LifeV
VenantKirchhoffViscoelasticData.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 ************************************************************************
4 
5  This file is part of the LifeV Applications.
6  Copyright (C) 2001-2010 EPFL, Politecnico di Milano, INRIA
7 
8  This library is free software; you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as
10  published by the Free Software Foundation; either version 2.1 of the
11  License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  USA
22 
23 ************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief VenantKirchhoffViscoelasticData - Class to secondorder problem (S. Venant Kirchhoff Viscoelastic)
30 
31  @author Matteo Pozzoli <matteo1.pozzoli@mail.polimi.it>
32 
33  @contributor Matteo Pozzoli <matteo1.pozzoli@mail.polimi.it>
34  @maintainer Matteo Pozzoli <matteo1.pozzoli@mail.polimi.it>
35  */
36 
37 #ifndef VENANTKIRCHHOFFVISCOELASTICDATA_H
38 #define VENANTKIRCHHOFFVISCOELASTICDATA_H 1
39 
40 
41 #include <string>
42 #include <iostream>
43 #include <map>
44 #include <list>
45 #include <boost/shared_ptr.hpp>
46 
47 
48 #include <lifev/core/filter/GetPot.hpp>
49 #include <lifev/core/LifeV.hpp>
50 #include <lifev/core/fem/TimeData.hpp>
51 #include <lifev/core/fem/TimeAdvanceData.hpp>
52 
53 
54 namespace LifeV
55 {
56 /*!
57  \class VenantKirchhoffViscoelasticData
58 */
59 class VenantKirchhoffViscoelasticData
60 {
61 public:
62  //! @name Type definitions
63  //@{
64 
65  typedef TimeData time_Type;
66  typedef std::shared_ptr<time_Type> timePtr_Type;
67 
68  typedef TimeAdvanceData timeAdvance_Type;
69  typedef std::shared_ptr<timeAdvance_Type> timeAdvancePtr_Type;
70 
71  typedef std::map<UInt, Real> MaterialContainer_Type;
72  typedef MaterialContainer_Type::const_iterator MaterialContainer_ConstIterator;
73 
74  //@}
75 
76  //! Constructor
77  VenantKirchhoffViscoelasticData();
78  VenantKirchhoffViscoelasticData ( const VenantKirchhoffViscoelasticData& VenantKirchhoffViscoelasticData);
79 
80  //! @name Operators
81  //@{
82 
83  //! Operator=
84  /*!
85  * @param VenantKirchhoffViscoelasticData - VenantKirchhoffViscoelasticData
86  */
87  VenantKirchhoffViscoelasticData& operator= ( const VenantKirchhoffViscoelasticData& VenantKirchhoffViscoelasticData );
88 
89  //@}
90  //! @name Methods
91  //@{
92 
93  //! Read the dataFile and set all the quantities
94  /*!
95  * @param dataFile data file
96  * @param section section of the file
97  */
98  void setup ( const GetPot& dataFile, const std::string& section = "solid" );
99 
100  //! Display the values
101  void showMe ( std::ostream& output = std::cout ) const;
102 
103  //@}
104 
105  //! @name Set methods
106  //@{
107 
108  //! Set data time container
109  /*!
110  * @param TimeData shared_ptr to TimeData container
111  */
112  void setTimeData ( const timePtr_Type timeData )
113  {
114  M_time = timeData;
115  }
116 
117  //! Set data time advance container
118  /*!
119  * @param timeAdvanceData shared_ptr to TimeAdvanceData container
120  */
121  void setTimeAdvanceData ( const timeAdvancePtr_Type timeAdvanceData )
122  {
123  M_timeAdvance = timeAdvanceData;
124  }
125 
126  //! Set density
127  /*!
128  * @param density solid density value
129  */
130  void setDensity ( const Real& density );
131 
132  //! Set gamma
133  /*!
134  * @param gamma damping coefficient.
135  */
136  void setGamma ( const Real& gamma );
137 
138  void setGamma ( const Real& gamma, const UInt& material );
139 
140  //! Set beta
141  /*!
142  * @param beta damping coefficient.
143  */
144  void setBeta ( const Real& beta);
145 
146  void setBeta ( const Real& beta, const UInt& material);
147 
148 
149  //! Set thickness
150  /*!
151  * @param thickness solid thickness value
152  */
153  void setThickness ( const Real& thickness );
154 
155  //! Set poisson
156  /*!
157  * @param poisson solid poisson value
158  * @param material material ID (1 by default)
159  */
160  void setPoisson ( const Real& poisson, const UInt& material = 1 );
161 
162  //! Set Young modulus
163  /*!
164  * @param Young solid young modulus value
165  * @param material material ID (1 by default)
166  */
167  void setYoung ( const Real& young, const UInt& material = 1 );
168 
169  //@}
170 
171  //! @name Get methods
172  //@{
173 
174  //! Get data time container
175  /*!
176  * @return shared_ptr to TimeData container
177  */
178  timePtr_Type dataTime() const
179  {
180  return M_time;
181  }
182 
183  //! Get data time container
184  /*!
185  * @return shared_ptr to TimeAdvanceData container
186  */
187  timeAdvancePtr_Type dataTimeAdvance() const
188  {
189  return M_timeAdvance;
190  }
191 
192  //! Get solid density
193  /*!
194  * @return Solid density
195  */
196  const Real& rho() const;
197 
198  //! Get solid thickness
199  /*!
200  * @return Solid thickness
201  */
202  const Real& thickness() const;
203 
204  //! Get solid poisson coefficient
205  /*!
206  * @param material material ID (1 by default)
207  * @return Solid poisson coefficient
208  */
209  Real poisson ( const UInt& material = 1 ) const;
210 
211  //! Get solid young modulus
212  /*!
213  * @param material material ID (1 by default)
214  * @return Solid young modulus
215  */
216  Real young ( const UInt& material = 1 ) const;
217 
218  //! Get solid first lame coefficient
219  /*!
220  * @param material material ID (1 by default)
221  * @return Solid first Lame coefficient
222  */
223  Real lambda ( const UInt& material = 1 ) const;
224 
225  //! Get solid second Lame coefficient
226  /*!
227  * @param material material ID (1 by default)
228  * @return Solid second Lame coefficient
229  */
230  Real mu ( const UInt& material = 1 ) const;
231 
232  //! Get damping coefficients
233  /*!
234  * @return gamma damping coefficient
235  */
236  const Real& gamma ( const UInt& material = 1 ) const;
237 
238  /*!
239  * @return beta damping coefficient
240  */
241  const Real& beta ( const UInt& material = 1 ) const;
242 
243  //! Get FE order
244  /*!
245  * @return FE order
246  */
247  const std::string& order() const;
248 
249  //! Get solid amplification factor
250  /*!
251  * @return Solid amplification factor
252  */
253  const Real& factor() const;
254 
255  //! Get verbose level
256  /*!
257  * @return verbose level
258  */
259  const UInt& verbose() const;
260 
261  //!
262  /*
263  * @ return true if Damping coefficient is not zero.
264  */
265  bool damping() const
266  {
267  return M_damping;
268  }
269  //@}
270 
271 private:
272 
273  //! Data containers for time and mesh
274  timePtr_Type M_time;
275  timeAdvancePtr_Type M_timeAdvance;
276 
277  //@name Physics
278  //@{
279  //! density
280  Real M_density;
281 
282  //!thickness
283  Real M_thickness;
284 
285  //!poisson
286  MaterialContainer_Type M_poisson;
287 
288  //!young
289  MaterialContainer_Type M_young;
290 
291  //!damping coefficient (Stiffness)
292  MaterialContainer_Type M_gamma;
293 
294  //! damping coefficint (mass)
295  MaterialContainer_Type M_beta;
296  //@}
297 
298  //!verbose
299  UInt M_verbose; // temporal output verbose
300  //! order
301  std::string M_order;
302 
303  //!damping true when there is damping term
304  bool M_damping;
305 };
306 
307 } //namespace
308 #endif /* VENANTKIRCHHOFFVISCOELASTICDATA_H*/
double Real
Generic real data.
Definition: LifeV.hpp:175
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191