42 #ifndef EPETRA_EXT_MODEL_EVALUATOR_HPP
43 #define EPETRA_EXT_MODEL_EVALUATOR_HPP
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
53 #include "Teuchos_RCP.hpp"
54 #include "Teuchos_Describable.hpp"
55 #include "Teuchos_Polynomial.hpp"
56 #include "Teuchos_Array.hpp"
57 #include "Teuchos_CompilerCodeTweakMacros.hpp"
59 #ifdef HAVE_PYTRILINOS
62 typedef _object PyObject;
72 class EpetraVectorOrthogPoly;
73 class EpetraMultiVectorOrthogPoly;
74 class EpetraOperatorOrthogPoly;
76 template <
typename ordinal_type,
typename scalar_type>
class Quadrature;
80 class ProductEpetraVector;
81 class ProductEpetraMultiVector;
82 class ProductEpetraOperator;
154 void set_x_dot(
const Teuchos::RCP<const Epetra_Vector> &x_dot );
156 void set_x_dotdot(
const Teuchos::RCP<const Epetra_Vector> &x_dotdot );
158 Teuchos::RCP<const Epetra_Vector>
get_x_dot()
const;
162 void set_x(
const Teuchos::RCP<const Epetra_Vector> &x );
164 Teuchos::RCP<const Epetra_Vector>
get_x()
const;
166 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_poly
169 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
get_x_poly()
const;
172 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dot_poly
175 const Teuchos::RCP<
const Teuchos::Polynomial<Epetra_Vector> > &x_dotdot_poly
178 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
get_x_dot_poly()
const;
179 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
get_x_dotdot_poly()
const;
201 void set_p(
int l,
const Teuchos::RCP<const Epetra_Vector> &p_l );
203 Teuchos::RCP<const Epetra_Vector>
get_p(
int l)
const;
213 void set_t(
double t );
227 double get_t()
const;
233 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
get_sg_basis()
const;
241 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
get_sg_expansion()
const;
263 typedef Teuchos::Array<Teuchos::RCP<const Epetra_Vector> > p_t;
264 typedef Teuchos::Array<sg_const_vector_t > p_sg_t;
265 typedef Teuchos::Array<mp_const_vector_t > p_mp_t;
266 typedef Teuchos::Array<bool> supports_p_sg_t;
268 std::string modelEvalDescription_;
269 Teuchos::RCP<const Epetra_Vector> x_dot_;
270 Teuchos::RCP<const Epetra_Vector> x_dotdot_;
271 Teuchos::RCP<const Epetra_Vector> x_;
272 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dot_poly_;
273 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_dotdot_poly_;
274 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> > x_poly_;
290 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> > sg_basis_;
291 Teuchos::RCP<const Stokhos::Quadrature<int,double> > sg_quad_;
292 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > > sg_exp_;
294 supports_p_sg_t supports_p_sg_;
295 supports_p_sg_t supports_p_mp_;
300 void assert_l(
int l)
const;
311 template<
class ObjType>
321 : Teuchos::RCP<ObjType>(obj), evalType_(evalType) {}
326 { this->operator=(obj); evalType_ = evalType; }
345 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
349 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
353 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
359 :supportsLinearOp_(true), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
367 :supportsLinearOp_(false)
370 ,supportsTransMVByRow_(
375 { supportsLinearOp_ =
true;
return *
this; }
379 switch(mvOrientation) {
382 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
388 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
391 {
return supportsLinearOp_; }
395 switch(mvOrientation) {
398 default: TEUCHOS_TEST_FOR_EXCEPT(
true);
400 TEUCHOS_UNREACHABLE_RETURN(
false);
403 bool supportsLinearOp_;
404 bool supportsMVByCol_;
405 bool supportsTransMVByRow_;
448 const Teuchos::RCP<Epetra_MultiVector> &mv
450 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
451 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
454 { orientation_ = orientation; };
460 {
return orientation_; }
463 {
return paramIndexes_; }
465 Teuchos::RCP<Epetra_MultiVector> mv_;
467 Teuchos::Array<int> paramIndexes_;
482 const Teuchos::RCP<Epetra_MultiVector> &mv
484 ) : dmv_(mv,orientation) {}
504 Teuchos::RCP<Epetra_Operator> lo_;
516 bool isAlreadyInverted_ )
536 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
538 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
539 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
542 { orientation_ = orientation; };
548 {
return orientation_; }
551 {
return paramIndexes_; }
553 Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > mv_;
555 Teuchos::Array<int> paramIndexes_;
566 SGDerivative(
const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &lo )
570 const Teuchos::RCP< Stokhos::EpetraMultiVectorOrthogPoly > &mv
572 ) : dmv_(mv,orientation) {}
577 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly >
getLinearOp()
const
592 Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > lo_;
608 ,
const Teuchos::Array<int> ¶mIndexes = Teuchos::Array<int>()
609 ) : mv_(mv), orientation_(orientation), paramIndexes_(paramIndexes) {}
612 { orientation_ = orientation; };
618 {
return orientation_; }
621 {
return paramIndexes_; }
625 Teuchos::Array<int> paramIndexes_;
643 ) : dmv_(mv,orientation) {}
770 typedef Teuchos::RCP<Stokhos::EpetraVectorOrthogPoly>
sg_vector_t;
845 void set_W(
const Teuchos::RCP<Epetra_Operator> &W );
846 void set_WPrec(
const Teuchos::RCP<Epetra_Operator> &WPrec );
848 Teuchos::RCP<Epetra_Operator>
get_W()
const;
849 Teuchos::RCP<Epetra_Operator>
get_WPrec()
const;
944 void set_f_poly(
const Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > &f_poly );
946 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> >
get_f_poly()
const;
1037 typedef Teuchos::Array<Evaluation<Epetra_Vector> > g_t;
1038 typedef Teuchos::Array<sg_vector_t > g_sg_t;
1039 typedef Teuchos::Array<mp_vector_t > g_mp_t;
1040 typedef Teuchos::Array<Derivative> deriv_t;
1041 typedef Teuchos::Array<SGDerivative> sg_deriv_t;
1042 typedef Teuchos::Array<MPDerivative> mp_deriv_t;
1043 typedef Teuchos::Array<DerivativeProperties> deriv_properties_t;
1044 typedef Teuchos::Array<DerivativeSupport> supports_t;
1045 typedef Teuchos::Array<bool> supports_g_sg_t;
1047 std::string modelEvalDescription_;
1048 mutable bool isFailed_;
1050 supports_t supports_DfDp_;
1051 supports_t supports_DgDx_dot_;
1052 supports_t supports_DgDx_dotdot_;
1053 supports_t supports_DgDx_;
1054 supports_t supports_DgDp_;
1055 supports_g_sg_t supports_g_sg_;
1056 supports_t supports_DfDp_sg_;
1057 supports_t supports_DgDx_dot_sg_;
1058 supports_t supports_DgDx_dotdot_sg_;
1059 supports_t supports_DgDx_sg_;
1060 supports_t supports_DgDp_sg_;
1061 supports_g_sg_t supports_g_mp_;
1062 supports_t supports_DfDp_mp_;
1063 supports_t supports_DgDx_dot_mp_;
1064 supports_t supports_DgDx_dotdot_mp_;
1065 supports_t supports_DgDx_mp_;
1066 supports_t supports_DgDp_mp_;
1071 Teuchos::RCP<Epetra_Operator> W_;
1072 Teuchos::RCP<Epetra_Operator> WPrec_;
1076 deriv_properties_t DfDp_properties_;
1078 deriv_t DgDx_dotdot_;
1080 deriv_properties_t DgDx_dot_properties_;
1081 deriv_properties_t DgDx_dotdot_properties_;
1082 deriv_properties_t DgDx_properties_;
1084 deriv_properties_t DgDp_properties_;
1085 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> > f_poly_;
1088 sg_deriv_t DfDp_sg_;
1089 deriv_properties_t DfDp_sg_properties_;
1090 sg_deriv_t DgDx_dot_sg_;
1091 sg_deriv_t DgDx_dotdot_sg_;
1092 sg_deriv_t DgDx_sg_;
1093 deriv_properties_t DgDx_dot_sg_properties_;
1094 deriv_properties_t DgDx_dotdot_sg_properties_;
1095 deriv_properties_t DgDx_sg_properties_;
1096 sg_deriv_t DgDp_sg_;
1097 deriv_properties_t DgDp_sg_properties_;
1100 mp_deriv_t DfDp_mp_;
1101 deriv_properties_t DfDp_mp_properties_;
1102 mp_deriv_t DgDx_dot_mp_;
1103 mp_deriv_t DgDx_dotdot_mp_;
1104 mp_deriv_t DgDx_mp_;
1105 deriv_properties_t DgDx_dot_mp_properties_;
1106 deriv_properties_t DgDx_dotdot_mp_properties_;
1107 deriv_properties_t DgDx_mp_properties_;
1108 mp_deriv_t DgDp_mp_;
1109 deriv_properties_t DgDp_mp_properties_;
1116 void assert_supports(
EOutArgsDgDp arg,
int j,
int l)
const;
1129 void assert_l(
int l)
const;
1130 void assert_j(
int j)
const;
1147 virtual Teuchos::RCP<const Epetra_Map>
get_x_map()
const = 0;
1150 virtual Teuchos::RCP<const Epetra_Map>
get_f_map()
const = 0;
1153 virtual Teuchos::RCP<const Epetra_Map>
get_p_map(
int l)
const;
1169 virtual Teuchos::RCP<const Teuchos::Array<std::string> >
get_p_names(
int l)
const;
1172 virtual Teuchos::RCP<const Epetra_Map>
get_g_map(
int j)
const;
1188 virtual Teuchos::ArrayView<const std::string>
get_g_names(
int j)
const;
1196 virtual Teuchos::RCP<const Epetra_Vector>
get_x_init()
const;
1199 virtual Teuchos::RCP<const Epetra_Vector>
get_x_dot_init()
const;
1205 virtual Teuchos::RCP<const Epetra_Vector>
get_p_init(
int l)
const;
1250 virtual Teuchos::RCP<Epetra_Operator>
create_W()
const;
1251 virtual Teuchos::RCP<EpetraExt::ModelEvaluator::Preconditioner>
create_WPrec()
const;
1254 virtual Teuchos::RCP<Epetra_Operator>
create_DfDp_op(
int l)
const;
1263 virtual Teuchos::RCP<Epetra_Operator>
create_DgDx_op(
int j)
const;
1266 virtual Teuchos::RCP<Epetra_Operator>
create_DgDp_op(
int j,
int l )
const;
1282 #ifdef HAVE_PYTRILINOS
1284 friend InArgs convertInArgsFromPython(PyObject * source);
1287 friend OutArgs convertOutArgsFromPython(PyObject * source);
1400 Teuchos::RCP<Epetra_Operator>
1402 const std::string &modelEvalDescription,
1404 const std::string &derivName
1408 Teuchos::RCP<Epetra_MultiVector>
1410 const std::string &modelEvalDescription,
1412 const std::string &derivName,
1417 Teuchos::RCP<Epetra_Operator>
1424 Teuchos::RCP<Epetra_MultiVector>
1431 Teuchos::RCP<Epetra_MultiVector>
1439 Teuchos::RCP<Epetra_MultiVector>
1447 Teuchos::RCP<Epetra_MultiVector>
1455 Teuchos::RCP<Epetra_MultiVector>
1472 {
return modelEvalDescription_; }
1476 {
return p_.size(); }
1496 { assert_supports(
IN_ARG_x); x_ = x; }
1500 { assert_supports(
IN_ARG_x);
return x_; }
1511 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1516 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1525 Teuchos::RCP<const Teuchos::Polynomial<Epetra_Vector> >
1585 { assert_l(l); p_[l] = p_l; }
1589 { assert_l(l);
return p_[l]; }
1594 { assert_supports(
IN_ARG_p_sg, l); p_sg_[l] = p_sg_l; }
1599 { assert_supports(
IN_ARG_p_sg, l);
return p_sg_[l]; }
1604 { assert_supports(
IN_ARG_p_mp, l); p_mp_[l] = p_mp_l; }
1609 { assert_supports(
IN_ARG_p_mp, l);
return p_mp_[l]; }
1613 { assert_supports(
IN_ARG_t); t_ = t; }
1617 { assert_supports(
IN_ARG_t);
return t_; }
1664 Teuchos::RCP<const Stokhos::OrthogPolyBasis<int,double> >
1673 Teuchos::RCP<const Stokhos::Quadrature<int,double> >
1682 Teuchos::RCP<Stokhos::OrthogPolyExpansion<int,double,Stokhos::StandardStorage<int,double> > >
1689 modelEvalDescription_ = new_modelEvalDescription;
1696 p_sg_.resize(new_Np);
1697 p_mp_.resize(new_Np);
1698 supports_p_sg_.resize(new_Np);
1699 supports_p_mp_.resize(new_Np);
1708 {
return modelEvalDescription_; }
1713 return DfDp_.size();
1786 {
return W_properties_; }
1789 {
return WPrec_properties_; }
1811 return DfDp_properties_[l];
1818 DfDp_sg_[l] = DfDp_sg_l;
1834 return DfDp_sg_properties_[l];
1841 DfDp_mp_[l] = DfDp_mp_l;
1857 return DfDp_mp_properties_[l];
1864 DgDx_dot_[j] = DgDx_dot_j;
1872 return DgDx_dot_[j];
1880 return DgDx_dot_properties_[j];
1887 DgDx_dot_sg_[j] = DgDx_dot_sg_j;
1895 return DgDx_dot_sg_[j];
1903 return DgDx_dot_sg_properties_[j];
1910 DgDx_dot_mp_[j] = DgDx_dot_mp_j;
1918 return DgDx_dot_mp_[j];
1926 return DgDx_dot_mp_properties_[j];
1933 DgDx_dotdot_[j] = DgDx_dotdot_j;
1941 return DgDx_dotdot_[j];
1949 return DgDx_dotdot_properties_[j];
1956 DgDx_dotdot_sg_[j] = DgDx_dotdot_sg_j;
1964 return DgDx_dotdot_sg_[j];
1972 return DgDx_dotdot_sg_properties_[j];
1979 DgDx_dotdot_mp_[j] = DgDx_dotdot_mp_j;
1987 return DgDx_dotdot_mp_[j];
1995 return DgDx_dotdot_mp_properties_[j];
2018 return DgDx_properties_[j];
2025 DgDx_sg_[j] = DgDx_sg_j;
2041 return DgDx_sg_properties_[j];
2048 DgDx_mp_[j] = DgDx_mp_j;
2064 return DgDx_mp_properties_[j];
2071 DgDp_[ j*Np() + l ] = DgDp_j_l;
2079 return DgDp_[ j*Np() + l ];
2087 return DgDp_properties_[ j*Np() + l ];
2094 DgDp_sg_[ j*Np() + l ] = DgDp_sg_j_l;
2102 return DgDp_sg_[ j*Np() + l ];
2110 return DgDp_sg_properties_[ j*Np() + l ];
2117 DgDp_mp_[ j*Np() + l ] = DgDp_mp_j_l;
2125 return DgDp_mp_[ j*Np() + l ];
2133 return DgDp_mp_properties_[ j*Np() + l ];
2138 { f_poly_ = f_poly; }
2141 Teuchos::RCP<Teuchos::Polynomial<Epetra_Vector> >
2182 this->_setModelEvalDescription(new_modelEvalDescription);
2187 { this->_set_Np(new_Np); }
2191 { this->_setSupports(arg,new_supports); }
2195 { this->_setSupports(arg,l,new_supports); }
2199 { this->_setSupports(arg,l,new_supports); }
2208 this->_setModelEvalDescription(new_modelEvalDescription);
2213 { this->_set_Np_Ng(new_Np,new_Ng); }
2217 { this->_setSupports(arg,new_supports); }
2221 { this->_setSupports(arg,l,new_supports); }
2225 { this->_setSupports(arg,j,new_supports); }
2229 { this->_setSupports(arg,j,new_supports); }
2233 { this->_setSupports(arg,j,new_supports); }
2237 { this->_setSupports(arg,j,l,new_supports); }
2241 { this->_setSupports(arg,j,new_supports); }
2245 { this->_setSupports(arg,l,new_supports); }
2249 { this->_setSupports(arg,j,new_supports); }
2253 { this->_setSupports(arg,j,new_supports); }
2257 { this->_setSupports(arg,j,new_supports); }
2261 { this->_setSupports(arg,j,l,new_supports); }
2265 { this->_setSupports(arg,j,new_supports); }
2269 { this->_setSupports(arg,l,new_supports); }
2273 { this->_setSupports(arg,j,new_supports); }
2277 { this->_setSupports(arg,j,new_supports); }
2281 { this->_setSupports(arg,j,new_supports); }
2285 { this->_setSupports(arg,j,l,new_supports); }
2289 { this->_set_W_properties(properties); }
2292 { this->_set_WPrec_properties(properties); }
2297 this->_set_DfDp_properties(l,properties);
2303 this->_set_DgDx_dot_properties(j,properties);
2309 this->_set_DgDx_dotdot_properties(j,properties);
2315 this->_set_DgDx_properties(j,properties);
2321 this->_set_DgDp_properties(j,l,properties);
2327 this->_set_DfDp_sg_properties(l,properties);
2333 this->_set_DgDx_dot_sg_properties(j,properties);
2339 this->_set_DgDx_dotdot_sg_properties(j,properties);
2345 this->_set_DgDx_sg_properties(j,properties);
2351 this->_set_DgDp_sg_properties(j,l,properties);
2357 this->_set_DfDp_mp_properties(l,properties);
2363 this->_set_DgDx_dot_mp_properties(j,properties);
2369 this->_set_DgDx_dotdot_mp_properties(j,properties);
2375 this->_set_DgDx_mp_properties(j,properties);
2381 this->_set_DgDp_mp_properties(j,l,properties);
2386 #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
Coeff of second derivative term d(x_dotdot)/dx.
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