Panzer Version of the Day
Loading...
Searching...
No Matches
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
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<ReadOnlyVector_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<ReadOnlyVector_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<const Thyra::VectorBase<double>>& ownedVector);
145
151 virtual Teuchos::RCP<const 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
173
174#ifdef PANZER_HAVE_EPETRA_STACK
180 Teuchos::RCP<ReadOnlyVector_GlobalEvaluationData>
181 getGEDBlock(
182 int i)
183 {
184 return gedBlocks_[i];
185 } // end of getGEDBlock()
186
192 Teuchos::RCP<const ReadOnlyVector_GlobalEvaluationData>
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
230 Teuchos::RCP<const Thyra::VectorBase<double>> ownedVector_;
231
235 Teuchos::RCP<const Thyra::DefaultProductVectorSpace<double>>
237
238 }; // end of class BlockedVector_ReadOnly_GlobalEvaluationData
239
240} // end of namespace panzer
241
242#endif // __Panzer_BlockedVector_ReadOnly_GlobalEvaluationData_hpp__
This class encapsulates the needs of a gather operation to do a halo exchange for blocked vectors.
virtual Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector.
bool isInitialized_
A flag indicating whether or not the object has been initialized.
bool requiresDirichletAdjustment() const
Determine if a Dirichlet adjustment is necessary.
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.
Teuchos::RCP< const Thyra::VectorBase< double > > ownedVector_
The owned vector.
Teuchos::RCP< const Thyra::DefaultProductVectorSpace< double > > ghostedSpace_
The vector space corresponding to the ghosted vector.
std::vector< Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > > gedBlocks_
A vector of the GlobalEvaluationData blocks.
virtual void globalToGhost(int mem)
Communicate the owned data to the ghosted vector.
virtual void setOwnedVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &ownedVector)
Set the owned vector.
virtual Teuchos::RCP< const Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector.