Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
16 namespace Thyra {
17 
18 
29 template<class Scalar>
31 public:
32 
35 
57  void reportFinalPoint(
58  const ModelEvaluatorBase::InArgs<Scalar> &finalPoint,
59  const bool wasSolved
60  );
61 
63 
64 };
65 
66 
67 // /////////////////////////////////
68 // Implementations
69 
70 
71 // Public functions overridden from ModelEvaulator
72 
73 
74 template<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  );
83  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
84 }
85 
86 
87 template<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  );
96  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
97 }
98 
99 
100 template<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  );
110  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
111 }
112 
113 
114 template<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 
127 template<class Scalar>
130 { return this->createInArgs(); }
131 
132 
133 template<class Scalar>
136 { return this->createInArgs(); }
137 
138 
139 template<class Scalar>
142 { return this->createInArgs(); }
143 
144 
145 template<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  );
155  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
156 }
157 
158 
159 template<class Scalar>
162 {
163  return Teuchos::null;
164 }
165 
166 
167 template<class Scalar>
170 {
171  return Teuchos::null;
172 }
173 
174 
175 template<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
Teuchos::ArrayView< const std::string > get_g_names(int j) const
Throws exception.
Default base class for concrete model evaluators.
ModelEvaluatorBase::InArgs< Scalar > getLowerBounds() const
Returns this-&gt;createInArgs().
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
ModelEvaluatorBase::InArgs< Scalar > getUpperBounds() const
Returns this-&gt;createInArgs().
RCP< const VectorSpaceBase< Scalar > > get_p_space(int l) const
Throws exception.
RCP< const VectorSpaceBase< Scalar > > get_g_space(int j) const
Throws exception.
This base class defines default function implementations appropritate for a set of nonlinear state fu...
RCP< PreconditionerBase< Scalar > > create_W_prec() const
Returns null.
RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Throws exception.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
void reportFinalPoint(const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
Ignores input and does nothing.
RCP< const LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Returns null .
ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Returns this-&gt;createInArgs().
RCP< LinearOpBase< Scalar > > create_W_op() const
Throws exception.
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...