Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_ProductEpetraVector.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_PRODUCT_EPETRA_VECTOR_HPP
11 #define STOKHOS_PRODUCT_EPETRA_VECTOR_HPP
12 
15 #include "Epetra_BlockMap.h"
16 #include "EpetraExt_MultiComm.h"
17 #include "EpetraExt_BlockMultiVector.h"
18 
19 namespace Stokhos {
20 
25  public virtual ProductContainer<Epetra_Vector> {
26  public:
27 
29  typedef double value_type;
30 
32  typedef int ordinal_type;
33 
35 
40 
45 
51  const Teuchos::RCP<const Epetra_BlockMap>& block_map,
54 
59  /*
60  * This version supplies the generated product map \c product_map
61  */
63  const Teuchos::RCP<const Epetra_BlockMap>& block_map,
67 
73  const Teuchos::RCP<const Epetra_BlockMap>& block_map,
78  const Epetra_Vector& block_vector);
79 
81 
85 
87  virtual ~ProductEpetraVector();
88 
90 
94 
97 
99  void assignToBlockVector(Epetra_Vector& v) const;
100 
102  void assignFromBlockVector(const Epetra_Vector& v);
103 
106 
109 
112 
114 
117  void reset(
118  const Teuchos::RCP<const Epetra_BlockMap>& block_map,
121 
123 
126  void reset(
127  const Teuchos::RCP<const Epetra_BlockMap>& block_map,
131 
134  const Epetra_Vector& block_vector);
135 
138 
141 
144 
146 
149  void sumAll();
150 
151  protected:
152 
155 
158 
161 
164 
165  }; // class ProductEpetraVector
166 
167 } // end namespace Stokhos
168 
169 #endif // STOKHOS_PRODUCT_EPETRA_VECTOR_HPP
Teuchos::RCP< const Epetra_BlockMap > productMap() const
Get product map.
Teuchos::RCP< EpetraExt::BlockVector > getBlockVector()
Get block vector.
void reset(const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm)
Reset to a new size.
Teuchos::RCP< EpetraExt::BlockVector > bv
Block vector storing coefficients.
Teuchos::RCP< const Epetra_BlockMap > product_map
Product map of block vector.
Teuchos::RCP< const EpetraExt::MultiComm > productComm() const
Get product comm.
void assignToBlockVector(Epetra_Vector &v) const
Assignment.
void setBlockVector(const Teuchos::RCP< EpetraExt::BlockVector > &block_vec)
Set block vector.
ProductEpetraVector & operator=(const ProductEpetraVector &v)
Assignment.
Teuchos::RCP< const EpetraExt::MultiComm > product_comm
Product multi-level communicator.
A container class for products of Epetra_Vector&#39;s.
void resetCoefficients(Epetra_DataAccess CV, const Epetra_Vector &block_vector)
Reset vector cofficients.
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.
Teuchos::RCP< const Epetra_BlockMap > coeff_map
Product map of block vector.
Teuchos::RCP< const Epetra_BlockMap > coefficientMap() const
Get coefficient map.
void assignFromBlockVector(const Epetra_Vector &v)
Assignment.
Epetra_DataAccess
void sumAll()
Sum coefficients across processors, storing result in this.