Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
31 #include "Panzer_ResponseBase.hpp"
32 
33 namespace panzer {
34 
35 template <typename EvalT>
37 public:
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 
61 
65  virtual void setVector(const Teuchos::RCP<Thyra::VectorBase<double> > & destVec) = 0;
66 
67 private:
68  // hide these methods
71 };
72 
73 template < >
75 public:
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 
107 private:
108  // hide these methods
111 };
112 
113 template < >
115 public:
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 
139 
143  virtual void setVector(const Teuchos::RCP<Thyra::MultiVectorBase<double> > & destVec) = 0;
144 
145 private:
146  // hide these methods
149 };
150 
151 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
152 template < >
154 public:
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 
174 private:
175  // hide these methods
178 };
179 
180 #endif
181 
182 }
183 
184 #endif
virtual void setVector(const Teuchos::RCP< Thyra::VectorBase< 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 std::string &responseName)