33 #ifndef SMALL_STRAIN_MECH_H_
34 #define SMALL_STRAIN_MECH_H_
52 namespace SmallStrainMechanics{
99 template <
typename TDomain>
192 template<
typename TElem>
195 std::vector<DoFIndex> vActiveSetLoc);
198 template <
typename TS
ide,
typename TElem>
201 std::vector<DoFIndex> vActiveSetLoc);
208 if(vLfeID.size() != (
size_t)
dim)
209 UG_THROW(
"SmallStrainMechanics: Needs exactly "<<
dim<<
" functions.");
212 for(
size_t i = 0; i < vLfeID.size(); ++i)
213 if(vLfeID[i].order() < 1)
214 UG_THROW(
"SmallStrainMechanics: Adaptive order not implemented.");
230 std::stringstream ss;
231 ss <<
"SmallStrainMechanics " <<
dim <<
"d ";
233 ss <<
" [Plain Strain / Ebener Verzerrungszustand]";
235 ss <<
" order of disc scheme = " <<
m_order
236 <<
", shape function set " <<
m_lfeID
240 ss <<
" User Defined Quad Order = " <<
m_quadOrder <<
"\n";
254 template <
typename TElem,
typename TFEGeom>
258 template<
typename TElem,
typename TFEGeom>
261 template<
typename TElem,
typename TFEGeom>
264 template<
typename TElem,
typename TFEGeom>
267 template<
typename TElem,
typename TFEGeom>
270 template<
typename TElem,
typename TFEGeom>
273 template<
typename TElem,
typename TFEGeom>
276 template<
typename TElem,
typename TFEGeom>
279 template<
typename TElem,
typename TFEGeom>
282 template<
typename TElem,
typename TFEGeom>
285 template<
typename TElem,
typename TFEGeom>
297 template <
typename TElem,
typename TFEGeom>
299 std::vector<std::vector<number> > vvvLinDef[],
302 template <
typename TElem,
typename TFEGeom>
308 template <
typename TElem,
typename TFEGeom>
313 template <
typename TElem,
typename TFEGeom>
319 template <
typename TElem,
typename TFEGeom>
383 template <
typename TElem,
typename TFEGeom>
393 std::vector<std::vector<number> > vvvDeriv[]);
397 template <
typename TElem,
typename TFEGeom>
410 template <
typename TElem,
typename TFEGeom>
TDomain::position_type position_type
Definition: mat_law_interface.h:44
Definition: mech_output_writer.h:52
Definition: small_strain_mech.h:102
int m_order
current order of disc scheme
Definition: small_strain_mech.h:341
void register_fe_func()
Definition: small_strain_mech.cpp:1425
void prep_timestep_elem(const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
assemble methods
Definition: small_strain_mech.cpp:251
virtual ~SmallStrainMechanicsElemDisc()
destructor
Definition: small_strain_mech.cpp:909
SmartPtr< DataExport< number, dim > > m_exDivergence
Export.
Definition: small_strain_mech.h:377
void set_viscous_forces(SmartPtr< CplUserData< MathVector< dim >, dim > > user0, SmartPtr< CplUserData< MathVector< dim >, dim > > user1)
Definition: small_strain_mech.cpp:152
SmartPtr< CplUserData< MathVector< dim >, dim > > VectorExport
Definition: small_strain_mech.h:367
SmartPtr< CplUserData< number, dim > > NumberExport
Definition: small_strain_mech.h:366
void set_assemble_funcs()
sets the requested assembling routines
Definition: small_strain_mech.cpp:846
void ex_stress_fe(MathMatrix< dim, dim > vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFEGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathMatrix< dim, dim > > > vvvDeriv[])
computes the stress
Definition: small_strain_mech.cpp:925
double m_massScale
Definition: small_strain_mech.h:350
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
type of trial space for each function used
Definition: small_strain_mech.h:205
SmartPtr< DataExport< MathVector< dim >, dim > > m_exDisplacement
Definition: small_strain_mech.h:378
void lin_def_volume_forces(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
Definition: small_strain_mech.cpp:710
DataImport< MathVector< dim >, dim > m_imViscousForces[2]
data import for viscous forces
Definition: small_strain_mech.h:362
void fsh_timestep_elem(const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:809
void init_state_variables(const size_t order)
initialize state/"inner" variables
Definition: small_strain_mech.cpp:200
void set_output_writer(SmartPtr< MechOutputWriter< TDomain > > spOutWriter)
set an output writer
Definition: small_strain_mech.h:139
void add_jac_A_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:336
SmartPtr< IMaterialLaw< TDomain > > m_spMatLaw
material law
Definition: small_strain_mech.h:330
void set_compress_factor(number val)
Definition: small_strain_mech.cpp:161
void set_material_law(SmartPtr< IMaterialLaw< TDomain > > spMatLaw)
adds a material law
Definition: small_strain_mech.h:131
SmartPtr< MathTensor4< dim, dim, dim, dim > > m_spElastTensor
elasticity tensor
Definition: small_strain_mech.h:333
bool m_bMatLawPassedToOutWriter
Definition: small_strain_mech.h:338
DataImport< number, dim > m_imDivergence
Data import for the reaction term.
Definition: small_strain_mech.h:356
void register_all_fe_funcs(int order, int quadOrder)
SmartPtr< IMaterialLaw< TDomain > > get_material_law()
gets the material law
Definition: small_strain_mech.h:135
void contact_forces_elem_ips_avg(LocalVector &locForce, GridObject *side, TElem *elem, const MathVector< dim > sideCoPos[], int numElemCorners, const LocalVector &locU, std::vector< DoFIndex > vActiveSetLoc)
computing contact forces elementwise by averaging over all integration points
size_t num_fct() const
Definition: small_strain_mech.h:248
base_type::domain_type domain_type
Domain type.
Definition: small_strain_mech.h:115
void lin_def_pressure(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
Definition: small_strain_mech.cpp:680
void set_quad_order(const size_t order)
sets the quad order
Definition: small_strain_mech.h:182
LFEID m_lfeID
current shape function set
Definition: small_strain_mech.h:344
void print_mat_constants(const number lambda, const number mu, const number E, const number v)
prints material constants
void contact_forces_elem_midpoint(LocalVector &locForce, TSide *side, TElem *elem, const MathVector< dim > sideCoPos[], const LocalVector &locU, std::vector< DoFIndex > vActiveSetLoc)
computing contact forces elementwise at every element midpoint
void lin_def_viscous_forces0(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
Definition: small_strain_mech.cpp:744
SmallStrainMechanicsElemDisc< TDomain > this_type
own type
Definition: small_strain_mech.h:108
SmartPtr< DataExport< MathMatrix< dim, dim >, dim > > m_exStressTensor
Definition: small_strain_mech.h:379
std::string config_string() const
returns config information of small strain mechanics ElemDisc and material law
Definition: small_strain_mech.h:228
SmartPtr< CplUserData< MathMatrix< dim, dim >, dim > > MatrixExport
Definition: small_strain_mech.h:368
DataImport< number, dim > m_imCompressIndex
Data import for the compressibility term.
Definition: small_strain_mech.h:359
void ex_displacement_fe(MathVector< dim > vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFEGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathVector< dim > > > vvvDeriv[])
computes the displacement
Definition: small_strain_mech.cpp:1035
void prep_elem_loop(const ReferenceObjectID roid, const int si)
Definition: small_strain_mech.cpp:261
void set_volume_forces(SmartPtr< CplUserData< MathVector< dim >, dim > > user)
Definition: small_strain_mech.cpp:62
void update_geo_elem(TBaseElem *elem, DimFEGeometry< dim > &geo)
updates the geometry for a given element
Definition: small_strain_mech.cpp:171
VectorExport displacement()
Definition: small_strain_mech.h:371
void lin_def_viscous_forces1(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
Definition: small_strain_mech.cpp:778
int get_quad_order()
gets the quad order
Definition: small_strain_mech.h:184
void ex_divergence_fe(number vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFEGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< number > > vvvDeriv[])
computes the divergence of displacement
Definition: small_strain_mech.cpp:1135
domain_traits< TDomain::dim >::grid_base_object TBaseElem
base element type of associated domain
Definition: small_strain_mech.h:111
void set_mass_scale(double val)
Definition: small_strain_mech.h:186
void prep_elem(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:309
IElemDisc< TDomain > base_type
Base class type.
Definition: small_strain_mech.h:105
DataImport< MathVector< dim >, dim > m_imVolForce
data import for volume forces
Definition: small_strain_mech.h:353
static const int dim
World dimension.
Definition: small_strain_mech.h:118
SmallStrainMechanicsElemDisc(const char *functions, const char *subsets)
constructor
Definition: small_strain_mech.cpp:870
SmartPtr< MechOutputWriter< TDomain > > m_spOutWriter
output writer
Definition: small_strain_mech.h:336
int m_quadOrder
Definition: small_strain_mech.h:348
void add_def_A_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:448
void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:419
MatrixExport stress()
Definition: small_strain_mech.h:372
void add_rhs_elem(LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:589
base_type::position_type position_type
Position type.
Definition: small_strain_mech.h:121
NumberExport divergence()
Definition: small_strain_mech.h:370
bool m_bOutWriter
Definition: small_strain_mech.h:337
void set_div_factor(SmartPtr< CplUserData< number, dim > > user)
Definition: small_strain_mech.cpp:128
void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: small_strain_mech.cpp:581
bool m_bQuadOrderUserDef
current integration order
Definition: small_strain_mech.h:347
void fsh_elem_loop()
Definition: small_strain_mech.cpp:303
void ex_displacement(const LocalVector &u, const MathVector< dim > vGlobIP[], const MathVector< TFEGeom::Type::dim > vLocIP[], const size_t nip, MathVector< dim > vValue[], bool bDeriv, std::vector< std::vector< MathVector< dim > > > vvvDeriv[])
computes the displacements (and derivatives)
UG_API std::string ConfigShift(std::string s)