Tempus
Version of the Day
Time Integration
|
Transform a ModelEvaluator's sensitivity equations to its residual. More...
#include <Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp>
Public Types | |
typedef Thyra::VectorBase< Scalar > | Vector |
typedef Thyra::MultiVectorBase < Scalar > | MultiVector |
Public Types inherited from Thyra::ModelEvaluator< class > | |
enum | EInArgsMembers |
enum | EInArgs_p_mp |
enum | EEvalType |
enum | EDerivativeMultiVectorOrientation |
enum | EDerivativeLinearOp |
enum | EDerivativeLinearity |
enum | ERankStatus |
enum | EOutArgsMembers |
enum | EOutArgsDfDp |
enum | EOutArgsDgDx_dot |
enum | EOutArgsDgDx |
enum | EOutArgsDgDp |
enum | EOutArgsDfDp_mp |
enum | EOutArgs_g_mp |
enum | EOutArgsDgDx_dot_mp |
enum | EOutArgsDgDx_mp |
enum | EOutArgsDgDp_mp |
typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | ScalarMag |
Public Member Functions | |
StaggeredForwardSensitivityModelEvaluator (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_residual_model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_solve_model, const bool is_pseudotransient, 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... | |
Public Member Functions inherited from Thyra::StateFuncModelEvaluatorBase< Scalar > | |
RCP< const VectorSpaceBase < Scalar > > | get_p_space (int l) const |
RCP< const Teuchos::Array < std::string > > | get_p_names (int l) const |
RCP< const VectorSpaceBase < Scalar > > | get_g_space (int j) const |
Teuchos::ArrayView< const std::string > | get_g_names (int j) const |
ModelEvaluatorBase::InArgs < Scalar > | getNominalValues () const |
ModelEvaluatorBase::InArgs < Scalar > | getLowerBounds () const |
ModelEvaluatorBase::InArgs < Scalar > | getUpperBounds () const |
RCP< LinearOpBase< Scalar > > | create_W_op () const |
RCP< PreconditionerBase< Scalar > > | create_W_prec () const |
RCP< const LinearOpWithSolveFactoryBase < Scalar > > | get_W_factory () const |
void | reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved) |
Public Member Functions inherited from Thyra::ModelEvaluator< class > | |
virtual int | Np () const =0 |
virtual int | Ng () const =0 |
virtual RCP< const VectorSpaceBase< Scalar > > | get_f_multiplier_space () const =0 |
virtual RCP< const VectorSpaceBase< Scalar > > | get_g_multiplier_space (int j) const =0 |
virtual RCP < LinearOpWithSolveBase < Scalar > > | create_W () const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_DfDp_op (int l) const =0 |
virtual ModelEvaluatorBase::OutArgs < Scalar > | createOutArgs () const =0 |
virtual void | evalModel (const ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const =0 |
ModelEvaluatorBase () | |
std::string | toString (ModelEvaluatorBase::EInArgsMembers) |
std::string | toString (ModelEvaluatorBase::EOutArgsMembers) |
std::string | toString (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation) |
ModelEvaluatorBase::EDerivativeMultiVectorOrientation | getOtherDerivativeMultiVectorOrientation (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation) |
Public Member Functions inherited from Teuchos::Describable | |
virtual std::string | description () const |
virtual void | describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
virtual | ~Describable () |
LabeledObject () | |
virtual | ~LabeledObject () |
virtual void | setObjectLabel (const std::string &objectLabel) |
virtual std::string | getObjectLabel () const |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Public Member Functions inherited from Tempus::SensitivityModelEvaluatorBase< Scalar > | |
SensitivityModelEvaluatorBase () | |
Constructor. More... | |
virtual | ~SensitivityModelEvaluatorBase () |
Destructor. More... | |
Static Public Member Functions | |
static Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () |
Private Types | |
typedef Thyra::DefaultMultiVectorProductVectorSpace < Scalar > | DMVPVS |
Private Member Functions | |
Thyra::ModelEvaluatorBase::OutArgs < Scalar > | createOutArgsImpl () const |
void | evalModelImpl (const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const |
Public functions overridden from SensitivityModelEvaulator. | |
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > | getForwardModel () const |
Get the underlying model 'f'. More... | |
void | setForwardSolutionHistory (const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh) |
Set solution history from forward state evaluation (for interpolation) More... | |
virtual void | setForwardSolutionState (const Teuchos::RCP< const Tempus::SolutionState< Scalar > > &s) |
Set solution state from forward state evaluation (for frozen state) More... | |
virtual void | setSolver (const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, const bool force_W_update) |
Set the solver of the underlying model if you want to reuse it. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Thyra::ModelEvaluator< class > | |
static const int | NUM_E_IN_ARGS_MEMBERS |
static const int | NUM_E_OUT_ARGS_MEMBERS |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
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 the forward sensitivity equations: F(X) = (df/dx)(x,p) * X + df/dp(x,p) = 0 where 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).
This model evaluator differes from CombinedForwardSensitivityModelEvaluator in that it doesn't include the state equations in the residual, just the sensitivity equations. Therefore it provides methods to set the state solution vector (x) and time derivatives (x_dot, x_dot_dot) for use in evaluating the senstivity residual. It also provides methods for setting the linear operator (W a.k.a. alpha*df/dx + beta*df/dx_dot) and its preconditioner in cases where they can be reused from the state model evaluations.
Definition at line 50 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
typedef Thyra::VectorBase<Scalar> Tempus::StaggeredForwardSensitivityModelEvaluator< Scalar >::Vector |
Definition at line 54 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
typedef Thyra::MultiVectorBase<Scalar> Tempus::StaggeredForwardSensitivityModelEvaluator< Scalar >::MultiVector |
Definition at line 55 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 161 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
Tempus::StaggeredForwardSensitivityModelEvaluator< Scalar >::StaggeredForwardSensitivityModelEvaluator | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | model, |
const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | sens_residual_model, | ||
const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | sens_solve_model, | ||
const bool | is_pseudotransient, | ||
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 24 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
inlinevirtual |
Get the underlying model 'f'.
Reimplemented from Tempus::SensitivityModelEvaluatorBase< Scalar >.
Definition at line 100 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
virtual |
Set solution history from forward state evaluation (for interpolation)
Reimplemented from Tempus::SensitivityModelEvaluatorBase< Scalar >.
Definition at line 148 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Set solution state from forward state evaluation (for frozen state)
Reimplemented from Tempus::SensitivityModelEvaluatorBase< Scalar >.
Definition at line 156 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
inlinevirtual |
Set the solver of the underlying model if you want to reuse it.
Reimplemented from Tempus::SensitivityModelEvaluatorBase< Scalar >.
Definition at line 114 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 165 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 173 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 181 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 188 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 195 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 208 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 225 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 237 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 245 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 252 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 260 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 281 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 288 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
static |
Definition at line 640 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 340 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 346 of file Tempus_StaggeredForwardSensitivityModelEvaluator_impl.hpp.
|
private |
Definition at line 169 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 170 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 172 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 173 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 174 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 175 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 176 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 177 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 178 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 179 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 180 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 181 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 182 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 183 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 184 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 186 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 187 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 188 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 189 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 190 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 191 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 192 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 194 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 195 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
private |
Definition at line 197 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 198 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 199 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 200 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 201 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 202 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 203 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 204 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 205 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 206 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 207 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 208 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 209 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.
|
mutableprivate |
Definition at line 210 of file Tempus_StaggeredForwardSensitivityModelEvaluator_decl.hpp.