42 #ifndef STOKHOS_PRODUCT_CONTAINER_HPP 43 #define STOKHOS_PRODUCT_CONTAINER_HPP 46 #include "Teuchos_RCP.hpp" 47 #include "Teuchos_Array.hpp" 48 #include "Epetra_BlockMap.h" 60 template <
typename coeff_type>
112 void reset(
const Teuchos::RCP<const Epetra_BlockMap>&
map);
118 void reset(
const Teuchos::RCP<const Epetra_BlockMap>&
map,
125 void resize(
const Teuchos::RCP<const Epetra_BlockMap>&
map);
137 Teuchos::RCP<const Epetra_BlockMap>
map()
const;
140 const Teuchos::Array<Teuchos::RCP<coeff_type> >&
144 Teuchos::Array<Teuchos::RCP<coeff_type> >&
148 Teuchos::RCP<coeff_type>
152 Teuchos::RCP<const coeff_type>
168 bool myGID(
int i)
const;
171 std::ostream&
print(std::ostream& os)
const;
176 Teuchos::RCP<const Epetra_BlockMap>
map_;
179 Teuchos::Array< Teuchos::RCP<coeff_type> >
coeff_;
183 template <
typename coeff_type>
186 return vec.
print(os);
194 #endif // STOKHOS_PRODUCT_VECTOR_HPP ordinal_type size() const
Return size.
void setCoeffPtr(ordinal_type i, const Teuchos::RCP< coeff_type > &c)
Set coefficient i to c.
ProductContainer & operator=(const ProductContainer &)
Assignment.
bool myGID(int i) const
Return whether global index i resides on this processor.
void init(const value_type &val)
Initialize coefficients.
coeff_type & operator[](ordinal_type i)
Array access.
int ordinal_type
Typename of ordinals.
Cloner for Epetra_Vector coefficients.
Stokhos::ProductContainerTraits< coeff_type > traits_type
Typename of traits.
Teuchos::RCP< const Epetra_BlockMap > map() const
Return container map.
double value_type
Typename of values.
Base traits definition for ProductContainer.
Teuchos::RCP< const Epetra_BlockMap > map_
Container map.
void reset(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to new map map.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
virtual ~ProductContainer()
Destructor.
Teuchos::Array< Teuchos::RCP< coeff_type > > coeff_
Array of polynomial coefficients.
Top-level namespace for Stokhos classes and functions.
Teuchos::RCP< coeff_type > getCoeffPtr(ordinal_type i)
Return ref-count pointer to coefficient i.
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.
ProductContainer()
Default constructor.
std::ostream & print(std::ostream &os) const
Print polynomial.
traits_type::value_type value_type
Typename of values.
void reserve(ordinal_type sz)
Reserve space for a size sz container.
const Teuchos::Array< Teuchos::RCP< coeff_type > > & getCoefficients() const
Return array of coefficients.
void resize(const Teuchos::RCP< const Epetra_BlockMap > &map)
Resize to map map.