GRINS-0.7.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics > Class Template Reference

#include <physics_factory_plane_stress_solids.h>

Inheritance diagram for GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >:
Collaboration graph
[legend]

Public Member Functions

 PhysicsFactoryPlaneStressSolids (const std::string &physics_name, const std::string &core_physics_name)
 
 ~PhysicsFactoryPlaneStressSolids ()
 
- Public Member Functions inherited from GRINS::PhysicsFactoryWithCore
 PhysicsFactoryWithCore (const std::string &physics_name, const std::string &core_physics_name)
 
 ~PhysicsFactoryWithCore ()
 
- Public Member Functions inherited from GRINS::PhysicsFactoryBase
 PhysicsFactoryBase (const std::string &physics_name)
 
 ~PhysicsFactoryBase ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
 FactoryWithGetPotPhysicsName (const std::string &name)
 
 ~FactoryWithGetPotPhysicsName ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPot< Physics >
 FactoryWithGetPot (const std::string &name)
 
 ~FactoryWithGetPot ()
 

Protected Member Functions

virtual libMesh::UniquePtr< Physicsbuild_physics (const GetPot &input, const std::string &physics_name)
 
- Protected Member Functions inherited from GRINS::PhysicsFactoryWithCore
std::string find_core_physics_name (const std::string &physics_name)
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
static void set_physics_name (const std::string &physics_name)
 Setter for physics name. More...
 
- Static Public Member Functions inherited from GRINS::FactoryWithGetPot< Physics >
static void set_getpot (const GetPot &input)
 
- Static Protected Member Functions inherited from GRINS::PhysicsFactoryWithCore
static std::map< std::string, std::string > & core_physics_names ()
 Cache for "core" physics names. More...
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
static std::string _physics_name
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPot< Physics >
static const GetPot * _input
 We store only a raw pointer here because we can't make a copy. More...
 

Detailed Description

template<template< typename > class DerivedPhysics>
class GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >

Definition at line 34 of file physics_factory_plane_stress_solids.h.

Constructor & Destructor Documentation

template<template< typename > class DerivedPhysics>
GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >::PhysicsFactoryPlaneStressSolids ( const std::string &  physics_name,
const std::string &  core_physics_name 
)
inline

Definition at line 37 of file physics_factory_plane_stress_solids.h.

39  : PhysicsFactoryWithCore(physics_name,core_physics_name)
40  {}
PhysicsFactoryWithCore(const std::string &physics_name, const std::string &core_physics_name)
template<template< typename > class DerivedPhysics>
GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >::~PhysicsFactoryPlaneStressSolids ( )
inline

Definition at line 42 of file physics_factory_plane_stress_solids.h.

42 {};

Member Function Documentation

template<template< typename > class DerivedPhysics>
libMesh::UniquePtr< Physics > GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >::build_physics ( const GetPot &  input,
const std::string &  physics_name 
)
protectedvirtual

Implements GRINS::PhysicsFactoryBase.

Definition at line 42 of file physics_factory_plane_stress_solids.C.

References GRINS::PhysicsFactoryHelper::parse_stress_strain_model().

44  {
45  std::string core_physics = this->find_core_physics_name(physics_name);
46 
47  std::string model = "none";
48  std::string strain_energy = "none";
49 
51  core_physics,
52  model,
53  strain_energy );
54 
55  libMesh::UniquePtr<Physics> new_physics;
56 
57  if( model == std::string("hookes_law") )
58  new_physics.reset( new DerivedPhysics<HookesLaw>
59  (physics_name,input, false /*is_compressible*/) );
60 
61  else if( model == std::string("incompressible_hyperelasticity") )
62  {
63  if( strain_energy == std::string("mooney_rivlin") )
64  {
65  new_physics.reset( new DerivedPhysics<IncompressiblePlaneStressHyperelasticity<MooneyRivlin> >(physics_name,input,false /*is_compressible*/) );
66  }
67  else
68  {
69  std::string error = "ERROR: Invalid strain_energy "+strain_energy+"!\n";
70  error += " Valid values are: mooney_rivlin\n";
71  libmesh_error_msg(error);
72  }
73 
74  }
75  else
76  {
77  std::string error = "Error: Invalid stress-strain model: "+model+"!\n";
78  error += " Valid values are: hookes_law\n";
79  error += " incompressible_hyperelasticity\n";
80  libmesh_error_msg(error);
81  }
82 
83  libmesh_assert(new_physics);
84 
85  return new_physics;
86  }
std::string find_core_physics_name(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.

The documentation for this class was generated from the following files:

Generated on Thu Jun 2 2016 21:52:32 for GRINS-0.7.0 by  doxygen 1.8.10