Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
VanDerPol_ModelEvaluator_02.hpp
Go to the documentation of this file.
1// @HEADER
2// ****************************************************************************
3// Tempus: Copyright (2017) Sandia Corporation
4//
5// Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6// ****************************************************************************
7// @HEADER
8
9#ifndef TEMPUS_VANDERPOL_MODELEVALUATOR_02_HPP
10#define TEMPUS_VANDERPOL_MODELEVALUATOR_02_HPP
11
12#include "Thyra_ModelEvaluator.hpp" // Interface
13#include "Thyra_StateFuncModelEvaluatorBase.hpp" // Implementation
14
15
24template<class Scalar>
26 : public Thyra::StateFuncModelEvaluatorBase<Scalar>
27{
28 public:
29
49
52 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_x_space() const
53 { return x_space_; }
54 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_f_space() const
55 { return f_space_; }
56 Thyra::ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const
57 { return nominalValues_; }
58 Thyra::ModelEvaluatorBase::InArgs<Scalar> createInArgs() const
59 { return prototypicalInArgs_; }
61
62private:
63
66 Thyra::ModelEvaluatorBase::OutArgs<Scalar> createOutArgsImpl() const
67 { return prototypicalOutArgs_; }
83 void evalModelImpl(
84 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs_bar,
85 const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs_bar
86 ) const;
88
94 mutable Thyra::ModelEvaluatorBase::InArgs<Scalar> prototypicalInArgs_;
96 mutable Thyra::ModelEvaluatorBase::OutArgs<Scalar> prototypicalOutArgs_;
100 Thyra::ModelEvaluatorBase::InArgs<Scalar> nominalValues_;
102 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > x_space_;
104 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > f_space_;
105
106 int dim_;
107 Scalar t0_ic_;
108 Scalar epsilon_;
109 Scalar x0_ic_;
110 Scalar x1_ic_;
111};
112
113
114#endif // TEMPUS_VANDERPOL_MODELEVALUATOR_02_HPP
ModelEvaluator implementation for the example van der Pol Problem.
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > prototypicalOutArgs_
Prototypical OutArgs that just supports the evaluation vector (OUT_ARG_f)
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > prototypicalInArgs_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > f_space_
Function evaluation vector space (a defaultSpmdVectorSpace of dimension 2)
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs_bar, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs_bar) const
int dim_
Number of state unknowns (2)
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Scalar epsilon_
This is a model parameter ( )
Thyra::ModelEvaluatorBase::InArgs< Scalar > nominalValues_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > x_space_
Solution vector space (a defaultSpmdVectorSpace of dimension 2)