Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_UnitTest_ERK_3Stage3rdOrder.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 
11 #include "Tempus_config.hpp"
13 
14 #include "../TestModels/SinCosModel.hpp"
15 
16 namespace Tempus_Unit_Test {
17 
18 using Teuchos::RCP;
19 using Teuchos::rcp;
20 using Teuchos::rcp_const_cast;
21 using Teuchos::rcp_dynamic_cast;
22 
23 
24 // ************************************************************
25 // ************************************************************
26 TEUCHOS_UNIT_TEST(ERK_3Stage3rdOrder, Default_Construction)
27 {
28  auto stepper = rcp(new Tempus::StepperERK_3Stage3rdOrder<double>());
30 
31  // Test stepper properties.
32  TEUCHOS_ASSERT(stepper->getOrder() == 3);
33 }
34 
35 
36 // ************************************************************
37 // ************************************************************
38 TEUCHOS_UNIT_TEST(ERK_3Stage3rdOrder, StepperFactory_Construction)
39 {
40  auto model = rcp(new Tempus_Test::SinCosModel<double>());
41  testFactoryConstruction("RK Explicit 3 Stage 3rd order", model);
42 }
43 
44 
45 // ************************************************************
46 // ************************************************************
47 TEUCHOS_UNIT_TEST(ERK_3Stage3rdOrder, AppAction)
48 {
49  auto stepper = rcp(new Tempus::StepperERK_3Stage3rdOrder<double>());
50  auto model = rcp(new Tempus_Test::SinCosModel<double>());
51  testRKAppAction(stepper, model, out, success);
52 }
53 
54 
55 } // 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...
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)