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
86
90enum SolverToleranceType : std::uint8_t
91{
96 // TODO: these names and descriptions are not great. The point is to determine whether
97 // to average over the domain and whether to average over components.
98 // TODO: this could also be bitwise
99 // TODO: consider returning relative residual change
116};
117
121enum PreconditionerType : std::uint8_t
122{
125};
126
137
141inline std::string
143{
144 switch (type)
145 {
147 return "Isotropic";
149 return "Transverse";
151 return "Orthotropic";
153 return "Anisotropic";
154 default:
155 return "UNKNOWN";
156 }
157}
158
162inline std::string
164{
165 switch (type)
166 {
168 return "Current";
170 return "Change";
172 return "OldOne";
174 return "OldTwo";
176 return "OldThree";
178 return "OldFour";
179 default:
180 return "UNKNOWN";
181 }
182}
183
187inline std::string
189{
190 switch (type)
191 {
193 return "AbsoluteResidual";
195 return "RMSEPerField";
197 return "RMSETotal";
199 return "IntegratedPerField";
201 return "IntegratedTotal";
202 default:
203 return "UNKNOWN";
204 }
205}
206
210inline std::string
212{
213 switch (type)
214 {
216 return "None";
218 return "GMG";
219 default:
220 return "UNKNOWN";
221 }
222}
223
227inline std::string
229{
230 switch (type)
231 {
233 return "vtk_unstructured_grid";
235 return "flat_binary";
236 default:
237 return "unknown";
238 }
239}
240
241PRISMS_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:91
@ RMSEPerField
The mean local error averaged over each field is lower than the tolerance.
Definition type_enums.h:103
@ IntegratedTotal
The sum of the integrated errors of each field is lower than the tolerance.
Definition type_enums.h:115
@ AbsoluteResidual
Legacy.
Definition type_enums.h:95
@ RMSETotal
The sum of the average local errors of each field is lower than the tolerance.
Definition type_enums.h:111
@ IntegratedPerField
The integrated error averaged over each field is lower than the tolerance.
Definition type_enums.h:107
std::string to_string(ElasticityModel type)
Enum to string for ElasticityModel.
Definition type_enums.h:142
DataFormatType
Data formats for input initial conditions. LastEntry is used for loop bounds.
Definition type_enums.h:132
@ VTKUnstructuredGrid
Definition type_enums.h:133
@ FlatBinary
Definition type_enums.h:134
@ LastEntry
Definition type_enums.h:135
PreconditionerType
Preconditioner type.
Definition type_enums.h:122
@ None
Definition type_enums.h:123
@ GMG
Definition type_enums.h:124
DependencyType
Internal classification for types of variable dependencies.
Definition type_enums.h:73
@ Current
Definition type_enums.h:80
@ Trial
Definition type_enums.h:78
@ LHS
Definition type_enums.h:76
@ DST
Definition type_enums.h:74
@ OldFour
Definition type_enums.h:84
@ Solution
Definition type_enums.h:77
@ OldThree
Definition type_enums.h:83
@ SRC
Definition type_enums.h:75
@ Change
Definition type_enums.h:79
@ OldOne
Definition type_enums.h:81
@ OldTwo
Definition type_enums.h:82
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