forked from gismo/gsKLShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gsMaterialMatrixUtils.h
147 lines (127 loc) · 3.59 KB
/
gsMaterialMatrixUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/** @file gsMaterialMatrixUtils.h
@brief Provides material matrix utilities
This file is part of the G+Smo library.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Author(s):
H.M. Verhelst (2019-..., TU Delft)
A. Mantzaflaris (2019-..., Inria)
*/
#pragma once
#include <gsKLShell/gsMaterialMatrixBase.h>
#include <gsIO/gsOptionList.h>
namespace gismo
{
/**
* @brief This class describes if an object is integrated through-thickness or not.
*
* NotIntegrated: The object has to be integrated
* Integrated: The object is integrated
* Constant: The object is constant through thickness, but is not integrated
* Linear: The object is linear through thickness, but is not integrated
*
* @ingroup KLShell
*/
enum class MatIntegration : short_t
{
NotIntegrated = 0,
Integrated = 1,
Constant = 2,
Linear = 3,
};
/**
* @brief This class describes a material model.
*
* @ingroup KLShell
*
*/
enum class Material : short_t
{
SvK = 0,
NH = 1,
NH_ext = 2,
MR = 3,
OG = 4
};
/**
* @brief This class describes the way material models are implemented.
*
* Composite: laminate material model
* Analytical: The expressions for Cijkl and Sij have to be provided in closed form
* Generalized: Uses a generalized way, where only the derivatives of psi have to be implemented
* Spectral: Implementation based on derivatives of psi w.r.t. principal stretches
*
* @ingroup KLShell
*/
enum class Implementation : short_t
{
Composite = 0,
Analytical = 1,
Generalized = 2,
Spectral = 3
};
/**
* @brief This class describes the output type.
*
* Generic: unspecified output type
* Density
* VectorN: Membrane forces
* VectorM: Bending moments
* MatrixA: 0th order moment of the differential of the material matrix w.r.t. membrane strains
* MatrixB: 1st order moment of the differential of the material matrix w.r.t. membrane strains
* MatrixC: 0th order moment of the differential of the material matrix w.r.t. bending strains
* MatrixD: 1st order moment of the differential of the material matrix w.r.t. bending strains
* PStressN: membrane principal stress
* PStressN: bending principal stress
* Stretch: Principal stretch
* StretchDir: Principal stretch directions
*
* @ingroup KLShell
*
*/
enum class MaterialOutput : short_t
{
Generic = 0,
Density = 1,
VectorN = 2,
VectorM = 3,
MatrixA = 4,
MatrixB = 5,
MatrixC = 6,
MatrixD = 7,
PStressN = 8,
PStressM = 9,
Stretch = 10, // ONLY ON MID-PLANE
StretchDir = 11, // ONLY ON MID-PLANE
Transformation = 12,
Thickness = 100,
Parameters = 101,
};
/**
* @brief Encodes the material model and implementation
*
* @tparam material Material model
* @tparam implementation The way it is implemented
*
* @ingroup KLShell
*
*/
template<enum Material material, enum Implementation implementation>
struct encodeMat_id {
static const constexpr short_t id = 10*(short_t)implementation + (short_t)material;
};
/**
* @brief Decodes the material model and implementation
*
* @tparam id identifier (from encoder)
*
* @ingroup KLShell
*
*/
template<short_t id>
struct decodeMat_id {
static const constexpr enum Material material = (enum Material)(id%10);
static const constexpr enum Implementation implementation = (enum Implementation)((id/10)%10);
};
} // namespace