Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_StateFuncModelEvaluatorBase.hpp
1// @HEADER
2// *****************************************************************************
3// Thyra: Interfaces and Support for Abstract Numerical Algorithms
4//
5// Copyright 2004 NTESS and the Thyra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef THYRA_STATE_FUNC_MODEL_EVALUATOR_BASE_HPP
11#define THYRA_STATE_FUNC_MODEL_EVALUATOR_BASE_HPP
12
13#include "Thyra_ModelEvaluatorDefaultBase.hpp"
14
15
16namespace Thyra {
17
18
29template<class Scalar>
65
66
67// /////////////////////////////////
68// Implementations
69
70
71// Public functions overridden from ModelEvaulator
72
73
74template<class Scalar>
77{
79 true,std::logic_error
80 ,"ModelEvaluator<"<<Teuchos::ScalarTraits<Scalar>::name()<<">::get_p_space(l): "
81 "Error, this function was not overridden in *this = \'"<<this->description()<<"\'!"
82 );
84}
85
86
87template<class Scalar>
90{
92 true,std::logic_error
93 ,"ModelEvaluator<"<<Teuchos::ScalarTraits<Scalar>::name()<<">::get_p_names(l): "
94 "Error, this function was not overridden in *this = \'"<<this->description()<<"\'!"
95 );
97}
98
99
100template<class Scalar>
103{
105 true,std::logic_error
106 ,"ModelEvaluator<"<<Teuchos::ScalarTraits<Scalar>::name()<<">::get_g_space(j): "
107 " Error, this function was not overridden in \'"
108 <<this->description()<<"\'!"
109 );
111}
112
113
114template<class Scalar>
117{
119 true,std::logic_error
120 ,"ModelEvaluator<"<<Teuchos::ScalarTraits<Scalar>::name()<<">::get_g_names(j): "
121 "Error, this function was not overridden in *this = \'"<<this->description()<<"\'!"
122 );
124}
125
126
127template<class Scalar>
130{ return this->createInArgs(); }
131
132
133template<class Scalar>
136{ return this->createInArgs(); }
137
138
139template<class Scalar>
142{ return this->createInArgs(); }
143
144
145template<class Scalar>
148{
150 true, std::logic_error
151 ,"Error, if \'W_op\' is supported by the ModelEvaluator subclass then"
152 " this function create_W_op() must be overridden by the subclass "
153 <<this->description()<<" to return a non-null object!"
154 );
156}
157
158
159template<class Scalar>
165
166
167template<class Scalar>
173
174
175template<class Scalar>
177 const ModelEvaluatorBase::InArgs<Scalar> &/* finalPoint */,
178 const bool /* wasSolved */
179 )
180{
181 // This final point is just ignored by default!
182}
183
184
185} // namespace Thyra
186
187
188#endif // THYRA_STATE_FUNC_MODEL_EVALUATOR_BASE_HPP
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object.
Default base class for concrete model evaluators.
This base class defines default function implementations appropritate for a set of nonlinear state fu...
RCP< const LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Returns null .
RCP< PreconditionerBase< Scalar > > create_W_prec() const
Returns null.
ModelEvaluatorBase::InArgs< Scalar > getUpperBounds() const
Returns this->createInArgs().
ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Returns this->createInArgs().
ModelEvaluatorBase::InArgs< Scalar > getLowerBounds() const
Returns this->createInArgs().
Teuchos::ArrayView< const std::string > get_g_names(int j) const
Throws exception.
RCP< LinearOpBase< Scalar > > create_W_op() const
Throws exception.
RCP< const VectorSpaceBase< Scalar > > get_p_space(int l) const
Throws exception.
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Throws exception.
void reportFinalPoint(const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
Ignores input and does nothing.
RCP< const VectorSpaceBase< Scalar > > get_g_space(int j) const
Throws exception.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
T_To & dyn_cast(T_From &from)