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: Time Integration and Sensitivity Analysis Package
4//
5// Copyright 2017 NTESS and the Tempus contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8//@HEADER
9
10#ifndef TEMPUS_VANDERPOL_MODELEVALUATOR_02_HPP
11#define TEMPUS_VANDERPOL_MODELEVALUATOR_02_HPP
12
13#include "Thyra_ModelEvaluator.hpp" // Interface
14#include "Thyra_StateFuncModelEvaluatorBase.hpp" // Implementation
15
16
25template<class Scalar>
27 : public Thyra::StateFuncModelEvaluatorBase<Scalar>
28{
29 public:
30
50
53 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_x_space() const
54 { return x_space_; }
55 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_f_space() const
56 { return f_space_; }
57 Thyra::ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const
58 { return nominalValues_; }
59 Thyra::ModelEvaluatorBase::InArgs<Scalar> createInArgs() const
60 { return prototypicalInArgs_; }
62
63private:
64
67 Thyra::ModelEvaluatorBase::OutArgs<Scalar> createOutArgsImpl() const
68 { return prototypicalOutArgs_; }
84 void evalModelImpl(
85 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs_bar,
86 const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs_bar
87 ) const;
89
95 mutable Thyra::ModelEvaluatorBase::InArgs<Scalar> prototypicalInArgs_;
97 mutable Thyra::ModelEvaluatorBase::OutArgs<Scalar> prototypicalOutArgs_;
101 Thyra::ModelEvaluatorBase::InArgs<Scalar> nominalValues_;
103 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > x_space_;
105 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > f_space_;
106
107 int dim_;
108 Scalar t0_ic_;
109 Scalar epsilon_;
110 Scalar x0_ic_;
111 Scalar x1_ic_;
112};
113
114
115#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)