12 #include "Teuchos_DefaultComm.hpp"
14 #include "Thyra_VectorStdOps.hpp"
16 #include "Tempus_StepperFactory.hpp"
20 #include "../TestModels/VanDerPol_IMEX_ExplicitModel.hpp"
21 #include "../TestModels/VanDerPol_IMEXPart_ImplicitModel.hpp"
22 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
27 namespace Tempus_Unit_Test {
31 using Teuchos::rcp_const_cast;
32 using Teuchos::rcp_dynamic_cast;
34 using Teuchos::sublist;
35 using Teuchos::getParametersFromXmlFile;
46 const bool useProductVector =
true;
51 const int numExplicitBlocks = 1;
52 const int parameterIndex = 4;
54 explicitModel, implicitModel,
55 numExplicitBlocks, parameterIndex));
60 stepper->setModel(model);
61 stepper->initialize();
71 bool useFSAL = stepper->getUseFSAL();
72 std::string ICConsistency = stepper->getICConsistency();
73 bool ICConsistencyCheck = stepper->getICConsistencyCheck();
74 bool zeroInitialGuess = stepper->getZeroInitialGuess();
75 std::string stepperType =
"Partitioned IMEX RK SSP2";
77 auto explicitTableau = stepperERK->getTableau();
79 auto implicitTableau = stepperSDIRK->getTableau();
89 stepper->setICConsistency(ICConsistency); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
90 stepper->setICConsistencyCheck(ICConsistencyCheck); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
91 stepper->setZeroInitialGuess(zeroInitialGuess); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
93 stepper->setStepperName(stepperType); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
94 stepper->setExplicitTableau(explicitTableau); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
95 stepper->setImplicitTableau(implicitTableau); stepper->initialize();
TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
104 model, solver, useFSAL, ICConsistency, ICConsistencyCheck,
105 zeroInitialGuess, modifier, stepperType, explicitTableau,
106 implicitTableau, order));
120 const bool useProductVector =
true;
125 const int numExplicitBlocks = 1;
126 const int parameterIndex = 4;
128 explicitModel, implicitModel,
129 numExplicitBlocks, parameterIndex));
140 const bool useProductVector =
true;
145 const int numExplicitBlocks = 1;
146 const int parameterIndex = 4;
148 explicitModel, implicitModel,
149 numExplicitBlocks, parameterIndex));
153 auto stepper = sf->createStepper(
"General Partitioned IMEX RK", model);
160 TEUCHOS_UNIT_TEST(IMEX_RK_Partition, StepperFactory_Construction_General_wo_Parameterlist_Model)
163 const bool useProductVector =
true;
168 const int numExplicitBlocks = 1;
169 const int parameterIndex = 4;
171 explicitModel, implicitModel,
172 numExplicitBlocks, parameterIndex));
176 auto stepper = sf->createStepper(
"General Partitioned IMEX RK");
177 stepper->setModel(model);
178 stepper->initialize();
190 const bool useProductVector =
true;
195 const int numExplicitBlocks = 1;
196 const int parameterIndex = 4;
198 explicitModel, implicitModel,
199 numExplicitBlocks, parameterIndex));
void testRKAppAction(const Teuchos::RCP< Tempus::StepperRKBase< double > > &stepper, const Teuchos::RCP< const Thyra::ModelEvaluator< double > > &model, Teuchos::FancyOStream &out, bool &success)
Unit test utility for Stepper RK AppAction.
Default observer for StepperRK.
Explicit Runge-Kutta time stepper.
void testFactoryConstruction(std::string stepperType, const Teuchos::RCP< const Thyra::ModelEvaluator< double > > &model)
Unit test utility for Stepper construction through StepperFactory.
van der Pol model formulated for the partitioned IMEX-RK.
Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
Default ModifierX for StepperRK.
Default modifier for StepperRK.
van der Pol model formulated for IMEX.
#define TEUCHOS_ASSERT(assertion_test)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)