Panzer  Version of the Day
Panzer_ResponseMESupportBase.hpp
Go to the documentation of this file.
1 #ifndef __Panzer_ResponseMESupportBase_hpp__
2 #define __Panzer_ResponseMESupportBase_hpp__
3 
4 #include <string>
5 
6 #include "Teuchos_RCP.hpp"
7 
8 #include "Epetra_Map.h"
9 #include "Epetra_Vector.h"
10 #include "Epetra_MultiVector.h"
11 #include "Epetra_Operator.h"
12 
13 #include "Thyra_VectorSpaceBase.hpp"
14 #include "Thyra_VectorBase.hpp"
15 #include "Thyra_MultiVectorBase.hpp"
16 #include "Thyra_LinearOpBase.hpp"
17 
18 #include "Panzer_ResponseBase.hpp"
19 
20 namespace panzer {
21 
22 template <typename EvalT>
24 public:
25  ResponseMESupportBase(const std::string & responseName)
26  : ResponseBase(responseName) {}
27 
29 
30  // This is the epetra view of the world
32 
34  virtual Teuchos::RCP<const Epetra_Map> getMap() const = 0;
35 
39  virtual void setVector(const Teuchos::RCP<Epetra_Vector> & destVec) = 0;
40 
41  // This is the Thyra view of the world
43 
46 
50  virtual void setVector(const Teuchos::RCP<Thyra::VectorBase<double> > & destVec) = 0;
51 
52 private:
53  // hide these methods
56 };
57 
58 template < >
60 public:
61  ResponseMESupportBase(const std::string & responseName)
62  : ResponseBase(responseName) {}
63 
65 
67  virtual bool supportsDerivative() const = 0;
68 
69  // This is the epetra view of the world
71 
73  virtual Teuchos::RCP<Epetra_MultiVector> buildEpetraDerivative() const = 0;
74 
77  virtual void setDerivative(const Teuchos::RCP<Epetra_MultiVector> & derivative) = 0;
78 
79  // This is the Thyra view of the world
81 
83  virtual Teuchos::RCP<Thyra::MultiVectorBase<double> > buildDerivative() const = 0;
84 
88  virtual void setDerivative(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & derivative) = 0;
89 
90 private:
91  // hide these methods
94 };
95 
96 template < >
98 public:
99  ResponseMESupportBase(const std::string & responseName)
100  : ResponseBase(responseName) {}
101 
103 
104  // This is the epetra view of the world
106 
108  virtual Teuchos::RCP<const Epetra_Map> getMap() const = 0;
109 
113  virtual void setVector(const Teuchos::RCP<Epetra_MultiVector> & destVec) = 0;
114 
115  // This is the Thyra view of the world
117 
120 
124  virtual void setVector(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & destVec) = 0;
125 
126 private:
127  // hide these methods
130 };
131 
132 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
133 template < >
134 class ResponseMESupportBase<panzer::Traits::Hessian> : public ResponseBase {
135 public:
136  ResponseMESupportBase(const std::string & responseName)
137  : ResponseBase(responseName) {}
138 
139  virtual ~ResponseMESupportBase() {}
140 
142  virtual bool supportsDerivative() const = 0;
143 
144  // This is the Thyra view of the world
146 
148  virtual Teuchos::RCP<Thyra::MultiVectorBase<double> > buildDerivative() const = 0;
149 
153  virtual void setDerivative(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & derivative) = 0;
154 
155 private:
156  // hide these methods
158  ResponseMESupportBase(const ResponseMESupportBase<panzer::Traits::Hessian> &);
159 };
160 
161 #endif
162 
163 }
164 
165 #endif
virtual Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getVectorSpace() const =0
Get the vector space for this response, vector space is constructed lazily.
virtual Teuchos::RCP< const Epetra_Map > getMap() const =0
Get the Epetra_Map for this response, map is constructed lazily.
ResponseMESupportBase(const std::string &responseName)
virtual void setVector(const Teuchos::RCP< Epetra_Vector > &destVec)=0