42 #ifndef EPETRA_EXT_MODEL_EVALUATOR_HPP 43 #define EPETRA_EXT_MODEL_EVALUATOR_HPP 47 #include "Teuchos_RCP.hpp" 48 #include "Teuchos_Describable.hpp" 49 #include "Teuchos_Polynomial.hpp" 50 #include "Teuchos_Array.hpp" 51 #include "Teuchos_CompilerCodeTweakMacros.hpp" 53 #ifdef HAVE_PYTRILINOS 56 typedef _object PyObject;
62 class Epetra_Operator;
66 class EpetraVectorOrthogPoly;
67 class EpetraMultiVectorOrthogPoly;
68 class EpetraOperatorOrthogPoly;
70 template <
typename ordinal_type,
typename scalar_type>
class Quadrature;
74 class ProductEpetraVector;
75 class ProductEpetraMultiVector;
76 class ProductEpetraOperator;
94 typedef Teuchos::RCP<Stokhos::ProductEpetraVector>
mp_vector_t;
114 ,IN_ARG_x_dotdot_poly
119 ,IN_ARG_sg_quadrature
122 static const int NUM_E_IN_ARGS_MEMBERS=21;
144 std::string modelEvalDescription()
const;
148 void set_x_dot(
const Teuchos::RCP<const Epetra_Vector> &x_dot );
150 void set_x_dotdot(
const Teuchos::RCP<const Epetra_Vector> &x_dotdot );
152 Teuchos::RCP<const Epetra_Vector> get_x_dot()
const;
154 Teuchos::RCP<const Epetra_Vector> get_x_dotdot()
const;
156 void set_x(
const Teuchos::RCP<const Epetra_Vector> &x );
158 Teuchos::RCP<const Epetra_Vector> get_x()
const;
160 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly
163 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_poly()
const;
166 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly
168 void set_x_dotdot_poly(
169 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dotdot_poly
172 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_dot_poly()
const;
173 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_dotdot_poly()
const;
175 void set_x_sg(
const sg_const_vector_t &x_sg);
177 sg_const_vector_t get_x_sg()
const;
179 void set_x_dot_sg(
const sg_const_vector_t &x_dot_sg);
180 void set_x_dotdot_sg(
const sg_const_vector_t &x_dotdot_sg);
182 sg_const_vector_t get_x_dot_sg()
const;
183 sg_const_vector_t get_x_dotdot_sg()
const;
185 void set_x_mp(
const mp_const_vector_t &x_mp);
187 mp_const_vector_t get_x_mp()
const;
189 void set_x_dot_mp(
const mp_const_vector_t &x_dot_mp);
190 void set_x_dotdot_mp(
const mp_const_vector_t &x_dotdot_mp);
192 mp_const_vector_t get_x_dot_mp()
const;
193 mp_const_vector_t get_x_dotdot_mp()
const;
195 void set_p(
int l,
const Teuchos::RCP<const Epetra_Vector> &p_l );
197 Teuchos::RCP<const Epetra_Vector> get_p(
int l)
const;
199 void set_p_sg(
int l,
const sg_const_vector_t &p_sg_l );
201 sg_const_vector_t get_p_sg(
int l)
const;
203 void set_p_mp(
int l,
const mp_const_vector_t &p_mp_l );
205 mp_const_vector_t get_p_mp(
int l)
const;
207 void set_t(
double t );
209 double get_alpha()
const;
211 void set_alpha(
double alpha );
214 double get_omega()
const;
216 void set_omega(
double omega );
217 double get_beta()
const;
219 void set_beta(
double beta );
221 double get_t()
const;
222 double get_step_size()
const;
223 void set_step_size(
double step_size);
224 int get_stage_number()
const;
225 void set_stage_number(
int stage_number);
227 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > get_sg_basis()
const;
231 Teuchos::RCP<const Stokhos::Quadrature<int,double> > get_sg_quadrature()
const;
235 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > get_sg_expansion()
const;
246 void _setModelEvalDescription(
const std::string &modelEvalDescription );
248 void _set_Np(
int Np);
252 void _setSupports(
EInArgs_p_sg arg,
int l,
bool supports );
254 void _setSupports(
EInArgs_p_mp arg,
int l,
bool supports );
257 typedef Teuchos::Array<Teuchos::RCP<const Epetra_Vector> > p_t;
258 typedef Teuchos::Array<sg_const_vector_t > p_sg_t;
259 typedef Teuchos::Array<mp_const_vector_t > p_mp_t;
260 typedef Teuchos::Array<bool> supports_p_sg_t;
262 std::string modelEvalDescription_;
263 Teuchos::RCP<const Epetra_Vector> x_dot_;
264 Teuchos::RCP<const Epetra_Vector> x_dotdot_;
265 Teuchos::RCP<const Epetra_Vector> x_;
266 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dot_poly_;
267 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dotdot_poly_;
268 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_poly_;
269 sg_const_vector_t x_dot_sg_;
270 sg_const_vector_t x_dotdot_sg_;
271 sg_const_vector_t x_sg_;
272 mp_const_vector_t x_dot_mp_;
273 mp_const_vector_t x_dotdot_mp_;
274 mp_const_vector_t x_mp_;
284 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > sg_basis_;
285 Teuchos::RCP<const Stokhos::Quadrature<int,double> > sg_quad_;
286 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > sg_exp_;
287 bool supports_[NUM_E_IN_ARGS_MEMBERS];
288 supports_p_sg_t supports_p_sg_;
289 supports_p_sg_t supports_p_mp_;
294 void assert_l(
int l)
const;
300 ,EVAL_TYPE_APPROX_DERIV
301 ,EVAL_TYPE_VERY_APPROX_DERIV
305 template<
class ObjType>
312 :
Teuchos::RCP<ObjType>(obj), evalType_(EVAL_TYPE_EXACT) {}
315 :
Teuchos::RCP<ObjType>(obj), evalType_(evalType) {}
320 { this->operator=(obj); evalType_ = evalType; }
328 ,DERIV_TRANS_MV_BY_ROW
339 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
343 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
347 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==DERIV_MV_BY_COL)
348 ,supportsTransMVByRow_(mvOrientation==DERIV_TRANS_MV_BY_ROW)
353 :supportsLinearOp_(true), supportsMVByCol_(mvOrientation==DERIV_MV_BY_COL)
354 ,supportsTransMVByRow_(mvOrientation==DERIV_TRANS_MV_BY_ROW)
361 :supportsLinearOp_(false)
363 mvOrientation1==DERIV_MV_BY_COL||mvOrientation2==DERIV_MV_BY_COL )
364 ,supportsTransMVByRow_(
365 mvOrientation1==DERIV_TRANS_MV_BY_ROW||mvOrientation2==DERIV_TRANS_MV_BY_ROW )
369 { supportsLinearOp_ =
true;
return *
this; }
373 switch(mvOrientation) {
374 case DERIV_MV_BY_COL: supportsMVByCol_ =
true;
break;
375 case DERIV_TRANS_MV_BY_ROW: supportsTransMVByRow_ =
true;
break;
376 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
382 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
385 {
return supportsLinearOp_; }
389 switch(mvOrientation) {
390 case DERIV_MV_BY_COL:
return supportsMVByCol_;
391 case DERIV_TRANS_MV_BY_ROW:
return supportsTransMVByRow_;
392 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
394 TEUCHOS_UNREACHABLE_RETURN(
false);
397 bool supportsLinearOp_;
398 bool supportsMVByCol_;
399 bool supportsTransMVByRow_;
405 DERIV_LINEARITY_UNKNOWN
406 ,DERIV_LINEARITY_CONST
407 ,DERIV_LINEARITY_NONCONST
413 ,DERIV_RANK_DEFICIENT
426 :linearity(DERIV_LINEARITY_UNKNOWN),rank(DERIV_RANK_UNKNOWN),supportsAdjoint(false) {}
430 ):linearity(in_linearity),rank(in_rank),supportsAdjoint(in_supportsAdjoint) {}
442 const Teuchos::RCP<Epetra_MultiVector> &mv
444 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
445 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
448 { orientation_ = orientation; };
454 {
return orientation_; }
457 {
return paramIndexes_; }
459 Teuchos::RCP<Epetra_MultiVector> mv_;
461 Teuchos::Array<int> paramIndexes_;
476 const Teuchos::RCP<Epetra_MultiVector> &mv
478 ) : dmv_(mv,orientation) {}
487 {
return dmv_.getMultiVector(); }
490 {
return dmv_.getOrientation(); }
496 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
498 Teuchos::RCP<Epetra_Operator> lo_;
510 bool isAlreadyInverted_ )
511 : PrecOp(PrecOp_), isAlreadyInverted(isAlreadyInverted_) {}
530 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
532 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
533 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
536 { orientation_ = orientation; };
542 {
return orientation_; }
545 {
return paramIndexes_; }
547 Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > mv_;
549 Teuchos::Array<int> paramIndexes_;
560 SGDerivative(
const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &lo )
564 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
566 ) : dmv_(mv,orientation) {}
571 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly >
getLinearOp()
const 575 {
return dmv_.getMultiVector(); }
578 {
return dmv_.getOrientation(); }
584 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
586 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > lo_;
600 const mp_multivector_t &mv
602 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
603 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
606 { orientation_ = orientation; };
612 {
return orientation_; }
615 {
return paramIndexes_; }
617 mp_multivector_t mv_;
619 Teuchos::Array<int> paramIndexes_;
635 const mp_multivector_t &mv
637 ) : dmv_(mv,orientation) {}
646 {
return dmv_.getMultiVector(); }
649 {
return dmv_.getOrientation(); }
655 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
672 static const int NUM_E_OUT_ARGS_MEMBERS=9;
716 OUT_ARG_DgDx_dotdot_sg
746 OUT_ARG_DgDx_dotdot_mp
764 typedef Teuchos::RCP<Stokhos::EpetraVectorOrthogPoly>
sg_vector_t;
772 std::string modelEvalDescription()
const;
815 void set_f_sg(
const sg_vector_t& f_sg );
817 sg_vector_t get_f_sg()
const;
819 void set_f_mp(
const mp_vector_t& f_mp );
821 mp_vector_t get_f_mp()
const;
828 void set_g_sg(
int j,
const sg_vector_t &g_sg_j );
831 sg_vector_t get_g_sg(
int j)
const;
834 void set_g_mp(
int j,
const mp_vector_t &g_mp_j );
837 mp_vector_t get_g_mp(
int j)
const;
839 void set_W(
const Teuchos::RCP<Epetra_Operator> &W );
840 void set_WPrec(
const Teuchos::RCP<Epetra_Operator> &WPrec );
842 Teuchos::RCP<Epetra_Operator> get_W()
const;
843 Teuchos::RCP<Epetra_Operator> get_WPrec()
const;
848 void set_W_sg(
const sg_operator_t& W_sg );
850 sg_operator_t get_W_sg()
const;
852 void set_W_mp(
const mp_operator_t& W_sg );
854 mp_operator_t get_W_mp()
const;
856 void set_DfDp(
int l,
const Derivative &DfDp_l);
874 void set_DgDx_dot(
int j,
const Derivative &DgDx_dot_j);
875 void set_DgDx_dotdot(
int j,
const Derivative &DgDx_dotdot_j);
883 void set_DgDx_dot_sg(
int j,
const SGDerivative &DgDx_dot_j);
884 void set_DgDx_dotdot_sg(
int j,
const SGDerivative &DgDx_dotdot_j);
892 void set_DgDx_dot_mp(
int j,
const MPDerivative &DgDx_dot_j);
893 void set_DgDx_dotdot_mp(
int j,
const MPDerivative &DgDx_dotdot_j);
901 void set_DgDx(
int j,
const Derivative &DgDx_j);
919 void set_DgDp(
int j,
int l,
const Derivative &DgDp_j_l );
925 void set_DgDp_sg(
int j,
int l,
const SGDerivative &DgDp_sg_j_l );
931 void set_DgDp_mp(
int j,
int l,
const MPDerivative &DgDp_mp_j_l );
938 void set_f_poly(
const Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > &f_poly );
940 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > get_f_poly()
const;
951 void setFailed()
const;
957 bool isFailed()
const;
961 void _setModelEvalDescription(
const std::string &modelEvalDescription );
963 void _set_Np_Ng(
int Np,
int Ng);
976 void _setSupports(
EOutArgs_g_sg arg,
int j,
bool supports );
988 void _setSupports(
EOutArgs_g_mp arg,
int j,
bool supports );
1031 typedef Teuchos::Array<Evaluation<Epetra_Vector> > g_t;
1032 typedef Teuchos::Array<sg_vector_t > g_sg_t;
1033 typedef Teuchos::Array<mp_vector_t > g_mp_t;
1034 typedef Teuchos::Array<Derivative> deriv_t;
1035 typedef Teuchos::Array<SGDerivative> sg_deriv_t;
1036 typedef Teuchos::Array<MPDerivative> mp_deriv_t;
1037 typedef Teuchos::Array<DerivativeProperties> deriv_properties_t;
1038 typedef Teuchos::Array<DerivativeSupport> supports_t;
1039 typedef Teuchos::Array<bool> supports_g_sg_t;
1041 std::string modelEvalDescription_;
1042 mutable bool isFailed_;
1043 bool supports_[NUM_E_OUT_ARGS_MEMBERS];
1044 supports_t supports_DfDp_;
1045 supports_t supports_DgDx_dot_;
1046 supports_t supports_DgDx_dotdot_;
1047 supports_t supports_DgDx_;
1048 supports_t supports_DgDp_;
1049 supports_g_sg_t supports_g_sg_;
1050 supports_t supports_DfDp_sg_;
1051 supports_t supports_DgDx_dot_sg_;
1052 supports_t supports_DgDx_dotdot_sg_;
1053 supports_t supports_DgDx_sg_;
1054 supports_t supports_DgDp_sg_;
1055 supports_g_sg_t supports_g_mp_;
1056 supports_t supports_DfDp_mp_;
1057 supports_t supports_DgDx_dot_mp_;
1058 supports_t supports_DgDx_dotdot_mp_;
1059 supports_t supports_DgDx_mp_;
1060 supports_t supports_DgDp_mp_;
1065 Teuchos::RCP<Epetra_Operator> W_;
1066 Teuchos::RCP<Epetra_Operator> WPrec_;
1070 deriv_properties_t DfDp_properties_;
1072 deriv_t DgDx_dotdot_;
1074 deriv_properties_t DgDx_dot_properties_;
1075 deriv_properties_t DgDx_dotdot_properties_;
1076 deriv_properties_t DgDx_properties_;
1078 deriv_properties_t DgDp_properties_;
1079 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > f_poly_;
1081 sg_operator_t W_sg_;
1082 sg_deriv_t DfDp_sg_;
1083 deriv_properties_t DfDp_sg_properties_;
1084 sg_deriv_t DgDx_dot_sg_;
1085 sg_deriv_t DgDx_dotdot_sg_;
1086 sg_deriv_t DgDx_sg_;
1087 deriv_properties_t DgDx_dot_sg_properties_;
1088 deriv_properties_t DgDx_dotdot_sg_properties_;
1089 deriv_properties_t DgDx_sg_properties_;
1090 sg_deriv_t DgDp_sg_;
1091 deriv_properties_t DgDp_sg_properties_;
1093 mp_operator_t W_mp_;
1094 mp_deriv_t DfDp_mp_;
1095 deriv_properties_t DfDp_mp_properties_;
1096 mp_deriv_t DgDx_dot_mp_;
1097 mp_deriv_t DgDx_dotdot_mp_;
1098 mp_deriv_t DgDx_mp_;
1099 deriv_properties_t DgDx_dot_mp_properties_;
1100 deriv_properties_t DgDx_dotdot_mp_properties_;
1101 deriv_properties_t DgDx_mp_properties_;
1102 mp_deriv_t DgDp_mp_;
1103 deriv_properties_t DgDp_mp_properties_;
1110 void assert_supports(
EOutArgsDgDp arg,
int j,
int l)
const;
1123 void assert_l(
int l)
const;
1124 void assert_j(
int j)
const;
1141 virtual Teuchos::RCP<const Epetra_Map> get_x_map()
const = 0;
1144 virtual Teuchos::RCP<const Epetra_Map> get_f_map()
const = 0;
1147 virtual Teuchos::RCP<const Epetra_Map> get_p_map(
int l)
const;
1163 virtual Teuchos::RCP<const Teuchos::Array<std::string> > get_p_names(
int l)
const;
1166 virtual Teuchos::RCP<const Epetra_Map> get_g_map(
int j)
const;
1182 virtual Teuchos::ArrayView<const std::string> get_g_names(
int j)
const;
1190 virtual Teuchos::RCP<const Epetra_Vector> get_x_init()
const;
1193 virtual Teuchos::RCP<const Epetra_Vector> get_x_dot_init()
const;
1196 virtual Teuchos::RCP<const Epetra_Vector> get_x_dotdot_init()
const;
1199 virtual Teuchos::RCP<const Epetra_Vector> get_p_init(
int l)
const;
1202 virtual double get_t_init()
const;
1213 virtual double getInfBound()
const;
1216 virtual Teuchos::RCP<const Epetra_Vector> get_x_lower_bounds()
const;
1219 virtual Teuchos::RCP<const Epetra_Vector> get_x_upper_bounds()
const;
1222 virtual Teuchos::RCP<const Epetra_Vector> get_p_lower_bounds(
int l)
const;
1225 virtual Teuchos::RCP<const Epetra_Vector> get_p_upper_bounds(
int l)
const;
1228 virtual double get_t_lower_bound()
const;
1231 virtual double get_t_upper_bound()
const;
1244 virtual Teuchos::RCP<Epetra_Operator> create_W()
const;
1245 virtual Teuchos::RCP<EpetraExt::ModelEvaluator::Preconditioner> create_WPrec()
const;
1248 virtual Teuchos::RCP<Epetra_Operator> create_DfDp_op(
int l)
const;
1251 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_dot_op(
int j)
const;
1254 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_dotdot_op(
int j)
const;
1257 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_op(
int j)
const;
1260 virtual Teuchos::RCP<Epetra_Operator> create_DgDp_op(
int j,
int l )
const;
1268 virtual InArgs createInArgs()
const = 0;
1271 virtual OutArgs createOutArgs()
const = 0;
1274 virtual void evalModel(
const InArgs& inArgs,
const OutArgs& outArgs )
const = 0;
1276 #ifdef HAVE_PYTRILINOS 1278 friend InArgs convertInArgsFromPython(PyObject * source);
1281 friend OutArgs convertOutArgsFromPython(PyObject * source);
1294 void setModelEvalDescription(
const std::string &modelEvalDescription );
1296 void set_Np(
int Np);
1300 void setSupports(
EInArgs_p_sg arg,
int l,
bool supports );
1302 void setSupports(
EInArgs_p_mp arg,
int l,
bool supports );
1309 void setModelEvalDescription(
const std::string &modelEvalDescription );
1311 void set_Np_Ng(
int Np,
int Ng);
1324 void setSupports(
EOutArgs_g_sg arg,
int j,
bool supports );
1335 void setSupports(
EOutArgs_g_mp arg,
int j,
bool supports );
1394 Teuchos::RCP<Epetra_Operator>
1396 const std::string &modelEvalDescription,
1398 const std::string &derivName
1402 Teuchos::RCP<Epetra_MultiVector>
1404 const std::string &modelEvalDescription,
1406 const std::string &derivName,
1411 Teuchos::RCP<Epetra_Operator>
1418 Teuchos::RCP<Epetra_MultiVector>
1425 Teuchos::RCP<Epetra_MultiVector>
1433 Teuchos::RCP<Epetra_MultiVector>
1441 Teuchos::RCP<Epetra_MultiVector>
1449 Teuchos::RCP<Epetra_MultiVector>
1465 std::string ModelEvaluator::InArgs::modelEvalDescription()
const 1466 {
return modelEvalDescription_; }
1469 int ModelEvaluator::InArgs::Np()
const 1470 {
return p_.size(); }
1473 void ModelEvaluator::InArgs::set_x_dot(
const Teuchos::RCP<const Epetra_Vector> &x_dot )
1474 { assert_supports(IN_ARG_x_dot); x_dot_ = x_dot; }
1477 void ModelEvaluator::InArgs::set_x_dotdot(
const Teuchos::RCP<const Epetra_Vector> &x_dotdot )
1478 { assert_supports(IN_ARG_x_dotdot); x_dotdot_ = x_dotdot; }
1481 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x_dot()
const 1482 { assert_supports(IN_ARG_x_dot);
return x_dot_; }
1485 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x_dotdot()
const 1486 { assert_supports(IN_ARG_x_dotdot);
return x_dotdot_; }
1489 void ModelEvaluator::InArgs::set_x(
const Teuchos::RCP<const Epetra_Vector> &x )
1490 { assert_supports(IN_ARG_x); x_ = x; }
1493 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x()
const 1494 { assert_supports(IN_ARG_x);
return x_; }
1497 void ModelEvaluator::InArgs::set_x_dot_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly )
1498 { assert_supports(IN_ARG_x_dot_poly); x_dot_poly_ = x_dot_poly; }
1501 void ModelEvaluator::InArgs::set_x_dotdot_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dotdot_poly )
1502 { assert_supports(IN_ARG_x_dotdot_poly); x_dotdot_poly_ = x_dotdot_poly; }
1505 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1506 ModelEvaluator::InArgs::get_x_dot_poly()
const 1507 { assert_supports(IN_ARG_x_dot_poly);
return x_dot_poly_; }
1510 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1511 ModelEvaluator::InArgs::get_x_dotdot_poly()
const 1512 { assert_supports(IN_ARG_x_dotdot_poly);
return x_dotdot_poly_; }
1515 void ModelEvaluator::InArgs::set_x_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly )
1516 { assert_supports(IN_ARG_x_poly); x_poly_ = x_poly; }
1519 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1520 ModelEvaluator::InArgs::get_x_poly()
const 1521 { assert_supports(IN_ARG_x_poly);
return x_poly_; }
1525 { assert_supports(IN_ARG_x_dot_sg); x_dot_sg_ = x_dot_sg; }
1529 { assert_supports(IN_ARG_x_dotdot_sg); x_dotdot_sg_ = x_dotdot_sg; }
1533 ModelEvaluator::InArgs::get_x_dot_sg()
const 1534 { assert_supports(IN_ARG_x_dot_sg);
return x_dot_sg_; }
1538 ModelEvaluator::InArgs::get_x_dotdot_sg()
const 1539 { assert_supports(IN_ARG_x_dotdot_sg);
return x_dotdot_sg_; }
1543 { assert_supports(IN_ARG_x_dot_mp); x_dot_mp_ = x_dot_mp; }
1547 { assert_supports(IN_ARG_x_dotdot_mp); x_dotdot_mp_ = x_dotdot_mp; }
1551 ModelEvaluator::InArgs::get_x_dot_mp()
const 1552 { assert_supports(IN_ARG_x_dot_mp);
return x_dot_mp_; }
1556 ModelEvaluator::InArgs::get_x_dotdot_mp()
const 1557 { assert_supports(IN_ARG_x_dotdot_mp);
return x_dotdot_mp_; }
1561 { assert_supports(IN_ARG_x_sg); x_sg_ = x_sg; }
1565 ModelEvaluator::InArgs::get_x_sg()
const 1566 { assert_supports(IN_ARG_x_sg);
return x_sg_; }
1570 { assert_supports(IN_ARG_x_mp); x_mp_ = x_mp; }
1574 ModelEvaluator::InArgs::get_x_mp()
const 1575 { assert_supports(IN_ARG_x_mp);
return x_mp_; }
1578 void ModelEvaluator::InArgs::set_p(
int l,
const Teuchos::RCP<const Epetra_Vector> &p_l )
1579 { assert_l(l); p_[l] = p_l; }
1582 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_p(
int l)
const 1583 { assert_l(l);
return p_[l]; }
1586 void ModelEvaluator::InArgs::set_p_sg(
int l,
1588 { assert_supports(IN_ARG_p_sg, l); p_sg_[l] = p_sg_l; }
1592 ModelEvaluator::InArgs::get_p_sg(
int l)
const 1593 { assert_supports(IN_ARG_p_sg, l);
return p_sg_[l]; }
1596 void ModelEvaluator::InArgs::set_p_mp(
int l,
1598 { assert_supports(IN_ARG_p_mp, l); p_mp_[l] = p_mp_l; }
1602 ModelEvaluator::InArgs::get_p_mp(
int l)
const 1603 { assert_supports(IN_ARG_p_mp, l);
return p_mp_[l]; }
1606 void ModelEvaluator::InArgs::set_t(
double t )
1607 { assert_supports(IN_ARG_t); t_ = t; }
1610 double ModelEvaluator::InArgs::get_t()
const 1611 { assert_supports(IN_ARG_t);
return t_; }
1614 void ModelEvaluator::InArgs::set_alpha(
double alpha )
1615 { assert_supports(IN_ARG_alpha); alpha_ = alpha; }
1618 double ModelEvaluator::InArgs::get_alpha()
const 1619 { assert_supports(IN_ARG_alpha);
return alpha_; }
1622 void ModelEvaluator::InArgs::set_omega(
double omega )
1623 { assert_supports(IN_ARG_omega); omega_ = omega; }
1626 double ModelEvaluator::InArgs::get_omega()
const 1627 { assert_supports(IN_ARG_omega);
return omega_; }
1630 void ModelEvaluator::InArgs::set_beta(
double beta )
1631 { assert_supports(IN_ARG_beta); beta_ = beta; }
1634 double ModelEvaluator::InArgs::get_beta()
const 1635 { assert_supports(IN_ARG_beta);
return beta_; }
1638 void ModelEvaluator::InArgs::set_step_size(
double step_size)
1639 { assert_supports(IN_ARG_step_size); step_size_ = step_size; }
1642 double ModelEvaluator::InArgs::get_step_size()
const 1643 { assert_supports(IN_ARG_step_size);
return step_size_; }
1646 void ModelEvaluator::InArgs::set_stage_number(
int stage_number)
1647 { assert_supports(IN_ARG_stage_number); stage_number_ = stage_number; }
1650 int ModelEvaluator::InArgs::get_stage_number()
const 1651 { assert_supports(IN_ARG_stage_number);
return stage_number_; }
1655 { assert_supports(IN_ARG_sg_basis); sg_basis_ = basis; }
1658 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
1659 ModelEvaluator::InArgs::get_sg_basis()
const 1660 { assert_supports(IN_ARG_sg_basis);
return sg_basis_; }
1664 { assert_supports(IN_ARG_sg_quadrature); sg_quad_ = quad; }
1667 Teuchos::RCP<const Stokhos::Quadrature<int,double> >
1668 ModelEvaluator::InArgs::get_sg_quadrature()
const 1669 { assert_supports(IN_ARG_sg_quadrature);
return sg_quad_; }
1673 { assert_supports(IN_ARG_sg_expansion); sg_exp_ = exp; }
1676 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
1677 ModelEvaluator::InArgs::get_sg_expansion()
const 1678 { assert_supports(IN_ARG_sg_expansion);
return sg_exp_; }
1681 void ModelEvaluator::InArgs::_setModelEvalDescription(
const std::string &new_modelEvalDescription )
1683 modelEvalDescription_ = new_modelEvalDescription;
1687 void ModelEvaluator::InArgs::_set_Np(
int new_Np)
1690 p_sg_.resize(new_Np);
1691 p_mp_.resize(new_Np);
1692 supports_p_sg_.resize(new_Np);
1693 supports_p_mp_.resize(new_Np);
1701 std::string ModelEvaluator::OutArgs::modelEvalDescription()
const 1702 {
return modelEvalDescription_; }
1705 int ModelEvaluator::OutArgs::Np()
const 1707 return DfDp_.size();
1711 int ModelEvaluator::OutArgs::Ng()
const 1721 ModelEvaluator::OutArgs::get_f()
const {
return f_; }
1732 ModelEvaluator::OutArgs::get_g(
int j)
const 1739 void ModelEvaluator::OutArgs::set_g_sg(
int j,
const sg_vector_t &g_sg_j )
1741 assert_supports(OUT_ARG_g_sg, j);
1747 ModelEvaluator::OutArgs::get_g_sg(
int j)
const 1749 assert_supports(OUT_ARG_g_sg, j);
1754 void ModelEvaluator::OutArgs::set_g_mp(
int j,
const mp_vector_t &g_mp_j )
1756 assert_supports(OUT_ARG_g_mp, j);
1762 ModelEvaluator::OutArgs::get_g_mp(
int j)
const 1764 assert_supports(OUT_ARG_g_mp, j);
1769 void ModelEvaluator::OutArgs::set_W(
const Teuchos::RCP<Epetra_Operator> &W ) { W_ = W; }
1771 void ModelEvaluator::OutArgs::set_WPrec(
const Teuchos::RCP<Epetra_Operator> &WPrec ) { WPrec_ = WPrec; }
1774 Teuchos::RCP<Epetra_Operator> ModelEvaluator::OutArgs::get_W()
const {
return W_; }
1776 Teuchos::RCP<Epetra_Operator> ModelEvaluator::OutArgs::get_WPrec()
const {
return WPrec_; }
1780 {
return W_properties_; }
1783 {
return WPrec_properties_; }
1786 void ModelEvaluator::OutArgs::set_DfDp(
int l,
const Derivative &DfDp_l )
1788 assert_supports(OUT_ARG_DfDp,l);
1794 ModelEvaluator::OutArgs::get_DfDp(
int l)
const 1796 assert_supports(OUT_ARG_DfDp,l);
1802 ModelEvaluator::OutArgs::get_DfDp_properties(
int l)
const 1804 assert_supports(OUT_ARG_DfDp,l);
1805 return DfDp_properties_[l];
1809 void ModelEvaluator::OutArgs::set_DfDp_sg(
int l,
const SGDerivative &DfDp_sg_l )
1811 assert_supports(OUT_ARG_DfDp_sg,l);
1812 DfDp_sg_[l] = DfDp_sg_l;
1817 ModelEvaluator::OutArgs::get_DfDp_sg(
int l)
const 1819 assert_supports(OUT_ARG_DfDp_sg,l);
1825 ModelEvaluator::OutArgs::get_DfDp_sg_properties(
int l)
const 1827 assert_supports(OUT_ARG_DfDp_sg,l);
1828 return DfDp_sg_properties_[l];
1832 void ModelEvaluator::OutArgs::set_DfDp_mp(
int l,
const MPDerivative &DfDp_mp_l )
1834 assert_supports(OUT_ARG_DfDp_mp,l);
1835 DfDp_mp_[l] = DfDp_mp_l;
1840 ModelEvaluator::OutArgs::get_DfDp_mp(
int l)
const 1842 assert_supports(OUT_ARG_DfDp_mp,l);
1848 ModelEvaluator::OutArgs::get_DfDp_mp_properties(
int l)
const 1850 assert_supports(OUT_ARG_DfDp_mp,l);
1851 return DfDp_mp_properties_[l];
1855 void ModelEvaluator::OutArgs::set_DgDx_dot(
int j,
const Derivative &DgDx_dot_j )
1857 assert_supports(OUT_ARG_DgDx_dot,j);
1858 DgDx_dot_[j] = DgDx_dot_j;
1863 ModelEvaluator::OutArgs::get_DgDx_dot(
int j)
const 1865 assert_supports(OUT_ARG_DgDx_dot,j);
1866 return DgDx_dot_[j];
1871 ModelEvaluator::OutArgs::get_DgDx_dot_properties(
int j)
const 1873 assert_supports(OUT_ARG_DgDx_dot,j);
1874 return DgDx_dot_properties_[j];
1878 void ModelEvaluator::OutArgs::set_DgDx_dot_sg(
int j,
const SGDerivative &DgDx_dot_sg_j )
1880 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1881 DgDx_dot_sg_[j] = DgDx_dot_sg_j;
1886 ModelEvaluator::OutArgs::get_DgDx_dot_sg(
int j)
const 1888 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1889 return DgDx_dot_sg_[j];
1894 ModelEvaluator::OutArgs::get_DgDx_dot_sg_properties(
int j)
const 1896 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1897 return DgDx_dot_sg_properties_[j];
1901 void ModelEvaluator::OutArgs::set_DgDx_dot_mp(
int j,
const MPDerivative &DgDx_dot_mp_j )
1903 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1904 DgDx_dot_mp_[j] = DgDx_dot_mp_j;
1909 ModelEvaluator::OutArgs::get_DgDx_dot_mp(
int j)
const 1911 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1912 return DgDx_dot_mp_[j];
1917 ModelEvaluator::OutArgs::get_DgDx_dot_mp_properties(
int j)
const 1919 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1920 return DgDx_dot_mp_properties_[j];
1924 void ModelEvaluator::OutArgs::set_DgDx_dotdot(
int j,
const Derivative &DgDx_dotdot_j )
1926 assert_supports(OUT_ARG_DgDx_dotdot,j);
1927 DgDx_dotdot_[j] = DgDx_dotdot_j;
1932 ModelEvaluator::OutArgs::get_DgDx_dotdot(
int j)
const 1934 assert_supports(OUT_ARG_DgDx_dotdot,j);
1935 return DgDx_dotdot_[j];
1940 ModelEvaluator::OutArgs::get_DgDx_dotdot_properties(
int j)
const 1942 assert_supports(OUT_ARG_DgDx_dotdot,j);
1943 return DgDx_dotdot_properties_[j];
1947 void ModelEvaluator::OutArgs::set_DgDx_dotdot_sg(
int j,
const SGDerivative &DgDx_dotdot_sg_j )
1949 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1950 DgDx_dotdot_sg_[j] = DgDx_dotdot_sg_j;
1955 ModelEvaluator::OutArgs::get_DgDx_dotdot_sg(
int j)
const 1957 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1958 return DgDx_dotdot_sg_[j];
1963 ModelEvaluator::OutArgs::get_DgDx_dotdot_sg_properties(
int j)
const 1965 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1966 return DgDx_dotdot_sg_properties_[j];
1970 void ModelEvaluator::OutArgs::set_DgDx_dotdot_mp(
int j,
const MPDerivative &DgDx_dotdot_mp_j )
1972 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1973 DgDx_dotdot_mp_[j] = DgDx_dotdot_mp_j;
1978 ModelEvaluator::OutArgs::get_DgDx_dotdot_mp(
int j)
const 1980 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1981 return DgDx_dotdot_mp_[j];
1986 ModelEvaluator::OutArgs::get_DgDx_dotdot_mp_properties(
int j)
const 1988 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1989 return DgDx_dotdot_mp_properties_[j];
1993 void ModelEvaluator::OutArgs::set_DgDx(
int j,
const Derivative &DgDx_j )
1995 assert_supports(OUT_ARG_DgDx,j);
2001 ModelEvaluator::OutArgs::get_DgDx(
int j)
const 2003 assert_supports(OUT_ARG_DgDx,j);
2009 ModelEvaluator::OutArgs::get_DgDx_properties(
int j)
const 2011 assert_supports(OUT_ARG_DgDx,j);
2012 return DgDx_properties_[j];
2016 void ModelEvaluator::OutArgs::set_DgDx_sg(
int j,
const SGDerivative &DgDx_sg_j )
2018 assert_supports(OUT_ARG_DgDx_sg,j);
2019 DgDx_sg_[j] = DgDx_sg_j;
2024 ModelEvaluator::OutArgs::get_DgDx_sg(
int j)
const 2026 assert_supports(OUT_ARG_DgDx_sg,j);
2032 ModelEvaluator::OutArgs::get_DgDx_sg_properties(
int j)
const 2034 assert_supports(OUT_ARG_DgDx_sg,j);
2035 return DgDx_sg_properties_[j];
2039 void ModelEvaluator::OutArgs::set_DgDx_mp(
int j,
const MPDerivative &DgDx_mp_j )
2041 assert_supports(OUT_ARG_DgDx_mp,j);
2042 DgDx_mp_[j] = DgDx_mp_j;
2047 ModelEvaluator::OutArgs::get_DgDx_mp(
int j)
const 2049 assert_supports(OUT_ARG_DgDx_mp,j);
2055 ModelEvaluator::OutArgs::get_DgDx_mp_properties(
int j)
const 2057 assert_supports(OUT_ARG_DgDx_mp,j);
2058 return DgDx_mp_properties_[j];
2062 void ModelEvaluator::OutArgs::set_DgDp(
int j,
int l,
const Derivative &DgDp_j_l )
2064 assert_supports(OUT_ARG_DgDp,j,l);
2065 DgDp_[ j*Np() + l ] = DgDp_j_l;
2070 ModelEvaluator::OutArgs::get_DgDp(
int j,
int l)
const 2072 assert_supports(OUT_ARG_DgDp,j,l);
2073 return DgDp_[ j*Np() + l ];
2078 ModelEvaluator::OutArgs::get_DgDp_properties(
int j,
int l)
const 2080 assert_supports(OUT_ARG_DgDp,j,l);
2081 return DgDp_properties_[ j*Np() + l ];
2085 void ModelEvaluator::OutArgs::set_DgDp_sg(
int j,
int l,
const SGDerivative &DgDp_sg_j_l )
2087 assert_supports(OUT_ARG_DgDp_sg,j,l);
2088 DgDp_sg_[ j*Np() + l ] = DgDp_sg_j_l;
2093 ModelEvaluator::OutArgs::get_DgDp_sg(
int j,
int l)
const 2095 assert_supports(OUT_ARG_DgDp_sg,j,l);
2096 return DgDp_sg_[ j*Np() + l ];
2101 ModelEvaluator::OutArgs::get_DgDp_sg_properties(
int j,
int l)
const 2103 assert_supports(OUT_ARG_DgDp_sg,j,l);
2104 return DgDp_sg_properties_[ j*Np() + l ];
2108 void ModelEvaluator::OutArgs::set_DgDp_mp(
int j,
int l,
const MPDerivative &DgDp_mp_j_l )
2110 assert_supports(OUT_ARG_DgDp_mp,j,l);
2111 DgDp_mp_[ j*Np() + l ] = DgDp_mp_j_l;
2116 ModelEvaluator::OutArgs::get_DgDp_mp(
int j,
int l)
const 2118 assert_supports(OUT_ARG_DgDp_mp,j,l);
2119 return DgDp_mp_[ j*Np() + l ];
2124 ModelEvaluator::OutArgs::get_DgDp_mp_properties(
int j,
int l)
const 2126 assert_supports(OUT_ARG_DgDp_mp,j,l);
2127 return DgDp_mp_properties_[ j*Np() + l ];
2131 void ModelEvaluator::OutArgs::set_f_poly(
const Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > &f_poly )
2132 { f_poly_ = f_poly; }
2135 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> >
2136 ModelEvaluator::OutArgs::get_f_poly()
const 2145 ModelEvaluator::OutArgs::get_f_sg()
const 2160 ModelEvaluator::OutArgs::get_f_mp()
const 2174 void ModelEvaluator::InArgsSetup::setModelEvalDescription(
const std::string &new_modelEvalDescription )
2176 this->_setModelEvalDescription(new_modelEvalDescription);
2180 void ModelEvaluator::InArgsSetup::set_Np(
int new_Np)
2181 { this->_set_Np(new_Np); }
2184 void ModelEvaluator::InArgsSetup::setSupports(
EInArgsMembers arg,
bool new_supports )
2185 { this->_setSupports(arg,new_supports); }
2188 void ModelEvaluator::InArgsSetup::setSupports(
EInArgs_p_sg arg,
int l,
bool new_supports )
2189 { this->_setSupports(arg,l,new_supports); }
2192 void ModelEvaluator::InArgsSetup::setSupports(
EInArgs_p_mp arg,
int l,
bool new_supports )
2193 { this->_setSupports(arg,l,new_supports); }
2200 void ModelEvaluator::OutArgsSetup::setModelEvalDescription(
const std::string &new_modelEvalDescription )
2202 this->_setModelEvalDescription(new_modelEvalDescription);
2206 void ModelEvaluator::OutArgsSetup::set_Np_Ng(
int new_Np,
int new_Ng)
2207 { this->_set_Np_Ng(new_Np,new_Ng); }
2211 { this->_setSupports(arg,new_supports); }
2215 { this->_setSupports(arg,l,new_supports); }
2219 { this->_setSupports(arg,j,new_supports); }
2223 { this->_setSupports(arg,j,new_supports); }
2227 { this->_setSupports(arg,j,new_supports); }
2231 { this->_setSupports(arg,j,l,new_supports); }
2234 void ModelEvaluator::OutArgsSetup::setSupports(
EOutArgs_g_sg arg,
int j,
bool new_supports )
2235 { this->_setSupports(arg,j,new_supports); }
2239 { this->_setSupports(arg,l,new_supports); }
2243 { this->_setSupports(arg,j,new_supports); }
2247 { this->_setSupports(arg,j,new_supports); }
2251 { this->_setSupports(arg,j,new_supports); }
2255 { this->_setSupports(arg,j,l,new_supports); }
2258 void ModelEvaluator::OutArgsSetup::setSupports(
EOutArgs_g_mp arg,
int j,
bool new_supports )
2259 { this->_setSupports(arg,j,new_supports); }
2263 { this->_setSupports(arg,l,new_supports); }
2267 { this->_setSupports(arg,j,new_supports); }
2271 { this->_setSupports(arg,j,new_supports); }
2275 { this->_setSupports(arg,j,new_supports); }
2279 { this->_setSupports(arg,j,l,new_supports); }
2283 { this->_set_W_properties(properties); }
2286 { this->_set_WPrec_properties(properties); }
2291 this->_set_DfDp_properties(l,properties);
2297 this->_set_DgDx_dot_properties(j,properties);
2303 this->_set_DgDx_dotdot_properties(j,properties);
2309 this->_set_DgDx_properties(j,properties);
2315 this->_set_DgDp_properties(j,l,properties);
2321 this->_set_DfDp_sg_properties(l,properties);
2327 this->_set_DgDx_dot_sg_properties(j,properties);
2333 this->_set_DgDx_dotdot_sg_properties(j,properties);
2339 this->_set_DgDx_sg_properties(j,properties);
2345 this->_set_DgDp_sg_properties(j,l,properties);
2351 this->_set_DfDp_mp_properties(l,properties);
2357 this->_set_DgDx_dot_mp_properties(j,properties);
2363 this->_set_DgDx_dotdot_mp_properties(j,properties);
2369 this->_set_DgDx_mp_properties(j,properties);
2375 this->_set_DgDp_mp_properties(j,l,properties);
2380 #endif // EPETRA_EXT_MODEL_EVALUATOR_HPP Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
EEvalType getType() const
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
MPDerivative(const mp_operator_t &lo)
MPDerivativeMultiVector(const mp_multivector_t &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
EDerivativeMultiVectorOrientation getOrientation() const
EDerivativeMultiVectorOrientation getOrientation() const
Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > getLinearOp() const
Teuchos::RCP< Epetra_MultiVector > getMultiVector() const
Preconditioner()
Default constructor of null Operatir.
Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > sg_operator_t
Short-hand for stochastic Galerkin operator type.
MPDerivativeMultiVector()
bool isAlreadyInverted
Bool flag.
Preconditioner(const Teuchos::RCP< Epetra_Operator > &PrecOp_, bool isAlreadyInverted_)
Usable constructor to set the (Epetra_Operator,bool) pair.
Teuchos::RCP< Epetra_Operator > getLinearOp(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName)
Teuchos::RCP< Epetra_MultiVector > get_DgDp_mv(const int j, const int l, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
SGDerivativeMultiVector(const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
std::string toString(ModelEvaluator::EOutArgsMembers outArg)
mp_operator_t getLinearOp() const
Teuchos::RCP< Epetra_MultiVector > get_DgDx_dot_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
Teuchos::RCP< Stokhos::ProductEpetraMultiVector > mp_multivector_t
Teuchos::RCP< Stokhos::ProductEpetraOperator > mp_operator_t
EDerivativeMultiVectorOrientation getOrientation() const
SGDerivativeMultiVector getDerivativeMultiVector() const
Teuchos::RCP< const Stokhos::ProductEpetraMultiVector > mp_const_multivector_t
Teuchos::RCP< Epetra_Operator > PrecOp
Accessor for the Epetra_Operator.
DerivativeSupport(EDerivativeMultiVectorOrientation mvOrientation)
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
Teuchos::RCP< Epetra_MultiVector > getMultiVector(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
EDerivativeLinearity linearity
DerivativeSupport(EDerivativeLinearOp)
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
bool supports(EDerivativeMultiVectorOrientation mvOrientation) const
Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > sg_vector_t
Short-hand for stochastic Galerkin vector type.
Evaluation(const Teuchos::RCP< ObjType > &obj)
Teuchos::RCP< const Stokhos::EpetraVectorOrthogPoly > sg_const_vector_t
Short-hand for stochastic Galerkin vector type.
mp_multivector_t getMultiVector() const
MPDerivativeMultiVector getDerivativeMultiVector() const
Teuchos::RCP< Epetra_MultiVector > get_DfDp_mv(const int l, const ModelEvaluator::OutArgs &outArgs)
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
Derivative(const DerivativeMultiVector &dmv)
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
SGDerivativeMultiVector()
Teuchos::RCP< Epetra_Operator > get_DfDp_op(const int l, const ModelEvaluator::OutArgs &outArgs)
MPDerivative(const MPDerivativeMultiVector &dmv)
DerivativeSupport & plus(EDerivativeMultiVectorOrientation mvOrientation)
MPDerivative(const mp_multivector_t &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Teuchos::RCP< const Stokhos::ProductEpetraVector > mp_const_vector_t
Teuchos::RCP< Epetra_MultiVector > get_DgDx_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
const Teuchos::Array< int > & getParamIndexes() const
const Teuchos::Array< int > & getParamIndexes() const
Derivative(const Teuchos::RCP< Epetra_Operator > &lo)
EDerivativeMultiVectorOrientation
DerivativeProperties(EDerivativeLinearity in_linearity, ERankStatus in_rank, bool in_supportsAdjoint)
SGDerivative(const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &lo)
DerivativeMultiVector getDerivativeMultiVector() const
Derivative(const Teuchos::RCP< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
DerivativeMultiVector(const Teuchos::RCP< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
bool supports(EDerivativeLinearOp) const
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
void reset(const Teuchos::RCP< ObjType > &obj, EEvalType evalType)
Simple aggregate struct that stores a preconditioner as an Epetra_Operator and a bool, about whether it is inverted or not.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
Teuchos::RCP< Epetra_MultiVector > get_DgDx_dotdot_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
SGDerivative(const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Teuchos::RCP< Epetra_MultiVector > getMultiVector() const
DerivativeSupport(EDerivativeLinearOp, EDerivativeMultiVectorOrientation mvOrientation)
Teuchos::RCP< Stokhos::ProductEpetraVector > mp_vector_t
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
const Teuchos::Array< int > & getParamIndexes() const
SGDerivative(const SGDerivativeMultiVector &dmv)
Teuchos::RCP< Epetra_Operator > getLinearOp() const
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
DerivativeSupport(EDerivativeMultiVectorOrientation mvOrientation1, EDerivativeMultiVectorOrientation mvOrientation2)
DerivativeSupport & plus(EDerivativeLinearOp)
Base interface for evaluating a stateless "model".
Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
Teuchos::RCP< const Stokhos::ProductEpetraOperator > mp_const_operator_t
mp_multivector_t getMultiVector() const
Evaluation(const Teuchos::RCP< ObjType > &obj, EEvalType evalType)