Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_UnitTest_ERK_3_8Rule.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 
9 #include "Teuchos_UnitTestHarness.hpp"
10 
12 
13 #include "../TestModels/SinCosModel.hpp"
14 
15 namespace Tempus_Unit_Test {
16 
17 using Teuchos::RCP;
18 using Teuchos::rcp;
19 using Teuchos::rcp_const_cast;
20 using Teuchos::rcp_dynamic_cast;
21 
22 
23 // ************************************************************
24 // ************************************************************
25 TEUCHOS_UNIT_TEST(ERK_3_8Rule, Default_Construction)
26 {
27  auto stepper = rcp(new Tempus::StepperERK_3_8Rule<double>());
29 
30  // Test stepper properties.
31  TEUCHOS_ASSERT(stepper->getOrder() == 4);
32 }
33 
34 
35 // ************************************************************
36 // ************************************************************
37 TEUCHOS_UNIT_TEST(ERK_3_8Rule, StepperFactory_Construction)
38 {
39  auto model = rcp(new Tempus_Test::SinCosModel<double>());
40  testFactoryConstruction("RK Explicit 3/8 Rule", model);
41 }
42 
43 
44 // ************************************************************
45 // ************************************************************
46 TEUCHOS_UNIT_TEST(ERK_3_8Rule, AppAction)
47 {
48  auto stepper = rcp(new Tempus::StepperERK_3_8Rule<double>());
49  auto model = rcp(new Tempus_Test::SinCosModel<double>());
50  testRKAppAction(stepper, model, out, success);
51 }
52 
53 
54 } // namespace Tempus_Test
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.
void testExplicitRKAccessorsFullConstruction(const RCP< Tempus::StepperExplicitRK< double > > &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
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...
Explicit RK 3/8th Rule Butcher Tableau.
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)