GRINS-0.8.0
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
GRINS::MooneyRivlin Class Reference

#include <mooney_rivlin.h>

Inheritance diagram for GRINS::MooneyRivlin:
Inheritance graph
[legend]
Collaboration diagram for GRINS::MooneyRivlin:
Collaboration graph
[legend]

Public Member Functions

 MooneyRivlin (const GetPot &input)
 
 MooneyRivlin (const GetPot &input, const std::string &material)
 
virtual ~MooneyRivlin ()
 
- Public Member Functions inherited from GRINS::HyperelasticStrainEnergy< MooneyRivlin >
 HyperelasticStrainEnergy ()
 
virtual ~HyperelasticStrainEnergy ()
 
libMesh::Real dI1 (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 
libMesh::Real dI2 (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 
libMesh::Real dI3 (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 
- Public Member Functions inherited from GRINS::ParameterUser
 ParameterUser (const std::string &user_name)
 
virtual ~ParameterUser ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 
virtual void set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void register_parameter (const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 

Private Member Functions

 MooneyRivlin ()
 
libMesh::Real dI1_imp (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 
libMesh::Real dI2_imp (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 
libMesh::Real dI3_imp (libMesh::Real I1, libMesh::Real I2, libMesh::Real I3) const
 

Private Attributes

libMesh::Real _C1
 
libMesh::Real _C2
 

Friends

class HyperelasticStrainEnergy< MooneyRivlin >
 

Additional Inherited Members

- Static Public Attributes inherited from GRINS::ParameterUser
static std::string zero_vector_function = std::string("{0}")
 A parseable function string with LIBMESH_DIM components, all 0. More...
 

Detailed Description

Definition at line 37 of file mooney_rivlin.h.

Constructor & Destructor Documentation

GRINS::MooneyRivlin::MooneyRivlin ( const GetPot &  input)

Definition at line 37 of file mooney_rivlin.C.

References _C1, _C2, grins_warning, and GRINS::ParameterUser::set_parameter().

39  ParameterUser("MooneyRivlin"),
40  _C1(-1),
41  _C2(-1)
42  {
43  // Warning about this constructor being deprecated
44  {
45  std::string warning = "WARNING: Use of this constructor is DEPRECATED.\n";
46  warning += " Please update to use constructor with input material name.\n";
47  grins_warning(warning);
48  }
49 
50  //Force the user to specify C1 and C2
51  if( !input.have_variable("Physics/MooneyRivlin/C1") ||
52  !input.have_variable("Physics/MooneyRivlin/C2") )
53  {
54  std::cerr << "Error: Must specify both C1 and C2 for Mooney-Rivlin material." << std::endl
55  << " They can be specified in Physics/MooneyRivlin/C1 and Physics/MooneyRivlin/C2" << std::endl;
56  libmesh_error();
57  }
58 
59  this->set_parameter
60  (_C1, input, "Physics/MooneyRivlin/C1", _C1);
61 
62  this->set_parameter
63  (_C2, input, "Physics/MooneyRivlin/C2", _C2);
64  return;
65  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
#define grins_warning(message)
Definition: common.h:34
friend class HyperelasticStrainEnergy< MooneyRivlin >
Definition: mooney_rivlin.h:48
ParameterUser(const std::string &user_name)
libMesh::Real _C2
Definition: mooney_rivlin.h:59
libMesh::Real _C1
Definition: mooney_rivlin.h:58
GRINS::MooneyRivlin::MooneyRivlin ( const GetPot &  input,
const std::string &  material 
)

Definition at line 67 of file mooney_rivlin.C.

References _C1, _C2, GRINS::MaterialsParsing::dep_input_warning(), GRINS::MaterialsParsing::duplicate_input_test(), and GRINS::ParameterUser::set_parameter().

69  ParameterUser("MooneyRivlin"),
70  _C1(-1),
71  _C2(-1)
72  {
74  "Materials/"+material+"/StressStrainLaw/MooneyRivlin/C1",
75  "Physics/MooneyRivlin/C1");
77  "Materials/"+material+"/StressStrainLaw/MooneyRivlin/C2",
78  "Physics/MooneyRivlin/C2");
79 
80  // Parse the new version
81  if( input.have_variable("Materials/"+material+"/StressStrainLaw/MooneyRivlin/C1") &&
82  input.have_variable("Materials/"+material+"/StressStrainLaw/MooneyRivlin/C2") )
83  {
84  this->set_parameter
85  (_C1, input, "Materials/"+material+"/StressStrainLaw/MooneyRivlin/C1", _C1);
86  this->set_parameter
87  (_C2, input, "Materials/"+material+"/StressStrainLaw/MooneyRivlin/C2", _C2);
88  }
89  // Parse the old version
90  else if( input.have_variable("Physics/MooneyRivlin/C1") &&
91  input.have_variable("Physics/MooneyRivlin/C2") )
92  {
93  MaterialsParsing::dep_input_warning( "Physics/MooneyRivlin/C1",
94  "StressStrainLaw/MooneyRivlin/C1" );
95  MaterialsParsing::dep_input_warning( "Physics/MooneyRivlin/C2",
96  "StressStrainLaw/MooneyRivlin/C2" );
97 
98  this->set_parameter
99  (_C1, input, "Physics/MooneyRivlin/C1", _C1);
100  this->set_parameter
101  (_C2, input, "Physics/MooneyRivlin/C2", _C2);
102  }
103  else
104  {
105  libmesh_error_msg("ERROR: Could not find consistent Mooney-Rivlin input!");
106  }
107  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
friend class HyperelasticStrainEnergy< MooneyRivlin >
Definition: mooney_rivlin.h:48
ParameterUser(const std::string &user_name)
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
libMesh::Real _C2
Definition: mooney_rivlin.h:59
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
libMesh::Real _C1
Definition: mooney_rivlin.h:58
GRINS::MooneyRivlin::~MooneyRivlin ( )
virtual

Definition at line 109 of file mooney_rivlin.C.

110  {
111  return;
112  }
GRINS::MooneyRivlin::MooneyRivlin ( )
private

Member Function Documentation

libMesh::Real GRINS::MooneyRivlin::dI1_imp ( libMesh::Real  I1,
libMesh::Real  I2,
libMesh::Real  I3 
) const
inlineprivate

Definition at line 64 of file mooney_rivlin.h.

References _C1.

65  {
66  return _C1;
67  }
libMesh::Real _C1
Definition: mooney_rivlin.h:58
libMesh::Real GRINS::MooneyRivlin::dI2_imp ( libMesh::Real  I1,
libMesh::Real  I2,
libMesh::Real  I3 
) const
inlineprivate

Definition at line 70 of file mooney_rivlin.h.

References _C2.

71  {
72  return _C2;
73  }
libMesh::Real _C2
Definition: mooney_rivlin.h:59
libMesh::Real GRINS::MooneyRivlin::dI3_imp ( libMesh::Real  I1,
libMesh::Real  I2,
libMesh::Real  I3 
) const
inlineprivate

Definition at line 76 of file mooney_rivlin.h.

77  {
78  return 0.0;
79  }

Friends And Related Function Documentation

friend class HyperelasticStrainEnergy< MooneyRivlin >
friend

Definition at line 48 of file mooney_rivlin.h.

Member Data Documentation

libMesh::Real GRINS::MooneyRivlin::_C1
private

Definition at line 58 of file mooney_rivlin.h.

Referenced by dI1_imp(), and MooneyRivlin().

libMesh::Real GRINS::MooneyRivlin::_C2
private

Definition at line 59 of file mooney_rivlin.h.

Referenced by dI2_imp(), and MooneyRivlin().


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

Generated on Tue Dec 19 2017 12:47:31 for GRINS-0.8.0 by  doxygen 1.8.9.1