34 #ifndef OOMPH_PML_TIME_HARMONIC_ELASTICITY_TENSOR_HEADER 35 #define OOMPH_PML_TIME_HARMONIC_ELASTICITY_TENSOR_HEADER 39 #include <oomph-lib-config.h> 42 #include "../generic/oomph_utilities.h" 65 static const unsigned Index[3][3][3][3];
72 {
return std::complex<double>(0.0,0.0);}
80 const unsigned &k,
const unsigned &l)
const 82 if((i > 2) || (j > 2) || (k> 2) || (l>2))
84 std::ostringstream error_message;
87 error_message <<
"Range Error : Index 1 " << i
88 <<
" is not in the range (0,2)";
92 error_message <<
"Range Error : Index 2 " << j
93 <<
" is not in the range (0,2)";
98 error_message <<
"Range Error : Index 2 " << k
99 <<
" is not in the range (0,2)";
104 error_message <<
"Range Error : Index 4 " << l
105 <<
" is not in the range (0,2)";
110 OOMPH_CURRENT_FUNCTION,
111 OOMPH_EXCEPTION_LOCATION);
128 std::complex<double>
operator()(
const unsigned &
i,
const unsigned &j,
129 const unsigned &k,
const unsigned &l)
const 153 std::complex<double> C[4];
157 static const unsigned StaticIndex[21];
174 C[0] = std::complex<double>(0.0,0.0);
175 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
176 double mu=E/(2.0*(1.0+nu));
177 this->set_lame_coefficients(lambda,mu);
187 C[0] = std::complex<double>(0.0,0.0);
191 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
192 double mu=E/(2.0*(1.0+nu));
193 this->set_lame_coefficients(lambda,mu);
211 C[0] = std::complex<double>(0.0,0.0);
212 double lambda=
E*nu/((1.0+nu)*(1.0-2.0*nu));
213 double mu=
E/(2.0*(1.0+nu));
214 this->set_lame_coefficients(lambda,mu);
220 {
return C[StaticIndex[
i]];}
228 C[1] = lambda + 2.0*mu;
PMLTimeHarmonicIsotropicElasticityTensor(const double &nu)
Constructor. Passing in the value of the Poisson's ratio. Stresses and tractions in the governing equ...
double Nu
Poisson's ratio.
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...
std::complex< double > independent_component(const unsigned &i) const
Overload the independent coefficient function.
static const unsigned Index[3][3][3][3]
Translation table from the four indices to the corresponding independent component.
double nu() const
Poisson's ratio.
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...
virtual ~PMLTimeHarmonicElasticityTensor()
Empty virtual Destructor.
virtual std::complex< double > independent_component(const unsigned &i) const
std::complex< 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)...
PMLTimeHarmonicElasticityTensor()
Empty Constructor.
void set_lame_coefficients(const double &lambda, const double &mu)
double Nu
Poisson's ratio (for smoothing by linear or nonlinear elasticity)
PMLTimeHarmonicIsotropicElasticityTensor(const double &nu, const double &E)
Constructor. Passing in the values of the Poisson's ratio and Young's modulus (interpreted as the rat...