Thyra
Version of the Day
|
Concrete aggregate class for all output arguments computable by a ModelEvaluator
subclass object.
More...
#include <Thyra_ModelEvaluatorBase_decl.hpp>
Public Member Functions | |
OutArgs () | |
int | Np () const |
Return the number of parameter subvectors p(l) supported (Np >= 0 ). More... | |
int | Ng () const |
Return the number of axillary response functions g(j)(...) supported (Ng >= 0 ). More... | |
bool | supports (EOutArgsMembers arg) const |
Determine if an input argument is supported or not. More... | |
const DerivativeSupport & | supports (EOutArgsDfDp arg, int l) const |
Determine if DfDp(l) is supported or not, where 0 <= l && l < Np() . More... | |
const DerivativeSupport & | supports (EOutArgsDgDx_dot arg, int j) const |
Determine if DgDx_dot(j) is supported or not, 0 <= j && j < Ng() . More... | |
const DerivativeSupport & | supports (EOutArgsDgDx arg, int j) const |
Determine if DgDx(j) is supported or not, 0 <= j && j < Ng() . More... | |
const DerivativeSupport & | supports (EOutArgsDgDp arg, int j, int l) const |
Determine if DgDp(j,l) is supported or not, 0 <= j && j < Ng() and 0 <= l && l < Np() . More... | |
void | set_f (const Evaluation< VectorBase< Scalar > > &f) |
Precondition: supports(OUT_ARG_f)==true . More... | |
Evaluation< VectorBase< Scalar > > | get_f () const |
Precondition: supports(OUT_ARG_f)==true . More... | |
void | set_g (int j, const Evaluation< VectorBase< Scalar > > &g_j) |
Precondition: supports(OUT_ARG_g)==true . More... | |
Evaluation< VectorBase< Scalar > > | get_g (int j) const |
Precondition: supports(OUT_ARG_g)==true .. More... | |
void | set_W (const RCP< LinearOpWithSolveBase< Scalar > > &W) |
Precondition: supports(OUT_ARG_W)==true . More... | |
RCP< LinearOpWithSolveBase < Scalar > > | get_W () const |
Precondition: supports(OUT_ARG_W)==true . More... | |
template<typename ObjectType > | |
bool | supports () const |
Determines if an extended output argument of type ObjectType is supported. More... | |
template<typename ObjectType > | |
void | set (const RCP< const ObjectType > &uo) |
Set an extended output argument of type ObjectType in OutArgs. Precondition: supports()==true . More... | |
template<typename ObjectType > | |
RCP< const ObjectType > | get () const |
Get an extended output argument of type ObjectType from OutArgs. Precondition: supports()==true . More... | |
void | set_f_mp (const RCP< Stokhos::ProductEpetraVector > &f_mp) |
Precondition: supports(OUT_ARG_f_mp)==true . More... | |
RCP< Stokhos::ProductEpetraVector > | get_f_mp () const |
Precondition: supports(OUT_ARG_f_mp)==true . More... | |
void | set_g_mp (int j, const RCP< Stokhos::ProductEpetraVector > &g_mp_j) |
Precondition: supports(OUT_ARG_g_mp)==true . More... | |
RCP< Stokhos::ProductEpetraVector > | get_g_mp (int j) const |
Precondition: supports(OUT_ARG_g_mp)==true .. More... | |
void | set_W_mp (const RCP< Stokhos::ProductEpetraOperator > &W_mp) |
Precondition: supports(OUT_ARG_W_mp)==true . More... | |
RCP < Stokhos::ProductEpetraOperator > | get_W_mp () const |
Precondition: supports(OUT_ARG_W_mp)==true . More... | |
void | set_W_op (const RCP< LinearOpBase< Scalar > > &W_op) |
Precondition: supports(OUT_ARG_W_op)==true . More... | |
RCP< LinearOpBase< Scalar > > | get_W_op () const |
Precondition: supports(OUT_ARG_W_op)==true . More... | |
void | set_W_prec (const RCP< PreconditionerBase< Scalar > > &W_prec) |
Precondition: supports(OUT_ARG_W_op)==true . More... | |
RCP< PreconditionerBase< Scalar > > | get_W_prec () const |
Precondition: supports(OUT_ARG_W_op)==true . More... | |
DerivativeProperties | get_W_properties () const |
Return the known properties of W (precondition: supports(OUT_ARG_f)==true ). More... | |
void | set_DfDp (int l, const Derivative< Scalar > &DfDp_l) |
Precondition: supports(OUT_ARG_DfDp,l)==true . More... | |
Derivative< Scalar > | get_DfDp (int l) const |
Precondition: supports(OUT_ARG_DfDp,l)==true . More... | |
DerivativeProperties | get_DfDp_properties (int l) const |
Return the know properties of DfDp(l) (precondition: supports(OUT_ARG_DfDp,l)==true ). More... | |
void | set_DgDx_dot (int j, const Derivative< Scalar > &DgDx_dot_j) |
Precondition: supports(OUT_ARG_DgDx_dot,j)==true . More... | |
Derivative< Scalar > | get_DgDx_dot (int j) const |
Precondition: supports(OUT_ARG_DgDx_dot,j)==true . More... | |
DerivativeProperties | get_DgDx_dot_properties (int j) const |
Return the know properties of DgDx_dot(j) (precondition: supports(OUT_ARG_DgDx_dot,j)==true ). More... | |
void | set_DgDx (int j, const Derivative< Scalar > &DgDx_j) |
Precondition: supports(OUT_ARG_DgDx,j)==true . More... | |
Derivative< Scalar > | get_DgDx (int j) const |
Precondition: supports(OUT_ARG_DgDx,j)==true . More... | |
DerivativeProperties | get_DgDx_properties (int j) const |
Return the know properties of DgDx(j) (precondition: supports(OUT_ARG_DgDx,j)==true ). More... | |
void | set_DgDp (int j, int l, const Derivative< Scalar > &DgDp_j_l) |
Precondition: supports(OUT_ARG_DgDp,j,l)==true . More... | |
Derivative< Scalar > | get_DgDp (int j, int l) const |
Precondition: supports(OUT_ARG_DgDp,j,l)==true . More... | |
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 ). More... | |
void | setArgs (const OutArgs< Scalar > &outArgs, bool ignoreUnsupported=false) |
Set all arguments fron outArgs into *this . More... | |
void | setFailed () const |
Set that the evaluation as a whole failed. More... | |
bool | isFailed () const |
Return if the evaluation failed or not. More... | |
bool | isEmpty () const |
void | assertSameSupport (const OutArgs< Scalar > &outArgs) const |
Assert that two OutArgs objects have the same support. More... | |
std::string | modelEvalDescription () const |
std::string | description () 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. More... | |
Concrete aggregate class for all output arguments computable by a ModelEvaluator
subclass object.
Note that const OutArgs
object means that a client can not change what output objects are being pointed to but they can still change the states of the contained objects. This is slight variation on the concept of logical const-ness in C++ but it is totally consistent with the vary nature of this class.
In addition to storing the output objects themselves, this class also allows the storage if the properties of some of the objects as well. Therefore, objects of this type are used to communicate a lot of different information about the output functions and derivatives supported by a model. It tells clients what functions and derivatives are supported and what the know properties are.
A client can not directly set what input arguments are supported or not supported. Only a subclass of ModelEvaluator
can do that (through the OutArgsSetup
subclass).
Extended types: The methods for supports(), set() and get() that are templated on the ObjectType
are used to support what are called extended types. This functionality allows developers to inject new objects into the ModelEvaluator evaluations. This can be used for expermenting with new capabilities that require adding new/special arguments to the outArgs. This also can be used to reduce the clutter and complexity of the model evaluator outArgs object. For example, users could create their own outArgs for a stochastic computation:
This object could then be used in a model evaluator without changing the base classes in Thyra:
Definition at line 870 of file Thyra_ModelEvaluatorBase_decl.hpp.
Thyra::ModelEvaluatorBase::OutArgs< Scalar >::OutArgs | ( | ) |
Definition at line 828 of file Thyra_ModelEvaluatorBase_def.hpp.
int Thyra::ModelEvaluatorBase::OutArgs< Scalar >::Np | ( | ) | const |
Return the number of parameter subvectors p(l)
supported (Np >= 0
).
Definition at line 840 of file Thyra_ModelEvaluatorBase_def.hpp.
int Thyra::ModelEvaluatorBase::OutArgs< Scalar >::Ng | ( | ) | const |
Return the number of axillary response functions g(j)(...)
supported (Ng >= 0
).
Definition at line 845 of file Thyra_ModelEvaluatorBase_def.hpp.
bool Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | EOutArgsMembers | arg | ) | const |
Determine if an input argument is supported or not.
Definition at line 850 of file Thyra_ModelEvaluatorBase_def.hpp.
const ModelEvaluatorBase::DerivativeSupport & Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | EOutArgsDfDp | arg, |
int | l | ||
) | const |
Determine if DfDp(l)
is supported or not, where 0 <= l && l < Np()
.
Definition at line 865 of file Thyra_ModelEvaluatorBase_def.hpp.
const ModelEvaluatorBase::DerivativeSupport & Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | EOutArgsDgDx_dot | arg, |
int | j | ||
) | const |
Determine if DgDx_dot(j)
is supported or not, 0 <= j && j < Ng()
.
Definition at line 876 of file Thyra_ModelEvaluatorBase_def.hpp.
const ModelEvaluatorBase::DerivativeSupport & Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | EOutArgsDgDx | arg, |
int | j | ||
) | const |
Determine if DgDx(j)
is supported or not, 0 <= j && j < Ng()
.
Definition at line 887 of file Thyra_ModelEvaluatorBase_def.hpp.
const ModelEvaluatorBase::DerivativeSupport & Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | EOutArgsDgDp | arg, |
int | j, | ||
int | l | ||
) | const |
Determine if DgDp(j,l)
is supported or not, 0 <= j && j < Ng()
and 0 <= l && l < Np()
.
Definition at line 898 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_f | ( | const Evaluation< VectorBase< Scalar > > & | f | ) |
Precondition: supports(OUT_ARG_f)==true
.
Definition at line 1130 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Evaluation< VectorBase< Scalar > > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_f | ( | ) | const |
Precondition: supports(OUT_ARG_f)==true
.
Definition at line 1141 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_g | ( | int | j, |
const Evaluation< VectorBase< Scalar > > & | g_j | ||
) |
Precondition: supports(OUT_ARG_g)==true
.
Definition at line 1149 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Evaluation< VectorBase< Scalar > > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_g | ( | int | j | ) | const |
Precondition: supports(OUT_ARG_g)==true
..
Definition at line 1160 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_W | ( | const RCP< LinearOpWithSolveBase< Scalar > > & | W | ) |
Precondition: supports(OUT_ARG_W)==true
.
Definition at line 1206 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< LinearOpWithSolveBase< Scalar > > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_W | ( | ) | const |
Precondition: supports(OUT_ARG_W)==true
.
Definition at line 1217 of file Thyra_ModelEvaluatorBase_def.hpp.
bool Thyra::ModelEvaluatorBase::OutArgs< Scalar >::supports | ( | ) | const |
Determines if an extended output argument of type ObjectType
is supported.
Definition at line 1723 of file Thyra_ModelEvaluatorBase_decl.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set | ( | const RCP< const ObjectType > & | uo | ) |
Set an extended output argument of type ObjectType
in OutArgs. Precondition: supports()==true
.
Definition at line 1736 of file Thyra_ModelEvaluatorBase_decl.hpp.
RCP<const ObjectType> Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get | ( | ) | const |
Get an extended output argument of type ObjectType
from OutArgs. Precondition: supports()==true
.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_f_mp | ( | const RCP< Stokhos::ProductEpetraVector > & | f_mp | ) |
Precondition: supports(OUT_ARG_f_mp)==true
.
Definition at line 1168 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< Stokhos::ProductEpetraVector > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_f_mp | ( | ) | const |
Precondition: supports(OUT_ARG_f_mp)==true
.
Definition at line 1179 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_g_mp | ( | int | j, |
const RCP< Stokhos::ProductEpetraVector > & | g_mp_j | ||
) |
Precondition: supports(OUT_ARG_g_mp)==true
.
Definition at line 1187 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< Stokhos::ProductEpetraVector > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_g_mp | ( | int | j | ) | const |
Precondition: supports(OUT_ARG_g_mp)==true
..
Definition at line 1198 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_W_mp | ( | const RCP< Stokhos::ProductEpetraOperator > & | W_mp | ) |
Precondition: supports(OUT_ARG_W_mp)==true
.
Definition at line 1225 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< Stokhos::ProductEpetraOperator > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_W_mp | ( | ) | const |
Precondition: supports(OUT_ARG_W_mp)==true
.
Definition at line 1236 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_W_op | ( | const RCP< LinearOpBase< Scalar > > & | W_op | ) |
Precondition: supports(OUT_ARG_W_op)==true
.
Definition at line 1244 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< LinearOpBase< Scalar > > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_W_op | ( | ) | const |
Precondition: supports(OUT_ARG_W_op)==true
.
Definition at line 1255 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_W_prec | ( | const RCP< PreconditionerBase< Scalar > > & | W_prec | ) |
Precondition: supports(OUT_ARG_W_op)==true
.
Definition at line 1263 of file Thyra_ModelEvaluatorBase_def.hpp.
RCP< PreconditionerBase< Scalar > > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_W_prec | ( | ) | const |
Precondition: supports(OUT_ARG_W_op)==true
.
Definition at line 1274 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::DerivativeProperties Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_W_properties | ( | ) | const |
Return the known properties of W
(precondition: supports(OUT_ARG_f)==true
).
Definition at line 1283 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_DfDp | ( | int | l, |
const Derivative< Scalar > & | DfDp_l | ||
) |
Precondition: supports(OUT_ARG_DfDp,l)==true
.
Definition at line 1291 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Derivative< Scalar > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DfDp | ( | int | l | ) | const |
Precondition: supports(OUT_ARG_DfDp,l)==true
.
Definition at line 1302 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::DerivativeProperties Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DfDp_properties | ( | int | l | ) | const |
Return the know properties of DfDp(l)
(precondition: supports(OUT_ARG_DfDp,l)==true
).
Definition at line 1311 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_DgDx_dot | ( | int | j, |
const Derivative< Scalar > & | DgDx_dot_j | ||
) |
Precondition: supports(OUT_ARG_DgDx_dot,j)==true
.
Definition at line 1347 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Derivative< Scalar > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDx_dot | ( | int | j | ) | const |
Precondition: supports(OUT_ARG_DgDx_dot,j)==true
.
Definition at line 1358 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::DerivativeProperties Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDx_dot_properties | ( | int | j | ) | const |
Return the know properties of DgDx_dot(j)
(precondition: supports(OUT_ARG_DgDx_dot,j)==true
).
Definition at line 1367 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_DgDx | ( | int | j, |
const Derivative< Scalar > & | DgDx_j | ||
) |
Precondition: supports(OUT_ARG_DgDx,j)==true
.
Definition at line 1403 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Derivative< Scalar > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDx | ( | int | j | ) | const |
Precondition: supports(OUT_ARG_DgDx,j)==true
.
Definition at line 1414 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::DerivativeProperties Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDx_properties | ( | int | j | ) | const |
Return the know properties of DgDx(j)
(precondition: supports(OUT_ARG_DgDx,j)==true
).
Definition at line 1423 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::set_DgDp | ( | int | j, |
int | l, | ||
const Derivative< Scalar > & | DgDp_j_l | ||
) |
Precondition: supports(OUT_ARG_DgDp,j,l)==true
.
Definition at line 1459 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::Derivative< Scalar > Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDp | ( | int | j, |
int | l | ||
) | const |
Precondition: supports(OUT_ARG_DgDp,j,l)==true
.
Definition at line 1470 of file Thyra_ModelEvaluatorBase_def.hpp.
ModelEvaluatorBase::DerivativeProperties Thyra::ModelEvaluatorBase::OutArgs< Scalar >::get_DgDp_properties | ( | int | j, |
int | l | ||
) | const |
Return the know properties of DgDp(j,l)
(precondition: supports(OUT_ARG_DgDp,j,l)==true
).
Definition at line 1479 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::setArgs | ( | const OutArgs< Scalar > & | outArgs, |
bool | ignoreUnsupported = false |
||
) |
Set all arguments fron outArgs
into *this
.
If ignoreUnsupported==true
, then arguments in outArgs
that are not supported in *this
will be ignored. Othereise, if an unsupported argument is set, then an exception will be thrown.
Definition at line 1833 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::setFailed | ( | ) | const |
Set that the evaluation as a whole failed.
Note that this function is declared as const
even through it technically changes the state of *this
object. This was done so that this property could be set by a ModelEvaluator
subclass in evalModel()
which takes a const OutArgs
object. This is consistent with the behavior of the rest of a const OutArgs
object in that a client is allowed to change the state of objects through a const OutArgs
object, they just can't change what objects are pointed to.
Definition at line 2078 of file Thyra_ModelEvaluatorBase_def.hpp.
bool Thyra::ModelEvaluatorBase::OutArgs< Scalar >::isFailed | ( | ) | const |
Return if the evaluation failed or not.
If the evaluation failed, no assumptions should be made at all about the state of the output objects.
Definition at line 2094 of file Thyra_ModelEvaluatorBase_def.hpp.
bool Thyra::ModelEvaluatorBase::OutArgs< Scalar >::isEmpty | ( | ) | const |
Definition at line 2101 of file Thyra_ModelEvaluatorBase_def.hpp.
void Thyra::ModelEvaluatorBase::OutArgs< Scalar >::assertSameSupport | ( | const OutArgs< Scalar > & | outArgs | ) | const |
Assert that two OutArgs objects have the same support.
Definition at line 2134 of file Thyra_ModelEvaluatorBase_def.hpp.
std::string Thyra::ModelEvaluatorBase::OutArgs< Scalar >::modelEvalDescription | ( | ) | const |
Definition at line 2208 of file Thyra_ModelEvaluatorBase_def.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 2215 of file Thyra_ModelEvaluatorBase_def.hpp.
|
virtual |
Create a more detailed description along about this object and the ModelEvaluator that created it.
Reimplemented from Teuchos::Describable.
Definition at line 2231 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2338 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2346 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2442 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 1772 of file Thyra_ModelEvaluatorBase_decl.hpp.
|
protected |
Definition at line 2455 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2466 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2476 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2527 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2721 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2730 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2740 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2750 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2760 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2810 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2918 of file Thyra_ModelEvaluatorBase_def.hpp.
|
protected |
Definition at line 2949 of file Thyra_ModelEvaluatorBase_def.hpp.