Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_SSPDIRK22.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 
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;
19 using Teuchos::sublist;
20 
21 
22 // ************************************************************
23 // ************************************************************
24 TEUCHOS_UNIT_TEST(SSPDIRK22, Default_Construction)
25 {
26  auto stepper = rcp(new Tempus::StepperSDIRK_SSPDIRK22<double>());
28 
29  // Test stepper properties.
30  TEUCHOS_ASSERT(stepper->getOrder() == 2);
31 }
32 
33 
34 // ************************************************************
35 // ************************************************************
36 TEUCHOS_UNIT_TEST(SSPDIRK22, StepperFactory_Construction)
37 {
38  auto model = rcp(new Tempus_Test::SinCosModel<double>());
39  testFactoryConstruction("SSPDIRK22", model);
40 }
41 
42 
43 // ************************************************************
44 // ************************************************************
45 TEUCHOS_UNIT_TEST(SSPDIRK22, AppAction)
46 {
47  auto stepper = rcp(new Tempus::StepperSDIRK_SSPDIRK22<double>());
48  auto model = rcp(new Tempus_Test::SinCosModel<double>());
49  testRKAppAction(stepper, model, out, success);
50 }
51 
52 
53 } // namespace Tempus_Unit_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.
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
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_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
void testDIRKAccessorsFullConstruction(const RCP< Tempus::StepperDIRK< double > > &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
#define TEUCHOS_ASSERT(assertion_test)