Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_ResponseOnlyModelEvaluatorBase.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_RESPONSE_ONLY_MODEL_EVALUATOR_BASE_HPP
11#define THYRA_RESPONSE_ONLY_MODEL_EVALUATOR_BASE_HPP
12
13
14#include "Thyra_ModelEvaluatorDefaultBase.hpp"
15#include "Teuchos_Assert.hpp"
16
17
18namespace Thyra {
19
20
31template<class Scalar>
69
70
71// /////////////////////////////////
72// Implementations
73
74
75// Public functions overridden from ModelEvaulator
76
77
78template<class Scalar>
84
85
86template<class Scalar>
89{
90#ifdef TEUCHOS_DEBUG
92#else
93 (void)l;
94#endif
95 return Teuchos::null;
96}
97
98
99template<class Scalar>
102{
103#ifdef TEUCHOS_DEBUG
104 TEUCHOS_ASSERT_IN_RANGE_UPPER_EXCLUSIVE( j, 0, this->Ng() );
105#else
106 (void)j;
107#endif
109}
110
111template<class Scalar>
117
118
119template<class Scalar>
122{ return this->createInArgs(); }
123
124
125template<class Scalar>
128{ return this->createInArgs(); }
129
130
131template<class Scalar>
134{ return this->createInArgs(); }
135
136
137template<class Scalar>
140{
142 true, std::logic_error
143 ,"Error, if \'W\' is supported by the ModelEvaluator subclass then"
144 " this function create_W() may be overridden by the subclass to return"
145 " a non-null object!"
146 );
148}
149
150
151template<class Scalar>
154{
156 true, std::logic_error,
157 "Error, if \'W\' is supported by the ModelEvaluator subclass then"
158 " this function create_W_op() may be overridden by the subclass "
159 <<this->description()<<" to return a non-null object!"
160 );
162}
163
164
165template<class Scalar>
168{
170 true, std::logic_error,
171 "Error, if \'W\' is supported by the ModelEvaluator subclass then"
172 " this function create_W_prec() may be overridden by the subclass "
173 <<this->description()<<" to return a non-null object!"
174 );
176}
177
178
179template<class Scalar>
182{
184 true, std::logic_error
185 ,"Error, if \'W\' is supported by the ModelEvaluator subclass then"
186 " this function get_W_factory() may be overridden by the subclass "
187 <<this->description()<<" to return a non-null object!"
188 );
190}
191
192
193template<class Scalar>
195 const ModelEvaluatorBase::InArgs<Scalar> &/* finalPoint */,
196 const bool /* wasSolved */
197 )
198{
199 // This final point is just ignored by default!
200}
201
202
203} // namespace Thyra
204
205
206#endif // THYRA_RESPONSE_ONLY_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 response-only model evalu...
ModelEvaluatorBase::InArgs< Scalar > getUpperBounds() const
Returns this->createInArgs().
RCP< const VectorSpaceBase< Scalar > > get_x_space() const
Throws exception.
void reportFinalPoint(const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
Does nothing and ignores input.
RCP< LinearOpWithSolveBase< Scalar > > create_W() const
Thorws exception.
RCP< const LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Thorws exception.
RCP< LinearOpBase< Scalar > > create_W_op() const
Thorws exception.
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Returns null.
RCP< const VectorSpaceBase< Scalar > > get_f_space() const
Throws exception.
ModelEvaluatorBase::InArgs< Scalar > getLowerBounds() const
Returns this->createInArgs().
RCP< PreconditionerBase< Scalar > > create_W_prec() const
Thorws exception.
Teuchos::ArrayView< const std::string > get_g_names(int j) const
Returns null.
ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Returns this->createInArgs().
#define TEUCHOS_ASSERT_IN_RANGE_UPPER_EXCLUSIVE(index, lower_inclusive, upper_exclusive)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
T_To & dyn_cast(T_From &from)