44 template <
typename coeff_type>
52 template <
typename coeff_type>
62 template <
typename coeff_type>
67 const typename traits_type::cloner_type& cloner)
73 template <
typename coeff_type>
81 template <
typename coeff_type>
87 template <
typename coeff_type>
99 template <
typename coeff_type>
105 const typename traits_type::cloner_type& cloner)
111 template <
typename coeff_type>
120 template <
typename coeff_type>
129 theTerm[dimension] = order;
131 return *(this->coeff_[this->map_->LID(index)]);
134 template <
typename coeff_type>
143 theTerm[dimension] = order;
145 return *(this->coeff_[this->map_->LID(index)]);
148 template <
typename coeff_type>
159 template <
typename coeff_type>
165 const coeff_type& vec)
170 i_gid = this->map_->GID(i);
172 weight*basis_values[i_gid]/basis_norms[i_gid],
177 template <
typename coeff_type>
183 os <<
"Stokhos::VectorOrthogPoly of global size "
184 << this->map_->NumGlobalElements() <<
", local size " << sz <<
" in basis "
185 <<
"\n" << basis_->getName() <<
":" << std::endl;
193 os <<
"Term " << i <<
" (";
195 os << trm[
j] <<
", ";
196 os << trm[trm.
size()-1] <<
"):" << std::endl;
197 traits_type::print(os, *(this->coeff_[this->map_->LID(i)]));
202 os <<
"Term " << this->map_->GID(i) <<
":" << std::endl;
203 traits_type::print(os, *(this->coeff_[i]));
ProductContainer< coeff_type >::ordinal_type ordinal_type
Typename of ordinals.
virtual ~VectorOrthogPoly()
Destructor.
void sumIntoAllTerms(const value_type &weight, const Teuchos::Array< value_type > &basis_values, const Teuchos::Array< value_type > &basis_norms, const coeff_type &vec)
Evaluate polynomial at supplied basis values.
ProductContainer & operator=(const ProductContainer &)
Assignment.
ordinal_type size() const
Size.
VectorOrthogPoly()
Constructor with no basis.
std::ostream & print(std::ostream &os) const
Print polynomial.
VectorOrthogPoly & operator=(const VectorOrthogPoly &)
Assignment.
Abstract base class for multivariate orthogonal polynomials.
void reset(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to new map map.
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
Basis.
A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
void evaluate(const Teuchos::Array< value_type > &basis_values, coeff_type &result) const
Evaluate polynomial at supplied basis values.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis() const
Get basis.
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, const Teuchos::RCP< const Epetra_BlockMap > &new_map, const typename traits_type::cloner_type &cloner)
Reset to a new basis.
coeff_type & term(ordinal_type dimension, ordinal_type order)
Get term for dimension dimension and order order.
void update(const ValueType &alpha, VectorType &x, const ValueType &beta, const VectorType &y)
ProductContainer< coeff_type >::value_type value_type
Typename of values.