44 template <
typename coeff_type>
52 template <
typename coeff_type>
56 const Teuchos::RCP<const Epetra_BlockMap>& theMap) :
62 template <
typename coeff_type>
66 const Teuchos::RCP<const Epetra_BlockMap>& theMap,
73 template <
typename coeff_type>
81 template <
typename coeff_type>
87 template <
typename coeff_type>
99 template <
typename coeff_type>
104 const Teuchos::RCP<const Epetra_BlockMap>& new_map,
111 template <
typename coeff_type>
120 template <
typename coeff_type>
125 Teuchos::RCP< const Stokhos::ProductBasis<ordinal_type, value_type> >
129 theTerm[dimension] = order;
131 return *(this->coeff_[this->map_->LID(
index)]);
134 template <
typename coeff_type>
139 Teuchos::RCP< const Stokhos::ProductBasis<ordinal_type, value_type> >
143 theTerm[dimension] = order;
145 return *(this->coeff_[this->map_->LID(
index)]);
148 template <
typename coeff_type>
151 evaluate(
const Teuchos::Array<value_type>& basis_values, coeff_type& result)
const 159 template <
typename coeff_type>
163 const Teuchos::Array<value_type>& basis_values,
164 const Teuchos::Array<value_type>& basis_norms,
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;
187 Teuchos::RCP< const Stokhos::ProductBasis<ordinal_type, value_type> >
190 if (product_basis != Teuchos::null) {
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]));
virtual ~VectorOrthogPoly()
Destructor.
SparseArrayIterator< index_iterator, value_iterator >::value_type index(const SparseArrayIterator< index_iterator, value_iterator > &it)
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.
Cloner for Epetra_Vector coefficients.
VectorOrthogPoly()
Constructor with no basis.
virtual ordinal_type dimension() const =0
Return dimension of basis.
VectorOrthogPoly & operator=(const VectorOrthogPoly &)
Assignment.
Abstract base class for multivariate orthogonal polynomials.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis() const
Get basis.
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
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_
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.
traits_type::ordinal_type ordinal_type
Typename of ordinals.
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
ordinal_type size() const
Size.
std::ostream & print(std::ostream &os) const
Print polynomial.
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.
traits_type::value_type value_type
Typename of values.
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.