Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_WriteVector_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_WriteVector_GlobalEvaluationData_hpp__
12#define __Panzer_WriteVector_GlobalEvaluationData_hpp__
13
14// Panzer
15#include "PanzerDiscFE_config.hpp"
16#ifdef PANZER_HAVE_EPETRA_STACK
18#endif
19
21
22// Teuchos
23#include "Teuchos_RCP.hpp"
24
25// Thyra
26#include "Thyra_VectorBase.hpp"
27
28namespace panzer {
29
34public:
35
38
41
44
47
50
52 virtual bool isInitialized() const = 0;
53
54
57 virtual void globalToGhost(int /* mem */) { }
58
62 virtual void ghostToGlobal(int mem) = 0;
63
65 virtual void setOwnedVector(const Teuchos::RCP<Thyra::VectorBase<double> > & ownedVector) = 0;
66
68 virtual Teuchos::RCP<Thyra::VectorBase<double> > getOwnedVector() const = 0;
69
71 virtual Teuchos::RCP<Thyra::VectorBase<double> > getGhostedVector() const = 0;
72
73#ifdef PANZER_HAVE_EPETRA_STACK
86 double&
87 operator[](
88 const int& lid)
89 {
90 if (lid < static_cast<int>(ownedView_.extent(0)))
91 return ownedView_(lid);
92 else // if (lid >= static_cast<int>(ownedView_.extent(0)))
93 return ghostedView_(lid - ownedView_.extent(0));
94 } // end of operator[]()
95
96protected:
97
102 ownedView_;
103
108 ghostedView_;
109#endif // PANZER_HAVE_EPETRA_STACK
110
111private:
112
114}; // end of class WriteVector_GlobalEvaluationData
115
116} // end of namespace panzer
117
118#endif // __Panzer_WriteVector_GlobalEvaluationData_hpp__
virtual Teuchos::RCP< Thyra::VectorBase< double > > getOwnedVector() const =0
Get the owned vector.
WriteVector_GlobalEvaluationData()
Default constructor, set combine mode to sum right away.
virtual Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const =0
Get the ghosted vector.
CombineMode getCombineMode() const
Get the combine mode, to be used by sub classes.
virtual void setOwnedVector(const Teuchos::RCP< Thyra::VectorBase< double > > &ownedVector)=0
Set the owned vector.
void setCombineMode(CombineMode cm)
Allow the user to set the combine mode (at any time)
CombineMode
when you gho from ghost to global, combine with a particular mode
virtual void ghostToGlobal(int mem)=0
virtual bool isInitialized() const =0
Is this object initialized.