GEOSX
ExtrinsicMeshData.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_EXTRINSIC_MESH_DATA_HPP_
20 #define GEOSX_EXTRINSIC_MESH_DATA_HPP_
21 
22 #include "codingUtilities/traits.hpp"
24 #include "common/DataTypes.hpp"
25 
38 #define EXTRINSIC_MESH_DATA_TRAIT( NAME, \
39  KEY, \
40  TYPE, \
41  DEFAULT, \
42  PLOTLEVEL, \
43  RESTARTFLAG, \
44  DESCRIPTION ) \
45  \
46  \
47  struct NAME \
48  { \
49  \
50  static constexpr auto key = KEY; \
51  \
52  using type = TYPE; \
53  \
54  using dataType = internal::typeHelper_t< TYPE >; \
55  \
56  static constexpr dataType defaultValue = DEFAULT; \
57  \
58  static constexpr auto plotLevel = dataRepository::PlotLevel::PLOTLEVEL; \
59  \
60  static constexpr auto restartFlag = dataRepository::RestartFlags::RESTARTFLAG; \
61  \
62  static constexpr auto description = DESCRIPTION; \
63  }
64 
65 namespace geosx
66 {
70 namespace extrinsicMeshData
71 {
72 
73 namespace internal
74 {
75 template< typename TYPE, bool HAS_TYPE = std::enable_if_t< traits::HasAlias_value_type< TYPE >, std::true_type >::value >
76 struct typeHelper
77 {
78  using type = typename TYPE::value_type;
79 };
80 
81 template< typename TYPE >
82 struct typeHelper< TYPE, false >
83 {
84  using type = TYPE; //typename std::enable_if< std::is_fundamental<TYPE>::value, TYPE>::type;
85 };
86 
87 template< typename T >
88 using typeHelper_t = typename typeHelper< T >::type;
89 }
90 
91 
93  "parentIndex",
95  -1,
96  LEVEL_2,
98  "Index of parent within the mesh object it is registered on." );
99 
101  "childIndex",
103  -1,
104  LEVEL_2,
105  WRITE_AND_READ,
106  "Index of child within the mesh object it is registered on." );
107 
109  "degreeFromCrack",
111  -1,
112  LEVEL_1,
113  WRITE_AND_READ,
114  "Distance to the crack in terms of topological distance. "
115  "(i.e. how many nodes are along the path to the closest "
116  "node that is on the crack surface." );
117 
119  "degreeFromCrackTip",
121  100000,
122  LEVEL_1,
123  WRITE_AND_READ,
124  "Distance to the crack tip in terms of topological distance. "
125  "(i.e. how many nodes are along the path to the closest "
126  "node that is on the crack surface." );
127 
129  "SIFNode",
131  0,
132  LEVEL_0,
133  WRITE_AND_READ,
134  "Calculated Stress Intensity Factor on the node." );
135 
137  "ruptureTime",
139  1.0e9,
140  LEVEL_0,
141  WRITE_AND_READ,
142  "Time that the object was ruptured/split." );
143 
145  "ruptureRate",
147  1.0e99,
148  LEVEL_0,
149  WRITE_AND_READ,
150  "Rate of rupture in terms of number of objects split per time." );
151 
153  "SIF_I",
155  -1,
156  LEVEL_1,
157  WRITE_AND_READ,
158  "Calculated mode 1 Stress Intensity Factor on the node." );
159 
161  "SIF_II",
163  -1,
164  LEVEL_1,
165  WRITE_AND_READ,
166  "Calculated mode 2 Stress Intensity Factor on the node." );
167 
169  "SIF_III",
171  -1,
172  LEVEL_1,
173  WRITE_AND_READ,
174  "Calculated mode 3 Stress Intensity Factor on the node." );
175 
177  "ruptureState",
179  0,
180  LEVEL_0,
181  WRITE_AND_READ,
182  "Rupture state of the face: \n 0=not ready for rupture \n 1=ready for rupture \n 2=ruptured." );
183 
185  "SIFonFace",
187  1,
188  LEVEL_0,
189  WRITE_AND_READ,
190  "Calculated Stress Intensity Factor on the face." );
191 
192 
194 
196  "K_IC",
198  1e99,
199  LEVEL_0,
200  WRITE_AND_READ,
201  "Critical Stress Intensity Factor :math:`K_{IC}` in the plane of the face." );
202 
204  "K_IC_00",
206  -1,
207  NOPLOT,
208  WRITE_AND_READ,
209  ":math:`K_{IC}` on 0-plane, in 0-direction." );
210 
212  "K_IC_01",
214  -1,
215  NOPLOT,
216  WRITE_AND_READ,
217  ":math:`K_{IC}` on 0-plane, in 1-direction." );
218 
220  "K_IC_02",
222  -1,
223  NOPLOT,
224  WRITE_AND_READ,
225  ":math:`K_{IC}` on 0-plane, in 2-direction." );
226 
227 
229  "K_IC_10",
231  -1,
232  NOPLOT,
233  WRITE_AND_READ,
234  ":math:`K_{IC}` on 1-plane, in 0-direction." );
235 
237  "K_IC_11",
239  -1,
240  NOPLOT,
241  WRITE_AND_READ,
242  ":math:`K_{IC}` on 1-plane, in 1-direction." );
243 
245  "K_IC_12",
247  -1,
248  NOPLOT,
249  WRITE_AND_READ,
250  ":math:`K_{IC}` on 1-plane, in 2-direction." );
251 
253  "K_IC_20",
255  -1,
256  NOPLOT,
257  WRITE_AND_READ,
258  ":math:`K_{IC}` on 2-plane, in 0-direction." );
259 
261  "K_IC_21",
263  -1,
264  NOPLOT,
265  WRITE_AND_READ,
266  ":math:`K_{IC}` on 2-plane, in 1-direction." );
267 
269  "K_IC_22",
271  -1,
272  NOPLOT,
273  WRITE_AND_READ,
274  ":math:`K_{IC}` on 2-plane, in 2-direction." );
275 
277  "primaryCandidateFace",
279  0,
280  LEVEL_0,
281  WRITE_AND_READ,
282  "??" );
283 
285  "isFaceSeparable",
287  0,
288  LEVEL_0,
289  WRITE_AND_READ,
290  "A flag to mark if the face is separable." );
291 
292 } // namespace extrinsicMeshData
293 } // namespace geosx
294 
295 #endif /* GEOSX_MESH_MESHFIELDS_HPP_ */
Trait struct for K_IC_20 data.
Trait struct for K_IC_12 data.
Trait struct for SIF_II data.
Trait struct for DegreeFromCrack data.
Trait struct for K_IC_00 data.
Trait struct for K_IC data.
#define EXTRINSIC_MESH_DATA_TRAIT(NAME, KEY, TYPE, DEFAULT, PLOTLEVEL, RESTARTFLAG, DESCRIPTION)
Generates a traits struct.
Trait struct for K_IC_11 data.
Trait struct for DegreeFromCrackTip data.
Trait struct for RuptureState data.
Trait struct for RuptureTime data.
Trait struct for IsFaceSeparable data.
Trait struct for K_IC_10 data.
Write to plot when plotLevel>=2 is specified in input.
Trait struct for RuptureRate data.
Trait struct for K_IC_22 data.
Trait struct for SIF_III data.
Trait struct for PrimaryCandidateFace data.
Trait struct for K_IC_02 data.
Trait struct for ChildIndex data.
Trait struct for SIFNode data.
Trait struct for ParentIndex data.
Trait struct for K_IC_21 data.
Trait struct for SIFonFace data.
Trait struct for SIF_I data.
Trait struct for K_IC_01 data.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
Definition: Array.hpp:55