42 #ifndef EPETRA_EXT_MODEL_EVALUATOR_HPP
43 #define EPETRA_EXT_MODEL_EVALUATOR_HPP
47 #include "Teuchos_RefCountPtr.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;
140 void set_x_dot(
const Teuchos::RefCountPtr<const Epetra_Vector> &x_dot );
142 Teuchos::RefCountPtr<const Epetra_Vector>
get_x_dot()
const;
144 void set_x(
const Teuchos::RefCountPtr<const Epetra_Vector> &x );
146 Teuchos::RefCountPtr<const Epetra_Vector>
get_x()
const;
148 const Teuchos::RefCountPtr<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly
151 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> >
get_x_poly()
const;
154 const Teuchos::RefCountPtr<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly
157 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> >
get_x_dot_poly()
const;
175 void set_p(
int l,
const Teuchos::RefCountPtr<const Epetra_Vector> &p_l );
177 Teuchos::RefCountPtr<const Epetra_Vector>
get_p(
int l)
const;
187 void set_t(
double t );
197 double get_t()
const;
199 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
get_sg_basis()
const;
207 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
get_sg_expansion()
const;
229 typedef Teuchos::Array<Teuchos::RefCountPtr<const Epetra_Vector> > p_t;
230 typedef Teuchos::Array<sg_const_vector_t > p_sg_t;
231 typedef Teuchos::Array<mp_const_vector_t > p_mp_t;
232 typedef Teuchos::Array<bool> supports_p_sg_t;
234 std::string modelEvalDescription_;
235 Teuchos::RefCountPtr<const Epetra_Vector> x_dot_;
236 Teuchos::RefCountPtr<const Epetra_Vector> x_;
237 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> > x_dot_poly_;
238 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> > x_poly_;
249 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > sg_basis_;
250 Teuchos::RCP<const Stokhos::Quadrature<int,double> > sg_quad_;
251 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > sg_exp_;
253 supports_p_sg_t supports_p_sg_;
254 supports_p_sg_t supports_p_mp_;
259 void assert_l(
int l)
const;
270 template<
class ObjType>
280 : Teuchos::RefCountPtr<ObjType>(obj), evalType_(evalType) {}
285 { this->operator=(obj); evalType_ = evalType; }
304 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
308 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
312 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
318 :supportsLinearOp_(true), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
326 :supportsLinearOp_(false)
329 ,supportsTransMVByRow_(
334 { supportsLinearOp_ =
true;
return *
this; }
338 switch(mvOrientation) {
341 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
347 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
350 {
return supportsLinearOp_; }
354 switch(mvOrientation) {
357 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
362 bool supportsLinearOp_;
363 bool supportsMVByCol_;
364 bool supportsTransMVByRow_;
407 const Teuchos::RefCountPtr<Epetra_MultiVector> &mv
409 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
410 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
413 { orientation_ = orientation; };
419 {
return orientation_; }
422 {
return paramIndexes_; }
424 Teuchos::RefCountPtr<Epetra_MultiVector> mv_;
426 Teuchos::Array<int> paramIndexes_;
437 Derivative(
const Teuchos::RefCountPtr<Epetra_Operator> &lo )
441 const Teuchos::RefCountPtr<Epetra_MultiVector> &mv
443 ) : dmv_(mv,orientation) {}
463 Teuchos::RefCountPtr<Epetra_Operator> lo_;
475 bool isAlreadyInverted_ )
495 const Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > &mv
497 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
498 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
501 { orientation_ = orientation; };
503 Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly >
getMultiVector()
const
507 {
return orientation_; }
510 {
return paramIndexes_; }
512 Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > mv_;
514 Teuchos::Array<int> paramIndexes_;
525 SGDerivative(
const Teuchos::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly > &lo )
529 const Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > &mv
531 ) : dmv_(mv,orientation) {}
536 Teuchos::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly >
getLinearOp()
const
539 Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly >
getMultiVector()
const
551 Teuchos::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly > lo_;
567 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
568 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
571 { orientation_ = orientation; };
577 {
return orientation_; }
580 {
return paramIndexes_; }
584 Teuchos::Array<int> paramIndexes_;
602 ) : dmv_(mv,orientation) {}
714 typedef Teuchos::RefCountPtr<Stokhos::EpetraVectorOrthogPoly>
sg_vector_t;
717 typedef Teuchos::RefCountPtr<Stokhos::EpetraOperatorOrthogPoly >
sg_operator_t;
786 void set_W(
const Teuchos::RefCountPtr<Epetra_Operator> &W );
787 void set_WPrec(
const Teuchos::RefCountPtr<Epetra_Operator> &WPrec );
789 Teuchos::RefCountPtr<Epetra_Operator>
get_W()
const;
790 Teuchos::RefCountPtr<Epetra_Operator>
get_WPrec()
const;
876 void set_f_poly(
const Teuchos::RefCountPtr<Teuchos::Polynomial<Epetra_Vector> > &f_poly );
878 Teuchos::RefCountPtr<Teuchos::Polynomial<Epetra_Vector> >
get_f_poly()
const;
963 typedef Teuchos::Array<Evaluation<Epetra_Vector> > g_t;
964 typedef Teuchos::Array<sg_vector_t > g_sg_t;
965 typedef Teuchos::Array<mp_vector_t > g_mp_t;
966 typedef Teuchos::Array<Derivative> deriv_t;
967 typedef Teuchos::Array<SGDerivative> sg_deriv_t;
968 typedef Teuchos::Array<MPDerivative> mp_deriv_t;
969 typedef Teuchos::Array<DerivativeProperties> deriv_properties_t;
970 typedef Teuchos::Array<DerivativeSupport> supports_t;
971 typedef Teuchos::Array<bool> supports_g_sg_t;
973 std::string modelEvalDescription_;
974 mutable bool isFailed_;
976 supports_t supports_DfDp_;
977 supports_t supports_DgDx_dot_;
978 supports_t supports_DgDx_;
979 supports_t supports_DgDp_;
980 supports_g_sg_t supports_g_sg_;
981 supports_t supports_DfDp_sg_;
982 supports_t supports_DgDx_dot_sg_;
983 supports_t supports_DgDx_sg_;
984 supports_t supports_DgDp_sg_;
985 supports_g_sg_t supports_g_mp_;
986 supports_t supports_DfDp_mp_;
987 supports_t supports_DgDx_dot_mp_;
988 supports_t supports_DgDx_mp_;
989 supports_t supports_DgDp_mp_;
994 Teuchos::RefCountPtr<Epetra_Operator> W_;
995 Teuchos::RefCountPtr<Epetra_Operator> WPrec_;
999 deriv_properties_t DfDp_properties_;
1002 deriv_properties_t DgDx_dot_properties_;
1003 deriv_properties_t DgDx_properties_;
1005 deriv_properties_t DgDp_properties_;
1006 Teuchos::RefCountPtr<Teuchos::Polynomial<Epetra_Vector> > f_poly_;
1009 sg_deriv_t DfDp_sg_;
1010 deriv_properties_t DfDp_sg_properties_;
1011 sg_deriv_t DgDx_dot_sg_;
1012 sg_deriv_t DgDx_sg_;
1013 deriv_properties_t DgDx_dot_sg_properties_;
1014 deriv_properties_t DgDx_sg_properties_;
1015 sg_deriv_t DgDp_sg_;
1016 deriv_properties_t DgDp_sg_properties_;
1019 mp_deriv_t DfDp_mp_;
1020 deriv_properties_t DfDp_mp_properties_;
1021 mp_deriv_t DgDx_dot_mp_;
1022 mp_deriv_t DgDx_mp_;
1023 deriv_properties_t DgDx_dot_mp_properties_;
1024 deriv_properties_t DgDx_mp_properties_;
1025 mp_deriv_t DgDp_mp_;
1026 deriv_properties_t DgDp_mp_properties_;
1032 void assert_supports(
EOutArgsDgDp arg,
int j,
int l)
const;
1043 void assert_l(
int l)
const;
1044 void assert_j(
int j)
const;
1061 virtual Teuchos::RefCountPtr<const Epetra_Map>
get_x_map()
const = 0;
1064 virtual Teuchos::RefCountPtr<const Epetra_Map>
get_f_map()
const = 0;
1067 virtual Teuchos::RefCountPtr<const Epetra_Map>
get_p_map(
int l)
const;
1083 virtual Teuchos::RefCountPtr<const Teuchos::Array<std::string> >
get_p_names(
int l)
const;
1086 virtual Teuchos::RefCountPtr<const Epetra_Map>
get_g_map(
int j)
const;
1094 virtual Teuchos::RefCountPtr<const Epetra_Vector>
get_x_init()
const;
1097 virtual Teuchos::RefCountPtr<const Epetra_Vector>
get_x_dot_init()
const;
1100 virtual Teuchos::RefCountPtr<const Epetra_Vector>
get_p_init(
int l)
const;
1145 virtual Teuchos::RefCountPtr<Epetra_Operator>
create_W()
const;
1146 virtual Teuchos::RefCountPtr<EpetraExt::ModelEvaluator::Preconditioner>
create_WPrec()
const;
1149 virtual Teuchos::RefCountPtr<Epetra_Operator>
create_DfDp_op(
int l)
const;
1155 virtual Teuchos::RefCountPtr<Epetra_Operator>
create_DgDx_op(
int j)
const;
1158 virtual Teuchos::RefCountPtr<Epetra_Operator>
create_DgDp_op(
int j,
int l )
const;
1174 #ifdef HAVE_PYTRILINOS
1176 friend InArgs convertInArgsFromPython(PyObject * source);
1179 friend OutArgs convertOutArgsFromPython(PyObject * source);
1286 Teuchos::RefCountPtr<Epetra_Operator>
1288 const std::string &modelEvalDescription,
1290 const std::string &derivName
1294 Teuchos::RefCountPtr<Epetra_MultiVector>
1296 const std::string &modelEvalDescription,
1298 const std::string &derivName,
1303 Teuchos::RefCountPtr<Epetra_Operator>
1310 Teuchos::RefCountPtr<Epetra_MultiVector>
1317 Teuchos::RefCountPtr<Epetra_MultiVector>
1325 Teuchos::RefCountPtr<Epetra_MultiVector>
1333 Teuchos::RefCountPtr<Epetra_MultiVector>
1350 {
return modelEvalDescription_; }
1354 {
return p_.size(); }
1366 { assert_supports(
IN_ARG_x); x_ = x; }
1370 { assert_supports(
IN_ARG_x);
return x_; }
1377 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> >
1386 Teuchos::RefCountPtr<const Teuchos::Polynomial<Epetra_Vector> >
1428 { assert_l(l); p_[l] = p_l; }
1432 { assert_l(l);
return p_[l]; }
1437 { assert_supports(
IN_ARG_p_sg, l); p_sg_[l] = p_sg_l; }
1442 { assert_supports(
IN_ARG_p_sg, l);
return p_sg_[l]; }
1447 { assert_supports(
IN_ARG_p_mp, l); p_mp_[l] = p_mp_l; }
1452 { assert_supports(
IN_ARG_p_mp, l);
return p_mp_[l]; }
1456 { assert_supports(
IN_ARG_t); t_ = t; }
1460 { assert_supports(
IN_ARG_t);
return t_; }
1483 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
1492 Teuchos::RCP<const Stokhos::Quadrature<int,double> >
1501 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
1508 modelEvalDescription_ = new_modelEvalDescription;
1515 p_sg_.resize(new_Np);
1516 p_mp_.resize(new_Np);
1517 supports_p_sg_.resize(new_Np);
1518 supports_p_mp_.resize(new_Np);
1527 {
return modelEvalDescription_; }
1532 return DfDp_.size();
1605 {
return W_properties_; }
1608 {
return WPrec_properties_; }
1630 return DfDp_properties_[l];
1637 DfDp_sg_[l] = DfDp_sg_l;
1653 return DfDp_sg_properties_[l];
1660 DfDp_mp_[l] = DfDp_mp_l;
1676 return DfDp_mp_properties_[l];
1683 DgDx_dot_[j] = DgDx_dot_j;
1691 return DgDx_dot_[j];
1699 return DgDx_dot_properties_[j];
1706 DgDx_dot_sg_[j] = DgDx_dot_sg_j;
1714 return DgDx_dot_sg_[j];
1722 return DgDx_dot_sg_properties_[j];
1729 DgDx_dot_mp_[j] = DgDx_dot_mp_j;
1737 return DgDx_dot_mp_[j];
1745 return DgDx_dot_mp_properties_[j];
1768 return DgDx_properties_[j];
1775 DgDx_sg_[j] = DgDx_sg_j;
1791 return DgDx_sg_properties_[j];
1798 DgDx_mp_[j] = DgDx_mp_j;
1814 return DgDx_mp_properties_[j];
1821 DgDp_[ j*Np() + l ] = DgDp_j_l;
1829 return DgDp_[ j*Np() + l ];
1837 return DgDp_properties_[ j*Np() + l ];
1844 DgDp_sg_[ j*Np() + l ] = DgDp_sg_j_l;
1852 return DgDp_sg_[ j*Np() + l ];
1860 return DgDp_sg_properties_[ j*Np() + l ];
1867 DgDp_mp_[ j*Np() + l ] = DgDp_mp_j_l;
1875 return DgDp_mp_[ j*Np() + l ];
1883 return DgDp_mp_properties_[ j*Np() + l ];
1888 { f_poly_ = f_poly; }
1891 Teuchos::RefCountPtr<Teuchos::Polynomial<Epetra_Vector> >
1932 this->_setModelEvalDescription(new_modelEvalDescription);
1937 { this->_set_Np(new_Np); }
1941 { this->_setSupports(arg,new_supports); }
1945 { this->_setSupports(arg,l,new_supports); }
1949 { this->_setSupports(arg,l,new_supports); }
1958 this->_setModelEvalDescription(new_modelEvalDescription);
1963 { this->_set_Np_Ng(new_Np,new_Ng); }
1967 { this->_setSupports(arg,new_supports); }
1971 { this->_setSupports(arg,l,new_supports); }
1975 { this->_setSupports(arg,j,new_supports); }
1979 { this->_setSupports(arg,j,new_supports); }
1983 { this->_setSupports(arg,j,l,new_supports); }
1987 { this->_setSupports(arg,j,new_supports); }
1991 { this->_setSupports(arg,l,new_supports); }
1995 { this->_setSupports(arg,j,new_supports); }
1999 { this->_setSupports(arg,j,new_supports); }
2003 { this->_setSupports(arg,j,l,new_supports); }
2007 { this->_setSupports(arg,j,new_supports); }
2011 { this->_setSupports(arg,l,new_supports); }
2015 { this->_setSupports(arg,j,new_supports); }
2019 { this->_setSupports(arg,j,new_supports); }
2023 { this->_setSupports(arg,j,l,new_supports); }
2027 { this->_set_W_properties(properties); }
2030 { this->_set_WPrec_properties(properties); }
2035 this->_set_DfDp_properties(l,properties);
2041 this->_set_DgDx_dot_properties(j,properties);
2047 this->_set_DgDx_properties(j,properties);
2053 this->_set_DgDp_properties(j,l,properties);
2059 this->_set_DfDp_sg_properties(l,properties);
2065 this->_set_DgDx_dot_sg_properties(j,properties);
2071 this->_set_DgDx_sg_properties(j,properties);
2077 this->_set_DgDp_sg_properties(j,l,properties);
2083 this->_set_DfDp_mp_properties(l,properties);
2089 this->_set_DgDx_dot_mp_properties(j,properties);
2095 this->_set_DgDx_mp_properties(j,properties);
2101 this->_set_DgDp_mp_properties(j,l,properties);
2106 #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
mp_const_vector_t get_x_mp() const
Get multi-point solution vector.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
Teuchos::RefCountPtr< Epetra_MultiVector > get_DgDx_dot_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
bool supports(EOutArgsMembers arg) const
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_x_lower_bounds() const
Residual vector Taylor polynomial.
void set_x_dot_poly(const Teuchos::RefCountPtr< const Teuchos::Polynomial< Epetra_Vector > > &x_dot_poly)
Set time derivative vector Taylor polynomial.
MPDerivative(const mp_operator_t &lo)
void set_W(const Teuchos::RefCountPtr< Epetra_Operator > &W)
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 >())
Derivative(const Teuchos::RefCountPtr< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
void set_W_properties(const DerivativeProperties &properties)
DerivativeProperties get_DgDx_sg_properties(int j) const
void set_WPrec(const Teuchos::RefCountPtr< Epetra_Operator > &WPrec)
virtual InArgs createInArgs() const =0
mp_const_vector_t get_p_mp(int l) const
Get multi-point parameter vector.
Evaluation< Epetra_Vector > get_g(int j) const
Get g(j) where 0 <= j && j < this->Ng().
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::RefCountPtr< const Epetra_Vector > get_x_dot() const
Evaluation(const Teuchos::RefCountPtr< ObjType > &obj)
mp_vector_t get_g_mp(int j) const
Get multi-point response.
Preconditioner()
Default constructor of null Operatir.
bool supports(EDerivativeLinearOp) const
void _setSupports(EOutArgsMembers arg, bool supports)
void _set_DfDp_properties(int l, const DerivativeProperties &properties)
Exact function evaluation.
void set_DgDx_sg_properties(int j, const DerivativeProperties &properties)
virtual Teuchos::RefCountPtr< const Epetra_Map > get_f_map() const =0
.
Teuchos::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly > sg_operator_t
Short-hand for stochastic Galerkin operator type.
Teuchos::RefCountPtr< const Stokhos::EpetraVectorOrthogPoly > sg_const_vector_t
Short-hand for stochastic Galerkin vector type.
MPDerivativeMultiVector()
Teuchos::RefCountPtr< Epetra_MultiVector > getMultiVector() const
Teuchos::RefCountPtr< Epetra_MultiVector > getMultiVector() const
void set_beta(double beta)
virtual ~ModelEvaluator()
static const int NUM_E_IN_ARGS_MEMBERS
bool isAlreadyInverted
Bool flag.
Preconditioner(const Teuchos::RCP< Epetra_Operator > &PrecOp_, bool isAlreadyInverted_)
Usable constructor to set the (Epetra_Operator,bool) pair.
Teuchos::RefCountPtr< Teuchos::Polynomial< Epetra_Vector > > get_f_poly() const
Get residual vector Taylor polynomial.
Multi-point solution vector.
Evaluation(const Teuchos::RefCountPtr< ObjType > &obj, EEvalType evalType)
virtual double get_t_upper_bound() const
mp_multivector_t getMultiVector() const
bool funcOrDerivesAreSet(EOutArgsMembers arg) const
Return true if the function or its derivatives are set.
DerivativeProperties get_DfDp_sg_properties(int l) const
DerivativeProperties get_DgDx_mp_properties(int j) const
void set_DfDp(int l, const Derivative &DfDp_l)
Teuchos::RefCountPtr< Stokhos::EpetraVectorOrthogPoly > sg_vector_t
Short-hand for stochastic Galerkin vector type.
Teuchos::RCP< Stokhos::ProductEpetraMultiVector > mp_multivector_t
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
Derivative get_DgDx_dot(int j) const
Teuchos::RefCountPtr< Epetra_MultiVector > get_DgDp_mv(const int j, const int l, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
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.
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
bool supports(EDerivativeMultiVectorOrientation mvOrientation) const
Teuchos::RefCountPtr< const Teuchos::Polynomial< Epetra_Vector > > get_x_poly() const
Get solution vector Taylor polynomial.
DerivativeProperties get_DgDp_mp_properties(int j, int l) const
Teuchos::RefCountPtr< Epetra_MultiVector > getMultiVector(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
DerivativeProperties get_W_properties() const
Derivative(const Teuchos::RefCountPtr< Epetra_Operator > &lo)
void setFailed() const
Set that the evaluation as a whole failed.
void set_DfDp_sg(int l, const SGDerivative &DfDp_sg_l)
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
DerivativeMultiVector(const Teuchos::RefCountPtr< Epetra_MultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
void set_f_mp(const mp_vector_t &f_sg)
Set multi-point residual vector.
Teuchos::RCP< const Stokhos::Quadrature< int, double > > get_sg_quadrature() const
SGDerivative get_DgDp_sg(int j, int l) const
SGDerivative(const Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Derivative get_DgDx(int j) const
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
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)
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
MPDerivativeMultiVector getDerivativeMultiVector() const
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.
virtual Teuchos::RefCountPtr< const Epetra_Map > get_p_map(int l) const
.
void set_DgDx_dot_sg(int j, const SGDerivative &DgDx_dot_j)
virtual Teuchos::RefCountPtr< const Teuchos::Array< std::string > > get_p_names(int l) const
Get the names of the parameters associated with parameter subvector l if available.
void set_x_dot(const Teuchos::RefCountPtr< const Epetra_Vector > &x_dot)
void set_DgDx_dot(int j, const Derivative &DgDx_dot_j)
DerivativeProperties get_DgDx_dot_sg_properties(int j) const
Teuchos::RefCountPtr< const Epetra_Vector > get_p(int l) 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)
virtual Teuchos::RefCountPtr< EpetraExt::ModelEvaluator::Preconditioner > create_WPrec() const
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_p_init(int l) const
void set_DgDx_sg(int j, const SGDerivative &DgDx_j)
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)
Teuchos::RefCountPtr< const Epetra_Vector > get_x() const
Set solution vector Taylor polynomial.
virtual Teuchos::RefCountPtr< const Epetra_Map > get_g_map(int j) const
.
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_p_upper_bounds(int l) const
Derivative(const DerivativeMultiVector &dmv)
void _set_DgDx_mp_properties(int j, const DerivativeProperties &properties)
void set_DgDp_sg_properties(int j, int l, const DerivativeProperties &properties)
Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > getMultiVector() const
MPDerivative get_DgDx_mp(int j) const
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
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()
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)
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
void _set_WPrec_properties(const DerivativeProperties &WPrec_properties)
Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > get_sg_basis() const
void _set_DgDx_dot_mp_properties(int j, const DerivativeProperties &properties)
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.
void set_x(const Teuchos::RefCountPtr< const Epetra_Vector > &x)
Multi-point residual vector.
void set_f_poly(const Teuchos::RefCountPtr< Teuchos::Polynomial< Epetra_Vector > > &f_poly)
Set residual vector Taylor polynomial.
void set_sg_expansion(const Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double, Stokhos::StandardStorage< int, double > > > &exp)
void setModelEvalDescription(const std::string &modelEvalDescription)
SGDerivativeMultiVector(const Teuchos::RefCountPtr< Stokhos::EpetraMultiVectorOrthogPoly > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
virtual Teuchos::RefCountPtr< Epetra_Operator > create_W() const
If supported, create a Epetra_Operator object for W to be evaluated.
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)
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_DgDx_dot_sg_properties(int j, const DerivativeProperties &properties)
Teuchos::RefCountPtr< Epetra_Operator > get_W() const
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_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)
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
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.
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.
Teuchos::RefCountPtr< Epetra_MultiVector > get_DfDp_mv(const int l, const ModelEvaluator::OutArgs &outArgs)
SGDerivative get_DgDx_dot_sg(int j) const
Teuchos::RefCountPtr< Epetra_Operator > get_DfDp_op(const int l, const ModelEvaluator::OutArgs &outArgs)
void set_alpha(double alpha)
DerivativeSupport(EDerivativeLinearOp, EDerivativeMultiVectorOrientation mvOrientation)
mp_vector_t get_f_mp() const
Get multi-point residual vector.
void set_DfDp_sg_properties(int l, const DerivativeProperties &properties)
Teuchos::RefCountPtr< Epetra_Operator > getLinearOp(const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName)
virtual Teuchos::RefCountPtr< Epetra_Operator > create_DgDx_dot_op(int j) const
virtual double get_t_init() const
virtual void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const =0
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
mp_multivector_t getMultiVector() const
Teuchos::RefCountPtr< Epetra_Operator > getLinearOp() const
Teuchos::RCP< Stokhos::ProductEpetraVector > mp_vector_t
virtual Teuchos::RefCountPtr< Epetra_Operator > create_DfDp_op(int l) const
void set_DfDp_mp(int l, const MPDerivative &DfDp_mp_l)
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_p_lower_bounds(int l) const
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...
virtual Teuchos::RefCountPtr< Epetra_Operator > create_DgDx_op(int j) const
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_x_dot_init() const
void set_p(int l, const Teuchos::RefCountPtr< const Epetra_Vector > &p_l)
void _set_DgDx_properties(int j, const DerivativeProperties &properties)
void set_DgDx_properties(int j, const DerivativeProperties &properties)
void reset(const Teuchos::RefCountPtr< ObjType > &obj, EEvalType evalType)
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)
virtual Teuchos::RefCountPtr< const Epetra_Vector > get_x_upper_bounds() const
Teuchos::RefCountPtr< const Teuchos::Polynomial< Epetra_Vector > > get_x_dot_poly() const
Get time derivative vector Taylor polynomial.
void _set_Np_Ng(int Np, int Ng)
Teuchos::RefCountPtr< Epetra_Operator > get_WPrec() const
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_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::RefCountPtr< const Epetra_Vector > get_x_init() 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
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
MPDerivative get_DgDx_dot_mp(int j) const
void _setSupports(EInArgsMembers arg, bool supports)
Evaluation< Epetra_Vector > get_f() const
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::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly > getLinearOp() const
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
Teuchos::RefCountPtr< Epetra_MultiVector > get_DgDx_mv(const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
virtual OutArgs createOutArgs() const =0
sg_const_vector_t get_x_dot_sg() const
Get stochastic Galerkin time derivative vector polynomial.
virtual Teuchos::RefCountPtr< Epetra_Operator > create_DgDp_op(int j, int l) const
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 _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)
SGDerivative(const Teuchos::RefCountPtr< Stokhos::EpetraOperatorOrthogPoly > &lo)
void set_x_poly(const Teuchos::RefCountPtr< const Teuchos::Polynomial< Epetra_Vector > > &x_poly)
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)
virtual Teuchos::RefCountPtr< const Epetra_Map > get_x_map() const =0
.