Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
cubictensor.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 CUBIC_TENSOR_HH
5#define CUBIC_TENSOR_HH
6
7#include "elasticitytensor.hh"
8
9template <int dim>
11
12template <>
13class CubicTensor<3> : public ElasticityTensor<3>
14{
15 public:
16 CubicTensor(double C11, double C12, double C44) {
17
19
20 (*this)[0][0] = C11;
21 (*this)[1][1] = C11;
22 (*this)[2][2] = C11;
23 (*this)[3][3] = 2*C44;
24 (*this)[4][4] = 2*C44;
25 (*this)[5][5] = 2*C44;
26
27 (*this)[0][1] = C12;
28 (*this)[0][2] = C12;
29 (*this)[1][0] = C12;
30 (*this)[1][2] = C12;
31 (*this)[2][0] = C12;
32 (*this)[2][1] = C12;
33 }
34};
35
36template <>
37class CubicTensor<2> : public ElasticityTensor<2>
38{
39 public:
40 CubicTensor(double C11, double C12, double C44) {
41
43
44 (*this)[0][0] = C11;
45 (*this)[1][1] = C11;
46 (*this)[2][2] = 2*C44;
47
48 (*this)[0][1] = C12;
49 (*this)[1][0] = C12;
50 }
51};
52
53
54#endif
constexpr derived_type & operator=(const RHS &rhs)
Definition cubictensor.hh:10
CubicTensor(double C11, double C12, double C44)
Definition cubictensor.hh:16
CubicTensor(double C11, double C12, double C44)
Definition cubictensor.hh:40
Base class for elasticity tensors in Voigt notation.
Definition elasticitytensor.hh:13