25 #ifndef GRINS_PHYSICS_FACTORY_PLANE_STRESS_SOLIDS_H
26 #define GRINS_PHYSICS_FACTORY_PLANE_STRESS_SOLIDS_H
38 template<
template<
typename>
class DerivedPhysics>
43 const std::string& core_physics_name )
51 virtual libMesh::UniquePtr<Physics>
build_physics(
const GetPot& input,
52 const std::string& physics_name );
56 template<
template<
typename>
class DerivedPhysics>
58 libMesh::UniquePtr<Physics>
60 (
const GetPot& input,
const std::string& physics_name )
62 std::string core_physics = this->find_core_physics_name(physics_name);
64 std::string model =
"none";
65 std::string strain_energy =
"none";
72 libMesh::UniquePtr<Physics> new_physics;
74 if( model == std::string(
"hookes_law") )
75 new_physics.reset(
new DerivedPhysics<HookesLaw>
76 (physics_name,input,
false ) );
78 else if( model == std::string(
"incompressible_hyperelasticity") )
80 if( strain_energy == std::string(
"mooney_rivlin") )
86 std::string error =
"ERROR: Invalid strain_energy "+strain_energy+
"!\n";
87 error +=
" Valid values are: mooney_rivlin\n";
88 libmesh_error_msg(error);
94 std::string error =
"Error: Invalid stress-strain model: "+model+
"!\n";
95 error +=
" Valid values are: hookes_law\n";
96 error +=
" incompressible_hyperelasticity\n";
97 libmesh_error_msg(error);
100 libmesh_assert(new_physics);
107 #endif // GRINS_PHYSICS_FACTORY_PLANE_STRESS_SOLIDS_H
~PhysicsFactoryPlaneStressSolids()
PhysicsFactory base class for Physics that may have a related "core" Physics.
PhysicsFactoryPlaneStressSolids(const std::string &physics_name, const std::string &core_physics_name)
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
static void parse_stress_strain_model(const GetPot &input, const std::string &physics, std::string &model, std::string &strain_energy)
Determine stress-strain law used by solid mechanics classes.