Tempus
Version of the Day
Time Integration
|
Transform a ModelEvaluator's sensitivity equations to its residual. More...
#include <Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp>
Public Types | |
typedef Thyra::VectorBase< Scalar > | Vector |
typedef Thyra::MultiVectorBase < Scalar > | MultiVector |
Public Member Functions | |
CombinedForwardSensitivityModelEvaluator (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null, const Teuchos::RCP< MultiVector > &dxdp_init=Teuchos::null, const Teuchos::RCP< MultiVector > &dx_dotdp_init=Teuchos::null, const Teuchos::RCP< MultiVector > &dx_dotdot_dp_init=Teuchos::null) | |
Constructor. More... | |
int | getSensitivityParamIndex () const |
Get sensitivity parameter index. More... | |
Public functions overridden from SensitivityModelEvaulator. | |
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > | getForwardModel () const |
Get the underlying model 'f'. More... | |
Public functions overridden from ModelEvaulator. | |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | get_p_space (int p) const |
Teuchos::RCP< const Teuchos::Array< std::string > > | get_p_names (int p) const |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | get_x_space () const |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | get_f_space () const |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | get_g_space (int j) const |
Teuchos::ArrayView< const std::string > | get_g_names (int j) const |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | create_W_op () const |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | create_DgDx_dot_op (int j) const |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | create_DgDx_op (int j) const |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | create_DgDp_op (int j, int l) const |
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase < Scalar > > | get_W_factory () const |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | createInArgs () const |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | getNominalValues () const |
Public Member Functions inherited from Tempus::SensitivityModelEvaluatorBase< Scalar > | |
SensitivityModelEvaluatorBase () | |
Constructor. More... | |
virtual | ~SensitivityModelEvaluatorBase () |
Destructor. More... | |
virtual void | setForwardSolutionHistory (const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &) |
Set solution history from forward state evaluation (for interpolation) More... | |
virtual void | setForwardSolutionState (const Teuchos::RCP< const Tempus::SolutionState< Scalar > > &) |
Set solution state from forward state evaluation (for frozen state) More... | |
virtual void | setSolver (const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &, const bool) |
Set the solver of the underlying model if you want to reuse it. More... | |
Static Public Member Functions | |
static Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () |
Private Member Functions | |
Thyra::ModelEvaluatorBase::OutArgs < Scalar > | createOutArgsImpl () const |
void | evalModelImpl (const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const |
Private Attributes | |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | prototypeInArgs_ |
Thyra::ModelEvaluatorBase::OutArgs < Scalar > | prototypeOutArgs_ |
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > | model_ |
Teuchos::RCP< MultiVector > | dxdp_init_ |
Teuchos::RCP< MultiVector > | dx_dotdp_init_ |
Teuchos::RCP< MultiVector > | dx_dotdotdp_init_ |
int | p_index_ |
int | x_tangent_index_ |
int | xdot_tangent_index_ |
int | xdotdot_tangent_index_ |
bool | use_dfdp_as_tangent_ |
int | num_param_ |
Teuchos::RCP< const Thyra::DefaultMultiVectorProductVectorSpace < Scalar > > | dxdp_space_ |
Teuchos::RCP< const Thyra::DefaultMultiVectorProductVectorSpace < Scalar > > | x_dxdp_space_ |
Teuchos::RCP< const Thyra::DefaultMultiVectorProductVectorSpace < Scalar > > | dfdp_space_ |
Teuchos::RCP< const Thyra::DefaultMultiVectorProductVectorSpace < Scalar > > | f_dfdp_space_ |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | my_dfdx_ |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | my_dfdxdot_ |
Teuchos::RCP < Thyra::LinearOpBase< Scalar > > | my_dfdxdotdot_ |
Transform a ModelEvaluator's sensitivity equations to its residual.
This class wraps a given ModelEvalutor encapsulating f(x,p) and creates a new "residual" for it and the forward sensitivity equations: F(X) = [ f(x,p) ] = 0 [ (df/dx)(x,p) * dx/dp + df/dp(x,p) ] where X = [ x; dx/dp ] (transient terms supressed for simplicity). This model evaluator can then be handed to a regular (non)linear solver to compute X. Note that even though these equations are linear in X, it is not necessarily the case that the underlying model evaluator accurately computes df/dx in its evaluation of W. Therefore this model evaluator can optionally reinterpret the model's df/dp out-arg as (df/dx)(x,p) * dx/dp + df/dp(x,p) where dx/dp is passed as another parameter (product) vector (encapsulated in the Thyra::DefaultMultiVectorProductVector). This is not standard model evaluator behavior, but is useful for models where W is only an approximation to df/dx and/or the model is capable of directly computing (df/dx)(x,p) * dx/dp + df/dp(x,p).
Definition at line 37 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
typedef Thyra::MultiVectorBase<Scalar> Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::MultiVector |
Definition at line 42 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
typedef Thyra::VectorBase<Scalar> Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::Vector |
Definition at line 41 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::CombinedForwardSensitivityModelEvaluator | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | model, |
const Teuchos::RCP< const Teuchos::ParameterList > & | pList = Teuchos::null , |
||
const Teuchos::RCP< MultiVector > & | dxdp_init = Teuchos::null , |
||
const Teuchos::RCP< MultiVector > & | dx_dotdp_init = Teuchos::null , |
||
const Teuchos::RCP< MultiVector > & | dx_dotdot_dp_init = Teuchos::null |
||
) |
Constructor.
The optionally supplied parameter list supports the following options:
Definition at line 23 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::create_DgDp_op | ( | int | j, |
int | l | ||
) | const |
Definition at line 182 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::create_DgDx_dot_op | ( | int | j | ) | const |
Definition at line 166 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::create_DgDx_op | ( | int | j | ) | const |
Definition at line 174 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::create_W_op | ( | ) | const |
Definition at line 157 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::createInArgs | ( | ) | const |
Definition at line 205 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 287 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 295 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_f_space | ( | ) | const |
Definition at line 133 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::ArrayView< const std::string > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_g_names | ( | int | j | ) | const |
Definition at line 149 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_g_space | ( | int | j | ) | const |
Definition at line 141 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Teuchos::Array< std::string > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_p_names | ( | int | p | ) | const |
Definition at line 117 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_p_space | ( | int | p | ) | const |
Definition at line 109 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_W_factory | ( | ) | const |
Definition at line 190 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::get_x_space | ( | ) | const |
Definition at line 125 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
|
inlinevirtual |
Get the underlying model 'f'.
Reimplemented from Tempus::SensitivityModelEvaluatorBase< Scalar >.
Definition at line 79 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus::CombinedForwardSensitivityModelEvaluator< Scalar >::getNominalValues | ( | ) | const |
Definition at line 213 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
|
inline |
Get sensitivity parameter index.
Definition at line 85 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
static |
Definition at line 453 of file Tempus_CombinedForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 146 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 136 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 135 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 134 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 144 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 147 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 133 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 149 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 150 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 151 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 143 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 137 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 130 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 131 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 141 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 145 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 138 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 139 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 140 of file Tempus_CombinedForwardSensitivityModelEvaluator_decl.hpp.