Tempus
Version of the Day
Time Integration
Toggle main menu visibility
Loading...
Searching...
No Matches
unit_test
Tempus_UnitTest_SDIRK_2Stage3rdOrder.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 "
Tempus_UnitTest_RK_Utils.hpp
"
10
11
12
namespace
Tempus_Unit_Test
{
13
14
using
Teuchos::RCP;
15
using
Teuchos::rcp;
16
using
Teuchos::rcp_const_cast;
17
using
Teuchos::rcp_dynamic_cast;
18
using
Teuchos::ParameterList;
19
using
Teuchos::sublist;
20
21
22
// ************************************************************
23
// ************************************************************
24
TEUCHOS_UNIT_TEST
(SDIRK_2Stage3rdOrder, Default_Construction)
25
{
26
auto
stepper = rcp(
new
Tempus::StepperSDIRK_2Stage3rdOrder<double>
());
27
testDIRKAccessorsFullConstruction
(stepper);
28
29
// Test stepper properties.
30
TEUCHOS_ASSERT(stepper->getOrder() == 3);
31
std::string gammaType =
"3rd Order A-stable"
;
32
TEUCHOS_ASSERT(stepper->getGammaType() == gammaType);
33
double
gamma = 0.7886751345948128;
34
TEUCHOS_ASSERT(stepper->getGamma() == gamma);
35
stepper->setGammaType(gammaType); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
36
stepper->setGamma(gamma); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
37
38
}
39
40
41
// ************************************************************
42
// ************************************************************
43
TEUCHOS_UNIT_TEST
(SDIRK_2Stage3rdOrder, StepperFactory_Construction)
44
{
45
auto
model = rcp(
new
Tempus_Test::SinCosModel<double>
());
46
testFactoryConstruction
(
"SDIRK 2 Stage 3rd order"
, model);
47
}
48
49
50
// ************************************************************
51
// ************************************************************
52
TEUCHOS_UNIT_TEST
(SDIRK_2Stage3rdOrder, AppAction)
53
{
54
auto
stepper = rcp(
new
Tempus::StepperSDIRK_2Stage3rdOrder<double>
());
55
auto
model = rcp(
new
Tempus_Test::SinCosModel<double>
());
56
testRKAppAction
(stepper, model, out, success);
57
}
58
59
60
}
// namespace Tempus_Unit_Test
Tempus_UnitTest_RK_Utils.hpp
Tempus::StepperSDIRK_2Stage3rdOrder
SDIRK 2 Stage 3rd order.
Definition
Tempus_StepperRKButcherTableau.hpp:2619
Tempus_Test::SinCosModel
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation.
Definition
SinCosModel_decl.hpp:94
Tempus_Unit_Test
Definition
Tempus_UnitTest_BackwardEuler.cpp:22
Tempus_Unit_Test::testDIRKAccessorsFullConstruction
void testDIRKAccessorsFullConstruction(const RCP< Tempus::StepperDIRK< double > > &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
Definition
Tempus_UnitTest_RK_Utils.hpp:125
Tempus_Unit_Test::testRKAppAction
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.
Definition
Tempus_UnitTest_RK_Utils.hpp:552
Tempus_Unit_Test::TEUCHOS_UNIT_TEST
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
Definition
Tempus_UnitTest_BackwardEuler.cpp:34
Tempus_Unit_Test::testFactoryConstruction
void testFactoryConstruction(std::string stepperType, const Teuchos::RCP< const Thyra::ModelEvaluator< double > > &model)
Unit test utility for Stepper construction through StepperFactory.
Definition
Tempus_UnitTest_Utils.hpp:42
Generated by
1.17.0