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;
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;
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;
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
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;
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;
207 void set_t(
double t );
221 double get_t()
const;
227 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
get_sg_basis()
const;
235 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
get_sg_expansion()
const;
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_;
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_;
288 supports_p_sg_t supports_p_sg_;
289 supports_p_sg_t supports_p_mp_;
294 void assert_l(
int l)
const;
305 template<
class ObjType>
315 : Teuchos::RCP<ObjType>(obj), evalType_(evalType) {}
320 { this->operator=(obj); evalType_ = evalType; }
339 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
343 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
347 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
353 :supportsLinearOp_(true), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
361 :supportsLinearOp_(false)
364 ,supportsTransMVByRow_(
369 { supportsLinearOp_ =
true;
return *
this; }
373 switch(mvOrientation) {
376 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
382 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
385 {
return supportsLinearOp_; }
389 switch(mvOrientation) {
392 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
394 TEUCHOS_UNREACHABLE_RETURN(
false);
397 bool supportsLinearOp_;
398 bool supportsMVByCol_;
399 bool supportsTransMVByRow_;
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) {}
498 Teuchos::RCP<Epetra_Operator> lo_;
510 bool 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
586 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > lo_;
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_; }
619 Teuchos::Array<int> paramIndexes_;
637 ) : dmv_(mv,orientation) {}
764 typedef Teuchos::RCP<Stokhos::EpetraVectorOrthogPoly>
sg_vector_t;
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;
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;
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_;
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_;
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_;
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;
1199 virtual Teuchos::RCP<const Epetra_Vector>
get_p_init(
int l)
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;
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;
1276 #ifdef HAVE_PYTRILINOS
1278 friend InArgs convertInArgsFromPython(PyObject * source);
1281 friend OutArgs convertOutArgsFromPython(PyObject * source);
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>
1466 {
return modelEvalDescription_; }
1470 {
return p_.size(); }
1490 { assert_supports(
IN_ARG_x); x_ = x; }
1494 { assert_supports(
IN_ARG_x);
return x_; }
1505 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1510 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1519 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1579 { assert_l(l); p_[l] = p_l; }
1583 { assert_l(l);
return p_[l]; }
1588 { assert_supports(
IN_ARG_p_sg, l); p_sg_[l] = p_sg_l; }
1593 { assert_supports(
IN_ARG_p_sg, l);
return p_sg_[l]; }
1598 { assert_supports(
IN_ARG_p_mp, l); p_mp_[l] = p_mp_l; }
1603 { assert_supports(
IN_ARG_p_mp, l);
return p_mp_[l]; }
1607 { assert_supports(
IN_ARG_t); t_ = t; }
1611 { assert_supports(
IN_ARG_t);
return t_; }
1658 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
1667 Teuchos::RCP<const Stokhos::Quadrature<int,double> >
1676 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
1683 modelEvalDescription_ = new_modelEvalDescription;
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);
1702 {
return modelEvalDescription_; }
1707 return DfDp_.size();
1780 {
return W_properties_; }
1783 {
return WPrec_properties_; }
1805 return DfDp_properties_[l];
1812 DfDp_sg_[l] = DfDp_sg_l;
1828 return DfDp_sg_properties_[l];
1835 DfDp_mp_[l] = DfDp_mp_l;
1851 return DfDp_mp_properties_[l];
1858 DgDx_dot_[j] = DgDx_dot_j;
1866 return DgDx_dot_[j];
1874 return DgDx_dot_properties_[j];
1881 DgDx_dot_sg_[j] = DgDx_dot_sg_j;
1889 return DgDx_dot_sg_[j];
1897 return DgDx_dot_sg_properties_[j];
1904 DgDx_dot_mp_[j] = DgDx_dot_mp_j;
1912 return DgDx_dot_mp_[j];
1920 return DgDx_dot_mp_properties_[j];
1927 DgDx_dotdot_[j] = DgDx_dotdot_j;
1935 return DgDx_dotdot_[j];
1943 return DgDx_dotdot_properties_[j];
1950 DgDx_dotdot_sg_[j] = DgDx_dotdot_sg_j;
1958 return DgDx_dotdot_sg_[j];
1966 return DgDx_dotdot_sg_properties_[j];
1973 DgDx_dotdot_mp_[j] = DgDx_dotdot_mp_j;
1981 return DgDx_dotdot_mp_[j];
1989 return DgDx_dotdot_mp_properties_[j];
2012 return DgDx_properties_[j];
2019 DgDx_sg_[j] = DgDx_sg_j;
2035 return DgDx_sg_properties_[j];
2042 DgDx_mp_[j] = DgDx_mp_j;
2058 return DgDx_mp_properties_[j];
2065 DgDp_[ j*Np() + l ] = DgDp_j_l;
2073 return DgDp_[ j*Np() + l ];
2081 return DgDp_properties_[ j*Np() + l ];
2088 DgDp_sg_[ j*Np() + l ] = DgDp_sg_j_l;
2096 return DgDp_sg_[ j*Np() + l ];
2104 return DgDp_sg_properties_[ j*Np() + l ];
2111 DgDp_mp_[ j*Np() + l ] = DgDp_mp_j_l;
2119 return DgDp_mp_[ j*Np() + l ];
2127 return DgDp_mp_properties_[ j*Np() + l ];
2132 { f_poly_ = f_poly; }
2135 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> >
2176 this->_setModelEvalDescription(new_modelEvalDescription);
2181 { this->_set_Np(new_Np); }
2185 { this->_setSupports(arg,new_supports); }
2189 { this->_setSupports(arg,l,new_supports); }
2193 { this->_setSupports(arg,l,new_supports); }
2202 this->_setModelEvalDescription(new_modelEvalDescription);
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); }
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); }
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...
DerivativeMultiVector getDerivativeMultiVector() const
void set_stage_number(int stage_number)
mp_const_vector_t get_x_mp() const
Get multi-point solution vector.
Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > get_x_dot_poly() const
Get time derivative vector Taylor polynomial.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
SGDerivative get_DgDx_dotdot_sg(int j) const
bool supports(EOutArgsMembers arg) const
Residual vector Taylor polynomial.
MPDerivative(const mp_operator_t &lo)
void set_WPrec_properties(const DerivativeProperties &properties)
MPDerivativeMultiVector(const mp_multivector_t &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
virtual Teuchos::RCP< const Epetra_Map > get_g_map(int j) const
.
void set_W_properties(const DerivativeProperties &properties)
DerivativeProperties get_DgDx_sg_properties(int j) const
virtual InArgs createInArgs() const =0
void set_step_size(double step_size)
mp_const_vector_t get_p_mp(int l) const
Get multi-point parameter vector.
virtual Teuchos::RCP< Epetra_Operator > create_DgDx_op(int j) const
Evaluation< Epetra_Vector > get_g(int j) const
Get g(j) where 0 <= j && j < this->Ng().
mp_const_vector_t get_x_dotdot_mp() const
void set_DgDx(int j, const Derivative &DgDx_j)
Derivative get_DfDp(int l) const
void setSupports(EOutArgsMembers arg, bool supports=true)
EEvalType getType() const
A very approximate derivative (i.e. for a preconditioner)
Teuchos::RCP< const Epetra_Vector > get_x_dotdot() const
void set_x_dotdot_poly(const Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > &x_dotdot_poly)
mp_vector_t get_g_mp(int j) const
Get multi-point response.
Preconditioner()
Default constructor of null Operatir.
bool supports(EDerivativeLinearOp) const
Time second derivative vector Taylor polynomial.
void _setSupports(EOutArgsMembers arg, bool supports)
void _set_DfDp_properties(int l, const DerivativeProperties &properties)
virtual Teuchos::RCP< const Epetra_Vector > get_p_init(int l) const
Exact function evaluation.
void set_DgDx_sg_properties(int j, const DerivativeProperties &properties)
virtual Teuchos::RCP< const Epetra_Map > get_f_map() const =0
.
virtual Teuchos::RCP< const Epetra_Map > get_x_map() const =0
.
Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > sg_operator_t
Short-hand for stochastic Galerkin operator type.
MPDerivativeMultiVector()
void set_beta(double beta)
virtual ~ModelEvaluator()
static const int NUM_E_IN_ARGS_MEMBERS
bool isAlreadyInverted
Bool flag.
Teuchos::RCP< Teuchos::Polynomial< Epetra_Vector > > get_f_poly() const
Get residual vector Taylor polynomial.
Preconditioner(const Teuchos::RCP< Epetra_Operator > &PrecOp_, bool isAlreadyInverted_)
Usable constructor to set the (Epetra_Operator,bool) pair.
void set_x(const Teuchos::RCP< const Epetra_Vector > &x)
void set_x_dot(const Teuchos::RCP< const Epetra_Vector > &x_dot)
virtual Teuchos::RCP< const Epetra_Vector > get_p_upper_bounds(int l) const
void set_x_dotdot_mp(const mp_const_vector_t &x_dotdot_mp)
Teuchos::RCP< Epetra_Operator > getLinearOp(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName)
Multi-point solution vector.
Teuchos::RCP< Epetra_MultiVector > get_DgDp_mv(const int j, const int l, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
virtual double get_t_upper_bound() const
mp_multivector_t getMultiVector() const
virtual Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Get the names of the parameters associated with parameter subvector l if available.
SGDerivativeMultiVector(const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
bool funcOrDerivesAreSet(EOutArgsMembers arg) const
Return true if the function or its derivatives are set.
DerivativeProperties get_DfDp_sg_properties(int l) const
MPDerivative get_DgDx_dotdot_mp(int j) const
Teuchos::RCP< Epetra_Operator > get_W() const
DerivativeProperties get_DgDx_mp_properties(int j) const
Teuchos::RCP< Epetra_MultiVector > get_DgDx_dot_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
void set_DfDp(int l, const Derivative &DfDp_l)
void set_WPrec(const Teuchos::RCP< Epetra_Operator > &WPrec)
Teuchos::RCP< Stokhos::ProductEpetraMultiVector > mp_multivector_t
Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
Stochastic Galerkin quadrature.
Stochastic Galerkin expansion.
void _set_DgDp_mp_properties(int j, int l, const DerivativeProperties &properties)
Teuchos::RCP< Stokhos::ProductEpetraOperator > mp_operator_t
void set_DgDx_dotdot(int j, const Derivative &DgDx_dotdot_j)
Derivative get_DgDx_dot(int j) const
void set_g_sg(int j, const sg_vector_t &g_sg_j)
Set stochastic Galerkin vector polynomial response.
Teuchos::RCP< const Stokhos::ProductEpetraMultiVector > mp_const_multivector_t
void set_f(const Evaluation< Epetra_Vector > &f)
SGDerivativeMultiVector getDerivativeMultiVector() const
void setSupports(EInArgsMembers arg, bool supports=true)
Teuchos::RCP< Epetra_Operator > PrecOp
Accessor for the Epetra_Operator.
Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > get_x_poly() const
Get solution vector Taylor polynomial.
DerivativeProperties get_WPrec_properties() const
DerivativeSupport(EDerivativeMultiVectorOrientation mvOrientation)
DerivativeProperties get_DgDp_properties(int j, int l) const
const Teuchos::Array< int > & getParamIndexes() const
DerivativeProperties get_DgDx_properties(int j) const
Teuchos::RCP< Epetra_Operator > getLinearOp() const
bool supports(EDerivativeMultiVectorOrientation mvOrientation) const
DerivativeProperties get_DgDp_mp_properties(int j, int l) const
DerivativeProperties get_W_properties() const
void setFailed() const
Set that the evaluation as a whole failed.
Teuchos::RCP< const Epetra_Vector > get_p(int l) const
void set_DfDp_sg(int l, const SGDerivative &DfDp_sg_l)
DerivativeProperties get_DgDx_dotdot_sg_properties(int j) const
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
EDerivativeMultiVectorOrientation getOrientation() const
MPDerivative get_DfDp_mp(int l) const
Teuchos::RCP< const Stokhos::Quadrature< int, double > > get_sg_quadrature() const
SGDerivative get_DgDp_sg(int j, int l) const
Derivative get_DgDx(int j) const
Teuchos::RCP< Epetra_MultiVector > getMultiVector(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
virtual Teuchos::RCP< Epetra_Operator > create_DgDx_dot_op(int j) const
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
virtual Teuchos::RCP< const Epetra_Vector > get_x_upper_bounds() const
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
void set_sg_basis(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis)
EDerivativeLinearity linearity
Multi-point "W" operator.
DerivativeSupport(EDerivativeLinearOp)
Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > getLinearOp() const
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
MPDerivativeMultiVector getDerivativeMultiVector() const
Teuchos::RCP< Epetra_Operator > get_WPrec() const
void set_x_dotdot(const Teuchos::RCP< const Epetra_Vector > &x_dotdot)
Stochastic Galerkin solution vector polynomial.
std::string modelEvalDescription() const
void set_W_sg(const sg_operator_t &W_sg)
Set stochastic Galerkin W operator polynomial.
Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > sg_vector_t
Short-hand for stochastic Galerkin vector type.
void set_DgDx_dot_sg(int j, const SGDerivative &DgDx_dot_j)
void set_DgDx_dot(int j, const Derivative &DgDx_dot_j)
DerivativeProperties get_DgDx_dot_sg_properties(int j) const
mp_const_vector_t get_x_dot_mp() const
Get multi-point time derivative vector.
sg_vector_t get_f_sg() const
Get stochastic Galerkin residual vector polynomial.
An approximate derivative (i.e. for a Jacobian)
void set_DgDx_dot_mp_properties(int j, const DerivativeProperties &properties)
void set_DgDp_properties(int j, int l, const DerivativeProperties &properties)
void set_DgDx_dotdot_mp(int j, const MPDerivative &DgDx_dotdot_j)
Teuchos::RCP< Epetra_MultiVector > getMultiVector() const
Evaluation(const Teuchos::RCP< ObjType > &obj)
void _set_DgDx_dotdot_mp_properties(int j, const DerivativeProperties &properties)
void set_DgDx_sg(int j, const SGDerivative &DgDx_j)
virtual Teuchos::ArrayView< const std::string > get_g_names(int j) const
Get the names of the response functions associated with response subvector j if available.
int get_stage_number() const
Teuchos::RCP< const Stokhos::EpetraVectorOrthogPoly > sg_const_vector_t
Short-hand for stochastic Galerkin vector type.
void set_p_mp(int l, const mp_const_vector_t &p_mp_l)
Set multi-point parameter vector.
void set_DgDx_mp(int j, const MPDerivative &DgDx_j)
void set_DgDp_sg(int j, int l, const SGDerivative &DgDp_sg_j_l)
void set_DfDp_properties(int l, const DerivativeProperties &properties)
void setModelEvalDescription(const std::string &modelEvalDescription)
void set_x_dotdot_sg(const sg_const_vector_t &x_dotdot_sg)
virtual Teuchos::RCP< const Epetra_Vector > get_x_lower_bounds() const
Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > get_x_dotdot_poly() const
virtual Teuchos::RCP< const Epetra_Vector > get_x_dotdot_init() const
Teuchos::RCP< Epetra_MultiVector > get_DfDp_mv(const int l, const ModelEvaluator::OutArgs &outArgs)
Derivative(const DerivativeMultiVector &dmv)
void set_p(int l, const Teuchos::RCP< const Epetra_Vector > &p_l)
void _set_DgDx_mp_properties(int j, const DerivativeProperties &properties)
void set_DgDp_sg_properties(int j, int l, const DerivativeProperties &properties)
MPDerivative get_DgDx_mp(int j) const
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
Teuchos::RCP< Epetra_MultiVector > getMultiVector() const
Derivative get_DgDp(int j, int l) const
void set_DgDx_dot_properties(int j, const DerivativeProperties &properties)
const Teuchos::Array< int > & getParamIndexes() const
SGDerivativeMultiVector()
Teuchos::RCP< Epetra_Operator > get_DfDp_op(const int l, const ModelEvaluator::OutArgs &outArgs)
sg_operator_t get_W_sg() const
Get stochastic Galerkin W operator polynomial.
void set_x_dot_sg(const sg_const_vector_t &x_dot_sg)
Set stochastic Galerkin time derivative vector polynomial.
MPDerivative(const MPDerivativeMultiVector &dmv)
DerivativeSupport & plus(EDerivativeMultiVectorOrientation mvOrientation)
Teuchos::RCP< const Epetra_Vector > get_x_dot() const
Multi-point time second derivative vector.
SGDerivative get_DfDp_sg(int l) const
Preconditioner operator (approx Jacobian)
MPDerivative(const mp_multivector_t &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Teuchos::RCP< const Stokhos::ProductEpetraVector > mp_const_vector_t
bool supports(EInArgsMembers arg) const
EDerivativeMultiVectorOrientation getOrientation() const
Teuchos::RCP< Epetra_MultiVector > get_DgDx_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
void _set_WPrec_properties(const DerivativeProperties &WPrec_properties)
Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > get_sg_basis() const
void set_W(const Teuchos::RCP< Epetra_Operator > &W)
void _set_DgDx_dot_mp_properties(int j, const DerivativeProperties &properties)
virtual Teuchos::RCP< const Epetra_Vector > get_x_dot_init() const
virtual Teuchos::RCP< const Epetra_Map > get_p_map(int l) const
.
Derivative(const Teuchos::RCP< Epetra_Operator > &lo)
void _set_DgDx_dot_properties(int j, const DerivativeProperties &properties)
mp_operator_t getLinearOp() const
EDerivativeMultiVectorOrientation
mp_operator_t get_W_mp() const
Get multi-point W.
Multi-point residual vector.
void set_sg_expansion(const Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double, Stokhos::StandardStorage< int, double > > > &exp)
virtual Teuchos::RCP< Epetra_Operator > create_DgDp_op(int j, int l) const
void setModelEvalDescription(const std::string &modelEvalDescription)
Derivative get_DgDx_dotdot(int j) const
void set_f_sg(const sg_vector_t &f_sg)
Set stochastic Galerkin residual vector polynomial.
DerivativeProperties(EDerivativeLinearity in_linearity, ERankStatus in_rank, bool in_supportsAdjoint)
SGDerivative(const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &lo)
Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
void set_DgDp(int j, int l, const Derivative &DgDp_j_l)
void set_W_mp(const mp_operator_t &W_sg)
Set multi-point W.
void set_f_poly(const Teuchos::RCP< Teuchos::Polynomial< Epetra_Vector > > &f_poly)
Set residual vector Taylor polynomial.
void set_DgDx_dotdot_sg_properties(int j, const DerivativeProperties &properties)
virtual Teuchos::RCP< Epetra_Operator > create_DgDx_dotdot_op(int j) const
void _set_DgDx_dot_sg_properties(int j, const DerivativeProperties &properties)
Multi-point time derivative vector.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
sg_vector_t get_g_sg(int j) const
Get stochastic Galerkin vector polynomial response.
DerivativeProperties get_DgDx_dotdot_mp_properties(int j) const
DerivativeProperties get_DfDp_properties(int l) const
void set_x_dot_mp(const mp_const_vector_t &x_dot_mp)
Set multi-point time derivative vector.
bool isFailed() const
Return if the evaluation failed or not.
void set_DfDp_mp_properties(int l, const DerivativeProperties &properties)
void set_DgDx_dot_mp(int j, const MPDerivative &DgDx_dot_j)
Derivative(const Teuchos::RCP< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
void set_x_poly(const Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > &x_poly)
DerivativeMultiVector(const Teuchos::RCP< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
virtual Teuchos::RCP< const Epetra_Vector > get_p_lower_bounds(int l) 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 getOrientation() const
void _set_DfDp_mp_properties(int l, const DerivativeProperties &properties)
Solution vector Taylor polynomial.
Stochastic Galerkin time derivative vector polynomial.
virtual double getInfBound() const
Return the value of an infinite bound.
void set_omega(double omega)
sg_const_vector_t get_p_sg(int l) const
Get stochastic Galerkin vector polynomial parameter.
void _set_DgDp_properties(int j, int l, const DerivativeProperties &properties)
Stochastic Galerkin residual vector polynomial.
virtual double get_t_lower_bound() const
Stochastic Galerkin "W" operator polyomial.
SGDerivative get_DgDx_dot_sg(int j) const
void set_alpha(double alpha)
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)
DerivativeSupport(EDerivativeLinearOp, EDerivativeMultiVectorOrientation mvOrientation)
virtual Teuchos::RCP< const Epetra_Vector > get_x_init() const
mp_vector_t get_f_mp() const
Get multi-point residual vector.
void set_DfDp_sg_properties(int l, const DerivativeProperties &properties)
virtual double get_t_init() const
DerivativeProperties get_DgDx_dotdot_properties(int j) const
virtual void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const =0
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
mp_multivector_t getMultiVector() const
Teuchos::RCP< Stokhos::ProductEpetraVector > mp_vector_t
void set_DfDp_mp(int l, const MPDerivative &DfDp_mp_l)
void set_DgDx_dotdot_mp_properties(int j, const DerivativeProperties &properties)
Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double, Stokhos::StandardStorage< int, double > > > get_sg_expansion() const
Time derivative vector Taylor polynomial.
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
void _set_DgDx_properties(int j, const DerivativeProperties &properties)
virtual Teuchos::RCP< EpetraExt::ModelEvaluator::Preconditioner > create_WPrec() const
void set_DgDx_properties(int j, const DerivativeProperties &properties)
MPDerivative get_DgDp_mp(int j, int l) const
void set_DgDp_mp(int j, int l, const MPDerivative &DgDp_mp_j_l)
void set_DgDx_dot_sg_properties(int j, const DerivativeProperties &properties)
double get_step_size() const
void _set_Np_Ng(int Np, int Ng)
SGDerivative(const SGDerivativeMultiVector &dmv)
DerivativeProperties get_DgDx_dot_mp_properties(int j) const
DerivativeProperties get_DfDp_mp_properties(int l) const
static const int NUM_E_OUT_ARGS_MEMBERS
DerivativeProperties get_DgDx_dot_properties(int j) const
void set_x_dot_poly(const Teuchos::RCP< const Teuchos::Polynomial< Epetra_Vector > > &x_dot_poly)
Set time derivative vector Taylor polynomial.
void _set_DgDp_sg_properties(int j, int l, const DerivativeProperties &properties)
void set_g_mp(int j, const mp_vector_t &g_mp_j)
Set multi-point response.
virtual Teuchos::RCP< Epetra_Operator > create_DfDp_op(int l) const
void set_x_mp(const mp_const_vector_t &x_mp)
Set multi-point solution vector.
Stochastic Galerkin basis.
SGDerivative get_DgDx_sg(int j) const
Stochastic Galerkin time second derivative vector polynomial.
const Teuchos::Array< int > & getParamIndexes() const
void set_sg_quadrature(const Teuchos::RCP< const Stokhos::Quadrature< int, double > > &quad)
void set_x_sg(const sg_const_vector_t &x_sg)
Set stochastic Galerkin solution vector polynomial.
std::string modelEvalDescription() const
void set_DgDx_dotdot_sg(int j, const SGDerivative &DgDx_dotdot_j)
void _set_DgDx_dotdot_properties(int j, const DerivativeProperties &properties)
MPDerivative get_DgDx_dot_mp(int j) const
void _setSupports(EInArgsMembers arg, bool supports)
void set_f_mp(const mp_vector_t &f_mp)
Set multi-point residual vector.
Evaluation< Epetra_Vector > get_f() const
virtual Teuchos::RCP< Epetra_Operator > create_W() const
If supported, create a Epetra_Operator object for W to be evaluated.
sg_const_vector_t get_x_sg() const
Get stochastic Galerkin solution vector polynomial.
void _set_DgDx_sg_properties(int j, const DerivativeProperties &properties)
Teuchos::RCP< const Epetra_Vector > get_x() const
Set solution vector Taylor polynomial.
void _set_W_properties(const DerivativeProperties &W_properties)
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
DerivativeSupport(EDerivativeMultiVectorOrientation mvOrientation1, EDerivativeMultiVectorOrientation mvOrientation2)
DerivativeSupport & plus(EDerivativeLinearOp)
DerivativeProperties get_DgDp_sg_properties(int j, int l) const
virtual OutArgs createOutArgs() const =0
void _set_DgDx_dotdot_sg_properties(int j, const DerivativeProperties &properties)
sg_const_vector_t get_x_dot_sg() const
Get stochastic Galerkin time derivative vector polynomial.
void set_p_sg(int l, const sg_const_vector_t &p_sg_l)
Set stochastic Galerkin vector polynomial parameter.
Base interface for evaluating a stateless "model".
void set_DgDx_dotdot_properties(int j, const DerivativeProperties &properties)
void _setModelEvalDescription(const std::string &modelEvalDescription)
void set_Np_Ng(int Np, int Ng)
void _set_DfDp_sg_properties(int l, const DerivativeProperties &properties)
std::string toString(const int &x)
void _setModelEvalDescription(const std::string &modelEvalDescription)
Teuchos::RCP< const Stokhos::ProductEpetraOperator > mp_const_operator_t
void set_g(int j, const Evaluation< Epetra_Vector > &g_j)
Set g(j) where 0 <= j && j < this->Ng().
void set_DgDx_mp_properties(int j, const DerivativeProperties &properties)
void set_DgDp_mp_properties(int j, int l, const DerivativeProperties &properties)
Evaluation(const Teuchos::RCP< ObjType > &obj, EEvalType evalType)
sg_const_vector_t get_x_dotdot_sg() const