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{
21 Newton
22};
23
29enum TensorRank : unsigned int
30{
31 Undefined = static_cast<unsigned int>(-1),
32 Scalar = 0,
33 Vector = 1
34};
35
46
64
68enum SolverToleranceType : std::uint8_t
69{
74 // TODO: these names and descriptions are not great. The point is to determine whether
75 // to average over the domain and whether to average over components.
76 // TODO: this could also be bitwise
77 // TODO: consider returning relative residual change
94};
95
99enum PreconditionerType : std::uint8_t
100{
102 GMG
104
115
119inline std::string
121{
122 switch (type)
123 {
125 return "Isotropic";
127 return "Transverse";
129 return "Orthotropic";
131 return "Anisotropic";
132 default:
133 return "UNKNOWN";
134 }
135}
136
140inline std::string
142{
143 switch (type)
144 {
146 return "Current";
148 return "Change";
150 return "OldOne";
152 return "OldTwo";
154 return "OldThree";
156 return "OldFour";
157 default:
158 return "UNKNOWN";
159 }
160}
161
165inline std::string
167{
168 switch (type)
169 {
171 return "AbsoluteResidual";
173 return "RMSEPerField";
175 return "RMSETotal";
177 return "IntegratedPerField";
179 return "IntegratedTotal";
180 default:
181 return "UNKNOWN";
182 }
183}
184
188inline std::string
190{
191 switch (type)
192 {
194 return "None";
196 return "GMG";
197 default:
198 return "UNKNOWN";
199 }
200}
201
205inline std::string
207{
208 switch (type)
209 {
211 return "vtk_unstructured_grid";
213 return "flat_binary";
214 default:
215 return "unknown";
216 }
217}
218
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20
SolveType
Type of PDE that is being solved.
Definition type_enums.h:17
@ Linear
Definition type_enums.h:20
@ Newton
Definition type_enums.h:21
@ Constant
Definition type_enums.h:18
@ Explicit
Definition type_enums.h:19
ElasticityModel
Symmetry of elastic tensor.
Definition type_enums.h:40
@ Transverse
Definition type_enums.h:42
@ Anisotropic
Definition type_enums.h:44
@ Orthotropic
Definition type_enums.h:43
@ Isotropic
Definition type_enums.h:41
SolverToleranceType
Solver tolerance type.
Definition type_enums.h:69
@ RMSEPerField
The mean local error averaged over each field is lower than the tolerance.
Definition type_enums.h:81
@ IntegratedTotal
The sum of the integrated errors of each field is lower than the tolerance.
Definition type_enums.h:93
@ AbsoluteResidual
Legacy.
Definition type_enums.h:73
@ RMSETotal
The sum of the average local errors of each field is lower than the tolerance.
Definition type_enums.h:89
@ IntegratedPerField
The integrated error averaged over each field is lower than the tolerance.
Definition type_enums.h:85
std::string to_string(ElasticityModel type)
Enum to string for ElasticityModel.
Definition type_enums.h:120
DataFormatType
Data formats for input initial conditions. LastEntry is used for loop bounds.
Definition type_enums.h:110
@ VTKUnstructuredGrid
Definition type_enums.h:111
@ FlatBinary
Definition type_enums.h:112
@ LastEntry
Definition type_enums.h:113
PreconditionerType
Preconditioner type.
Definition type_enums.h:100
@ None
Definition type_enums.h:101
@ GMG
Definition type_enums.h:102
DependencyType
Internal classification for types of variable dependencies.
Definition type_enums.h:51
@ Current
Definition type_enums.h:58
@ Trial
Definition type_enums.h:56
@ LHS
Definition type_enums.h:54
@ DST
Definition type_enums.h:52
@ OldFour
Definition type_enums.h:62
@ Solution
Definition type_enums.h:55
@ OldThree
Definition type_enums.h:61
@ SRC
Definition type_enums.h:53
@ Change
Definition type_enums.h:57
@ OldOne
Definition type_enums.h:59
@ OldTwo
Definition type_enums.h:60
TensorRank
Tensor rank of the field.
Definition type_enums.h:30
@ Undefined
Definition type_enums.h:31
@ Vector
Definition type_enums.h:33
@ Scalar
Definition type_enums.h:32