Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_ERK_Trapezoidal.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 
14 using Teuchos::RCP;
15 using Teuchos::rcp;
16 using Teuchos::rcp_const_cast;
17 using Teuchos::rcp_dynamic_cast;
18 
19 // ************************************************************
20 // ************************************************************
21 TEUCHOS_UNIT_TEST(ERK_Trapezoidal, Default_Construction)
22 {
23  auto stepper = rcp(new Tempus::StepperERK_Trapezoidal<double>());
25 
26  // Test stepper properties.
27  TEUCHOS_ASSERT(stepper->getOrder() == 2);
28 }
29 
30 // ************************************************************
31 // ************************************************************
32 TEUCHOS_UNIT_TEST(ERK_Trapezoidal, StepperFactory_Construction)
33 {
34  auto model = rcp(new Tempus_Test::SinCosModel<double>());
35  testFactoryConstruction("RK Explicit Trapezoidal", model);
36 }
37 
38 // ************************************************************
39 // ************************************************************
40 TEUCHOS_UNIT_TEST(ERK_Trapezoidal, AppAction)
41 {
42  auto stepper = rcp(new Tempus::StepperERK_Trapezoidal<double>());
43  auto model = rcp(new Tempus_Test::SinCosModel<double>());
44  testRKAppAction(stepper, model, out, success);
45 }
46 
47 } // namespace Tempus_Unit_Test
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...
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)
void testExplicitRKAccessorsFullConstruction(const RCP< Tempus::StepperExplicitRK< double >> &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
#define TEUCHOS_ASSERT(assertion_test)