Panzer Version of the Day
Loading...
Searching...
No Matches
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
29namespace Thyra
30{
31 template<typename> class DefaultProductVectorSpace;
32}
33
34namespace 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,
73 const std::vector<Teuchos::RCP<WriteVector_GlobalEvaluationData>>&
74 gedBlocks);
75
80 {
81 } // end of Destructor
82
98 void
100 const Teuchos::RCP<const Thyra::VectorSpaceBase<double>>& ghostedSpace,
101 const Teuchos::RCP<const Thyra::VectorSpaceBase<double>>& ownedSpace,
102 const std::vector<Teuchos::RCP<WriteVector_GlobalEvaluationData>>&
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
135
142 virtual void
144 const Teuchos::RCP<Thyra::VectorBase<double>>& ownedVector);
145
151 virtual Teuchos::RCP<Thyra::VectorBase<double>>
152 getOwnedVector() const;
153
159 virtual Teuchos::RCP<Thyra::VectorBase<double>>
160 getGhostedVector() const;
161
167 size_t
169 {
170 return gedBlocks_.size();
171 } // end of getBlockCount()
172
178 Teuchos::RCP<WriteVector_GlobalEvaluationData>
180 int i)
181 {
182 return gedBlocks_[i];
183 } // end of getGEDBlock()
184
190 Teuchos::RCP<const WriteVector_GlobalEvaluationData>
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
226 Teuchos::RCP<Thyra::VectorBase<double>> ownedVector_;
227
231 Teuchos::RCP<const Thyra::DefaultProductVectorSpace<double>>
233
234 }; // end of class BlockedVector_Write_GlobalEvaluationData
235
236} // end of namespace panzer
237
238#endif // __Panzer_BlockedVector_Write_GlobalEvaluationData_hpp__
This class encapsulates the needs of a gather operation to do a // halo exchange for blocked vectors....
bool isInitialized_
A flag indicating whether or not the object has been initialized.
virtual Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector.
bool requiresDirichletAdjustment() const
Determine if a Dirichlet adjustment is necessary.
virtual void ghostToGlobal(int mem)
Communicate the ghosted data to the owned vector.
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.
virtual void initializeData()
Initialize internal data for communication.
Teuchos::RCP< const Thyra::DefaultProductVectorSpace< double > > ghostedSpace_
The vector space corresponding to the ghosted vector.
virtual void setOwnedVector(const Teuchos::RCP< Thyra::VectorBase< double > > &ownedVector)
Set the owned vector.
virtual Teuchos::RCP< Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector.
Teuchos::RCP< Thyra::VectorBase< double > > ownedVector_
The owned vector.
Teuchos::RCP< WriteVector_GlobalEvaluationData > getGEDBlock(int i)
Get the i-th block (non const version).
Teuchos::RCP< const WriteVector_GlobalEvaluationData > getGEDBlock(int i) const
Get the i-th block (const version).