oomph::TimeHarmonicElasticityTensor Class Reference

#include <time_harmonic_elasticity_tensor.h>

+ Inheritance diagram for oomph::TimeHarmonicElasticityTensor:

Public Member Functions

virtual ~TimeHarmonicElasticityTensor ()
 Empty virtual Destructor. More...
 
double operator() (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 

Protected Member Functions

virtual double independent_component (const unsigned &i) const
 
void range_check (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 
 TimeHarmonicElasticityTensor ()
 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

◆ TimeHarmonicElasticityTensor()

oomph::TimeHarmonicElasticityTensor::TimeHarmonicElasticityTensor ( )
inlineprotected

Empty Constructor.

113 {}

◆ ~TimeHarmonicElasticityTensor()

virtual oomph::TimeHarmonicElasticityTensor::~TimeHarmonicElasticityTensor ( )
inlinevirtual

Empty virtual Destructor.

117 {}

Member Function Documentation

◆ independent_component()

virtual double oomph::TimeHarmonicElasticityTensor::independent_component ( const unsigned i) const
inlineprotectedvirtual

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

Reimplemented in oomph::TimeHarmonicIsotropicElasticityTensor.

64  {
65  return 0.0;
66  }

Referenced by operator()().

◆ operator()()

double oomph::TimeHarmonicElasticityTensor::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).

126  {
127  // Range check
128 #ifdef PARANOID
129  range_check(i, j, k, l);
130 #endif
131  return independent_component(Index[i][j][k][l]);
132  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
virtual double independent_component(const unsigned &i) const
Definition: time_harmonic_elasticity_tensor.h:63
static const unsigned Index[3][3][3][3]
Definition: time_harmonic_elasticity_tensor.h:58
void range_check(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Definition: time_harmonic_elasticity_tensor.h:73
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::TimeHarmonicElasticityTensor::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...)

77  {
78  if ((i > 2) || (j > 2) || (k > 2) || (l > 2))
79  {
80  std::ostringstream error_message;
81  if (i > 2)
82  {
83  error_message << "Range Error : Index 1 " << i
84  << " is not in the range (0,2)";
85  }
86  if (j > 2)
87  {
88  error_message << "Range Error : Index 2 " << j
89  << " is not in the range (0,2)";
90  }
91 
92  if (k > 2)
93  {
94  error_message << "Range Error : Index 2 " << k
95  << " is not in the range (0,2)";
96  }
97 
98  if (l > 2)
99  {
100  error_message << "Range Error : Index 4 " << l
101  << " is not in the range (0,2)";
102  }
103 
104  // Throw the error
105  throw OomphLibError(error_message.str(),
108  }
109  }
#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::TimeHarmonicElasticityTensor::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: