Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_BlockedVector_Write_GlobalEvaluationData.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef __Panzer_BlockedVector_Write_GlobalEvaluationData_hpp__
12 #define __Panzer_BlockedVector_Write_GlobalEvaluationData_hpp__
13 
15 //
16 // Include Files
17 //
19 
20 // Panzer
22 
24 //
25 // Forward Declarations
26 //
28 
29 namespace Thyra
30 {
31  template<typename> class DefaultProductVectorSpace;
32 }
33 
34 namespace panzer
35 { //
41  : //
43  {
44  public:
45 
50 
58 
71  const Teuchos::RCP<const Thyra::VectorSpaceBase<double>> ghostedSpace,
72  const Teuchos::RCP<const Thyra::VectorSpaceBase<double>> ownedSpace,
74  gedBlocks);
75 
80  {
81  } // end of Destructor
82 
98  void
99  initialize(
100  const Teuchos::RCP<const Thyra::VectorSpaceBase<double>>& ghostedSpace,
101  const Teuchos::RCP<const Thyra::VectorSpaceBase<double>>& ownedSpace,
103  gedBlocks);
104 
110  virtual bool
112  {
113  return isInitialized_;
114  } // end of isInitialized()
115 
124  virtual void
126  int mem);
127 
133  virtual void
134  initializeData();
135 
142  virtual void
144  const Teuchos::RCP<Thyra::VectorBase<double>>& ownedVector);
145 
152  getOwnedVector() const;
153 
160  getGhostedVector() const;
161 
167  size_t
169  {
170  return gedBlocks_.size();
171  } // end of getBlockCount()
172 
180  int i)
181  {
182  return gedBlocks_[i];
183  } // end of getGEDBlock()
184 
192  int i) const
193  {
194  return gedBlocks_[i];
195  } // end of getGEDBlock()
196 
204  bool
206  {
207  return false;
208  } // end of requiresDirichletAdjustment()
209 
210  private:
211 
217 
221  std::vector<Teuchos::RCP<WriteVector_GlobalEvaluationData>> gedBlocks_;
222 
227 
233 
234  }; // end of class BlockedVector_Write_GlobalEvaluationData
235 
236 } // end of namespace panzer
237 
238 #endif // __Panzer_BlockedVector_Write_GlobalEvaluationData_hpp__
std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData > > gedBlocks_
A vector of the GlobalEvaluationData blocks.
void initialize(const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ghostedSpace, const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ownedSpace, const std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData >> &gedBlocks)
Initialize this object using the sub-GlobalEvaluationData objects.
This class encapsulates the needs of a gather operation to do a // halo exchange for blocked vectors...
virtual void ghostToGlobal(int mem)
Communicate the ghosted data to the owned vector.
virtual void setOwnedVector(const Teuchos::RCP< Thyra::VectorBase< double >> &ownedVector)
Set the owned vector.
Teuchos::RCP< const WriteVector_GlobalEvaluationData > getGEDBlock(int i) const
Get the i-th block (const version).
virtual Teuchos::RCP< Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector.
Teuchos::RCP< Thyra::VectorBase< double > > ownedVector_
The owned vector.
virtual void initializeData()
Initialize internal data for communication.
virtual Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector.
Teuchos::RCP< const Thyra::DefaultProductVectorSpace< double > > ghostedSpace_
The vector space corresponding to the ghosted vector.
bool requiresDirichletAdjustment() const
Determine if a Dirichlet adjustment is necessary.
bool isInitialized_
A flag indicating whether or not the object has been initialized.
Teuchos::RCP< WriteVector_GlobalEvaluationData > getGEDBlock(int i)
Get the i-th block (non const version).