Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::WrapperModelEvaluatorSecondOrder< Scalar > Class Template Reference

A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state, x, and determines its residual, $ g(x) $, which is suitable for a nonlinear solve. This is accomplished by computing the time derivative of the state, x_dot, (through Lambda functions), supplying the current time, and calling the application application ModelEvaluator, $ f(\dot{x},x,t) $. More...

#include <Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp>

Inheritance diagram for Tempus::WrapperModelEvaluatorSecondOrder< Scalar >:
Tempus::WrapperModelEvaluator< Scalar >

Public Types

enum  SCHEME_TYPE { NEWMARK_IMPLICIT_AFORM, NEWMARK_IMPLICIT_DFORM }
 
typedef Thyra::VectorBase< Scalar > Vector
 

Public Member Functions

 WrapperModelEvaluatorSecondOrder (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const std::string schemeName)
 Constructor. More...
 
void setAppModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &me)
 Set the underlying application ModelEvaluator. More...
 
Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getAppModel () const
 Get the underlying application model 'f'. More...
 
void initializeNewmark (Teuchos::RCP< const Vector > v_pred, Teuchos::RCP< const Vector > d_pred, Scalar delta_t, Scalar t, Scalar beta, Scalar gamma)
 Set values needed in evalModelImpl. More...
 
Overridden from Thyra::StateFuncModelEvaluatorBase
Teuchos::RCP
< Thyra::LinearOpBase< Scalar > > 
create_W_op () const
 
Teuchos::RCP< const
Thyra::LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_f_space () const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_p_space (int p) const
 Get the p space. More...
 
Teuchos::RCP< const
Teuchos::Array< std::string > > 
get_p_names (int p) const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_x_space () const
 Get the x-solution space. More...
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_g_space (int i) const
 Get the g space. More...
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
virtual void setInArgs (Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs)
 Set InArgs the wrapper ModelEvalutor. More...
 
virtual
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
getInArgs ()
 Get InArgs the wrapper ModelEvalutor. More...
 
virtual void setOutArgs (Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs)
 Set OutArgs the wrapper ModelEvalutor. More...
 
virtual
Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
getOutArgs ()
 Get OutArgs the wrapper ModelEvalutor. More...
 
virtual void setForSolve (Teuchos::RCP< TimeDerivative< Scalar > > timeDer, Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs, Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs, EVALUATION_TYPE=SOLVE_FOR_X)
 Set parameters for application implicit ModelEvaluator solve. More...
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
createInArgs () const
 
Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgsImpl () const
 
void evalModelImpl (const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
 
Vector Methods.

Private Member Functions

 WrapperModelEvaluatorSecondOrder ()
 Default constructor - not allowed. More...
 

Private Attributes

Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
appModel_
 
Scalar t_
 
Scalar gamma_
 
Scalar beta_
 
Scalar delta_t_
 
Teuchos::RCP< const Vectord_pred_
 
Teuchos::RCP< const Vectorv_pred_
 
Teuchos::RCP
< Teuchos::FancyOStream > 
out_
 
SCHEME_TYPE schemeType_
 
Teuchos::RCP< TimeDerivative
< Scalar > > 
timeDer_
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
wrapperInArgs_
 
Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
wrapperOutArgs_
 

Detailed Description

template<typename Scalar>
class Tempus::WrapperModelEvaluatorSecondOrder< Scalar >

A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state, x, and determines its residual, $ g(x) $, which is suitable for a nonlinear solve. This is accomplished by computing the time derivative of the state, x_dot, (through Lambda functions), supplying the current time, and calling the application application ModelEvaluator, $ f(\dot{x},x,t) $.

This class breaks the primary design principle for ModelEvaluators; it is not stateless!

Definition at line 32 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

Member Typedef Documentation

template<typename Scalar >
typedef Thyra::VectorBase<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::Vector

Member Enumeration Documentation

Enumerator
NEWMARK_IMPLICIT_AFORM 
NEWMARK_IMPLICIT_DFORM 

Definition at line 189 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

Constructor & Destructor Documentation

template<typename Scalar >
Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::WrapperModelEvaluatorSecondOrder ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel,
const std::string  schemeName 
)
inline

Constructor.

Definition at line 39 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::WrapperModelEvaluatorSecondOrder ( )
private

Default constructor - not allowed.

Member Function Documentation

template<typename Scalar >
Teuchos::RCP<Thyra::LinearOpBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::create_W_op ( ) const
inline
template<typename Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::createInArgs ( ) const
template<typename Scalar >
Thyra::ModelEvaluatorBase::OutArgs< Scalar > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::createOutArgsImpl ( ) const
template<typename Scalar >
void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::evalModelImpl ( const Thyra::ModelEvaluatorBase::InArgs< Scalar > &  inArgs,
const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &  outArgs 
) const
template<typename Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_f_space ( ) const
inline
template<typename Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_g_space ( int  i) const
inlinevirtual

Get the g space.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 143 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
Teuchos::RCP<const Teuchos::Array<std::string> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_p_names ( int  p) const
inline
template<typename Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_p_space ( int  i) const
inlinevirtual

Get the p space.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 119 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
Teuchos::RCP<const Thyra::LinearOpWithSolveFactoryBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_W_factory ( ) const
inline
template<typename Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::get_x_space ( ) const
inlinevirtual

Get the x-solution space.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 135 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::getAppModel ( ) const
inlinevirtual

Get the underlying application model 'f'.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 72 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
virtual Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::getInArgs ( )
inlinevirtual

Get InArgs the wrapper ModelEvalutor.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 159 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::getNominalValues ( ) const
inline
template<typename Scalar >
virtual Thyra::ModelEvaluatorBase::OutArgs<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::getOutArgs ( )
inlinevirtual

Get OutArgs the wrapper ModelEvalutor.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 167 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::initializeNewmark ( Teuchos::RCP< const Vector v_pred,
Teuchos::RCP< const Vector d_pred,
Scalar  delta_t,
Scalar  t,
Scalar  beta,
Scalar  gamma 
)
inline

Set values needed in evalModelImpl.

Definition at line 81 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::setAppModel ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  me)
inlinevirtual

Set the underlying application ModelEvaluator.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 62 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
virtual void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::setForSolve ( Teuchos::RCP< TimeDerivative< Scalar > >  timeDer,
Thyra::ModelEvaluatorBase::InArgs< Scalar >  inArgs,
Thyra::ModelEvaluatorBase::OutArgs< Scalar >  outArgs,
EVALUATION_TYPE  = SOLVE_FOR_X 
)
inlinevirtual

Set parameters for application implicit ModelEvaluator solve.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 171 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
virtual void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::setInArgs ( Thyra::ModelEvaluatorBase::InArgs< Scalar >  inArgs)
inlinevirtual

Set InArgs the wrapper ModelEvalutor.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 155 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

template<typename Scalar >
virtual void Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::setOutArgs ( Thyra::ModelEvaluatorBase::OutArgs< Scalar >  outArgs)
inlinevirtual

Set OutArgs the wrapper ModelEvalutor.

Implements Tempus::WrapperModelEvaluator< Scalar >.

Definition at line 163 of file Tempus_WrapperModelEvaluatorSecondOrder_decl.hpp.

Member Data Documentation

template<typename Scalar >
Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::appModel_
private
template<typename Scalar >
Scalar Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::beta_
private
template<typename Scalar >
Teuchos::RCP<const Vector> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::d_pred_
private
template<typename Scalar >
Scalar Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::delta_t_
private
template<typename Scalar >
Scalar Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::gamma_
private
template<typename Scalar >
Teuchos::RCP<Teuchos::FancyOStream> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::out_
private
template<typename Scalar >
SCHEME_TYPE Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::schemeType_
private
template<typename Scalar >
Scalar Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::t_
private
template<typename Scalar >
Teuchos::RCP<TimeDerivative<Scalar> > Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::timeDer_
private
template<typename Scalar >
Teuchos::RCP<const Vector> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::v_pred_
private
template<typename Scalar >
Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::wrapperInArgs_
private
template<typename Scalar >
Thyra::ModelEvaluatorBase::OutArgs<Scalar> Tempus::WrapperModelEvaluatorSecondOrder< Scalar >::wrapperOutArgs_
private

The documentation for this class was generated from the following files: