PRISMS-PF Manual
Loading...
Searching...
No Matches
type_enums.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <prismspf/config.h>
7
8#include <cstdint>
9#include <string>
10
12
16enum SolveType : std::uint8_t
17{
44};
45
51enum TensorRank : unsigned int
52{
53 Undefined = static_cast<unsigned int>(-1),
54 Scalar = 0,
56};
57
68
89
107
111enum SolverToleranceType : std::uint8_t
112{
117 // TODO: these names and descriptions are not great. The point is to determine whether
118 // to average over the domain and whether to average over components.
119 // TODO: this could also be bitwise
120 // TODO: consider returning relative residual change
137};
138
142enum PreconditionerType : std::uint8_t
143{
147};
148
159
163inline std::string
165{
166 switch (type)
167 {
169 return "Isotropic";
171 return "Transverse";
173 return "Orthotropic";
175 return "Anisotropic";
176 default:
177 return "UNKNOWN";
178 }
179}
180
184inline std::string
186{
187 switch (type)
188 {
190 return "ThreeDimension";
192 return "PlaneStrain";
194 return "PlaneStress";
195 default:
196 return "UNKNOWN";
197 }
198}
199
203inline std::string
205{
206 switch (type)
207 {
209 return "Current";
211 return "Change";
213 return "OldOne";
215 return "OldTwo";
217 return "OldThree";
219 return "OldFour";
220 default:
221 return "UNKNOWN";
222 }
223}
224
228inline std::string
230{
231 switch (type)
232 {
234 return "AbsoluteResidual";
236 return "RMSEPerField";
238 return "RMSETotal";
240 return "IntegratedPerField";
242 return "IntegratedTotal";
243 default:
244 return "UNKNOWN";
245 }
246}
247
251inline std::string
253{
254 switch (type)
255 {
257 return "None";
259 return "GMG";
260 default:
261 return "UNKNOWN";
262 }
263}
264
268inline std::string
270{
271 switch (type)
272 {
274 return "vtk_unstructured_grid";
276 return "flat_binary";
277 default:
278 return "unknown";
279 }
280}
281
282PRISMS_PF_END_NAMESPACE
Definition conditional_ostreams.cc:20
SolveType
Type of PDE that is being solved.
Definition type_enums.h:17
@ Linear
Definition type_enums.h:33
@ Newton
Definition type_enums.h:43
@ Constant
Definition type_enums.h:21
@ Explicit
Definition type_enums.h:26
ElasticityModel
Symmetry of elastic tensor.
Definition type_enums.h:62
@ Transverse
Definition type_enums.h:64
@ Anisotropic
Definition type_enums.h:66
@ Orthotropic
Definition type_enums.h:65
@ Isotropic
Definition type_enums.h:63
SolverToleranceType
Solver tolerance type.
Definition type_enums.h:112
@ RMSEPerField
The mean local error averaged over each field is lower than the tolerance.
Definition type_enums.h:124
@ IntegratedTotal
The sum of the integrated errors of each field is lower than the tolerance.
Definition type_enums.h:136
@ AbsoluteResidual
Legacy.
Definition type_enums.h:116
@ RMSETotal
The sum of the average local errors of each field is lower than the tolerance.
Definition type_enums.h:132
@ IntegratedPerField
The integrated error averaged over each field is lower than the tolerance.
Definition type_enums.h:128
StressState
State of stress.
Definition type_enums.h:73
@ ThreeDimension
Definition type_enums.h:77
@ PlaneStress
Definition type_enums.h:87
@ PlaneStrain
Definition type_enums.h:82
std::string to_string(ElasticityModel type)
Enum to string for ElasticityModel.
Definition type_enums.h:164
DataFormatType
Data formats for input initial conditions. LastEntry is used for loop bounds.
Definition type_enums.h:154
@ VTKUnstructuredGrid
Definition type_enums.h:155
@ FlatBinary
Definition type_enums.h:156
@ LastEntry
Definition type_enums.h:157
PreconditionerType
Preconditioner type.
Definition type_enums.h:143
@ Chebyshev
Definition type_enums.h:145
@ None
Definition type_enums.h:144
@ GMG
Definition type_enums.h:146
DependencyType
Internal classification for types of variable dependencies.
Definition type_enums.h:94
@ Current
Definition type_enums.h:101
@ Trial
Definition type_enums.h:99
@ LHS
Definition type_enums.h:97
@ DST
Definition type_enums.h:95
@ OldFour
Definition type_enums.h:105
@ Solution
Definition type_enums.h:98
@ OldThree
Definition type_enums.h:104
@ SRC
Definition type_enums.h:96
@ Change
Definition type_enums.h:100
@ OldOne
Definition type_enums.h:102
@ OldTwo
Definition type_enums.h:103
TensorRank
Tensor rank of the field.
Definition type_enums.h:52
@ Undefined
Definition type_enums.h:53
@ Vector
Definition type_enums.h:55
@ Scalar
Definition type_enums.h:54