Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_EpetraVector_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_EpetraVector_Write_GlobalEvaluationData_hpp__
12#define __Panzer_EpetraVector_Write_GlobalEvaluationData_hpp__
13
15//
16// Include Files
17//
19
20// Epetra
21#include "Epetra_Export.h"
22#include "Epetra_Map.h"
23#include "Epetra_Vector.h"
24
25// Panzer
27
28// Teuchos
29#include "Teuchos_RCP.hpp"
30
31// Thyra
32#include "Thyra_VectorSpaceBase.hpp"
33#include "Thyra_VectorBase.hpp"
34
35namespace panzer
36{
37
45 :
47 {
48 public:
49
54 :
55 isInitialized_(false)
56 {
57 } // end of Default Constructor
58
66 :
67 isInitialized_(false)
68 {
70 } // end of Copy Constructor
71
84 const Teuchos::RCP<const Epetra_Export>& exporter,
85 const Teuchos::RCP<const Epetra_Map>& ghostedMap,
86 const Teuchos::RCP<const Epetra_Map>& ownedMap)
87 :
88 isInitialized_(false)
89 {
90 initialize(exporter, ghostedMap, ownedMap);
91 } // end of Initializing Constructor
92
104 void
106 const Teuchos::RCP<const Epetra_Export>& exporter,
107 const Teuchos::RCP<const Epetra_Map>& ghostedMap,
108 const Teuchos::RCP<const Epetra_Map>& ownedMap);
109
118 virtual void
120 int mem);
121
125 virtual void
127
133 virtual bool
135 {
136 return false;
137 } // end of requiresDirichletAdjustment()
138
145 void
147 const Teuchos::RCP<Epetra_Vector>& ownedVector);
148
154 Teuchos::RCP<Epetra_Vector>
156
163 void
165 const Teuchos::RCP<Thyra::VectorBase<double>>& ownedVector);
166
172 Teuchos::RCP<Thyra::VectorBase<double>>
173 getOwnedVector() const;
174
180 Teuchos::RCP<Thyra::VectorBase<double>>
181 getGhostedVector() const;
182
188 virtual bool
190 {
191 return isInitialized_;
192 } // end of isInitialized()
193
202 void
203 print(
204 std::ostream& os) const;
205
206 private:
207
213
217 Teuchos::RCP<const Epetra_Map> ghostedMap_;
218
222 Teuchos::RCP<const Epetra_Map> ownedMap_;
223
227 Teuchos::RCP<const Thyra::VectorSpaceBase<double>> ghostedSpace_;
228
232 Teuchos::RCP<const Thyra::VectorSpaceBase<double>> ownedSpace_;
233
238 Teuchos::RCP<const Epetra_Export> exporter_;
239
243 Teuchos::RCP<Epetra_Vector> ghostedVector_;
244
248 Teuchos::RCP<Thyra::VectorBase<double>> ownedVector_;
249
250 }; // end of class EpetraVector_Write_GlobalEvaluationData
251
252} // end of namespace panzer
253
254#endif // __Panzer_EpetraVector_Write_GlobalEvaluationData_hpp__
This class provides a boundary exchange communication mechanism for vectors.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ownedSpace_
The vector space corresponding to the owned vector.
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector (Thyra version).
Teuchos::RCP< const Epetra_Map > ghostedMap_
The map corresponding to the ghosted vector.
void initialize(const Teuchos::RCP< const Epetra_Export > &exporter, const Teuchos::RCP< const Epetra_Map > &ghostedMap, const Teuchos::RCP< const Epetra_Map > &ownedMap)
Initialize this object with some Epetra communication objects.
Teuchos::RCP< const Epetra_Export > exporter_
The exporter used to communicate between the owned and ghosted vectors.
virtual void ghostToGlobal(int mem)
Communicate the ghosted data to the owned vector.
void setOwnedVector(const Teuchos::RCP< Thyra::VectorBase< double > > &ownedVector)
Set the owned vector (Thyra version).
Teuchos::RCP< Epetra_Vector > getGhostedVector_Epetra() const
Get the ghosted vector (Epetra version).
virtual 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< const Epetra_Map > ownedMap_
The map corresponding to the owned vector.
virtual void initializeData()
Clear out the ghosted vector. // JMG: Is this right?
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedSpace_
The vector space corresponding to the ghosted vector.
Teuchos::RCP< Thyra::VectorBase< double > > ownedVector_
The owned vector.
EpetraVector_Write_GlobalEvaluationData(const Teuchos::RCP< const Epetra_Export > &exporter, const Teuchos::RCP< const Epetra_Map > &ghostedMap, const Teuchos::RCP< const Epetra_Map > &ownedMap)
Initializing Constructor.
EpetraVector_Write_GlobalEvaluationData(const EpetraVector_Write_GlobalEvaluationData &src)
Copy Constructor.
Teuchos::RCP< Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector (Thyra version).
void setOwnedVector_Epetra(const Teuchos::RCP< Epetra_Vector > &ownedVector)
Set the owned vector (Epetra version).