LifeV
ZeroDimensionalSolver.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  * @file
29  * @brief Rythmos solver
30  * @version alpha (experimental)
31  *
32  * @date 16-11-2011
33  * @author Mahmoud Jafargholi
34  *
35  * @contributors Cristiano Malossi <cristiano.malossi@epfl.ch>
36  * @mantainer Cristiano Malossi <cristiano.malossi@epfl.ch>
37  */
38 
39 #ifndef ZeroDimensionalSolver_H
40 #define ZeroDimensionalSolver_H 1
41 
42 
43 // Include definitions
44 #include <lifev/zero_dimensional/solver/ZeroDimensionalDefinitions.hpp>
45 
46 // Includes for Rythmos:
47 #if ( defined(HAVE_NOX_THYRA) && defined(HAVE_TRILINOS_RYTHMOS) )
48 #include <Rythmos_StepperBase.hpp>
49 #include <Rythmos_ForwardEulerStepper.hpp>
50 #include <Rythmos_BackwardEulerStepper.hpp>
51 #include <Rythmos_ExplicitRKStepper.hpp>
52 #include <Rythmos_ImplicitBDFStepper.hpp>
53 #include <Rythmos_ImplicitRKStepper.hpp>
54 #include <Rythmos_RKButcherTableau.hpp>
55 #include <Rythmos_RKButcherTableauBuilder.hpp>
56 #include <Rythmos_TimeStepNonlinearSolver.hpp>
57 
58 // Includes for Thyra:
59 #include <Thyra_DiagonalEpetraLinearOpWithSolveFactory.hpp>
60 #include <Thyra_EpetraThyraWrappers.hpp>
61 #include <Thyra_EpetraLinearOp.hpp>
62 #include <Thyra_EpetraModelEvaluator.hpp>
63 #include <Thyra_NonlinearSolver_NOX.hpp>
64 
65 // Includes for Stratimikos:
66 #include <Stratimikos_DefaultLinearSolverBuilder.hpp>
67 #endif /* HAVE_NOX_THYRA && HAVE_TRILINOS_RYTHMOS */
68 
69 // Includes for Teuchos:
70 #include <Teuchos_Array.hpp>
71 #include <Teuchos_RCP.hpp>
72 #include <Teuchos_ParameterList.hpp>
73 #include <Teuchos_CommandLineProcessor.hpp>
74 #include <Teuchos_FancyOStream.hpp>
75 #include <Teuchos_GlobalMPISession.hpp>
76 #include <Teuchos_VerboseObject.hpp>
77 #include <Teuchos_StandardCatchMacros.hpp>
78 #include <Teuchos_XMLParameterListHelpers.hpp>
79 #include <Teuchos_RCPBoostSharedPtrConversions.hpp>
80 
81 
82 // LIFEV includes
83 #include <lifev/zero_dimensional/solver/ZeroDimensionalRythmosSolverInterface.hpp>
84 #include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp>
85 
86 namespace LifeV
87 {
88 
89 //! Rhytmos methods
91 
92 //! time step method
94 
95 //! ZeroDimensional Solver
96 #if ( defined(HAVE_NOX_THYRA) && defined(HAVE_TRILINOS_RYTHMOS) )
98 {
99 public:
100 
101  //! Constructor
105  //! Destructor
106  virtual ~ZeroDimensionalSolver() {}
107 
108  //! setup solver
110 
111  //! integrate the system between t1 and t2
112  void takeStep (Real t1, Real t2);
113 
114 private:
115 
131 
132 };
133 
134 #else
135 
137 {
138 public:
139 
140  //! Constructor
141  explicit ZeroDimensionalSolver (Int /*numCircuitElements*/,
142  std::shared_ptr<Epetra_Comm> /*comm*/,
143  zeroDimensionalCircuitDataPtr_Type /*circuitData*/) {}
144  //! Destructor
145  virtual ~ZeroDimensionalSolver() {}
146 
147  //! setup solver
148  void setup (const ZeroDimensionalData::solverData_Type& /*data*/) {}
149 
150  //! integrate the system between t1 and t2
151  void takeStep (Real /*t1*/, Real /*t2*/) {}
152 };
153 
154 #endif /* HAVE_NOX_THYRA && HAVE_TRILINOS_RYTHMOS */
155 
156 } // LifeV namespace
157 
158 #endif //ZeroDimensionalSolver_H
EMethod
Rhytmos methods.
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
void updateInverseJacobian(const UInt &iQuadPt)
ZeroDimensionalSolver(Int, std::shared_ptr< Epetra_Comm >, zeroDimensionalCircuitDataPtr_Type)
Constructor.
void setup(const ZeroDimensionalData::solverData_Type &)
setup solver
void takeStep(Real, Real)
integrate the system between t1 and t2
double Real
Generic real data.
Definition: LifeV.hpp:175
Data container for 0D model.
virtual ~ZeroDimensionalSolver()
Destructor.
STEP_METHOD
time step method
std::shared_ptr< ZeroDimensionalCircuitData > zeroDimensionalCircuitDataPtr_Type