Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
18 namespace Thyra {
19 
20 
31 template<class Scalar>
33 public:
34 
37 
61  void reportFinalPoint(
62  const ModelEvaluatorBase::InArgs<Scalar> &finalPoint,
63  const bool wasSolved
64  );
65 
67 
68 };
69 
70 
71 // /////////////////////////////////
72 // Implementations
73 
74 
75 // Public functions overridden from ModelEvaulator
76 
77 
78 template<class Scalar>
81 {
82  return Teuchos::null;
83 }
84 
85 
86 template<class Scalar>
89 {
90 #ifdef TEUCHOS_DEBUG
91  TEUCHOS_ASSERT_IN_RANGE_UPPER_EXCLUSIVE( l, 0, this->Np() );
92 #else
93  (void)l;
94 #endif
95  return Teuchos::null;
96 }
97 
98 
99 template<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
108  return Teuchos::ArrayView<const std::string>(Teuchos::null);
109 }
110 
111 template<class Scalar>
114 {
115  return Teuchos::null;
116 }
117 
118 
119 template<class Scalar>
122 { return this->createInArgs(); }
123 
124 
125 template<class Scalar>
128 { return this->createInArgs(); }
129 
130 
131 template<class Scalar>
134 { return this->createInArgs(); }
135 
136 
137 template<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  );
147  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
148 }
149 
150 
151 template<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  );
161  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
162 }
163 
164 
165 template<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  );
175  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
176 }
177 
178 
179 template<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  );
189  TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
190 }
191 
192 
193 template<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
ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Returns this-&gt;createInArgs().
Default base class for concrete model evaluators.
ModelEvaluatorBase::InArgs< Scalar > getUpperBounds() const
Returns this-&gt;createInArgs().
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< LinearOpBase< Scalar > > create_W_op() const
Thorws exception.
void reportFinalPoint(const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
Does nothing and ignores input.
RCP< const VectorSpaceBase< Scalar > > get_x_space() const
Throws exception.
#define TEUCHOS_ASSERT_IN_RANGE_UPPER_EXCLUSIVE(index, lower_inclusive, upper_exclusive)
Teuchos::ArrayView< const std::string > get_g_names(int j) const
Returns null.
This base class defines default function implementations appropritate for a response-only model evalu...
RCP< LinearOpWithSolveBase< Scalar > > create_W() 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.
RCP< PreconditionerBase< Scalar > > create_W_prec() const
Thorws exception.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
ModelEvaluatorBase::InArgs< Scalar > getLowerBounds() const
Returns this-&gt;createInArgs().
RCP< const LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Thorws exception.
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...