diff --git a/examples/new_material/local_material_damage.hh b/examples/new_material/local_material_damage.hh index 2f1105b80..ca6410f5b 100644 --- a/examples/new_material/local_material_damage.hh +++ b/examples/new_material/local_material_damage.hh @@ -1,127 +1,123 @@ /** * @file local_material_damage.hh * * @author Guillaume Anciaux * @author Marion Estelle Chambart * @author Nicolas Richart * * @date creation: Mon Aug 10 2015 * @date last modification: Mon Jan 18 2016 * * @brief Material isotropic elastic * * @section LICENSE * * Copyright (©) 2015 EPFL (Ecole Polytechnique Fédérale de Lausanne) Laboratory * (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "aka_common.hh" #include "material.hh" /* -------------------------------------------------------------------------- */ #ifndef __AKANTU_LOCAL_MATERIAL_DAMAGE_HH__ #define __AKANTU_LOCAL_MATERIAL_DAMAGE_HH__ -__BEGIN_AKANTU__ - class LocalMaterialDamage : public Material { /* ------------------------------------------------------------------------ */ /* Constructors/Destructors */ /* ------------------------------------------------------------------------ */ public: LocalMaterialDamage(SolidMechanicsModel & model, const ID & id = ""); virtual ~LocalMaterialDamage(){}; /* ------------------------------------------------------------------------ */ /* Methods */ /* ------------------------------------------------------------------------ */ public: void initMaterial(); /// constitutive law for all element of a type void computeStress(ElementType el_type, GhostType ghost_type = _not_ghost); /// constitutive law for a given quadrature point inline void computeStressOnQuad(Matrix & grad_u, Matrix & sigma, Real & damage); /// compute tangent stiffness virtual void computeTangentStiffness(__attribute__((unused)) const ElementType & el_type, __attribute__((unused)) Array & tangent_matrix, __attribute__((unused)) GhostType ghost_type = _not_ghost){}; /// compute the potential energy for all elements void computePotentialEnergy(ElementType el_type, GhostType ghost_type = _not_ghost); /// compute the potential energy for on element inline void computePotentialEnergyOnQuad(Matrix & grad_u, Matrix & sigma, Real & epot); /* ------------------------------------------------------------------------ */ /* Accessors */ /* ------------------------------------------------------------------------ */ public: /// compute the celerity of the fastest wave in the material inline Real getCelerity(const Element & element) const; /* ------------------------------------------------------------------------ */ /* Class Members */ /* ------------------------------------------------------------------------ */ AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(Damage, damage, Real); private: /// the young modulus Real E; /// Poisson coefficient Real nu; /// First Lamé coefficient Real lambda; /// Second Lamé coefficient (shear modulus) Real mu; /// resistance to damage Real Yd; /// damage threshold Real Sd; /// Bulk modulus Real kpa; /// damage internal variable InternalField damage; }; /* -------------------------------------------------------------------------- */ /* inline functions */ /* -------------------------------------------------------------------------- */ #include "local_material_damage_inline_impl.hh" -__END_AKANTU__ - #endif /* __AKANTU_LOCAL_MATERIAL_DAMAGE_HH__ */