Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_SSPDIRK32.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 
11 #include "Teuchos_TimeMonitor.hpp"
12 #include "Teuchos_DefaultComm.hpp"
13 
14 #include "Thyra_VectorStdOps.hpp"
15 
17 
18 #include "../TestModels/SinCosModel.hpp"
19 #include "../TestModels/VanDerPolModel.hpp"
20 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
21 
22 #include <fstream>
23 #include <vector>
24 
25 namespace Tempus_Unit_Test {
26 
27 using Teuchos::RCP;
28 using Teuchos::rcp;
29 using Teuchos::rcp_const_cast;
30 using Teuchos::rcp_dynamic_cast;
32 using Teuchos::sublist;
33 using Teuchos::getParametersFromXmlFile;
34 
35 
36 // ************************************************************
37 // ************************************************************
38 TEUCHOS_UNIT_TEST(SSPDIRK32, Default_Construction)
39 {
40  auto stepper = rcp(new Tempus::StepperSDIRK_SSPDIRK32<double>());
42 
43  // Test stepper properties.
44  TEUCHOS_ASSERT(stepper->getOrder() == 2);
45 }
46 
47 
48 // ************************************************************
49 // ************************************************************
50 TEUCHOS_UNIT_TEST(SSPDIRK32, StepperFactory_Construction)
51 {
52  auto model = rcp(new Tempus_Test::SinCosModel<double>());
53  testFactoryConstruction("SSPDIRK32", model);
54 }
55 
56 
57 // ************************************************************
58 // ************************************************************
59 TEUCHOS_UNIT_TEST(SSPDIRK32, AppAction)
60 {
61  auto stepper = rcp(new Tempus::StepperSDIRK_SSPDIRK32<double>());
62  auto model = rcp(new Tempus_Test::SinCosModel<double>());
63  testRKAppAction(stepper, model, out, success);
64 }
65 
66 
67 } // 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 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)
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
void testDIRKAccessorsFullConstruction(const RCP< Tempus::StepperDIRK< double > > &stepper)
Unit test utility for ExplicitRK Stepper construction and accessors.
#define TEUCHOS_ASSERT(assertion_test)