LifeV
ADRData.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 File containing a class for handling data and parameters
30  for advection-diffusion-reaction problems
31 
32  @author
33  @date 00-08-2010
34 
35  @contributor Samuel Quinodoz <samuel.quinodoz@epfl.ch>
36  @mantainer Samuel Quinodoz <samuel.quinodoz@epfl.ch>
37 
38  */
39 #ifndef _DATAADR_H_
40 #define _DATAADR_H_
41 
42 #include <lifev/core/LifeV.hpp>
43 
44 #include <lifev/core/filter/GetPot.hpp>
45 #include <lifev/core/fem/TimeData.hpp>
46 #include <lifev/core/util/StringData.hpp>
47 
48 namespace LifeV
49 {
50 
51 /*!
52  \typedef The kind of stabilization (if any) applied
53  to the numerical scheme
54 */
56 {
57  ADR_NO_STABILIZATION, //!< No stabilization
58  ADR_IP_STABILIZATION, //!< Interior penalty
59  ADR_SD_STABILIZATION //!< Stream-line diffusion
60 };
61 
62 /*!
63  \class DataADR
64 
65  Base class which holds usual data for the ADR equations solvers
66 
67 */
68 class DataADR
69 {
70 public:
71 
72  //! @name Public Types
73  //@{
74 
75  //! The time data handler
76  /*!
77  The class DataADR "has a" time handler object, to manage time dependent
78  problems.
79  */
82 
83  //@}
84 
85  //! @name Constructors & Destructor
86  //@{
87 
88  //! Empty Constructor
89  DataADR();
90 
91  //! Copy constructor
92  /*!
93  * @param dataADR an object of type DataADR
94  */
95  DataADR ( const DataADR& dataADR );
96 
97  //@}
98 
99  //! @name Methods
100  //@{
101 
102  //! Read the dataFile and set all the internal quantities
103  /*!
104  * @param dataFile data file
105  * @param section section of the file
106  */
107  void setup ( const GetPot& dataFile, const std::string& section = "adr" );
108 
109  //! Display the internal values
110  void showMe ( std::ostream& output = std::cout ) const;
111 
112  //@}
113 
114  //! @name Operators
115  //@{
116 
117  //! Operator=
118  /*!
119  * @param dataADR an object of type DataADR
120  */
121  DataADR& operator= ( const DataADR& dataADR );
122 
123  //@}
124 
125  //! @name Set methods
126  //@{
127 
128  inline void setDiffusionCoefficient ( const Real& diffusionCoefficient )
129  {
130  M_diffusionCoefficient = diffusionCoefficient;
131  }
132 
133  inline void setReactionCoefficient ( const Real& reactionCoefficient )
134  {
135  M_reactionCoefficient = reactionCoefficient;
136  }
137 
138  inline void setSteady ( const Real& steady )
139  {
140  M_steady = steady;
141  }
142 
143  //! Set data time container
144  /*!
145  * @param TimeData shared_ptr to TimeData container
146  */
147  inline void setTimeDataPtr ( const TimeData_ptr_type TimeDataPtr )
148  {
149  M_TimeDataPtr = TimeDataPtr;
150  }
151 
152  inline void setFieldDimension ( const UInt& fieldDim )
153  {
154  M_solutionFieldDimension = fieldDim;
155  }
156 
157  inline void setStabilizationMethod ( const ADRStabilization& stabMethod )
158  {
159  M_stabilizationMethod = stabMethod;
160  }
161 
162  inline void setStabilizationCoefficient ( const Real& stabCoeff )
163  {
164  M_stabilizationCoefficient = stabCoeff;
165  }
166  //@}
167 
168  //! @name Get methods
169  //@{
170 
171  inline const Real& diffusionCoefficient() const
172  {
173  return M_diffusionCoefficient;
174  }
175 
176  inline const Real& reactionCoefficient() const
177  {
178  return M_reactionCoefficient;
179  }
180 
181  inline const Real& steady() const
182  {
183  return M_steady;
184  }
185 
186  //! Get data time container
187  inline TimeData_ptr_type TimeDataPtr ( void ) const
188  {
189  return M_TimeDataPtr;
190  }
191 
192  inline const UInt& solutionFieldDimension() const
193  {
195  }
196 
197  inline const UInt& verbose() const
198  {
199  return M_verbose;
200  }
201 
202  inline const std::string& solFEType() const
203  {
204  return M_solFEType;
205  }
206 
207  // inline const std::string& advectionFieldFEType() const { return M_advectionFieldFEType; }
208 
209  inline const ADRStabilization& stabilizationMethod() const
210  {
211  return M_stabilizationMethod;
212  }
213 
214  inline const Real& stabilizationCoefficient() const
215  {
217  }
218 
219  //@}
220 
221 private:
222 
223  //! Physics
224  Real M_diffusionCoefficient; // Diffusion coefficient
225  Real M_reactionCoefficient; // Reaction coefficient
226  Real M_steady; // is the problem constant in time?
227  UInt M_solutionFieldDimension; // number of components of the unknown field
228 
229  //! Data container for time parameters
231 
232  //! Miscellaneous parameters
233  UInt M_verbose; // Class output verbose
234 
235  //! Type of finite element (P1, P2, ...) for the solution
236  std::string M_solFEType;
237  //! Type of finite element (P1, P2, ...) for the advection field
238  // std::string M_advectionFieldFEType;
239 
240  //! Discretization
243  // stabilization coefficient for the advection field
245 
246 };
247 
248 
249 }
250 #endif
const std::string & solFEType() const
Definition: ADRData.hpp:202
Real M_diffusionCoefficient
Physics.
Definition: ADRData.hpp:224
Stream-line diffusion.
Definition: ADRData.hpp:59
DataADR()
Empty Constructor.
Definition: ADRData.cpp:38
ADRStabilization
Definition: ADRData.hpp:55
StringDataList M_stabilization_list
Type of finite element (P1, P2, ...) for the advection field.
Definition: ADRData.hpp:241
void showMe(std::ostream &output=std::cout) const
Display the internal values.
Definition: ADRData.cpp:109
Real M_reactionCoefficient
Definition: ADRData.hpp:225
No stabilization.
Definition: ADRData.hpp:57
void setStabilizationCoefficient(const Real &stabCoeff)
Definition: ADRData.hpp:162
const Real & diffusionCoefficient() const
Definition: ADRData.hpp:171
const UInt & solutionFieldDimension() const
Definition: ADRData.hpp:192
void setFieldDimension(const UInt &fieldDim)
Definition: ADRData.hpp:152
const Real & reactionCoefficient() const
Definition: ADRData.hpp:176
void updateInverseJacobian(const UInt &iQuadPt)
DataADR(const DataADR &dataADR)
Copy constructor.
Definition: ADRData.cpp:58
Interior penalty.
Definition: ADRData.hpp:58
const ADRStabilization & stabilizationMethod() const
Definition: ADRData.hpp:209
TimeData_ptr_type TimeDataPtr(void) const
Get data time container.
Definition: ADRData.hpp:187
void setReactionCoefficient(const Real &reactionCoefficient)
Definition: ADRData.hpp:133
void setSteady(const Real &steady)
Definition: ADRData.hpp:138
const UInt & verbose() const
Definition: ADRData.hpp:197
void setDiffusionCoefficient(const Real &diffusionCoefficient)
Definition: ADRData.hpp:128
const Real & steady() const
Definition: ADRData.hpp:181
UInt M_verbose
Miscellaneous parameters.
Definition: ADRData.hpp:233
Real M_stabilizationCoefficient
Definition: ADRData.hpp:244
DataADR & operator=(const DataADR &dataADR)
Operator=.
double Real
Generic real data.
Definition: LifeV.hpp:175
std::shared_ptr< TimeData_type > TimeData_ptr_type
Definition: ADRData.hpp:81
std::string M_solFEType
Type of finite element (P1, P2, ...) for the solution.
Definition: ADRData.hpp:236
TimeData_ptr_type M_TimeDataPtr
Data container for time parameters.
Definition: ADRData.hpp:230
UInt M_solutionFieldDimension
Definition: ADRData.hpp:227
ADRStabilization M_stabilizationMethod
Definition: ADRData.hpp:242
void setStabilizationMethod(const ADRStabilization &stabMethod)
Definition: ADRData.hpp:157
void setTimeDataPtr(const TimeData_ptr_type TimeDataPtr)
Set data time container.
Definition: ADRData.hpp:147
const Real & stabilizationCoefficient() const
Definition: ADRData.hpp:214
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
void setup(const GetPot &dataFile, const std::string &section="adr")
Read the dataFile and set all the internal quantities.
Definition: ADRData.cpp:79
TimeData TimeData_type
The time data handler.
Definition: ADRData.hpp:80
TimeData - Class for handling temporal discretization.
Definition: TimeData.hpp:61