46 template <
typename ordinal_type, 
typename value_type>
 
   53   bool limit_integration_order_) :
 
   56   limit_integration_order(limit_integration_order_),
 
   57   pce_sz(pce->basis()->size()),
 
   58   Cijk_matrix(pce_sz,pce_sz),
 
   59   weights(Teuchos::
Copy, 
 
   63   lanczos_vecs(pce_sz, p+1),
 
   78   for (
typename Cijk_type::k_iterator k_it = Cijk->k_begin();
 
   79        k_it != Cijk->k_end(); ++k_it) {
 
   81     for (
typename Cijk_type::kj_iterator j_it = Cijk->j_begin(k_it); 
 
   82    j_it != Cijk->j_end(k_it); ++j_it) {
 
   85       for (
typename Cijk_type::kji_iterator i_it = Cijk->i_begin(j_it);
 
   86      i_it != Cijk->i_end(j_it); ++i_it) {
 
  101 template <
typename ordinal_type, 
typename value_type>
 
  107 template <
typename ordinal_type, 
typename value_type>
 
  115 #ifdef STOKHOS_TEUCHOS_TIME_MONITOR 
  125   if (limit_integration_order && quad_order > 2*this->p)
 
  126     quad_order = 2*this->p;
 
  133   if (quad_weights.
size() < num_points) {
 
  135     quad_weights.
resize(num_points);
 
  136     quad_points.
resize(num_points);
 
  137     quad_values.resize(num_points);
 
  140       quad_points[i] = quad_points[0];
 
  141       quad_values[i].
resize(this->p+1);
 
  142       this->evaluateBases(quad_points[i], quad_values[i]);
 
  147 template <
typename ordinal_type, 
typename value_type>
 
  157 template <
typename ordinal_type, 
typename value_type>
 
  165 template <
typename ordinal_type, 
typename value_type>
 
  173       value_type(1.0), lanczos_vecs.values(), pce_sz, 
 
  178     out[i] /= pce_norms[i];
 
  181 template <
typename ordinal_type, 
typename value_type>
 
  203     lanczos_type::computeNormalized(n, vs, A, u0, *lv, alpha, beta, nrm);
 
  205     lanczos_type::compute(n, vs, A, u0, *lv, alpha, beta, nrm);
 
  231   return this->normalize;
 
  234 template <
typename ordinal_type, 
typename value_type>
 
  244     u[i] = (*pce)[i]*pce_norms[i];
 
  248     new_pce[i] /= this->norms[i];
 
  251 template <
typename ordinal_type, 
typename value_type> 
 
  256   limit_integration_order(basis.limit_integration_order),
 
  257   pce_sz(basis.pce_sz),
 
  258   pce_norms(basis.pce_norms),
 
  259   Cijk_matrix(basis.Cijk_matrix),
 
  260   weights(basis.weights),
 
  262   lanczos_vecs(pce_sz, p+1),
 
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
value_type getNewCoeffs(ordinal_type i) const 
Get new coefficients in this new basis. 
matrix_type Cijk_matrix
Triple-product matrix used in generating lanczos vectors. 
virtual Teuchos::RCP< OneDOrthogPolyBasis< ordinal_type, value_type > > cloneWithOrder(ordinal_type p) const 
Clone this object with the option of building a higher order basis. 
#define TEUCHOS_FUNC_TIME_MONITOR(FUNCNAME)
virtual void setup()
Setup basis after computing recurrence coefficients. 
Implementation of OneDOrthogPolyBasis based on the general three-term recurrence relationship:  for  ...
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format. 
~LanczosProjPCEBasis()
Destructor. 
void GEMV(ETransp trans, const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const A_type *A, const OrdinalType &lda, const x_type *x, const OrdinalType &incx, const beta_type beta, ScalarType *y, const OrdinalType &incy) const 
int multiply(ETransp transa, ETransp transb, ScalarType alpha, const SerialDenseMatrix< OrdinalType, ScalarType > &A, const SerialDenseMatrix< OrdinalType, ScalarType > &B, ScalarType beta)
virtual void getQuadPoints(ordinal_type quad_order, Teuchos::Array< value_type > &points, Teuchos::Array< value_type > &weights, Teuchos::Array< Teuchos::Array< value_type > > &values) const 
Compute quadrature points, weights, and values of basis polynomials at given set of points points...
RawPointerConversionTraits< Container >::Ptr_t getRawPtr(const Container &c)
Teuchos::RCP< const Stokhos::OrthogPolyApprox< ordinal_type, value_type > > pce
PCE Lanczos procedure is based on. 
virtual bool computeRecurrenceCoefficients(ordinal_type n, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const 
Compute recurrence coefficients. 
Teuchos::Array< value_type > pce_norms
Basis norms. 
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void transformCoeffsFromLanczos(const value_type *in, value_type *out) const 
Map expansion coefficients from this basis to original. 
vector_type u0
Initial Lanczos vector. 
KOKKOS_INLINE_FUNCTION PCE< Storage > ceil(const PCE< Storage > &a)
vector_type weights
Weighting vector used in inner-products. 
LanczosProjPCEBasis(ordinal_type p, const Teuchos::RCP< const Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > &Cijk, bool normalize, bool limit_integration_order=false)
Constructor. 
virtual void getQuadPoints(ordinal_type quad_order, Teuchos::Array< value_type > &points, Teuchos::Array< value_type > &weights, Teuchos::Array< Teuchos::Array< value_type > > &values) const 
Get Gauss quadrature points, weights, and values of basis at points. 
void resize(size_type new_size, const value_type &x=value_type())
Stokhos::Sparse3Tensor< int, double > Cijk_type
virtual void setup()
Setup basis after computing recurrence coefficients. 
ordinal_type pce_sz
Size of PC expansion. 
Generates three-term recurrence using the Lanczos procedure applied to a polynomial chaos expansion i...