Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ResponseMESupportBase.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_ResponseMESupportBase_hpp__
12#define __Panzer_ResponseMESupportBase_hpp__
13
14#include <string>
15
16#include "Teuchos_RCP.hpp"
17
18#include "PanzerDiscFE_config.hpp"
19#ifdef PANZER_HAVE_EPETRA_STACK
20#include "Epetra_Map.h"
21#include "Epetra_Vector.h"
22#include "Epetra_MultiVector.h"
23#include "Epetra_Operator.h"
24#endif
25
26#include "Thyra_VectorSpaceBase.hpp"
27#include "Thyra_VectorBase.hpp"
28#include "Thyra_MultiVectorBase.hpp"
29#include "Thyra_LinearOpBase.hpp"
30
32
33namespace panzer {
34
35template <typename EvalT>
37public:
38 ResponseMESupportBase(const std::string & responseName)
39 : ResponseBase(responseName) {}
40
42
43#ifdef PANZER_HAVE_EPETRA_STACK
44 // This is the epetra view of the world
46
48 virtual Teuchos::RCP<const Epetra_Map> getMap() const = 0;
49
53 virtual void setVector(const Teuchos::RCP<Epetra_Vector> & destVec) = 0;
54#endif
55
56 // This is the Thyra view of the world
58
60 virtual Teuchos::RCP<const Thyra::VectorSpaceBase<double> > getVectorSpace() const = 0;
61
65 virtual void setVector(const Teuchos::RCP<Thyra::VectorBase<double> > & destVec) = 0;
66
67private:
68 // hide these methods
71};
72
73template < >
75public:
76 ResponseMESupportBase(const std::string & responseName)
77 : ResponseBase(responseName) {}
78
80
82 virtual bool supportsDerivative() const = 0;
83
84#ifdef PANZER_HAVE_EPETRA_STACK
85 // This is the epetra view of the world
87
89 virtual Teuchos::RCP<Epetra_MultiVector> buildEpetraDerivative() const = 0;
90
93 virtual void setDerivative(const Teuchos::RCP<Epetra_MultiVector> & derivative) = 0;
94#endif
95
96 // This is the Thyra view of the world
98
100 virtual Teuchos::RCP<Thyra::MultiVectorBase<double> > buildDerivative() const = 0;
101
105 virtual void setDerivative(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & derivative) = 0;
106
107private:
108 // hide these methods
111};
112
113template < >
115public:
116 ResponseMESupportBase(const std::string & responseName)
117 : ResponseBase(responseName) {}
118
120
121#ifdef PANZER_HAVE_EPETRA_STACK
122 // This is the epetra view of the world
124
126 virtual Teuchos::RCP<const Epetra_Map> getMap() const = 0;
127
131 virtual void setVector(const Teuchos::RCP<Epetra_MultiVector> & destVec) = 0;
132#endif
133
134 // This is the Thyra view of the world
136
138 virtual Teuchos::RCP<const Thyra::VectorSpaceBase<double> > getVectorSpace() const = 0;
139
143 virtual void setVector(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & destVec) = 0;
144
145private:
146 // hide these methods
149};
150
151#ifdef Panzer_BUILD_HESSIAN_SUPPORT
152template < >
154public:
155 ResponseMESupportBase(const std::string & responseName)
156 : ResponseBase(responseName) {}
157
159
161 virtual bool supportsDerivative() const = 0;
162
163 // This is the Thyra view of the world
165
167 virtual Teuchos::RCP<Thyra::MultiVectorBase<double> > buildDerivative() const = 0;
168
172 virtual void setDerivative(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & derivative) = 0;
173
174private:
175 // hide these methods
178};
179
180#endif
181
182}
183
184#endif
virtual void setDerivative(const Teuchos::RCP< Thyra::MultiVectorBase< double > > &derivative)=0
virtual bool supportsDerivative() const =0
Does this response support derivative evaluation?
virtual Teuchos::RCP< Thyra::MultiVectorBase< double > > buildDerivative() const =0
Get an Epetra_Operator for this response, map is constructed lazily.
ResponseMESupportBase(const ResponseMESupportBase< panzer::Traits::Hessian > &)
virtual bool supportsDerivative() const =0
Does this response support derivative evaluation?
virtual Teuchos::RCP< Thyra::MultiVectorBase< double > > buildDerivative() const =0
Get an Epetra_Operator for this response, map is constructed lazily.
ResponseMESupportBase(const ResponseMESupportBase< panzer::Traits::Jacobian > &)
virtual void setDerivative(const Teuchos::RCP< Thyra::MultiVectorBase< double > > &derivative)=0
virtual void setVector(const Teuchos::RCP< Thyra::MultiVectorBase< double > > &destVec)=0
virtual Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getVectorSpace() const =0
Get the vector space for this response, vector space is constructed lazily.
ResponseMESupportBase(const ResponseMESupportBase< panzer::Traits::Tangent > &)
virtual Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getVectorSpace() const =0
Get the vector space for this response, vector space is constructed lazily.
ResponseMESupportBase(const ResponseMESupportBase< EvalT > &)
ResponseMESupportBase(const std::string &responseName)
virtual void setVector(const Teuchos::RCP< Thyra::VectorBase< double > > &destVec)=0