Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_ERK_Merson45.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
10 
11 namespace Tempus_Unit_Test {
12 
13 using Teuchos::RCP;
14 using Teuchos::rcp;
15 using Teuchos::rcp_const_cast;
16 using Teuchos::rcp_dynamic_cast;
17 
18 // ************************************************************
19 // ************************************************************
20 TEUCHOS_UNIT_TEST(ERK_Merson45, Default_Construction)
21 {
22  auto stepper = rcp(new Tempus::StepperERK_Merson45<double>());
24 
25  // Test stepper properties.
26  TEUCHOS_ASSERT(stepper->getOrder() == 4);
27 }
28 
29 // ************************************************************
30 // ************************************************************
31 TEUCHOS_UNIT_TEST(ERK_Merson45, StepperFactory_Construction)
32 {
33  auto model = rcp(new Tempus_Test::SinCosModel<double>());
34  testFactoryConstruction("Merson 4(5) Pair", model);
35 }
36 
37 // ************************************************************
38 // ************************************************************
39 TEUCHOS_UNIT_TEST(ERK_Merson45, AppAction)
40 {
41  auto stepper = rcp(new Tempus::StepperERK_Merson45<double>());
42  auto model = rcp(new Tempus_Test::SinCosModel<double>());
43  testRKAppAction(stepper, model, out, success);
44 }
45 
46 } // namespace Tempus_Unit_Test
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...
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)
void testExplicitRKAccessorsFullConstruction(const RCP< Tempus::StepperExplicitRK< double >> &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
Explicit RK Merson Butcher Tableau.
#define TEUCHOS_ASSERT(assertion_test)