oomph::PMLTimeHarmonicElasticityTensor Class Reference

#include <pml_time_harmonic_elasticity_tensor.h>

+ Inheritance diagram for oomph::PMLTimeHarmonicElasticityTensor:

Public Member Functions

virtual ~PMLTimeHarmonicElasticityTensor ()
 Empty virtual Destructor. More...
 
std::complex< doubleoperator() (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 

Protected Member Functions

virtual std::complex< doubleindependent_component (const unsigned &i) const
 
void range_check (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 
 PMLTimeHarmonicElasticityTensor ()
 Empty Constructor. More...
 

Static Private Attributes

static const unsigned Index [3][3][3][3]
 

Detailed Description

A base class that represents the fourth-rank elasticity tensor \(E_{ijkl}\) defined such that

\[\tau_{ij} = E_{ijkl} e_{kl},\]

where \(e_{ij}\) is the infinitessimal (Cauchy) strain tensor and \(\tau_{ij}\) is the stress tensor. The symmetries of the tensor are such that

\[E_{ijkl} = E_{jikl} = E_{ijlk} = E_{klij}\]

and thus there are relatively few independent components. These symmetries are included in the definition of the object so that non-physical symmetries cannot be accidentally imposed.

Constructor & Destructor Documentation

◆ PMLTimeHarmonicElasticityTensor()

oomph::PMLTimeHarmonicElasticityTensor::PMLTimeHarmonicElasticityTensor ( )
inlineprotected

Empty Constructor.

116 {}

◆ ~PMLTimeHarmonicElasticityTensor()

virtual oomph::PMLTimeHarmonicElasticityTensor::~PMLTimeHarmonicElasticityTensor ( )
inlinevirtual

Empty virtual Destructor.

120 {}

Member Function Documentation

◆ independent_component()

virtual std::complex<double> oomph::PMLTimeHarmonicElasticityTensor::independent_component ( const unsigned i) const
inlineprotectedvirtual

Member function that returns the i-th independent component of the elasticity tensor

Reimplemented in oomph::PMLTimeHarmonicIsotropicElasticityTensor.

67  {
68  return std::complex<double>(0.0, 0.0);
69  }

Referenced by operator()().

◆ operator()()

std::complex<double> oomph::PMLTimeHarmonicElasticityTensor::operator() ( const unsigned i,
const unsigned j,
const unsigned k,
const unsigned l 
) const
inline

Return the appropriate independent component via the index translation scheme (const version).

129  {
130  // Range check
131 #ifdef PARANOID
132  range_check(i, j, k, l);
133 #endif
134  return independent_component(Index[i][j][k][l]);
135  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
static const unsigned Index[3][3][3][3]
Definition: pml_time_harmonic_elasticity_tensor.h:60
virtual std::complex< double > independent_component(const unsigned &i) const
Definition: pml_time_harmonic_elasticity_tensor.h:65
void range_check(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Definition: pml_time_harmonic_elasticity_tensor.h:76
char char char int int * k
Definition: level2_impl.h:374
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References i, independent_component(), Index, j, k, and range_check().

◆ range_check()

void oomph::PMLTimeHarmonicElasticityTensor::range_check ( const unsigned i,
const unsigned j,
const unsigned k,
const unsigned l 
) const
inlineprotected

Helper range checking function (Note that this only captures over-runs in 3D but errors are likely to be caught in evaluation of the stress and strain tensors anyway...)

80  {
81  if ((i > 2) || (j > 2) || (k > 2) || (l > 2))
82  {
83  std::ostringstream error_message;
84  if (i > 2)
85  {
86  error_message << "Range Error : Index 1 " << i
87  << " is not in the range (0,2)";
88  }
89  if (j > 2)
90  {
91  error_message << "Range Error : Index 2 " << j
92  << " is not in the range (0,2)";
93  }
94 
95  if (k > 2)
96  {
97  error_message << "Range Error : Index 2 " << k
98  << " is not in the range (0,2)";
99  }
100 
101  if (l > 2)
102  {
103  error_message << "Range Error : Index 4 " << l
104  << " is not in the range (0,2)";
105  }
106 
107  // Throw the error
108  throw OomphLibError(error_message.str(),
111  }
112  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References i, j, k, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by operator()().

Member Data Documentation

◆ Index

const unsigned oomph::PMLTimeHarmonicElasticityTensor::Index
staticprivate
Initial value:
= {
{{{0, 1, 6}, {1, 2, 7}, {6, 7, 8}},
{{1, 3, 9}, {3, 4, 10}, {9, 10, 11}},
{{6, 9, 12}, {9, 13, 14}, {12, 14, 15}}},
{{{1, 3, 9}, {3, 4, 10}, {9, 10, 11}},
{{2, 4, 13}, {4, 5, 16}, {13, 16, 17}},
{{7, 10, 14}, {10, 16, 18}, {14, 18, 19}}},
{{{6, 9, 12}, {9, 13, 14}, {12, 14, 15}},
{{7, 10, 14}, {10, 16, 18}, {14, 18, 19}},
{{8, 11, 15}, {11, 17, 19}, {15, 19, 20}}}}

Translation table from the four indices to the corresponding independent component

Translation scheme that takes account of the symmetries of the tensor. The independent coefficients are related to the coefficients of the elasticity tensor as follows: /

\[\begin{array}{cc} 0 & E_{1111} \\ 1 & E_{1112} \\ 2 & E_{1122} \\ 3 & E_{1212} \\ 4 & E_{1222} \\ 5 & E_{2222} \\ 6 & E_{1113} \\ 7 & E_{1123} \\ 8 & E_{1133} \\ 9 & E_{1213} \\ 10 & E_{1223} \\ 11 & E_{1233} \\ 12 & E_{1313} \\ 13 & E_{1322} \\ 14 & E_{1323} \\ 15 & E_{1333} \\ 16 & E_{2223} \\ 17 & E_{2233} \\ 18 & E_{2323} \\ 19 & E_{2333} \\ 20 & E_{3333} \end{array}\]

/

Referenced by operator()().


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