25 #ifndef GRINS_PHYSICS_FACTORY_ONE_D_STRESS_SOLIDS_H
26 #define GRINS_PHYSICS_FACTORY_ONE_D_STRESS_SOLIDS_H
35 template<
template<
typename>
class DerivedPhysics>
40 const std::string& core_physics_name )
48 virtual libMesh::UniquePtr<Physics>
build_physics(
const GetPot& input,
49 const std::string& physics_name );
53 template<
template<
typename>
class DerivedPhysics>
56 const std::string& physics_name )
58 std::string core_physics = this->find_core_physics_name(physics_name);
60 std::string model =
"none";
61 std::string strain_energy =
"none";
68 libMesh::UniquePtr<Physics> new_physics;
70 if( model == std::string(
"hookes_law") )
72 new_physics.reset(
new DerivedPhysics<HookesLaw1D>
73 (physics_name,input,
false ) );
77 std::string error =
"Error: Invalid stress-strain model: "+model+
"!\n";
78 error +=
" Valid values are: hookes_law\n";
79 libmesh_error_msg(error);
82 libmesh_assert(new_physics);
89 #endif // GRINS_PHYSICS_FACTORY_ONE_D_STRESS_SOLIDS_H
PhysicsFactoryOneDStressSolids(const std::string &physics_name, const std::string &core_physics_name)
~PhysicsFactoryOneDStressSolids()
PhysicsFactory base class for Physics that may have a related "core" Physics.
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.