Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_BlockedVector_ReadOnly_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_ReadOnly_GlobalEvaluationData_hpp__
12 #define __Panzer_BlockedVector_ReadOnly_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<const 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 
173 
174 #ifdef PANZER_HAVE_EPETRA_STACK
175 
181  getGEDBlock(
182  int i)
183  {
184  return gedBlocks_[i];
185  } // end of getGEDBlock()
186 
193  getGEDBlock(
194  int i) const
195  {
196  return gedBlocks_[i];
197  } // end of getGEDBlock()
198 #endif // PANZER_HAVE_EPETRA_STACK
199 
207  bool
209  {
210  return false;
211  } // end of requiresDirichletAdjustment()
212 
213  private:
214 
220 
224  std::vector<Teuchos::RCP<ReadOnlyVector_GlobalEvaluationData>>
226 
231 
237 
238  }; // end of class BlockedVector_ReadOnly_GlobalEvaluationData
239 
240 } // end of namespace panzer
241 
242 #endif // __Panzer_BlockedVector_ReadOnly_GlobalEvaluationData_hpp__
Teuchos::RCP< const Thyra::VectorBase< double > > ownedVector_
The owned vector.
bool requiresDirichletAdjustment() const
Determine if a Dirichlet adjustment is necessary.
std::vector< Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > > gedBlocks_
A vector of the GlobalEvaluationData blocks.
virtual void initializeData()
Initialize internal data for communication.
This class encapsulates the needs of a gather operation to do a halo exchange for blocked vectors...
virtual void globalToGhost(int mem)
Communicate the owned data to the ghosted vector.
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.
virtual Teuchos::RCP< const Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector.
virtual void setOwnedVector(const Teuchos::RCP< const Thyra::VectorBase< double >> &ownedVector)
Set the owned vector.
bool isInitialized_
A flag indicating whether or not the object has been initialized.
void initialize(const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ghostedSpace, const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ownedSpace, const std::vector< Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData >> &gedBlocks)
Initialize this object using the sub-GlobalEvaluationData objects.