42 #ifndef THYRA_MODEL_EVALUATOR_BASE_DECL_HPP
43 #define THYRA_MODEL_EVALUATOR_BASE_DECL_HPP
46 #include "Thyra_LinearOpWithSolveBase.hpp"
47 #include "Teuchos_Describable.hpp"
48 #include "Teuchos_any.hpp"
49 #include "Teuchos_Assert.hpp"
51 #ifdef HAVE_THYRA_ME_POLYNOMIAL
52 # include "Teuchos_Polynomial.hpp"
56 class ProductEpetraVector;
57 class ProductEpetraMultiVector;
58 class ProductEpetraOperator;
158 template<
class Scalar>
205 template<
typename ObjectType>
208 template<
typename ObjectType>
211 template<
typename ObjectType>
214 #ifdef HAVE_THYRA_ME_POLYNOMIAL
225 #endif // HAVE_THYRA_ME_POLYNOMIAL
276 bool cloneObjects =
false
301 template<
typename ObjectType>
310 std::string modelEvalDescription_;
321 #ifdef HAVE_THYRA_ME_POLYNOMIAL
324 #endif // HAVE_THYRA_ME_POLYNOMIAL
330 Scalar W_x_dot_dot_coeff_;
332 Scalar stage_number_;
338 void assert_l(
int l)
const;
339 void assert_j(
int j)
const;
341 std::map<std::string,Teuchos::any> extended_inargs_;
357 template<
class ObjType>
362 : evalType_(EVAL_TYPE_EXACT) {}
367 :
RCP<ObjType>(obj), evalType_(EVAL_TYPE_EXACT) {}
370 :
RCP<ObjType>(obj), evalType_(evalType) {}
375 { this->
operator=(obj); evalType_ = evalType; }
399 :supportsLinearOp_(false), supportsMVByCol_(false), supportsTransMVByRow_(false)
403 :supportsLinearOp_(true), supportsMVByCol_(false), supportsTransMVByRow_(false)
407 :supportsLinearOp_(false), supportsMVByCol_(mvOrientation==
DERIV_MV_BY_COL)
412 { supportsLinearOp_ =
true;
return *
this; }
416 switch(mvOrientation) {
425 {
return ( !supportsLinearOp_ && !supportsMVByCol_ && !supportsTransMVByRow_ ); }
428 {
return supportsLinearOp_; }
432 switch(mvOrientation) {
443 supportsLinearOp_ == derivSupport.supportsLinearOp_
444 && supportsMVByCol_ == derivSupport.supportsMVByCol_
445 && supportsTransMVByRow_ == derivSupport.supportsTransMVByRow_
451 bool supportsLinearOp_;
452 bool supportsMVByCol_;
453 bool supportsTransMVByRow_;
488 bool in_supportsAdjoint
498 template<
class Scalar>
512 { orientation_ = orientation; };
515 { mv_.assert_not_null();
return *
this; }
521 {
return orientation_; }
536 template<
class Scalar>
548 ) : dmv_(mv,orientation) {}
554 {
return ( lo_.get()==NULL && dmv_.getMultiVector().get()==NULL ); }
557 { dmv_.assert_not_null(); lo_.assert_not_null();
return *
this; }
563 {
return dmv_.getMultiVector(); }
566 {
return dmv_.getOrientation(); }
576 if (derivSupport.
none())
612 ) : mv_(mv.
assert_not_null()), orientation_(orientation), paramIndexes_(paramIndexes) {}
615 { orientation_ = orientation; };
624 {
return orientation_; }
627 {
return paramIndexes_; }
654 ) : dmv_(mv,orientation) {}
682 if (derivSupport.
none())
899 template<
class Scalar>
986 template<
typename ObjectType>
989 template<
typename ObjectType>
992 template<
typename ObjectType>
1127 void set_DfDp_mp(
int l,
const MPDerivative &DfDp_mp_l);
1130 void set_DgDx_dot_mp(
int j,
const MPDerivative &DgDx_dot_mp_j);
1133 void set_DgDx_mp(
int j,
const MPDerivative &DgDx_mp_j);
1136 void set_DgDp_mp(
int j,
int l,
const MPDerivative &DgDp_mp_j_l );
1140 #ifdef HAVE_THYRA_ME_POLYNOMIAL
1145 #endif // HAVE_THYRA_ME_POLYNOMIAL
1191 template<
typename ObjectType>
1278 std::string modelEvalDescription_;
1285 bool supports_hess_f_xx_;
1291 bool supports_H_xx_;
1295 bool supports_hess_vec_prod_f_xx_;
1355 #ifdef HAVE_THYRA_ME_POLYNOMIAL
1357 #endif // HAVE_THYRA_ME_POLYNOMIAL
1358 mutable bool isFailed_;
1360 std::map<std::string,Teuchos::any> extended_outargs_;
1364 void assert_supports(
1368 void assert_supports(
1372 void assert_supports(
1376 void assert_supports(
1381 void assert_supports(
1384 void assert_supports(
1387 void assert_supports(
1390 void assert_supports(
1393 void assert_supports(
1396 void assert_supports(
1399 void assert_supports(
1402 void assert_supports(
1406 void assert_supports(
1409 void assert_supports(
1412 void assert_supports(
1415 void assert_supports(
1418 void assert_supports(
1421 void assert_supports(
1424 void assert_supports(
1427 void assert_supports(
1430 void assert_supports(
1435 void assert_supports(
1439 void assert_supports(
1443 void assert_supports(
1447 void assert_supports(
1452 void assert_l(
int l)
const;
1453 void assert_j(
int j)
const;
1459 #ifdef HAVE_PROTECTED_NESTED_TEMPLATE_CLASS_ACCESS
1473 template<
class Scalar>
1491 template<
typename ObjectType>
1506 template<
class Scalar>
1562 template<
typename ObjectType>
1631 getOtherDerivativeMultiVectorOrientation(
1643 template<
class Scalar>
1644 template<
typename ObjectType>
1647 std::map<std::string,Teuchos::any>::const_iterator search =
1648 extended_inargs_.find(
typeid(ObjectType).name());
1650 if (search == extended_inargs_.end())
1656 template<
class Scalar>
1657 template<
typename ObjectType>
1660 std::map<std::string,Teuchos::any>::iterator search = extended_inargs_.find(
typeid(ObjectType).name());
1663 "ERROR: InArgs::set<ObjectType>() was called with unsupported extended data type \""
1664 <<
typeid(ObjectType).name() <<
"\"!");
1669 template<
class Scalar>
1670 template<
typename ObjectType>
1674 std::map<std::string,Teuchos::any>::const_iterator search = extended_inargs_.find(
typeid(ObjectType).name());
1677 "ERROR: InArgs::get<ObjectType>() was called with unsupported extended data type \""
1678 <<
typeid(ObjectType).name() <<
"\"!");
1683 template<
class Scalar>
1684 template<
class ObjectType>
1688 this->
template _setSupports<ObjectType>(in_supports);
1691 template<
class Scalar>
1692 template<
class ObjectType>
1701 this->extended_inargs_[
typeid(ObjectType).name()] =
Teuchos::any();
1704 std::map<std::string,Teuchos::any>::iterator search =
1705 this->extended_inargs_.find(
typeid(ObjectType).name());
1707 if (search != this->extended_inargs_.end())
1708 this->extended_inargs_.erase(
typeid(ObjectType).name());
1713 template<
class Scalar>
1714 template<
typename ObjectType>
1717 std::map<std::string,Teuchos::any>::const_iterator search =
1718 extended_outargs_.find(
typeid(ObjectType).name());
1720 if (search == extended_outargs_.end())
1726 template<
class Scalar>
1727 template<
typename ObjectType>
1730 std::map<std::string,Teuchos::any>::iterator search = extended_outargs_.find(
typeid(ObjectType).name());
1733 "ERROR: OutArgs::set<ObjectType>() was called with unsupported extended data type \""
1734 <<
typeid(ObjectType).name() <<
"\"!");
1739 template<
class Scalar>
1740 template<
typename ObjectType>
1744 std::map<std::string,Teuchos::any>::const_iterator search = extended_outargs_.find(
typeid(ObjectType).name());
1747 "ERROR: OutArgs::get<ObjectType>() was called with unsupported extended data type \""
1748 <<
typeid(ObjectType).name() <<
"\"!");
1753 template<
class Scalar>
1754 template<
class ObjectType>
1758 this->
template _setSupports<ObjectType>(in_supports);
1761 template<
class Scalar>
1762 template<
class ObjectType>
1771 this->extended_outargs_[
typeid(ObjectType).name()] =
Teuchos::any();
1774 std::map<std::string,Teuchos::any>::iterator search =
1775 this->extended_outargs_.find(
typeid(ObjectType).name());
1777 if (search != this->extended_outargs_.end())
1778 this->extended_outargs_.erase(
typeid(ObjectType).name());
1791 case ModelEvaluatorBase::IN_ARG_x_dot_dot:
1792 return "IN_ARG_x_dot_dot";
1793 case ModelEvaluatorBase::IN_ARG_x_dot:
1794 return "IN_ARG_x_dot";
1795 case ModelEvaluatorBase::IN_ARG_x:
1797 case ModelEvaluatorBase::IN_ARG_x_dot_poly:
1798 return "IN_ARG_x_dot_poly";
1799 case ModelEvaluatorBase::IN_ARG_x_poly:
1800 return "IN_ARG_x_poly";
1801 case ModelEvaluatorBase::IN_ARG_x_dot_mp:
1802 return "IN_ARG_x_dot_mp";
1803 case ModelEvaluatorBase::IN_ARG_x_mp:
1804 return "IN_ARG_x_mp";
1805 case ModelEvaluatorBase::IN_ARG_t:
1807 case ModelEvaluatorBase::IN_ARG_alpha:
1808 return "IN_ARG_alpha";
1809 case ModelEvaluatorBase::IN_ARG_beta:
1810 return "IN_ARG_beta";
1811 case ModelEvaluatorBase::IN_ARG_W_x_dot_dot_coeff:
1812 return "IN_ARG_W_x_dot_dot_coeff";
1813 case ModelEvaluatorBase::IN_ARG_step_size:
1814 return "IN_ARG_step_size";
1815 case ModelEvaluatorBase::IN_ARG_stage_number:
1816 return "IN_ARG_stage_number";
1817 #ifdef TEUCHOS_DEBUG
1830 case ModelEvaluatorBase::OUT_ARG_f:
1832 case ModelEvaluatorBase::OUT_ARG_W:
1834 case ModelEvaluatorBase::OUT_ARG_f_mp:
1835 return "OUT_ARG_f_mp";
1836 case ModelEvaluatorBase::OUT_ARG_W_mp:
1837 return "OUT_ARG_W_mp";
1838 case ModelEvaluatorBase::OUT_ARG_W_op:
1839 return "OUT_ARG_W_op";
1840 case ModelEvaluatorBase::OUT_ARG_W_prec:
1841 return "OUT_ARG_W_prec";
1842 case ModelEvaluatorBase::OUT_ARG_f_poly:
1843 return "OUT_ARG_f_poly";
1844 #ifdef TEUCHOS_DEBUG
1855 ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation
1858 switch(orientation) {
1859 case ModelEvaluatorBase::DERIV_MV_BY_COL:
1860 return "DERIV_MV_BY_COL";
1861 case ModelEvaluatorBase::DERIV_TRANS_MV_BY_ROW:
1862 return "DERIV_TRANS_MV_BY_ROW";
1863 #ifdef TEUCHOS_DEBUG
1874 Thyra::getOtherDerivativeMultiVectorOrientation(
1875 ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation
1878 switch(orientation) {
1879 case ModelEvaluatorBase::DERIV_MV_BY_COL:
1880 return ModelEvaluatorBase::DERIV_TRANS_MV_BY_ROW;
1881 case ModelEvaluatorBase::DERIV_TRANS_MV_BY_ROW:
1882 return ModelEvaluatorBase::DERIV_MV_BY_COL;
1883 #ifdef TEUCHOS_DEBUG
1888 return ModelEvaluatorBase::DERIV_MV_BY_COL;
1892 #endif // THYRA_MODEL_EVALUATOR_BASE_DECL_HPP
RCP< LinearOpBase< Scalar > > get_H_xx() const
Precondition: supports(OUT_ARG_H_xx)==true.
Protected subclass of InArgs that only ModelEvaluator subclasses can access to set up the selection o...
void set_hess_vec_prod_g_px(int j, int l, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_g_px_j_l)
Precondition: supports(OUT_ARG_hess_vec_prod_g_px,j,l)==true.
int Ng() const
Return the number of axillary response functions g(j)(...) supported (Ng >= 0).
bool supports(EDerivativeMultiVectorOrientation mvOrientation) const
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_f_pp(int l1, int l2) const
Precondition: supports(OUT_ARG_hess_vec_prod_f_pp,l1,l2)==true.
EDerivativeMultiVectorOrientation getOrientation() const
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Create a more detailed description along about this object and the ModelEvaluator that created it...
RCP< Stokhos::ProductEpetraMultiVector > getMultiVector() const
RCP< MultiVectorBase< Scalar > > getMultiVector() const
std::string description() const
void set_DgDx_properties(int j, const DerivativeProperties &properties)
void _set_Np_Ng(int Np, int Ng)
MPDerivative(const RCP< Stokhos::ProductEpetraOperator > &lo)
void set_DfDp_properties(int l, const DerivativeProperties &properties)
Base class for all linear operators that can support a high-level solve operation.
bool is_null(const boost::shared_ptr< T > &p)
void set_step_size(Scalar step_size)
Precondition: supports(IN_ARG_step_size)==true.
Scalar get_beta() const
Precondition: supports(IN_ARG_beta)==true.
RCP< const VectorBase< Scalar > > get_f_multiplier() const
Precondition: supports(IN_ARG_x)==true.
RCP< Stokhos::ProductEpetraVector > get_g_mp(int j) const
Precondition: supports(OUT_ARG_g_mp)==true..
EOutArgs_hess_vec_prod_f_pp
void set_x_dot_dot(const RCP< const VectorBase< Scalar > > &x_dot_dot)
Precondition: supports(IN_ARG_x_dot_dot)==true.
void set_hess_f_pp(int l1, int l2, const RCP< LinearOpBase< Scalar > > &hess_f_pp_l1_l2)
Precondition: supports(OUT_ARG_hess_f_pp,l1,l2)==true.
void setArgs(const OutArgs< Scalar > &outArgs, bool ignoreUnsupported=false)
Set all arguments fron outArgs into *this.
bool supports() const
Determines if an extended input argument of type ObjectType is supported.
ScalarMag get_t() const
.Precondition: supports(IN_ARG_t)==true
static const int NUM_E_IN_ARGS_MEMBERS
void _set_DfDp_properties(int l, const DerivativeProperties &properties)
Concrete aggregate class for all output arguments computable by a ModelEvaluator subclass object...
Derivative< Scalar > get_DfDp(int l) const
Precondition: supports(OUT_ARG_DfDp,l)==true.
void set_g(int j, const Evaluation< VectorBase< Scalar > > &g_j)
Precondition: supports(OUT_ARG_g)==true.
RCP< const VectorBase< Scalar > > get_x_dot() const
Precondition: supports(IN_ARG_x_dot)==true.
EDerivativeMultiVectorOrientation
std::string modelEvalDescription() const
MPDerivative(const RCP< Stokhos::ProductEpetraMultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
static const int NUM_E_OUT_ARGS_MEMBERS
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_f_xp(int l) const
Precondition: supports(OUT_ARG_hess_vec_prod_f_xp,l)==true.
void setModelEvalDescription(const std::string &modelEvalDescription)
void set_W_mp(const RCP< Stokhos::ProductEpetraOperator > &W_mp)
Precondition: supports(OUT_ARG_W_mp)==true.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
EOutArgs_hess_vec_prod_f_xp
void _set_DgDx_dot_properties(int j, const DerivativeProperties &properties)
void set_W_prec(const RCP< PreconditionerBase< Scalar > > &W_prec)
Precondition: supports(OUT_ARG_W_op)==true.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Create a more detailed description along about this object and the ModelEvaluator that created it...
void set_Np_Ng(int Np, int Ng)
EEvalType getType() const
void _setUnsupportsAndRelated(EInArgsMembers arg)
RCP< LinearOpBase< Scalar > > get_hess_g_xp(int j, int l) const
Precondition: supports(OUT_ARG_hess_g_xp,j,l)==true.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void set(const RCP< const ObjectType > &uo)
Set an extended output argument of type ObjectType in OutArgs. Precondition: supports()==true.
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
void describe(Teuchos::FancyOStream &, const Teuchos::EVerbosityLevel) const
MPDerivativeMultiVector()
void set_x_dot_mp(const RCP< const Stokhos::ProductEpetraVector > &x_dot_mp)
Precondition: supports(IN_ARG_x_dot_mp)==true.
void _setUnsupportsAndRelated(EInArgsMembers arg)
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
void set(const RCP< const ObjectType > &uo)
Set an extended input object of type ObjectType in the InArgs. Precondition: supports()==true.
RCP< LinearOpBase< Scalar > > get_H_pp(int l1, int l2) const
Precondition: supports(OUT_ARG_H_pp,l1,l2)==true.
bool isSameSupport(const DerivativeSupport &derivSupport) const
Evaluation< VectorBase< Scalar > > get_g(int j) const
Precondition: supports(OUT_ARG_g)==true..
DerivativeMultiVector(const RCP< MultiVectorBase< Scalar > > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Evaluation< VectorBase< Scalar > > get_f() const
Precondition: supports(OUT_ARG_f)==true.
Jacobian form DhDz (nz columns of h_space vectors)
RCP< const ObjectType > get() const
Get an extended input object of type ObjectType>/tt> from the InArgs. Precondition: supports()==true...
EDerivativeLinearity linearity
void set_hess_f_xp(int l, const RCP< LinearOpBase< Scalar > > &hess_f_xp_l)
Precondition: supports(OUT_ARG_hess_f_xp,l)==true.
RCP< const Stokhos::ProductEpetraVector > get_x_mp() const
Precondition: supports(IN_ARG_x_mp)==true.
void set_hess_vec_prod_g_xx(int j, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_g_xx_j)
Precondition: supports(OUT_ARG_hess_vec_prod_g_xx,j)==true.
std::string description() const
Do an exact evaluation (default)
void _setSupports(EOutArgsMembers arg, bool supports)
MPDerivative(const MPDerivativeMultiVector &dmv)
Derivative(const RCP< MultiVectorBase< Scalar > > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL)
Evaluation(const RCP< ObjType > &obj)
Implicit conversion from RCP<ObjType>.
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
DerivativeProperties get_DgDx_dot_properties(int j) const
Return the know properties of DgDx_dot(j) (precondition: supports(OUT_ARG_DgDx_dot,j)==true).
DerivativeSupport & plus(EDerivativeMultiVectorOrientation mvOrientation)
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
Derivative< Scalar > get_DgDp(int j, int l) const
Precondition: supports(OUT_ARG_DgDp,j,l)==true.
bool isSupportedBy(const DerivativeSupport &derivSupport) const
Returns true if the form of the derivative contained here is supported by deriveSupport.
void changeOrientation(const EDerivativeMultiVectorOrientation orientation)
void set_hess_f_xx(const RCP< LinearOpBase< Scalar > > &hess_f_xx)
Precondition: supports(OUT_ARG_hess_f_xx)==true.
RCP< const ObjectType > get() const
Get an extended output argument of type ObjectType from OutArgs. Precondition: supports()==true.
Gradient form DhDz^T (nh columns of z_space vectors)
bool isSupportedBy(const DerivativeSupport &derivSupport) const
Returns true if the form of the derivative contained here is supported by deriveSupport.
DerivativeProperties get_DgDx_properties(int j) const
Return the know properties of DgDx(j) (precondition: supports(OUT_ARG_DgDx,j)==true).
Evaluation(const RCP< ObjType > &obj, EEvalType evalType)
MPDerivativeMultiVector getDerivativeMultiVector() const
void set_W_properties(const DerivativeProperties &properties)
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_g_xx(int j) const
Precondition: supports(OUT_ARG_hess_vec_prod_g_xx,j)==true.
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_f_px(int l) const
Precondition: supports(OUT_ARG_hess_vec_prod_f_px,l)==true.
void setSupports(EInArgsMembers arg, bool supports=true)
int Np() const
Return the number of parameter subvectors p(l) supported (Np >= 0).
void set_stage_number(Scalar stage_number)
Precondition: supports(IN_ARG_stage_number)==true.
An approx. eval. for a F.D. deriv.
void set_x(const RCP< const VectorBase< Scalar > > &x)
Precondition: supports(IN_ARG_x)==true.
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
void setUnsupportsAndRelated(EInArgsMembers arg)
Interface for a collection of column vectors called a multi-vector.
void setUnsupportsAndRelated(EInArgsMembers arg)
void set_hess_vec_prod_f_xx(const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_f_xx)
Precondition: supports(OUT_ARG_hess_vec_prod_f_xx)==true.
void setArgs(const InArgs< Scalar > &inArgs, bool ignoreUnsupported=false, bool cloneObjects=false)
Set non-null arguments (does not overwrite non-NULLs with NULLs) .
void set_DgDp(int j, int l, const Derivative< Scalar > &DgDp_j_l)
Precondition: supports(OUT_ARG_DgDp,j,l)==true.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
void set_DgDp_properties(int j, int l, const DerivativeProperties &properties)
Teuchos::ScalarTraits< Scalar >::magnitudeType ScalarMag
void _setHessianSupports(const bool supports)
RCP< Stokhos::ProductEpetraOperator > getLinearOp() const
EOutArgs_hess_vec_prod_f_xx
DerivativeSupport(EDerivativeMultiVectorOrientation mvOrientation)
void setHessianSupports(const bool supports=true)
DerivativeMultiVector< Scalar > getDerivativeMultiVector() const
RCP< const Stokhos::ProductEpetraVector > get_x_dot_mp() const
Precondition: supports(IN_ARG_x_dotmp)==true.
void set_g_multiplier(int j, const RCP< const VectorBase< Scalar > > &g_multiplier)
Precondition: supports(IN_ARG_x)==true.
std::string description() const
Derivative(const DerivativeMultiVector< Scalar > &dmv)
const MPDerivativeMultiVector & assert_not_null() const
void set_hess_vec_prod_f_pp(int l1, int l2, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_f_pp_l1_l2)
Precondition: supports(OUT_ARG_hess_vec_prod_f_pp,l1,l2)==true.
void set_hess_g_xp(int j, int l, const RCP< LinearOpBase< Scalar > > &hess_g_xp_j_l)
Precondition: supports(OUT_ARG_hess_g_xp,j,l)==true.
void _setModelEvalDescription(const std::string &modelEvalDescription)
Abstract interface for finite-dimensional dense vectors.
void set_Np_Ng(int Np, int Ng)
RCP< LinearOpBase< Scalar > > get_hess_g_xx(int j) const
Precondition: supports(OUT_ARG_hess_g_xx,j)==true.
TEUCHOSCORE_LIB_DLL_EXPORT std::string toString(const EVerbosityLevel verbLevel)
Simple public strict containing properties of a derivative object.
void _setSupports(EInArgsMembers arg, bool supports)
void describe(Teuchos::FancyOStream &, const Teuchos::EVerbosityLevel) const
RCP< T > & operator=(const RCP< T > &r_ptr)
void assertSameSupport(const OutArgs< Scalar > &outArgs) const
Assert that two OutArgs objects have the same support.
EEvalType
The type of an evaluation.
Scalar get_W_x_dot_dot_coeff() const
Precondition: supports(IN_ARG_W_x_dot_dot_coeff)==true.
void set_hess_g_xx(int j, const RCP< LinearOpBase< Scalar > > &hess_g_xx_j)
Precondition: supports(OUT_ARG_hess_g_xx,j)==true.
void set_x_dot(const RCP< const VectorBase< Scalar > > &x_dot)
Precondition: supports(IN_ARG_x_dot)==true.
Base class for all linear operators.
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_g_px(int j, int l) const
Precondition: supports(OUT_ARG_hess_vec_prod_g_px,j,l)==true.
RCP< LinearOpBase< Scalar > > get_hess_f_pp(int l1, int l2) const
Precondition: supports(OUT_ARG_hess_f_pp,l1,l2)==true.
DerivativeSupport(EDerivativeLinearOp)
RCP< Stokhos::ProductEpetraOperator > get_W_mp() const
Precondition: supports(OUT_ARG_W_mp)==true.
DerivativeProperties get_DgDp_properties(int j, int l) const
Return the know properties of DgDp(j,l) (precondition: supports(OUT_ARG_DgDp,j,l)==true).
Derivative(const RCP< LinearOpBase< Scalar > > &lo)
std::string description() const
void set_DgDx_dot_properties(int j, const DerivativeProperties &properties)
bool isFailed() const
Return if the evaluation failed or not.
const RCP< T > & assert_not_null() const
void _set_DgDx_properties(int j, const DerivativeProperties &properties)
void set_g_mp(int j, const RCP< Stokhos::ProductEpetraVector > &g_mp_j)
Precondition: supports(OUT_ARG_g_mp)==true.
EOutArgs_hess_vec_prod_g_pp
EOutArgs_hess_vec_prod_g_xp
void set_hess_vec_prod_f_px(int l, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_f_px_l)
Precondition: supports(OUT_ARG_hess_vec_prod_f_px,l)==true.
DerivativeProperties(EDerivativeLinearity in_linearity, ERankStatus in_rank, bool in_supportsAdjoint)
Base subclass for ModelEvaluator that defines some basic types.
void set_t(ScalarMag t)
Precondition: supports(IN_ARG_t)==true.
void set_p_direction(int l, const RCP< const MultiVectorBase< Scalar > > &p_direction_l)
Precondition: supports(IN_ARG_x)==true.
void set_x_mp(const RCP< const Stokhos::ProductEpetraVector > &x_mp)
Precondition: supports(IN_ARG_x_mp)==true.
void set_H_xx(const RCP< LinearOpBase< Scalar > > &H_xx)
Precondition: supports(OUT_ARG_H_xx)==true.
void set_hess_vec_prod_f_xp(int l, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_f_xp_l)
Precondition: supports(OUT_ARG_hess_vec_prod_f_xp,l)==true.
void set_DgDx_dot(int j, const Derivative< Scalar > &DgDx_dot_j)
Precondition: supports(OUT_ARG_DgDx_dot,j)==true.
RCP< LinearOpBase< Scalar > > get_hess_g_pp(int j, int l1, int l2) const
Precondition: supports(OUT_ARG_hess_g_pp,j,l1,l2)==true.
void assertSameSupport(const InArgs< Scalar > &inArgs) const
Assert that two InArgs objects have the same support.
void set_p(int l, const RCP< const VectorBase< Scalar > > &p_l)
Set p(l) where 0 <= l && l < this->Np().
void setSupports(EOutArgsMembers arg, bool supports=true)
RCP< LinearOpWithSolveBase< Scalar > > get_W() const
Precondition: supports(OUT_ARG_W)==true.
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_f_xx() const
Precondition: supports(OUT_ARG_hess_vec_prod_f_xx)==true.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
void _set_DgDp_properties(int j, int l, const DerivativeProperties &properties)
void set_W(const RCP< LinearOpWithSolveBase< Scalar > > &W)
Precondition: supports(OUT_ARG_W)==true.
int Ng() const
Return the number of axillary response functions g(j)(...) supported (Ng >= 0).
Scalar get_alpha() const
Precondition: supports(IN_ARG_alpha)==true.
void setFailed() const
Set that the evaluation as a whole failed.
void set_hess_g_pp(int j, int l1, int l2, const RCP< LinearOpBase< Scalar > > &hess_g_pp_j_l1_l2)
Precondition: supports(OUT_ARG_hess_g_pp,j,l1,l2)==true.
bool supports() const
Determines if an extended output argument of type ObjectType is supported.
RCP< Stokhos::ProductEpetraMultiVector > getMultiVector() const
void _set_Np_Ng(int Np, int Ng)
Scalar get_stage_number() const
Precondition: supports(IN_ARG_stage_number)==true.
std::string description() const
RCP< Stokhos::ProductEpetraVector > get_f_mp() const
Precondition: supports(OUT_ARG_f_mp)==true.
void set_alpha(Scalar alpha)
Precondition: supports(IN_ARG_alpha)==true.
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_g_pp(int j, int l1, int l2) const
Precondition: supports(OUT_ARG_hess_vec_prod_g_pp,j,l1,l2)==true.
void set_f_multiplier(const RCP< const VectorBase< Scalar > > &f_multiplier)
Precondition: supports(IN_ARG_x)==true.
void _set_W_properties(const DerivativeProperties &properties)
void set_hess_vec_prod_g_pp(int j, int l1, int l2, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_g_pp_j_l1_l2)
Precondition: supports(OUT_ARG_hess_vec_prod_g_pp,j,l1,l2)==true.
Derivative< Scalar > get_DgDx_dot(int j) const
Precondition: supports(OUT_ARG_DgDx_dot,j)==true.
void set_DfDp(int l, const Derivative< Scalar > &DfDp_l)
Precondition: supports(OUT_ARG_DfDp,l)==true.
ModelEvaluatorBase()
constructor
void set_H_pp(int l1, int l2, const RCP< LinearOpBase< Scalar > > &H_pp_l1_l2)
Precondition: supports(OUT_ARG_H_pp,l1,l2)==true.
EDerivativeMultiVectorOrientation getOrientation() const
RCP< PreconditionerBase< Scalar > > get_W_prec() const
Precondition: supports(OUT_ARG_W_op)==true.
const Derivative< Scalar > & assert_not_null() const
void set_f_mp(const RCP< Stokhos::ProductEpetraVector > &f_mp)
Precondition: supports(OUT_ARG_f_mp)==true.
void set_x_direction(const RCP< const MultiVectorBase< Scalar > > &x_direction)
Precondition: supports(IN_ARG_x)==true.
std::string description() const
EOutArgs_hess_vec_prod_g_px
Determines the forms of a general derivative that are supported.
std::string description() const
int Np() const
Return the number of parameter subvectors p(l) supported (Np >= 0).
Scalar get_step_size() const
Precondition: supports(IN_ARG_step_size)==true.
RCP< const MultiVectorBase< Scalar > > get_p_direction(int l) const
Get p(l) where 0 <= l && l < this->Np().
RCP< const VectorBase< Scalar > > get_x_dot_dot() const
Precondition: supports(IN_ARG_x_dot_dot)==true.
DerivativeSupport & plus(EDerivativeLinearOp)
RCP< LinearOpBase< Scalar > > get_hess_f_xx() const
Precondition: supports(OUT_ARG_hess_f_xx)==true.
RCP< const VectorBase< Scalar > > get_g_multiplier(int j) const
Precondition: supports(IN_ARG_x)==true.
void set_f(const Evaluation< VectorBase< Scalar > > &f)
Precondition: supports(OUT_ARG_f)==true.
void set_H_xp(int l, const RCP< LinearOpBase< Scalar > > &H_xp_l)
Precondition: supports(OUT_ARG_H_xp,l)==true.
void set_beta(Scalar beta)
Precondition: supports(IN_ARG_beta)==true.
void set_DgDx(int j, const Derivative< Scalar > &DgDx_j)
Precondition: supports(OUT_ARG_DgDx,j)==true.
void setModelEvalDescription(const std::string &modelEvalDescription)
Type to embed evaluation accuracy with an RCP-managed object.
RCP< LinearOpBase< Scalar > > get_hess_f_xp(int l) const
Precondition: supports(OUT_ARG_hess_f_xp,l)==true.
EOutArgs_hess_vec_prod_g_xx
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
std::string modelEvalDescription() const
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
const DerivativeMultiVector< Scalar > & assert_not_null() const
void set_W_x_dot_dot_coeff(Scalar W_x_dot_dot_coeff)
Precondition: supports(IN_ARG_W_x_dot_dot_coeff)==true.
MPDerivativeMultiVector(const RCP< Stokhos::ProductEpetraMultiVector > &mv, const EDerivativeMultiVectorOrientation orientation=DERIV_MV_BY_COL, const Teuchos::Array< int > ¶mIndexes=Teuchos::Array< int >())
RCP< LinearOpBase< Scalar > > get_W_op() const
Precondition: supports(OUT_ARG_W_op)==true.
RCP< const MultiVectorBase< Scalar > > get_x_direction() const
Precondition: supports(IN_ARG_x)==true.
bool supports(EDerivativeLinearOp) const
void set_W_op(const RCP< LinearOpBase< Scalar > > &W_op)
Precondition: supports(OUT_ARG_W_op)==true.
EDerivativeMultiVectorOrientation getMultiVectorOrientation() const
DerivativeProperties get_DfDp_properties(int l) const
Return the know properties of DfDp(l) (precondition: supports(OUT_ARG_DfDp,l)==true).
RCP< const VectorBase< Scalar > > get_x() const
Precondition: supports(IN_ARG_x)==true.
void _setModelEvalDescription(const std::string &modelEvalDescription)
const Teuchos::Array< int > & getParamIndexes() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const MPDerivative & assert_not_null() const
RCP< LinearOpBase< Scalar > > getLinearOp() const
void set_hess_vec_prod_g_xp(int j, int l, const RCP< MultiVectorBase< Scalar > > &hess_vec_prod_g_xp_j_l)
Precondition: supports(OUT_ARG_hess_vec_prod_g_xp,j,l)==true.
RCP< const VectorBase< Scalar > > get_p(int l) const
Get p(l) where 0 <= l && l < this->Np().
Protected subclass of OutArgs that only ModelEvaluator subclasses can access to set up the selection ...
RCP< MultiVectorBase< Scalar > > get_hess_vec_prod_g_xp(int j, int l) const
Precondition: supports(OUT_ARG_hess_vec_prod_g_xp,j,l)==true.
DerivativeProperties get_W_properties() const
Return the known properties of W (precondition: supports(OUT_ARG_f)==true).
RCP< LinearOpBase< Scalar > > get_H_xp(int l) const
Precondition: supports(OUT_ARG_H_xp,l)==true.
EOutArgs_hess_vec_prod_f_px
RCP< MultiVectorBase< Scalar > > getMultiVector() const
Evaluation(Teuchos::ENull)
Derivative< Scalar > get_DgDx(int j) const
Precondition: supports(OUT_ARG_DgDx,j)==true.
void reset(const RCP< ObjType > &obj, EEvalType evalType)
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...