Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_SDIRK_5Stage5thOrder.cpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
11 
12 namespace Tempus_Unit_Test {
13 
15 using Teuchos::RCP;
16 using Teuchos::rcp;
17 using Teuchos::rcp_const_cast;
18 using Teuchos::rcp_dynamic_cast;
19 using Teuchos::sublist;
20 
21 // ************************************************************
22 // ************************************************************
23 TEUCHOS_UNIT_TEST(SDIRK_5Stage5thOrder, Default_Construction)
24 {
27 
28  // Test stepper properties.
29  TEUCHOS_ASSERT(stepper->getOrder() == 5);
30 }
31 
32 // ************************************************************
33 // ************************************************************
34 TEUCHOS_UNIT_TEST(SDIRK_5Stage5thOrder, StepperFactory_Construction)
35 {
36  auto model = rcp(new Tempus_Test::SinCosModel<double>());
37  testFactoryConstruction("SDIRK 5 Stage 5th order", model);
38 }
39 
40 // ************************************************************
41 // ************************************************************
42 TEUCHOS_UNIT_TEST(SDIRK_5Stage5thOrder, StageNumber)
43 {
45  int stageNumber = 4;
46  stepper->setStageNumber(stageNumber);
47  int s = stepper->getStageNumber();
48  TEST_COMPARE(s, ==, stageNumber);
49 }
50 
51 // ************************************************************
52 // ************************************************************
53 TEUCHOS_UNIT_TEST(SDIRK_5Stage5thOrder, AppAction)
54 {
56  auto model = rcp(new Tempus_Test::SinCosModel<double>());
57  testRKAppAction(stepper, model, out, success);
58 }
59 
60 } // namespace Tempus_Unit_Test
void testDIRKAccessorsFullConstruction(const RCP< Tempus::StepperDIRK< 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.
#define TEST_COMPARE(v1, comp, v2)
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)
#define TEUCHOS_ASSERT(assertion_test)