12 #include "../TestModels/DahlquistTestModel.hpp"
14 namespace Tempus_Unit_Test {
18 using Teuchos::rcp_const_cast;
19 using Teuchos::rcp_dynamic_cast;
30 const auto rk_fe = stepper->getTableau();
61 stepper->setModel(model);
62 stepper->setICConsistency(
"Consistent");
63 stepper->setUseFSAL(
true);
64 stepper->initialize();
70 stepper->setInitialConditions(solutionHistory);
71 solutionHistory->initWorkingState();
73 solutionHistory->getWorkingState()->setTimeStep(dt);
74 solutionHistory->getWorkingState()->setTime(dt);
75 stepper->takeStep(solutionHistory);
78 const double relTol = 1.0e-14;
81 auto currentState = solutionHistory->getCurrentState();
82 const double x_0 = get_ele(*(currentState->getX()), 0);
83 const double xDot_0 = get_ele(*(currentState->getXDot()), 0);
86 TEST_ASSERT(std::abs(currentState->getTime()) < relTol);
89 auto workingState = solutionHistory->getWorkingState();
90 const double x_1 = get_ele(*(workingState->getX()), 0);
91 const double xDot_1 = get_ele(*(workingState->getXDot()), 0);
void testFactoryConstruction(std::string stepperType, const Teuchos::RCP< const Thyra::ModelEvaluator< double > > &model)
Unit test utility for Stepper construction through StepperFactory.
The classic Dahlquist Test Problem.
#define TEST_FLOATING_EQUALITY(v1, v2, tol)
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation with a...
Teuchos::RCP< SolutionHistory< Scalar > > createSolutionHistoryME(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
Nonmember contructor from a Thyra ModelEvaluator.
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.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
Forward Euler Runge-Kutta Butcher Tableau.
void testExplicitRKAccessorsFullConstruction(const RCP< Tempus::StepperExplicitRK< double >> &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
#define TEUCHOS_ASSERT(assertion_test)