13 template <
typename ordinal_type,
typename value_type>
21 name(
"Monomial Proj Gram Schmidt PCE Basis")
23 this->
setup(max_p, pce, quad);
26 template <
typename ordinal_type,
typename value_type>
32 template <
typename ordinal_type,
typename value_type>
40 template <
typename ordinal_type,
typename value_type>
56 CPBUtils::compute_terms(max_p, this->d, max_sz, terms_, num_terms_);
75 SDM Bp(this->pce_sz, max_sz);
77 this->pce_basis->norm_squared();
82 Bp(i,
j) += weights[k]*B(k,
j)*A(k,i);
83 Bp(i,
j) /= basis_norms[i];
91 nrm += Bp(i,
j)*Bp(i,
j)*basis_norms[i];
103 for (
int i=0; i<this->d+1; i++)
107 this->orthogonalization_method, threshold, this->verbose, Bp, w,
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
KOKKOS_INLINE_FUNCTION PCE< Storage > pow(const PCE< Storage > &a, const PCE< Storage > &b)
int multiply(ETransp transa, ETransp transb, ScalarType alpha, const SerialDenseMatrix< OrdinalType, ScalarType > &A, const SerialDenseMatrix< OrdinalType, ScalarType > &B, ScalarType beta)
Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product me...
virtual ordinal_type buildReducedBasis(ordinal_type max_p, value_type threshold, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A, const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F, const Teuchos::Array< value_type > &weights, Teuchos::Array< Stokhos::MultiIndex< ordinal_type > > &terms_, Teuchos::Array< ordinal_type > &num_terms_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Qp_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Q_)
Build the reduced basis, parameterized by total order max_p.
void setup(ordinal_type p, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad)
virtual const std::string & getName() const
Return string name of basis.
Abstract base class for quadrature methods.
MonomialProjGramSchmidtPCEBasis(ordinal_type p, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad, const Teuchos::ParameterList ¶ms=Teuchos::ParameterList())
Constructor.
virtual ~MonomialProjGramSchmidtPCEBasis()
Destructor.
int reshape(OrdinalType numRows, OrdinalType numCols)
#define TEUCHOS_ASSERT(assertion_test)
Encapsulate various orthogonalization (ie QR) methods.