29 #ifndef NEMOSYS_REFINEJSON_H_ 30 #define NEMOSYS_REFINEJSON_H_ 32 #include <jsoncons/json.hpp> 39 # define IF_CFMSH(a) a, 45 #if defined(MLAMR) && defined(HAVE_CFMSH) 46 # define IF_MLAMR_CFMSH(a) a, 48 # define IF_MLAMR_CFMSH(a) 51 #if defined(HAVE_GMSH) 52 # define IF_GMSH(a) a, 64 static constexpr
auto refOpts =
"Refinement Options";
66 static constexpr
auto refMethod =
"Refinement Method";
86 [](
const jsoncons::string_view &x) {
96 JSONCONS_N_MEMBER_NAME_TRAITS(
97 NEM::DRV::FoamMLRefineDriver::Opts, 2,
99 [](
const jsoncons::string_view &x) {
100 return x == NEM::DRV::FoamMLRefineDriver::Opts::method;
103 [](
const jsoncons::string_view &x) {
104 return x == NEM::DRV::FoamMLRefineDriver::Opts::refCriteria;
106 (refineInterval,
"Refinement Interval"),
107 (maxRefinement,
"Maximum Refinement"), (nBufferLayers,
"Buffer Layers"),
108 (maxCells,
"Max Cells"), (writeFieldData,
"Write Field Data?"),
109 (writeMesh,
"Write Mesh?"), (writeRefHistory,
"Write Refinement Data?"),
110 (timeStep,
"Time Step"), (endTime,
"End Time"), (startTime,
"Start Time"),
111 (mlModel,
"ML Kernel"))
118 JSONCONS_N_MEMBER_NAME_TRAITS(
121 [](
const jsoncons::string_view &x) {
125 (inputFieldFile,
"Input Field File"),
126 (refineInterval,
"Refinement Interval"),
127 (maxRefinement,
"Maximum Refinement"), (nBufferLayers,
"Buffer Layers"),
128 (maxCells,
"Max Cells"), (writeFieldData,
"Write Field Data?"),
129 (writeMesh,
"Write Mesh?"), (writeRefHistory,
"Write Refinement Data?"),
130 (timeStep,
"Time Step"), (endTime,
"End Time"), (startTime,
"Start Time"),
131 (lowerRefineLevel,
"Lower Refinement Level"),
132 (upperRefineLevel,
"Upper Refinement Level"),
133 (unrefineAbove,
"Unrefinement Above"),
134 (unrefineBelow,
"Unrefinement Below"))
137 (VALUE,
"Value"), (GRADIENT,
"Gradient"))
145 JSONCONS_N_MEMBER_NAME_TRAITS(
148 [](
const jsoncons::string_view &x) {
151 (MetricSources,
"Metric Sources"), (reconstructGeo,
"Reconstruct Geometry"),
152 (Verbose,
"Verbose"), (ShouldLimitLengths,
"Should Limit Lengths"),
153 (MaxLength,
"Max Length"), (MinLength,
"Min Length"),
154 (ShouldLimitGradation,
"Should Limit Gradation"),
155 (MaxGradationRate,
"Max Gradation Rate"),
156 (GradationConvergenceTolerance,
"Gradation Convergence Tolerance"),
157 (ShouldLimitElementCount,
"Should Limit Element Count"),
158 (MaxElementCount,
"Max ElementCount"),
159 (MinElementCount,
"Min Element Count"),
160 (ElementCountOverRelaxation,
"Element Count Over Relaxation"),
161 (NsmoothingSteps,
"N smoothing Steps"),
162 (MinLengthDesired,
"Min Length Desired"),
163 (MaxLengthDesired,
"Max Length Desired"),
164 (MaxLengthAllowed,
"Max Length Desired"),
165 (MinQualityAllowed,
"Min Quality Desired"),
166 (MinQualityDesired,
"Min Quality Desired"),
167 (NsliverLayers,
"N sliver Layers"), (Verbosity,
"Verbosity"),
168 (LengthHistogramMin,
"Length Histogram Min"),
169 (LengthHistogramMax,
"Length Histogram Max"),
170 (NlengthHistogramBins,
"N length Histogram Bins"),
171 (NqualityHistogramBins,
"N quality Histogram Bins"),
172 (ShouldRefine,
"Should Refine"), (ShouldCoarsen,
"Should Coarsen"),
173 (ShouldSwap,
"Should Swap"),
174 (ShouldCoarsenSlivers,
"Should Coarsen Slivers"),
175 (ShouldPreventCoarsenFlip,
"Should Prevent Coarsen Flip"),
176 (TransferOpts,
"Transfer Options"),
177 (TransferOptsIntegralDiffuse,
"Transfer Integral Options"))
180 (type,
"Type"), (knob,
"Knob"),
181 (tag_name,
"Tag Name"), (isotropy,
"Isotropy"),
184 JSONCONS_ENUM_NAME_TRAITS(Omega_h_Source, (OMEGA_H_CONSTANT,
"Constant"),
185 (OMEGA_H_VARIATION,
"Variation"),
186 (OMEGA_H_DERIVATIVE,
"Derivative"),
187 (OMEGA_H_GIVEN,
"Given"),
188 (OMEGA_H_IMPLIED,
"Implied"),
189 (OMEGA_H_CURVATURE,
"Curvature"))
191 JSONCONS_ENUM_NAME_TRAITS(Omega_h_Isotropy,
192 (OMEGA_H_ANISOTROPIC,
"Anisotropic"),
193 (OMEGA_H_ISO_LENGTH,
"Length"),
194 (OMEGA_H_ISO_SIZE,
"Size"))
196 JSONCONS_ENUM_NAME_TRAITS(Omega_h_Scales, (OMEGA_H_ABSOLUTE,
"Absolute"),
197 (OMEGA_H_SCALES,
"Scales"))
200 (arrayName,
"Name"), (method,
"Method"),
201 (integralName,
"Integral Name"))
203 JSONCONS_ENUM_NAME_TRAITS(Omega_h_Transfer, (OMEGA_H_INHERIT,
"Inherit"),
204 (OMEGA_H_LINEAR_INTERP,
"Linear Interp"),
205 (OMEGA_H_METRIC,
"Metric"),
206 (OMEGA_H_DENSITY,
"Density"),
207 (OMEGA_H_CONSERVE,
"Conserve"),
208 (OMEGA_H_MOMENTUM_VELOCITY,
"Momentum Velocity"),
209 (OMEGA_H_POINTWISE,
"Pointwise"))
212 (integralName,
"Integral Name"), (type,
"Type"),
213 (tolerance,
"Tolerance"), (floor,
"Floor"))
223 (arrayName,
"Array Name"),
224 (stdDevMult,
"StdDev Multiplier"),
225 (maxIsMin,
"Max Is Min for Scaling"),
227 (sizeFactor,
"Size Factor"))
230 (VALUE,
"value"), (GRADIENT,
"gradient"))
237 JSONCONS_ALL_MEMBER_NAME_TRAITS(
240 [](
const jsoncons::string_view &x) {
244 (edgeScale,
"Edge Scaling"))
251 JSONCONS_ALL_MEMBER_NAME_TRAITS(
254 [](
const jsoncons::string_view &x) {
262 #undef IF_MLAMR_CFMSH 265 #endif // NEMOSYS_REFINEJSON_H_
static constexpr auto refMethod
#define NEM_JSON_CHECK_KEY_ONLY(x)
static constexpr const char * programType
#define IF_MLAMR_CFMSH(a)
static constexpr auto refTransferData
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_FINAL(ValueType, ParentType, NumMandatoryParams,...)
static constexpr const char * method
static constexpr const char * method
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_INTERMEDIATE(BaseClass, ChildClasses, ParentClass, NumMandatoryParams,...)
static constexpr const char * method
static constexpr auto refOpts
static constexpr auto programType
static constexpr auto meshFiles
static constexpr auto refOperator
Store variables to create Omega_h's MetricSource object used to define metrics for refinement...
#define NEM_JSON_RDONLY_OVERRIDE(X)