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
179 Teuchos::RCP<ReadOnlyVector_GlobalEvaluationData>
181 int i)
182 {
183 return gedBlocks_[i];
184 } // end of getGEDBlock()
185
191 Teuchos::RCP<const ReadOnlyVector_GlobalEvaluationData>
193 int i) const
194 {
195 return gedBlocks_[i];
196 } // end of getGEDBlock()
197
205 bool
207 {
208 return false;
209 } // end of requiresDirichletAdjustment()
210
211 private:
212
218
222 std::vector<Teuchos::RCP<ReadOnlyVector_GlobalEvaluationData>>
224
228 Teuchos::RCP<const Thyra::VectorBase<double>> ownedVector_;
229
233 Teuchos::RCP<const Thyra::DefaultProductVectorSpace<double>>
235
236 }; // end of class BlockedVector_ReadOnly_GlobalEvaluationData
237
238} // end of namespace panzer
239
240#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.
Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > getGEDBlock(int i)
Get the i-th block (non const version).
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.
Teuchos::RCP< const ReadOnlyVector_GlobalEvaluationData > getGEDBlock(int i) const
Get the i-th block (const version).
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.