10 #ifndef Tempus_WrapCombinedFSAModelEvaluator_hpp
11 #define Tempus_WrapCombinedFSAModelEvaluator_hpp
13 #include "Tempus_config.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairPartIMEX_CombinedFSA.hpp"
24 template <
typename Scalar>
34 using Teuchos::rcp_dynamic_cast;
36 RCP<SensitivityModelEvaluatorBase<Scalar> > wrapped_model;
39 RCP<const WrapperModelEvaluatorPairIMEX_Basic<Scalar> > modelPairIMEX =
42 RCP<const WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
43 modelPairPartIMEX = rcp_dynamic_cast<
48 if ((modelPairIMEX != Teuchos::null || modelPairPartIMEX != Teuchos::null) &&
49 (model.ptr() != sens_residual_model.ptr()) &&
50 (model.ptr() != sens_solve_model.ptr()))
52 true, std::logic_error,
53 "Unique model evaluators for state, sensitivity residual, and "
54 "sensitivity solve is not supported for IMEX");
56 if (modelPairIMEX != Teuchos::null) {
58 modelPairIMEX, pList));
60 else if (modelPairPartIMEX != Teuchos::null) {
63 modelPairPartIMEX, pList));
67 model, sens_residual_model, sens_solve_model, pList));
73 template <
typename Scalar>
87 csens_solve_model, pList);
Transform a ModelEvaluator's sensitivity equations to its residual.
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Specialization of IMEX ME for "combined" FSA method.
Specialization of IMEX-Part ME for "combined" FSA method.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar > > wrapCombinedFSAModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_residual_model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_solve_model, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)