9 #include "Teuchos_UnitTestHarness.hpp"
10 #include "Teuchos_XMLParameterListHelpers.hpp"
11 #include "Teuchos_TimeMonitor.hpp"
12 #include "Teuchos_DefaultComm.hpp"
14 #include "Thyra_VectorStdOps.hpp"
19 #include "../TestModels/SinCosModel.hpp"
20 #include "../TestModels/VanDerPolModel.hpp"
21 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
26 namespace Tempus_Unit_Test {
30 using Teuchos::rcp_const_cast;
31 using Teuchos::rcp_dynamic_cast;
32 using Teuchos::ParameterList;
33 using Teuchos::sublist;
34 using Teuchos::getParametersFromXmlFile;
47 stepper->setModel(model);
48 stepper->initialize();
49 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
54 auto solver = rcp(
new Thyra::NOXNonlinearSolver());
57 bool useFSAL = stepper->getUseFSALDefault();
58 std::string ICConsistency = stepper->getICConsistencyDefault();
59 bool ICConsistencyCheck = stepper->getICConsistencyCheckDefault();
60 bool zeroInitialGuess = stepper->getZeroInitialGuess();
63 stepper->setObserver(obs); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
64 stepper->setSolver(solver); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
65 stepper->setUseFSAL(useFSAL); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
66 stepper->setICConsistency(ICConsistency); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
67 stepper->setICConsistencyCheck(ICConsistencyCheck); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
68 stepper->setZeroInitialGuess(zeroInitialGuess); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
73 model, obs, solver, useFSAL,
74 ICConsistency, ICConsistencyCheck, zeroInitialGuess));
75 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
78 TEUCHOS_ASSERT(stepper->getOrder() == 2);
Trapezoidal method time stepper.
void testFactoryConstruction(std::string stepperType, const Teuchos::RCP< const Thyra::ModelEvaluator< double > > &model)
Unit test utility for Stepper construction through StepperFactory.
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation with a...
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
StepperTrapezoidalObserver class for StepperTrapezoidal.
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)