10 #ifndef Tempus_WrapperModelEvaluatorSecondOrder_decl_hpp
11 #define Tempus_WrapperModelEvaluatorSecondOrder_decl_hpp
14 #include "Tempus_config.hpp"
16 #include "Thyra_VectorBase.hpp"
32 template <
typename Scalar>
41 const std::string schemeName)
42 :
appModel_(appModel),
out_(Teuchos::VerboseObjectBase::getDefaultOStream())
44 #ifdef VERBOSE_DEBUG_OUTPUT
45 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
46 *
out_ <<
" schemeName = " << schemeName <<
"\n";
48 if (schemeName ==
"Newmark Implicit a-Form" || schemeName ==
"HHT-Alpha") {
51 else if (schemeName ==
"Newmark Implicit d-Form") {
56 true, std::logic_error,
57 "Error: WrapperModelEvaluatorSecondOrder called with unsopported "
58 <<
"schemeName = " << schemeName
59 <<
"! Supported schemeNames are: 'Newmark Implicit a-Form' and "
67 #ifdef VERBOSE_DEBUG_OUTPUT
68 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
76 #ifdef VERBOSE_DEBUG_OUTPUT
77 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
85 Scalar t, Scalar beta, Scalar gamma)
87 #ifdef VERBOSE_DEBUG_OUTPUT
88 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
102 #ifdef VERBOSE_DEBUG_OUTPUT
103 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
111 #ifdef VERBOSE_DEBUG_OUTPUT
112 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
119 #ifdef VERBOSE_DEBUG_OUTPUT
120 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
127 #ifdef VERBOSE_DEBUG_OUTPUT
128 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
135 #ifdef VERBOSE_DEBUG_OUTPUT
136 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
143 #ifdef VERBOSE_DEBUG_OUTPUT
144 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
156 #ifdef VERBOSE_DEBUG_OUTPUT
157 *
out_ <<
"DEBUG: " << __PRETTY_FUNCTION__ <<
"\n";
180 const int index = -1 )
217 #endif // Tempus_WrapperModelEvaluatorSecondOrder_hpp
virtual Thyra::ModelEvaluatorBase::OutArgs< Scalar > getOutArgs()
Get OutArgs the wrapper ModelEvalutor.
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
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.
void setAppModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &me)
Set the underlying application ModelEvaluator.
virtual void setForSolve(const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &y=Teuchos::null, const int index=-1)
Set parameters for application implicit ModelEvaluator solve.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getAppModel() const
Get the underlying application model 'f'.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int p) const
Get the p space.
Thyra::VectorBase< Scalar > Vector
Teuchos::RCP< const Vector > d_pred_
Teuchos::RCP< TimeDerivative< Scalar > > timeDer_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Get the x-solution space.
A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state...
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > appModel_
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > wrapperOutArgs_
WrapperModelEvaluatorSecondOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const std::string schemeName)
Constructor.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
A ModelEvaluator which wraps the application ModelEvaluator.
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Teuchos::RCP< const Vector > v_pred_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > wrapperInArgs_
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int p) const
virtual Thyra::ModelEvaluatorBase::InArgs< Scalar > getInArgs()
Get InArgs the wrapper ModelEvalutor.
WrapperModelEvaluatorSecondOrder()
Default constructor - not allowed.
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Teuchos::RCP< Teuchos::FancyOStream > out_
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int i) const
Get the g space.