30 #ifndef OOMPH_ELASTICITY_TENSOR_HEADER
31 #define OOMPH_ELASTICITY_TENSOR_HEADER
35 #include <oomph-lib-config.h>
38 #include "../generic/oomph_utilities.h"
59 static const unsigned Index[3][3][3][3];
75 const unsigned& l)
const
77 if ((
i > 2) || (j > 2) || (k > 2) || (l > 2))
79 std::ostringstream error_message;
82 error_message <<
"Range Error : Index 1 " <<
i
83 <<
" is not in the range (0,2)";
87 error_message <<
"Range Error : Index 2 " << j
88 <<
" is not in the range (0,2)";
93 error_message <<
"Range Error : Index 2 " << k
94 <<
" is not in the range (0,2)";
99 error_message <<
"Range Error : Index 4 " << l
100 <<
" is not in the range (0,2)";
105 OOMPH_CURRENT_FUNCTION,
106 OOMPH_EXCEPTION_LOCATION);
123 const unsigned& l)
const
140 std::stringstream error_stream;
141 error_stream <<
"Broken base implementation.\n"
142 <<
"Must be overloaded for specific storage schemes.\n";
144 OOMPH_CURRENT_FUNCTION,
145 OOMPH_EXCEPTION_LOCATION);
179 double lambda =
E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu));
180 double mu =
E / (2.0 * (1.0 + nu));
194 double lambda =
E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu));
195 double mu =
E / (2.0 * (1.0 + nu));
218 double lambda =
E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu));
219 double mu =
E / (2.0 * (1.0 + nu));
235 C[1] = lambda + 2.0 * mu;
256 for (
unsigned i = 0;
i < 21;
i++)
275 C[this->
Index[
i][j][k][l]] = value;
A base class that represents the fourth-rank elasticity tensor defined such that.
virtual ~ElasticityTensor()
Empty virtual Destructor.
double operator()(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Return the appropriate independent component via the index translation scheme (const version).
static const unsigned Index[3][3][3][3]
Translation table from the four indices to the corresponding independent component.
virtual double independent_component(const unsigned &i) const
Member function that returns the i-th independent component of the elasticity tensor.
ElasticityTensor()
Empty Constructor.
virtual void set_value(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l, const double &value)
Allow the values to be set (virtual function that must be overloaded if values can be set directly.
void range_check(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Helper range checking function (Note that this only captures over-runs in 3D but errors are likely to...
A general elasticity tensor that provides storage for all 21 independent components.
double independent_component(const unsigned &i) const
Overload the independent coefficient function.
GeneralElasticityTensor()
Empy Constructor.
void set_value(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l, const double &value)
Allow the values to be set.
An isotropic elasticity tensor defined in terms of Young's modulus and Poisson's ratio....
IsotropicElasticityTensor(const double &nu, const double &E)
Constructor. Passing in the values of the Poisson's ratio and Young's modulus (interpreted as the rat...
IsotropicElasticityTensor(const Vector< double > &lame)
Constructur. Passing in the values of the two lame coefficients directly (interpreted as the ratios o...
void set_lame_coefficients(const double &lambda, const double &mu)
IsotropicElasticityTensor(const double &nu)
Constructor. Passing in the value of the Poisson's ratio. Stresses and tractions in the governing equ...
double independent_component(const unsigned &i) const
Overload the independent coefficient function.
void update_constitutive_parameters(const double &nu, const double &E=1.0)
Update parameters: Specify values of the Poisson's ratio and (optionally) Young's modulus (interprete...
static const unsigned StaticIndex[21]
Translation scheme for the isotropic elasticity tensor.
An OomphLibError object which should be thrown when an run-time error is encountered....
//////////////////////////////////////////////////////////////////// ////////////////////////////////...