Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
isotropictensor.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE-FUFEM Project contributors, see file AUTHORS.md
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3
4#ifndef ISOTROPIC_TENSOR_HH
5#define ISOTROPIC_TENSOR_HH
6
7#include "elasticitytensor.hh"
8
9template <int dim>
11{
12public:
13 IsotropicTensor(double E, double nu)
14 {
15 DUNE_THROW(Dune::NotImplemented, "No isotropic Hooke tensor for " << dim << "-dimensional problems");
16 }
17};
18
19template <>
21{
22public:
23 /* Same representation as in symmetrictensor.hh:
24
25 [s11] [ * * * ] [e11]
26 [s22] [ * * * ] [e22]
27 [s33] = [ * * * ] * [e33]
28 [s12] [ * ] [e12]
29 [s13] [ * ] [e13]
30 [s23] [ * ] [e23]
31 */
32 IsotropicTensor(double E, double nu)
33 {
35
36 (*this)[0][0] = 1 - nu;
37 (*this)[0][1] = nu;
38 (*this)[0][2] = nu;
39
40 (*this)[1][0] = nu;
41 (*this)[1][1] = 1 - nu;
42 (*this)[1][2] = nu;
43
44 (*this)[2][0] = nu;
45 (*this)[2][1] = nu;
46 (*this)[2][2] = 1 - nu;
47
48 (*this)[3][3] = 1 - 2*nu;
49 (*this)[4][4] = 1 - 2*nu;
50 (*this)[5][5] = 1 - 2*nu;
51
52 (*this) *= E/(1 + nu)/(1 - 2*nu);
53 }
54};
55
56template <>
58{
59public:
60 IsotropicTensor(double E, double nu)
61 {
63
64 (*this)[0][0] = 1 - nu;
65 (*this)[0][1] = nu;
66
67 (*this)[1][0] = nu;
68 (*this)[1][1] = 1 - nu;
69
70 (*this)[2][2] = 1 - 2*nu;
71
72 (*this) *= (E/(1 + nu)/(1 - 2*nu));
73 }
74};
75
76#endif
size_type dim() const
#define DUNE_THROW(E,...)
constexpr derived_type & operator=(const RHS &rhs)
Base class for elasticity tensors in Voigt notation.
Definition elasticitytensor.hh:13
Definition isotropictensor.hh:11
IsotropicTensor(double E, double nu)
Definition isotropictensor.hh:13
IsotropicTensor(double E, double nu)
Definition isotropictensor.hh:32
IsotropicTensor(double E, double nu)
Definition isotropictensor.hh:60