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" 52 #ifdef HAVE_PYTRILINOS 55 typedef _object PyObject;
61 class Epetra_Operator;
65 class EpetraVectorOrthogPoly;
66 class EpetraMultiVectorOrthogPoly;
67 class EpetraOperatorOrthogPoly;
69 template <
typename ordinal_type,
typename scalar_type>
class Quadrature;
73 class ProductEpetraVector;
74 class ProductEpetraMultiVector;
75 class ProductEpetraOperator;
93 typedef Teuchos::RCP<Stokhos::ProductEpetraVector>
mp_vector_t;
113 ,IN_ARG_x_dotdot_poly
118 ,IN_ARG_sg_quadrature
121 static const int NUM_E_IN_ARGS_MEMBERS=21;
143 std::string modelEvalDescription()
const;
147 void set_x_dot(
const Teuchos::RCP<const Epetra_Vector> &x_dot );
149 void set_x_dotdot(
const Teuchos::RCP<const Epetra_Vector> &x_dotdot );
151 Teuchos::RCP<const Epetra_Vector> get_x_dot()
const;
153 Teuchos::RCP<const Epetra_Vector> get_x_dotdot()
const;
155 void set_x(
const Teuchos::RCP<const Epetra_Vector> &x );
157 Teuchos::RCP<const Epetra_Vector> get_x()
const;
159 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly
162 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_poly()
const;
165 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly
167 void set_x_dotdot_poly(
168 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dotdot_poly
171 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_dot_poly()
const;
172 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > get_x_dotdot_poly()
const;
174 void set_x_sg(
const sg_const_vector_t &x_sg);
176 sg_const_vector_t get_x_sg()
const;
178 void set_x_dot_sg(
const sg_const_vector_t &x_dot_sg);
179 void set_x_dotdot_sg(
const sg_const_vector_t &x_dotdot_sg);
181 sg_const_vector_t get_x_dot_sg()
const;
182 sg_const_vector_t get_x_dotdot_sg()
const;
184 void set_x_mp(
const mp_const_vector_t &x_mp);
186 mp_const_vector_t get_x_mp()
const;
188 void set_x_dot_mp(
const mp_const_vector_t &x_dot_mp);
189 void set_x_dotdot_mp(
const mp_const_vector_t &x_dotdot_mp);
191 mp_const_vector_t get_x_dot_mp()
const;
192 mp_const_vector_t get_x_dotdot_mp()
const;
194 void set_p(
int l,
const Teuchos::RCP<const Epetra_Vector> &p_l );
196 Teuchos::RCP<const Epetra_Vector> get_p(
int l)
const;
198 void set_p_sg(
int l,
const sg_const_vector_t &p_sg_l );
200 sg_const_vector_t get_p_sg(
int l)
const;
202 void set_p_mp(
int l,
const mp_const_vector_t &p_mp_l );
204 mp_const_vector_t get_p_mp(
int l)
const;
206 void set_t(
double t );
208 double get_alpha()
const;
210 void set_alpha(
double alpha );
213 double get_omega()
const;
215 void set_omega(
double omega );
216 double get_beta()
const;
218 void set_beta(
double beta );
220 double get_t()
const;
221 double get_step_size()
const;
222 void set_step_size(
double step_size);
223 int get_stage_number()
const;
224 void set_stage_number(
int stage_number);
226 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > get_sg_basis()
const;
230 Teuchos::RCP<const Stokhos::Quadrature<int,double> > get_sg_quadrature()
const;
234 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > get_sg_expansion()
const;
245 void _setModelEvalDescription(
const std::string &modelEvalDescription );
247 void _set_Np(
int Np);
251 void _setSupports(
EInArgs_p_sg arg,
int l,
bool supports );
253 void _setSupports(
EInArgs_p_mp arg,
int l,
bool supports );
256 typedef Teuchos::Array<Teuchos::RCP<const Epetra_Vector> > p_t;
257 typedef Teuchos::Array<sg_const_vector_t > p_sg_t;
258 typedef Teuchos::Array<mp_const_vector_t > p_mp_t;
259 typedef Teuchos::Array<bool> supports_p_sg_t;
261 std::string modelEvalDescription_;
262 Teuchos::RCP<const Epetra_Vector> x_dot_;
263 Teuchos::RCP<const Epetra_Vector> x_dotdot_;
264 Teuchos::RCP<const Epetra_Vector> x_;
265 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dot_poly_;
266 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dotdot_poly_;
267 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_poly_;
268 sg_const_vector_t x_dot_sg_;
269 sg_const_vector_t x_dotdot_sg_;
270 sg_const_vector_t x_sg_;
271 mp_const_vector_t x_dot_mp_;
272 mp_const_vector_t x_dotdot_mp_;
273 mp_const_vector_t x_mp_;
283 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > sg_basis_;
284 Teuchos::RCP<const Stokhos::Quadrature<int,double> > sg_quad_;
285 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > sg_exp_;
286 bool supports_[NUM_E_IN_ARGS_MEMBERS];
287 supports_p_sg_t supports_p_sg_;
288 supports_p_sg_t supports_p_mp_;
293 void assert_l(
int l)
const;
299 ,EVAL_TYPE_APPROX_DERIV
300 ,EVAL_TYPE_VERY_APPROX_DERIV
304 template<
class ObjType>
311 :
Teuchos::RCP<ObjType>(obj), evalType_(EVAL_TYPE_EXACT) {}
314 :
Teuchos::RCP<ObjType>(obj), evalType_(evalType) {}
319 { this->operator=(obj); evalType_ = evalType; }
327 ,DERIV_TRANS_MV_BY_ROW
338 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
342 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
346 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==DERIV_MV_BY_COL)
347 ,supportsTransMVByRow_(mvOrientation==DERIV_TRANS_MV_BY_ROW)
352 :supportsLinearOp_(true), supportsMVByCol_(mvOrientation==DERIV_MV_BY_COL)
353 ,supportsTransMVByRow_(mvOrientation==DERIV_TRANS_MV_BY_ROW)
360 :supportsLinearOp_(false)
362 mvOrientation1==DERIV_MV_BY_COL||mvOrientation2==DERIV_MV_BY_COL )
363 ,supportsTransMVByRow_(
364 mvOrientation1==DERIV_TRANS_MV_BY_ROW||mvOrientation2==DERIV_TRANS_MV_BY_ROW )
368 { supportsLinearOp_ =
true;
return *
this; }
372 switch(mvOrientation) {
373 case DERIV_MV_BY_COL: supportsMVByCol_ =
true;
break;
374 case DERIV_TRANS_MV_BY_ROW: supportsTransMVByRow_ =
true;
break;
375 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
381 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
384 {
return supportsLinearOp_; }
388 switch(mvOrientation) {
389 case DERIV_MV_BY_COL:
return supportsMVByCol_;
390 case DERIV_TRANS_MV_BY_ROW:
return supportsTransMVByRow_;
391 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
396 bool supportsLinearOp_;
397 bool supportsMVByCol_;
398 bool supportsTransMVByRow_;
404 DERIV_LINEARITY_UNKNOWN
405 ,DERIV_LINEARITY_CONST
406 ,DERIV_LINEARITY_NONCONST
412 ,DERIV_RANK_DEFICIENT
425 :linearity(DERIV_LINEARITY_UNKNOWN),rank(DERIV_RANK_UNKNOWN),supportsAdjoint(false) {}
429 ):linearity(in_linearity),rank(in_rank),supportsAdjoint(in_supportsAdjoint) {}
441 const Teuchos::RCP<Epetra_MultiVector> &mv
443 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
444 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
447 { orientation_ = orientation; };
453 {
return orientation_; }
456 {
return paramIndexes_; }
458 Teuchos::RCP<Epetra_MultiVector> mv_;
460 Teuchos::Array<int> paramIndexes_;
475 const Teuchos::RCP<Epetra_MultiVector> &mv
477 ) : dmv_(mv,orientation) {}
486 {
return dmv_.getMultiVector(); }
489 {
return dmv_.getOrientation(); }
495 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
497 Teuchos::RCP<Epetra_Operator> lo_;
509 bool isAlreadyInverted_ )
510 : PrecOp(PrecOp_), isAlreadyInverted(isAlreadyInverted_) {}
529 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
531 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
532 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
535 { orientation_ = orientation; };
541 {
return orientation_; }
544 {
return paramIndexes_; }
546 Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > mv_;
548 Teuchos::Array<int> paramIndexes_;
559 SGDerivative(
const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &lo )
563 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
565 ) : dmv_(mv,orientation) {}
570 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly >
getLinearOp()
const 574 {
return dmv_.getMultiVector(); }
577 {
return dmv_.getOrientation(); }
583 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
585 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > lo_;
599 const mp_multivector_t &mv
601 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
602 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
605 { orientation_ = orientation; };
611 {
return orientation_; }
614 {
return paramIndexes_; }
616 mp_multivector_t mv_;
618 Teuchos::Array<int> paramIndexes_;
634 const mp_multivector_t &mv
636 ) : dmv_(mv,orientation) {}
645 {
return dmv_.getMultiVector(); }
648 {
return dmv_.getOrientation(); }
654 {
return !lo_.get() && !dmv_.getMultiVector().get(); }
671 static const int NUM_E_OUT_ARGS_MEMBERS=9;
715 OUT_ARG_DgDx_dotdot_sg
745 OUT_ARG_DgDx_dotdot_mp
763 typedef Teuchos::RCP<Stokhos::EpetraVectorOrthogPoly>
sg_vector_t;
771 std::string modelEvalDescription()
const;
814 void set_f_sg(
const sg_vector_t& f_sg );
816 sg_vector_t get_f_sg()
const;
818 void set_f_mp(
const mp_vector_t& f_mp );
820 mp_vector_t get_f_mp()
const;
827 void set_g_sg(
int j,
const sg_vector_t &g_sg_j );
830 sg_vector_t get_g_sg(
int j)
const;
833 void set_g_mp(
int j,
const mp_vector_t &g_mp_j );
836 mp_vector_t get_g_mp(
int j)
const;
838 void set_W(
const Teuchos::RCP<Epetra_Operator> &W );
839 void set_WPrec(
const Teuchos::RCP<Epetra_Operator> &WPrec );
841 Teuchos::RCP<Epetra_Operator> get_W()
const;
842 Teuchos::RCP<Epetra_Operator> get_WPrec()
const;
847 void set_W_sg(
const sg_operator_t& W_sg );
849 sg_operator_t get_W_sg()
const;
851 void set_W_mp(
const mp_operator_t& W_sg );
853 mp_operator_t get_W_mp()
const;
855 void set_DfDp(
int l,
const Derivative &DfDp_l);
873 void set_DgDx_dot(
int j,
const Derivative &DgDx_dot_j);
874 void set_DgDx_dotdot(
int j,
const Derivative &DgDx_dotdot_j);
882 void set_DgDx_dot_sg(
int j,
const SGDerivative &DgDx_dot_j);
883 void set_DgDx_dotdot_sg(
int j,
const SGDerivative &DgDx_dotdot_j);
891 void set_DgDx_dot_mp(
int j,
const MPDerivative &DgDx_dot_j);
892 void set_DgDx_dotdot_mp(
int j,
const MPDerivative &DgDx_dotdot_j);
900 void set_DgDx(
int j,
const Derivative &DgDx_j);
918 void set_DgDp(
int j,
int l,
const Derivative &DgDp_j_l );
924 void set_DgDp_sg(
int j,
int l,
const SGDerivative &DgDp_sg_j_l );
930 void set_DgDp_mp(
int j,
int l,
const MPDerivative &DgDp_mp_j_l );
937 void set_f_poly(
const Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > &f_poly );
939 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > get_f_poly()
const;
950 void setFailed()
const;
956 bool isFailed()
const;
960 void _setModelEvalDescription(
const std::string &modelEvalDescription );
962 void _set_Np_Ng(
int Np,
int Ng);
975 void _setSupports(
EOutArgs_g_sg arg,
int j,
bool supports );
987 void _setSupports(
EOutArgs_g_mp arg,
int j,
bool supports );
1030 typedef Teuchos::Array<Evaluation<Epetra_Vector> > g_t;
1031 typedef Teuchos::Array<sg_vector_t > g_sg_t;
1032 typedef Teuchos::Array<mp_vector_t > g_mp_t;
1033 typedef Teuchos::Array<Derivative> deriv_t;
1034 typedef Teuchos::Array<SGDerivative> sg_deriv_t;
1035 typedef Teuchos::Array<MPDerivative> mp_deriv_t;
1036 typedef Teuchos::Array<DerivativeProperties> deriv_properties_t;
1037 typedef Teuchos::Array<DerivativeSupport> supports_t;
1038 typedef Teuchos::Array<bool> supports_g_sg_t;
1040 std::string modelEvalDescription_;
1041 mutable bool isFailed_;
1042 bool supports_[NUM_E_OUT_ARGS_MEMBERS];
1043 supports_t supports_DfDp_;
1044 supports_t supports_DgDx_dot_;
1045 supports_t supports_DgDx_dotdot_;
1046 supports_t supports_DgDx_;
1047 supports_t supports_DgDp_;
1048 supports_g_sg_t supports_g_sg_;
1049 supports_t supports_DfDp_sg_;
1050 supports_t supports_DgDx_dot_sg_;
1051 supports_t supports_DgDx_dotdot_sg_;
1052 supports_t supports_DgDx_sg_;
1053 supports_t supports_DgDp_sg_;
1054 supports_g_sg_t supports_g_mp_;
1055 supports_t supports_DfDp_mp_;
1056 supports_t supports_DgDx_dot_mp_;
1057 supports_t supports_DgDx_dotdot_mp_;
1058 supports_t supports_DgDx_mp_;
1059 supports_t supports_DgDp_mp_;
1064 Teuchos::RCP<Epetra_Operator> W_;
1065 Teuchos::RCP<Epetra_Operator> WPrec_;
1069 deriv_properties_t DfDp_properties_;
1071 deriv_t DgDx_dotdot_;
1073 deriv_properties_t DgDx_dot_properties_;
1074 deriv_properties_t DgDx_dotdot_properties_;
1075 deriv_properties_t DgDx_properties_;
1077 deriv_properties_t DgDp_properties_;
1078 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > f_poly_;
1080 sg_operator_t W_sg_;
1081 sg_deriv_t DfDp_sg_;
1082 deriv_properties_t DfDp_sg_properties_;
1083 sg_deriv_t DgDx_dot_sg_;
1084 sg_deriv_t DgDx_dotdot_sg_;
1085 sg_deriv_t DgDx_sg_;
1086 deriv_properties_t DgDx_dot_sg_properties_;
1087 deriv_properties_t DgDx_dotdot_sg_properties_;
1088 deriv_properties_t DgDx_sg_properties_;
1089 sg_deriv_t DgDp_sg_;
1090 deriv_properties_t DgDp_sg_properties_;
1092 mp_operator_t W_mp_;
1093 mp_deriv_t DfDp_mp_;
1094 deriv_properties_t DfDp_mp_properties_;
1095 mp_deriv_t DgDx_dot_mp_;
1096 mp_deriv_t DgDx_dotdot_mp_;
1097 mp_deriv_t DgDx_mp_;
1098 deriv_properties_t DgDx_dot_mp_properties_;
1099 deriv_properties_t DgDx_dotdot_mp_properties_;
1100 deriv_properties_t DgDx_mp_properties_;
1101 mp_deriv_t DgDp_mp_;
1102 deriv_properties_t DgDp_mp_properties_;
1109 void assert_supports(
EOutArgsDgDp arg,
int j,
int l)
const;
1122 void assert_l(
int l)
const;
1123 void assert_j(
int j)
const;
1140 virtual Teuchos::RCP<const Epetra_Map> get_x_map()
const = 0;
1143 virtual Teuchos::RCP<const Epetra_Map> get_f_map()
const = 0;
1146 virtual Teuchos::RCP<const Epetra_Map> get_p_map(
int l)
const;
1162 virtual Teuchos::RCP<const Teuchos::Array<std::string> > get_p_names(
int l)
const;
1165 virtual Teuchos::RCP<const Epetra_Map> get_g_map(
int j)
const;
1181 virtual Teuchos::ArrayView<const std::string> get_g_names(
int j)
const;
1189 virtual Teuchos::RCP<const Epetra_Vector> get_x_init()
const;
1192 virtual Teuchos::RCP<const Epetra_Vector> get_x_dot_init()
const;
1195 virtual Teuchos::RCP<const Epetra_Vector> get_x_dotdot_init()
const;
1198 virtual Teuchos::RCP<const Epetra_Vector> get_p_init(
int l)
const;
1201 virtual double get_t_init()
const;
1212 virtual double getInfBound()
const;
1215 virtual Teuchos::RCP<const Epetra_Vector> get_x_lower_bounds()
const;
1218 virtual Teuchos::RCP<const Epetra_Vector> get_x_upper_bounds()
const;
1221 virtual Teuchos::RCP<const Epetra_Vector> get_p_lower_bounds(
int l)
const;
1224 virtual Teuchos::RCP<const Epetra_Vector> get_p_upper_bounds(
int l)
const;
1227 virtual double get_t_lower_bound()
const;
1230 virtual double get_t_upper_bound()
const;
1243 virtual Teuchos::RCP<Epetra_Operator> create_W()
const;
1244 virtual Teuchos::RCP<EpetraExt::ModelEvaluator::Preconditioner> create_WPrec()
const;
1247 virtual Teuchos::RCP<Epetra_Operator> create_DfDp_op(
int l)
const;
1250 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_dot_op(
int j)
const;
1253 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_dotdot_op(
int j)
const;
1256 virtual Teuchos::RCP<Epetra_Operator> create_DgDx_op(
int j)
const;
1259 virtual Teuchos::RCP<Epetra_Operator> create_DgDp_op(
int j,
int l )
const;
1267 virtual InArgs createInArgs()
const = 0;
1270 virtual OutArgs createOutArgs()
const = 0;
1273 virtual void evalModel(
const InArgs& inArgs,
const OutArgs& outArgs )
const = 0;
1275 #ifdef HAVE_PYTRILINOS 1277 friend InArgs convertInArgsFromPython(PyObject * source);
1280 friend OutArgs convertOutArgsFromPython(PyObject * source);
1293 void setModelEvalDescription(
const std::string &modelEvalDescription );
1295 void set_Np(
int Np);
1299 void setSupports(
EInArgs_p_sg arg,
int l,
bool supports );
1301 void setSupports(
EInArgs_p_mp arg,
int l,
bool supports );
1308 void setModelEvalDescription(
const std::string &modelEvalDescription );
1310 void set_Np_Ng(
int Np,
int Ng);
1323 void setSupports(
EOutArgs_g_sg arg,
int j,
bool supports );
1334 void setSupports(
EOutArgs_g_mp arg,
int j,
bool supports );
1393 Teuchos::RCP<Epetra_Operator>
1395 const std::string &modelEvalDescription,
1397 const std::string &derivName
1401 Teuchos::RCP<Epetra_MultiVector>
1403 const std::string &modelEvalDescription,
1405 const std::string &derivName,
1410 Teuchos::RCP<Epetra_Operator>
1417 Teuchos::RCP<Epetra_MultiVector>
1424 Teuchos::RCP<Epetra_MultiVector>
1432 Teuchos::RCP<Epetra_MultiVector>
1440 Teuchos::RCP<Epetra_MultiVector>
1448 Teuchos::RCP<Epetra_MultiVector>
1464 std::string ModelEvaluator::InArgs::modelEvalDescription()
const 1465 {
return modelEvalDescription_; }
1468 int ModelEvaluator::InArgs::Np()
const 1469 {
return p_.size(); }
1472 void ModelEvaluator::InArgs::set_x_dot(
const Teuchos::RCP<const Epetra_Vector> &x_dot )
1473 { assert_supports(IN_ARG_x_dot); x_dot_ = x_dot; }
1476 void ModelEvaluator::InArgs::set_x_dotdot(
const Teuchos::RCP<const Epetra_Vector> &x_dotdot )
1477 { assert_supports(IN_ARG_x_dotdot); x_dotdot_ = x_dotdot; }
1480 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x_dot()
const 1481 { assert_supports(IN_ARG_x_dot);
return x_dot_; }
1484 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x_dotdot()
const 1485 { assert_supports(IN_ARG_x_dotdot);
return x_dotdot_; }
1488 void ModelEvaluator::InArgs::set_x(
const Teuchos::RCP<const Epetra_Vector> &x )
1489 { assert_supports(IN_ARG_x); x_ = x; }
1492 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_x()
const 1493 { assert_supports(IN_ARG_x);
return x_; }
1496 void ModelEvaluator::InArgs::set_x_dot_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly )
1497 { assert_supports(IN_ARG_x_dot_poly); x_dot_poly_ = x_dot_poly; }
1500 void ModelEvaluator::InArgs::set_x_dotdot_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dotdot_poly )
1501 { assert_supports(IN_ARG_x_dotdot_poly); x_dotdot_poly_ = x_dotdot_poly; }
1504 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1505 ModelEvaluator::InArgs::get_x_dot_poly()
const 1506 { assert_supports(IN_ARG_x_dot_poly);
return x_dot_poly_; }
1509 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1510 ModelEvaluator::InArgs::get_x_dotdot_poly()
const 1511 { assert_supports(IN_ARG_x_dotdot_poly);
return x_dotdot_poly_; }
1514 void ModelEvaluator::InArgs::set_x_poly(
const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly )
1515 { assert_supports(IN_ARG_x_poly); x_poly_ = x_poly; }
1518 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1519 ModelEvaluator::InArgs::get_x_poly()
const 1520 { assert_supports(IN_ARG_x_poly);
return x_poly_; }
1524 { assert_supports(IN_ARG_x_dot_sg); x_dot_sg_ = x_dot_sg; }
1528 { assert_supports(IN_ARG_x_dotdot_sg); x_dotdot_sg_ = x_dotdot_sg; }
1532 ModelEvaluator::InArgs::get_x_dot_sg()
const 1533 { assert_supports(IN_ARG_x_dot_sg);
return x_dot_sg_; }
1537 ModelEvaluator::InArgs::get_x_dotdot_sg()
const 1538 { assert_supports(IN_ARG_x_dotdot_sg);
return x_dotdot_sg_; }
1542 { assert_supports(IN_ARG_x_dot_mp); x_dot_mp_ = x_dot_mp; }
1546 { assert_supports(IN_ARG_x_dotdot_mp); x_dotdot_mp_ = x_dotdot_mp; }
1550 ModelEvaluator::InArgs::get_x_dot_mp()
const 1551 { assert_supports(IN_ARG_x_dot_mp);
return x_dot_mp_; }
1555 ModelEvaluator::InArgs::get_x_dotdot_mp()
const 1556 { assert_supports(IN_ARG_x_dotdot_mp);
return x_dotdot_mp_; }
1560 { assert_supports(IN_ARG_x_sg); x_sg_ = x_sg; }
1564 ModelEvaluator::InArgs::get_x_sg()
const 1565 { assert_supports(IN_ARG_x_sg);
return x_sg_; }
1569 { assert_supports(IN_ARG_x_mp); x_mp_ = x_mp; }
1573 ModelEvaluator::InArgs::get_x_mp()
const 1574 { assert_supports(IN_ARG_x_mp);
return x_mp_; }
1577 void ModelEvaluator::InArgs::set_p(
int l,
const Teuchos::RCP<const Epetra_Vector> &p_l )
1578 { assert_l(l); p_[l] = p_l; }
1581 Teuchos::RCP<const Epetra_Vector> ModelEvaluator::InArgs::get_p(
int l)
const 1582 { assert_l(l);
return p_[l]; }
1585 void ModelEvaluator::InArgs::set_p_sg(
int l,
1587 { assert_supports(IN_ARG_p_sg, l); p_sg_[l] = p_sg_l; }
1591 ModelEvaluator::InArgs::get_p_sg(
int l)
const 1592 { assert_supports(IN_ARG_p_sg, l);
return p_sg_[l]; }
1595 void ModelEvaluator::InArgs::set_p_mp(
int l,
1597 { assert_supports(IN_ARG_p_mp, l); p_mp_[l] = p_mp_l; }
1601 ModelEvaluator::InArgs::get_p_mp(
int l)
const 1602 { assert_supports(IN_ARG_p_mp, l);
return p_mp_[l]; }
1605 void ModelEvaluator::InArgs::set_t(
double t )
1606 { assert_supports(IN_ARG_t); t_ = t; }
1609 double ModelEvaluator::InArgs::get_t()
const 1610 { assert_supports(IN_ARG_t);
return t_; }
1613 void ModelEvaluator::InArgs::set_alpha(
double alpha )
1614 { assert_supports(IN_ARG_alpha); alpha_ = alpha; }
1617 double ModelEvaluator::InArgs::get_alpha()
const 1618 { assert_supports(IN_ARG_alpha);
return alpha_; }
1621 void ModelEvaluator::InArgs::set_omega(
double omega )
1622 { assert_supports(IN_ARG_omega); omega_ = omega; }
1625 double ModelEvaluator::InArgs::get_omega()
const 1626 { assert_supports(IN_ARG_omega);
return omega_; }
1629 void ModelEvaluator::InArgs::set_beta(
double beta )
1630 { assert_supports(IN_ARG_beta); beta_ = beta; }
1633 double ModelEvaluator::InArgs::get_beta()
const 1634 { assert_supports(IN_ARG_beta);
return beta_; }
1637 void ModelEvaluator::InArgs::set_step_size(
double step_size)
1638 { assert_supports(IN_ARG_step_size); step_size_ = step_size; }
1641 double ModelEvaluator::InArgs::get_step_size()
const 1642 { assert_supports(IN_ARG_step_size);
return step_size_; }
1645 void ModelEvaluator::InArgs::set_stage_number(
int stage_number)
1646 { assert_supports(IN_ARG_stage_number); stage_number_ = stage_number; }
1649 int ModelEvaluator::InArgs::get_stage_number()
const 1650 { assert_supports(IN_ARG_stage_number);
return stage_number_; }
1654 { assert_supports(IN_ARG_sg_basis); sg_basis_ = basis; }
1657 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
1658 ModelEvaluator::InArgs::get_sg_basis()
const 1659 { assert_supports(IN_ARG_sg_basis);
return sg_basis_; }
1663 { assert_supports(IN_ARG_sg_quadrature); sg_quad_ = quad; }
1666 Teuchos::RCP<const Stokhos::Quadrature<int,double> >
1667 ModelEvaluator::InArgs::get_sg_quadrature()
const 1668 { assert_supports(IN_ARG_sg_quadrature);
return sg_quad_; }
1672 { assert_supports(IN_ARG_sg_expansion); sg_exp_ = exp; }
1675 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
1676 ModelEvaluator::InArgs::get_sg_expansion()
const 1677 { assert_supports(IN_ARG_sg_expansion);
return sg_exp_; }
1680 void ModelEvaluator::InArgs::_setModelEvalDescription(
const std::string &new_modelEvalDescription )
1682 modelEvalDescription_ = new_modelEvalDescription;
1686 void ModelEvaluator::InArgs::_set_Np(
int new_Np)
1689 p_sg_.resize(new_Np);
1690 p_mp_.resize(new_Np);
1691 supports_p_sg_.resize(new_Np);
1692 supports_p_mp_.resize(new_Np);
1700 std::string ModelEvaluator::OutArgs::modelEvalDescription()
const 1701 {
return modelEvalDescription_; }
1704 int ModelEvaluator::OutArgs::Np()
const 1706 return DfDp_.size();
1710 int ModelEvaluator::OutArgs::Ng()
const 1720 ModelEvaluator::OutArgs::get_f()
const {
return f_; }
1731 ModelEvaluator::OutArgs::get_g(
int j)
const 1738 void ModelEvaluator::OutArgs::set_g_sg(
int j,
const sg_vector_t &g_sg_j )
1740 assert_supports(OUT_ARG_g_sg, j);
1746 ModelEvaluator::OutArgs::get_g_sg(
int j)
const 1748 assert_supports(OUT_ARG_g_sg, j);
1753 void ModelEvaluator::OutArgs::set_g_mp(
int j,
const mp_vector_t &g_mp_j )
1755 assert_supports(OUT_ARG_g_mp, j);
1761 ModelEvaluator::OutArgs::get_g_mp(
int j)
const 1763 assert_supports(OUT_ARG_g_mp, j);
1768 void ModelEvaluator::OutArgs::set_W(
const Teuchos::RCP<Epetra_Operator> &W ) { W_ = W; }
1770 void ModelEvaluator::OutArgs::set_WPrec(
const Teuchos::RCP<Epetra_Operator> &WPrec ) { WPrec_ = WPrec; }
1773 Teuchos::RCP<Epetra_Operator> ModelEvaluator::OutArgs::get_W()
const {
return W_; }
1775 Teuchos::RCP<Epetra_Operator> ModelEvaluator::OutArgs::get_WPrec()
const {
return WPrec_; }
1779 {
return W_properties_; }
1782 {
return WPrec_properties_; }
1785 void ModelEvaluator::OutArgs::set_DfDp(
int l,
const Derivative &DfDp_l )
1787 assert_supports(OUT_ARG_DfDp,l);
1793 ModelEvaluator::OutArgs::get_DfDp(
int l)
const 1795 assert_supports(OUT_ARG_DfDp,l);
1801 ModelEvaluator::OutArgs::get_DfDp_properties(
int l)
const 1803 assert_supports(OUT_ARG_DfDp,l);
1804 return DfDp_properties_[l];
1808 void ModelEvaluator::OutArgs::set_DfDp_sg(
int l,
const SGDerivative &DfDp_sg_l )
1810 assert_supports(OUT_ARG_DfDp_sg,l);
1811 DfDp_sg_[l] = DfDp_sg_l;
1816 ModelEvaluator::OutArgs::get_DfDp_sg(
int l)
const 1818 assert_supports(OUT_ARG_DfDp_sg,l);
1824 ModelEvaluator::OutArgs::get_DfDp_sg_properties(
int l)
const 1826 assert_supports(OUT_ARG_DfDp_sg,l);
1827 return DfDp_sg_properties_[l];
1831 void ModelEvaluator::OutArgs::set_DfDp_mp(
int l,
const MPDerivative &DfDp_mp_l )
1833 assert_supports(OUT_ARG_DfDp_mp,l);
1834 DfDp_mp_[l] = DfDp_mp_l;
1839 ModelEvaluator::OutArgs::get_DfDp_mp(
int l)
const 1841 assert_supports(OUT_ARG_DfDp_mp,l);
1847 ModelEvaluator::OutArgs::get_DfDp_mp_properties(
int l)
const 1849 assert_supports(OUT_ARG_DfDp_mp,l);
1850 return DfDp_mp_properties_[l];
1854 void ModelEvaluator::OutArgs::set_DgDx_dot(
int j,
const Derivative &DgDx_dot_j )
1856 assert_supports(OUT_ARG_DgDx_dot,j);
1857 DgDx_dot_[j] = DgDx_dot_j;
1862 ModelEvaluator::OutArgs::get_DgDx_dot(
int j)
const 1864 assert_supports(OUT_ARG_DgDx_dot,j);
1865 return DgDx_dot_[j];
1870 ModelEvaluator::OutArgs::get_DgDx_dot_properties(
int j)
const 1872 assert_supports(OUT_ARG_DgDx_dot,j);
1873 return DgDx_dot_properties_[j];
1877 void ModelEvaluator::OutArgs::set_DgDx_dot_sg(
int j,
const SGDerivative &DgDx_dot_sg_j )
1879 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1880 DgDx_dot_sg_[j] = DgDx_dot_sg_j;
1885 ModelEvaluator::OutArgs::get_DgDx_dot_sg(
int j)
const 1887 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1888 return DgDx_dot_sg_[j];
1893 ModelEvaluator::OutArgs::get_DgDx_dot_sg_properties(
int j)
const 1895 assert_supports(OUT_ARG_DgDx_dot_sg,j);
1896 return DgDx_dot_sg_properties_[j];
1900 void ModelEvaluator::OutArgs::set_DgDx_dot_mp(
int j,
const MPDerivative &DgDx_dot_mp_j )
1902 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1903 DgDx_dot_mp_[j] = DgDx_dot_mp_j;
1908 ModelEvaluator::OutArgs::get_DgDx_dot_mp(
int j)
const 1910 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1911 return DgDx_dot_mp_[j];
1916 ModelEvaluator::OutArgs::get_DgDx_dot_mp_properties(
int j)
const 1918 assert_supports(OUT_ARG_DgDx_dot_mp,j);
1919 return DgDx_dot_mp_properties_[j];
1923 void ModelEvaluator::OutArgs::set_DgDx_dotdot(
int j,
const Derivative &DgDx_dotdot_j )
1925 assert_supports(OUT_ARG_DgDx_dotdot,j);
1926 DgDx_dotdot_[j] = DgDx_dotdot_j;
1931 ModelEvaluator::OutArgs::get_DgDx_dotdot(
int j)
const 1933 assert_supports(OUT_ARG_DgDx_dotdot,j);
1934 return DgDx_dotdot_[j];
1939 ModelEvaluator::OutArgs::get_DgDx_dotdot_properties(
int j)
const 1941 assert_supports(OUT_ARG_DgDx_dotdot,j);
1942 return DgDx_dotdot_properties_[j];
1946 void ModelEvaluator::OutArgs::set_DgDx_dotdot_sg(
int j,
const SGDerivative &DgDx_dotdot_sg_j )
1948 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1949 DgDx_dotdot_sg_[j] = DgDx_dotdot_sg_j;
1954 ModelEvaluator::OutArgs::get_DgDx_dotdot_sg(
int j)
const 1956 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1957 return DgDx_dotdot_sg_[j];
1962 ModelEvaluator::OutArgs::get_DgDx_dotdot_sg_properties(
int j)
const 1964 assert_supports(OUT_ARG_DgDx_dotdot_sg,j);
1965 return DgDx_dotdot_sg_properties_[j];
1969 void ModelEvaluator::OutArgs::set_DgDx_dotdot_mp(
int j,
const MPDerivative &DgDx_dotdot_mp_j )
1971 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1972 DgDx_dotdot_mp_[j] = DgDx_dotdot_mp_j;
1977 ModelEvaluator::OutArgs::get_DgDx_dotdot_mp(
int j)
const 1979 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1980 return DgDx_dotdot_mp_[j];
1985 ModelEvaluator::OutArgs::get_DgDx_dotdot_mp_properties(
int j)
const 1987 assert_supports(OUT_ARG_DgDx_dotdot_mp,j);
1988 return DgDx_dotdot_mp_properties_[j];
1992 void ModelEvaluator::OutArgs::set_DgDx(
int j,
const Derivative &DgDx_j )
1994 assert_supports(OUT_ARG_DgDx,j);
2000 ModelEvaluator::OutArgs::get_DgDx(
int j)
const 2002 assert_supports(OUT_ARG_DgDx,j);
2008 ModelEvaluator::OutArgs::get_DgDx_properties(
int j)
const 2010 assert_supports(OUT_ARG_DgDx,j);
2011 return DgDx_properties_[j];
2015 void ModelEvaluator::OutArgs::set_DgDx_sg(
int j,
const SGDerivative &DgDx_sg_j )
2017 assert_supports(OUT_ARG_DgDx_sg,j);
2018 DgDx_sg_[j] = DgDx_sg_j;
2023 ModelEvaluator::OutArgs::get_DgDx_sg(
int j)
const 2025 assert_supports(OUT_ARG_DgDx_sg,j);
2031 ModelEvaluator::OutArgs::get_DgDx_sg_properties(
int j)
const 2033 assert_supports(OUT_ARG_DgDx_sg,j);
2034 return DgDx_sg_properties_[j];
2038 void ModelEvaluator::OutArgs::set_DgDx_mp(
int j,
const MPDerivative &DgDx_mp_j )
2040 assert_supports(OUT_ARG_DgDx_mp,j);
2041 DgDx_mp_[j] = DgDx_mp_j;
2046 ModelEvaluator::OutArgs::get_DgDx_mp(
int j)
const 2048 assert_supports(OUT_ARG_DgDx_mp,j);
2054 ModelEvaluator::OutArgs::get_DgDx_mp_properties(
int j)
const 2056 assert_supports(OUT_ARG_DgDx_mp,j);
2057 return DgDx_mp_properties_[j];
2061 void ModelEvaluator::OutArgs::set_DgDp(
int j,
int l,
const Derivative &DgDp_j_l )
2063 assert_supports(OUT_ARG_DgDp,j,l);
2064 DgDp_[ j*Np() + l ] = DgDp_j_l;
2069 ModelEvaluator::OutArgs::get_DgDp(
int j,
int l)
const 2071 assert_supports(OUT_ARG_DgDp,j,l);
2072 return DgDp_[ j*Np() + l ];
2077 ModelEvaluator::OutArgs::get_DgDp_properties(
int j,
int l)
const 2079 assert_supports(OUT_ARG_DgDp,j,l);
2080 return DgDp_properties_[ j*Np() + l ];
2084 void ModelEvaluator::OutArgs::set_DgDp_sg(
int j,
int l,
const SGDerivative &DgDp_sg_j_l )
2086 assert_supports(OUT_ARG_DgDp_sg,j,l);
2087 DgDp_sg_[ j*Np() + l ] = DgDp_sg_j_l;
2092 ModelEvaluator::OutArgs::get_DgDp_sg(
int j,
int l)
const 2094 assert_supports(OUT_ARG_DgDp_sg,j,l);
2095 return DgDp_sg_[ j*Np() + l ];
2100 ModelEvaluator::OutArgs::get_DgDp_sg_properties(
int j,
int l)
const 2102 assert_supports(OUT_ARG_DgDp_sg,j,l);
2103 return DgDp_sg_properties_[ j*Np() + l ];
2107 void ModelEvaluator::OutArgs::set_DgDp_mp(
int j,
int l,
const MPDerivative &DgDp_mp_j_l )
2109 assert_supports(OUT_ARG_DgDp_mp,j,l);
2110 DgDp_mp_[ j*Np() + l ] = DgDp_mp_j_l;
2115 ModelEvaluator::OutArgs::get_DgDp_mp(
int j,
int l)
const 2117 assert_supports(OUT_ARG_DgDp_mp,j,l);
2118 return DgDp_mp_[ j*Np() + l ];
2123 ModelEvaluator::OutArgs::get_DgDp_mp_properties(
int j,
int l)
const 2125 assert_supports(OUT_ARG_DgDp_mp,j,l);
2126 return DgDp_mp_properties_[ j*Np() + l ];
2130 void ModelEvaluator::OutArgs::set_f_poly(
const Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > &f_poly )
2131 { f_poly_ = f_poly; }
2134 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> >
2135 ModelEvaluator::OutArgs::get_f_poly()
const 2144 ModelEvaluator::OutArgs::get_f_sg()
const 2159 ModelEvaluator::OutArgs::get_f_mp()
const 2173 void ModelEvaluator::InArgsSetup::setModelEvalDescription(
const std::string &new_modelEvalDescription )
2175 this->_setModelEvalDescription(new_modelEvalDescription);
2179 void ModelEvaluator::InArgsSetup::set_Np(
int new_Np)
2180 { this->_set_Np(new_Np); }
2183 void ModelEvaluator::InArgsSetup::setSupports(
EInArgsMembers arg,
bool new_supports )
2184 { this->_setSupports(arg,new_supports); }
2187 void ModelEvaluator::InArgsSetup::setSupports(
EInArgs_p_sg arg,
int l,
bool new_supports )
2188 { this->_setSupports(arg,l,new_supports); }
2191 void ModelEvaluator::InArgsSetup::setSupports(
EInArgs_p_mp arg,
int l,
bool new_supports )
2192 { this->_setSupports(arg,l,new_supports); }
2199 void ModelEvaluator::OutArgsSetup::setModelEvalDescription(
const std::string &new_modelEvalDescription )
2201 this->_setModelEvalDescription(new_modelEvalDescription);
2205 void ModelEvaluator::OutArgsSetup::set_Np_Ng(
int new_Np,
int new_Ng)
2206 { this->_set_Np_Ng(new_Np,new_Ng); }
2210 { this->_setSupports(arg,new_supports); }
2214 { this->_setSupports(arg,l,new_supports); }
2218 { this->_setSupports(arg,j,new_supports); }
2222 { this->_setSupports(arg,j,new_supports); }
2226 { this->_setSupports(arg,j,new_supports); }
2230 { this->_setSupports(arg,j,l,new_supports); }
2233 void ModelEvaluator::OutArgsSetup::setSupports(
EOutArgs_g_sg arg,
int j,
bool new_supports )
2234 { this->_setSupports(arg,j,new_supports); }
2238 { this->_setSupports(arg,l,new_supports); }
2242 { this->_setSupports(arg,j,new_supports); }
2246 { this->_setSupports(arg,j,new_supports); }
2250 { this->_setSupports(arg,j,new_supports); }
2254 { this->_setSupports(arg,j,l,new_supports); }
2257 void ModelEvaluator::OutArgsSetup::setSupports(
EOutArgs_g_mp arg,
int j,
bool new_supports )
2258 { this->_setSupports(arg,j,new_supports); }
2262 { this->_setSupports(arg,l,new_supports); }
2266 { this->_setSupports(arg,j,new_supports); }
2270 { this->_setSupports(arg,j,new_supports); }
2274 { this->_setSupports(arg,j,new_supports); }
2278 { this->_setSupports(arg,j,l,new_supports); }
2282 { this->_set_W_properties(properties); }
2285 { this->_set_WPrec_properties(properties); }
2290 this->_set_DfDp_properties(l,properties);
2296 this->_set_DgDx_dot_properties(j,properties);
2302 this->_set_DgDx_dotdot_properties(j,properties);
2308 this->_set_DgDx_properties(j,properties);
2314 this->_set_DgDp_properties(j,l,properties);
2320 this->_set_DfDp_sg_properties(l,properties);
2326 this->_set_DgDx_dot_sg_properties(j,properties);
2332 this->_set_DgDx_dotdot_sg_properties(j,properties);
2338 this->_set_DgDx_sg_properties(j,properties);
2344 this->_set_DgDp_sg_properties(j,l,properties);
2350 this->_set_DfDp_mp_properties(l,properties);
2356 this->_set_DgDx_dot_mp_properties(j,properties);
2362 this->_set_DgDx_dotdot_mp_properties(j,properties);
2368 this->_set_DgDx_mp_properties(j,properties);
2374 this->_set_DgDp_mp_properties(j,l,properties);
2379 #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)