36 #include <lifev/structure/solver/VenantKirchhoffViscoelasticData.hpp> 82 if (
this != &venantKirchhoffViscoelasticData )
93 M_order = venantKirchhoffViscoelasticData.M_order;
110 M_time.reset (
new time_Type ( dataFile, section +
"/time_discretization" ) );
113 if ( !M_timeAdvance.get() )
115 M_timeAdvance.reset (
new timeAdvance_Type ( dataFile, section +
"/time_discretization" ) );
119 M_density = dataFile ( ( section +
"/physics/density" ).data(), 1. );
120 M_thickness = dataFile ( ( section +
"/physics/thickness" ).data(), 0.1 );
122 UInt materialsNumber = dataFile.vector_variable_size ( ( section +
"/physics/material_flag" ).data() );
124 if ( materialsNumber == 0 )
126 std::cout <<
"The material flag was not set from data file. Its value will be dedced from the first volume marker." <<
"\n";
132 ASSERT ( materialsNumber == dataFile.vector_variable_size ( ( section +
"/physics/young" ).data() ),
"!!! ERROR: Inconsistent size for Young Modulus !!!");
133 ASSERT ( materialsNumber == dataFile.vector_variable_size ( ( section +
"/physics/poisson" ).data() ),
"!!! ERROR: Inconsistent size for Poisson Coeff. !!!");
136 for (
UInt i (0) ; i < materialsNumber ; ++i )
138 material = dataFile ( ( section +
"/physics/material_flag" ).data(), 0., i );
139 M_young[material] = dataFile ( ( section +
"/physics/young" ).data(), 0., i );
140 M_poisson[material] = dataFile ( ( section +
"/physics/poisson" ).data(), 0., i );
141 M_gamma[material] = dataFile ( ( section +
"/physics/young" ).data(), 0., i );
142 M_beta[material] = dataFile ( ( section +
"/physics/poisson" ).data(), 0., i );
146 M_damping = dataFile ( (section +
"/damping").data(),
false);
149 M_order = dataFile ( (section +
"/space_discretization/order").data(),
"P1" );
152 M_verbose = dataFile ( (section +
"/miscellaneous/verbose").data(), 1 );
160 output <<
"\n*** Values for data [solid/physics]\n\n";
161 output <<
"density = " << M_density << std::endl;
162 output <<
"thickness = " << M_thickness << std::endl;
163 for ( MaterialContainer_ConstIterator i = M_young.begin() ; i != M_young.end() ; ++i )
165 output <<
"young[" << i->first <<
"] = " << i->second << std::endl;
167 for ( MaterialContainer_ConstIterator i = M_poisson.begin() ; i != M_poisson.end() ; ++i )
169 output <<
"poisson[" << i->first <<
"] = " << i->second << std::endl;
172 for ( MaterialContainer_ConstIterator i = M_poisson.begin() ; i != M_poisson.end() ; ++i )
174 output <<
"Lame - lambda[" << i->first <<
"] = " << lambda ( i->first ) << std::endl;
175 output <<
"Lame - mu[" << i->first <<
"] = " << mu ( i->first ) << std::endl;
178 for ( MaterialContainer_ConstIterator i = M_gamma.begin() ; i != M_gamma.end() ; ++i )
180 output <<
"gamma[" << i->first <<
"] = " << i->second << std::endl;
183 for ( MaterialContainer_ConstIterator i = M_beta.begin() ; i != M_beta.end() ; ++i )
185 output <<
"beta[" << i->first <<
"] = " << i->second << std::endl;
188 output <<
"\n*** Values for data [solid/miscellaneous]\n\n";
189 output <<
"verbose = " << M_verbose << std::endl;
191 output <<
"\n*** Values for data [solid/space_discretization]\n\n";
192 output <<
"FE order = " << M_order << std::endl;
194 output <<
"\n*** Values for data [solid/time_discretization]\n\n";
195 M_time->showMe ( output );
196 M_timeAdvance->showMe ( output );
219 M_poisson[material] = poisson;
225 M_young[material] = young;
231 M_gamma[material] = gamma;
238 M_beta[material] = beta;
259 MaterialContainer_Type::const_iterator IT = M_poisson.find ( material );
260 if (IT != M_poisson.end() )
262 return M_poisson.find ( material )->second;
273 MaterialContainer_Type::const_iterator IT = M_young.find ( material );
274 if (IT != M_young.end() )
287 return M_young.find ( material )->second * M_poisson.find ( material )->second /
288 ( ( 1.0 + M_poisson.find ( material )->second ) * ( 1.0 - 2.0 * M_poisson.find ( material )->second ) );
294 return M_young.find ( material )->second / ( 2.0 * ( 1.0 + M_poisson.find ( material )->second ) );
301 return M_gamma.find ( material )->second;
307 return M_beta.find ( material )->second;
void showMe(std::ostream &output=std::cout) const
Display the values.
void setPoisson(const Real &poisson, const UInt &material=1)
Set poisson.
const Real & thickness() const
Get solid thickness.
Real M_thickness
thickness
VenantKirchhoffViscoelasticData(const VenantKirchhoffViscoelasticData &VenantKirchhoffViscoelasticData)
const Real & rho() const
Get solid density.
timePtr_Type M_time
Data containers for time and mesh.
Real mu(const UInt &material=1) const
Get solid second Lame coefficient.
void updateInverseJacobian(const UInt &iQuadPt)
MaterialContainer_Type M_poisson
poisson
void setDensity(const Real &density)
Set density.
MaterialContainer_Type M_beta
damping coefficint (mass)
VenantKirchhoffViscoelasticData & operator=(const VenantKirchhoffViscoelasticData &VenantKirchhoffViscoelasticData)
Operator=.
void setup(const GetPot &dataFile, const std::string §ion="solid")
Read the dataFile and set all the quantities.
VenantKirchhoffViscoelasticData()
Constructor.
Real young(const UInt &material=1) const
Get solid young modulus.
void setYoung(const Real &young, const UInt &material=1)
Set Young modulus.
const Real & gamma(const UInt &material=1) const
Get damping coefficients.
MaterialContainer_Type M_gamma
damping coefficient (Stiffness)
void setGamma(const Real &gamma, const UInt &material)
const Real & beta(const UInt &material=1) const
double Real
Generic real data.
timeAdvancePtr_Type M_timeAdvance
void setBeta(const Real &beta, const UInt &material)
void setThickness(const Real &thickness)
Set thickness.
MaterialContainer_Type M_young
young
const std::string & order() const
Get FE order.
bool M_damping
damping true when there is damping term
Real poisson(const UInt &material=1) const
Get solid poisson coefficient.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Real lambda(const UInt &material=1) const
Get solid first lame coefficient.