LifeV
WallTensionEstimatorData.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 DataStructure - File containing a data container for wall tension analysis
30  *
31  * @version 1.0
32  * @date 19-04-2012
33  * @author Paolo Tricerri
34  *
35  * @maintainer Paolo Tricerri <paolo.tricerri@epfl.ch>
36  */
37 
38 #ifndef WallTensionEstimatorData_H
39 #define WallTensionEstimatorData_H
40 
41 // Tell the compiler to ignore specific kind of warnings:
42 #pragma GCC diagnostic ignored "-Wunused-variable"
43 #pragma GCC diagnostic ignored "-Wunused-parameter"
44 
45 // STL classes
46 #include <string>
47 #include <iostream>
48 #include <map>
49 
50 // Boost classes
51 #include <boost/shared_ptr.hpp>
52 
53 // Tell the compiler to restore the warning previously silented
54 #pragma GCC diagnostic warning "-Wunused-variable"
55 #pragma GCC diagnostic warning "-Wunused-parameter"
56 
57 // LifeV core includes
58 #include <lifev/core/LifeV.hpp>
59 #include <lifev/core/util/StringUtility.hpp>
60 #include <lifev/core/filter/GetPot.hpp>
61 
62 namespace LifeV
63 {
64 
65 //! DataElasticStructure - Data container for solid problems with elastic structure
67 {
68 public:
69 
70  //! @name Type definitions
71  //@{
72 
74  typedef std::vector< Real > time_Type;
75 
76  //@}
77 
78 
79  //! @name Constructors & Destructor
80  //@{0
81 
82  //! Empty Constructor
84 
85  //! Copy constructor
86  /*!
87  * @param WallTensionEstimatorData - WallTensionEstimatorData
88  */
89  WallTensionEstimatorData ( const WallTensionEstimatorData& wallTensionEstimatorData );
90 
91  //! Destructor
92  virtual ~WallTensionEstimatorData() {};
93 
94  //@}
95 
96 
97  //! @name Operators
98  //@{
99 
100  //! Operator=
101  /*!
102  * @param WallTensionEstimatorData - WallTensionEstimatorData
103  */
104  WallTensionEstimatorData& operator= ( const WallTensionEstimatorData& wallTensionEstimatorData );
105 
106  //@}
107 
108 
109  //! @name Methods
110  //@{
111 
112  //! Read the dataFile and set all the quantities
113  /*!
114  * @param dataFile data file
115  * @param section section of the file
116  */
117  void setup ( const GetPot& dataFile, const std::string& section = "solid" );
118 
119  //! Display the values
120  void showMe ( std::ostream& output = std::cout ) const;
121 
122  //@}
123 
124 
125  //! @name Set methods
126  //@{
127 
128  //! Set nameFile
129  /*!
130  * @param nameFile name of the post-processing file to be opened
131  */
132  void setNameFile ( const std::string& nameFile)
133  {
134  M_nameFile = nameFile;
135  }
136 
137  //! Set Analysis Type
138  /*!
139  * @param analysis Type of analysis that can be performed
140  */
141  void setAnalysisType ( const std::string& analysisType)
142  {
143  M_analysisType = analysisType;
144  }
145 
146  //! Set Recovery Variable
147  /*!
148  * @param recoveryVariable the field that is recovered (displacement or tensions)
149  */
150  void setRecoveryVariable ( const std::string& recoveryVariable)
151  {
152  M_recoveryVariable = recoveryVariable;
153  }
154 
155  //! Set initialTime
156  /*!
157  * @param initial Time initial of the analysis
158  */
159  void setInitialTime (const UInt i, const Real initialTime )
160  {
161  M_initialTime[i] = initialTime;
162  }
163 
164  //! Set final Time
165  /*!
166  * @param final Time final time of the analysis
167  */
168  void setFinalTime ( const UInt i, const Real finalTime )
169  {
170  M_finalTime[i] = finalTime;
171  }
172 
173  //! Set starting iteration
174  /*!
175  * @param starting iteration
176  */
177  void setIterationStart ( const UInt i, const std::string& iterStart )
178  {
179  M_iterStart[i] = iterStart;
180  }
181 
182  //! Set final Time
183  /*!
184  * @param final Time final time of the analysis
185  */
186  void setIterationEnd ( const UInt i, const std::string& iterEnd )
187  {
188  M_iterEnd[i] = iterEnd;
189  }
190 
191  //@}
192 
193 
194  //! @name Get methods
195  //@{
196 
197  //! Get nameFile
198  /*!
199  * @return std::string with the name of the file used for the analysis
200  */
201  const std::string& nameFile() const
202  {
203  return M_nameFile;
204  }
205 
206  //! Get typeFile
207  /*!
208  * @return std::string with the type of the file used for the analysis
209  */
210  const std::string& typeFile() const
211  {
212  return M_typeFile;
213  }
214 
215  //! Get analysisType
216  /*!
217  * @return std::string with the type of analysis that has to be performed
218  */
219  const std::string& analysisType() const
220  {
221  return M_analysisType;
222  }
223 
224  //! Get recoveryVariable
225  /*!
226  * @return std::string with the name of the field that is recovered
227  */
228  const std::string& recoveryVariable() const
229  {
230  return M_recoveryVariable;
231  }
232 
233  //! Get initial Time
234  /*!
235  * @return initial Time of the analysis
236  */
237  const time_Type& initialTime() const
238  {
239  return M_initialTime;
240  }
241 
242  //! Get initial Time of the interval i
243  /*!
244  * @return initial Time of the i-th interval
245  */
246  const Real initialTime (const UInt i) const
247  {
248  return M_initialTime[i];
249  }
250 
251  //! Get final Time
252  /*!
253  * @return final time of the anaysis
254  */
255  const time_Type& finalTime() const
256  {
257  return M_finalTime;
258  }
259 
260  //! Get final Time of the i-th interval
261  /*!
262  * @return final time of the i-th interval
263  */
264  const Real finalTime (const UInt i) const
265  {
266  return M_finalTime[i];
267  }
268 
269  //! Get starting iteration
270  /*!
271  * @return starting iteration
272  */
273  const iteration_Type& iterStart() const
274  {
275  return M_iterStart;
276  }
277 
278  //! Get starting iteration of the i-th interval
279  /*!
280  * @return starting iteration of the i-th interval
281  */
282  const std::string& iterStart (const UInt i) const
283  {
284  return M_iterStart[i];
285  }
286 
287 
288  //! Get ending iteration
289  /*!
290  * @return ending iteration
291  */
292  const iteration_Type& iterEnd() const
293  {
294  return M_iterEnd;
295  }
296 
297  //! Get starting iteration
298  /*!
299  * @return starting iteration
300  */
301  const std::string& iterEnd (const UInt i) const
302  {
303  return M_iterEnd[i];
304  }
305 
306  //@}
307 
308 private:
309 
311  //! Name of the file
314 
315  //! Type of Analysis
317  //! Field that is recovered
319 
320  //! Initial & Final Time
323 
324  //! Initial & Final iteration
327 
328 
329 };
330 
331 } // end namespace LifeV
332 
333 #endif // WallTensionEstimatorData_H
std::string M_recoveryVariable
Field that is recovered.
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
void setInitialTime(const UInt i, const Real initialTime)
Set initialTime.
WallTensionEstimatorData(const WallTensionEstimatorData &wallTensionEstimatorData)
Copy constructor.
const time_Type & finalTime() const
Get final Time.
void setFinalTime(const UInt i, const Real finalTime)
Set final Time.
const iteration_Type & iterStart() const
Get starting iteration.
void showMe(std::ostream &output=std::cout) const
Display the values.
const Real finalTime(const UInt i) const
Get final Time of the i-th interval.
const Real initialTime(const UInt i) const
Get initial Time of the interval i.
std::vector< std::string > iteration_Type
void setup(const GetPot &dataFile, const std::string &section="solid")
Read the dataFile and set all the quantities.
const iteration_Type & iterEnd() const
Get ending iteration.
void setNameFile(const std::string &nameFile)
Set nameFile.
void setRecoveryVariable(const std::string &recoveryVariable)
Set Recovery Variable.
void setIterationEnd(const UInt i, const std::string &iterEnd)
Set final Time.
void setIterationStart(const UInt i, const std::string &iterStart)
Set starting iteration.
const std::string & typeFile() const
Get typeFile.
const std::string & iterEnd(const UInt i) const
Get starting iteration.
const std::string & recoveryVariable() const
Get recoveryVariable.
std::string M_analysisType
Type of Analysis.
double Real
Generic real data.
Definition: LifeV.hpp:175
void setAnalysisType(const std::string &analysisType)
Set Analysis Type.
time_Type M_initialTime
Initial & Final Time.
const std::string & iterStart(const UInt i) const
Get starting iteration of the i-th interval.
iteration_Type M_iterStart
Initial & Final iteration.
const time_Type & initialTime() const
Get initial Time.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
std::string M_nameFile
Name of the file.
const std::string & analysisType() const
Get analysisType.
const std::string & nameFile() const
Get nameFile.
WallTensionEstimatorData & operator=(const WallTensionEstimatorData &wallTensionEstimatorData)
Operator=.