29 #ifndef NEMOSYS_OMEGAHREFINESRV_H_ 30 #define NEMOSYS_OMEGAHREFINESRV_H_ 39 #include <Omega_h_defines.hpp> 51 std::string tag_name, Omega_h_Isotropy isotropy,
52 Omega_h_Scales scales)
53 : type(type), knob(knob), tag_name(
std::move(tag_name)),
54 isotropy(isotropy), scales(scales) {}
58 Omega_h_Source type{OMEGA_H_IMPLIED};
62 Omega_h::Real knob{1.};
66 std::string tag_name{};
70 Omega_h_Isotropy isotropy{OMEGA_H_ANISOTROPIC};
75 Omega_h_Scales scales{OMEGA_H_SCALES};
106 vtkSetMacro(Verbose,
bool);
107 vtkGetMacro(Verbose,
bool);
108 vtkBooleanMacro(Verbose,
bool);
115 void AddMetricSource(Omega_h_Source type,
Omega_h::Real knob = 1.0,
116 std::
string tag_name = "",
117 Omega_h_Isotropy isotropy = OMEGA_H_ANISOTROPIC,
118 Omega_h_Scales scales = OMEGA_H_SCALES) {
121 MetricSources.push_back(orms);
129 vtkSetMacro(ShouldLimitLengths,
bool);
130 vtkGetMacro(ShouldLimitLengths,
bool);
131 vtkBooleanMacro(ShouldLimitLengths,
bool);
138 vtkSetMacro(MaxLength, Omega_h::Real);
139 vtkGetMacro(MaxLength, Omega_h::Real);
146 vtkSetMacro(MinLength, Omega_h::Real);
147 vtkGetMacro(MinLength, Omega_h::Real);
154 vtkSetMacro(ShouldLimitGradation,
bool);
155 vtkGetMacro(ShouldLimitGradation,
bool);
156 vtkBooleanMacro(ShouldLimitGradation,
bool);
163 vtkSetMacro(MaxGradationRate, Omega_h::Real);
164 vtkGetMacro(MaxGradationRate, Omega_h::Real);
171 vtkSetMacro(GradationConvergenceTolerance, Omega_h::Real);
172 vtkGetMacro(GradationConvergenceTolerance, Omega_h::Real);
179 vtkSetMacro(ShouldLimitElementCount,
bool);
180 vtkGetMacro(ShouldLimitElementCount,
bool);
181 vtkBooleanMacro(ShouldLimitElementCount,
bool);
188 vtkSetMacro(MaxElementCount, Omega_h::Real);
189 vtkGetMacro(MaxElementCount, Omega_h::Real);
196 vtkSetMacro(MinElementCount, Omega_h::Real);
197 vtkGetMacro(MinElementCount, Omega_h::Real);
204 vtkSetMacro(ElementCountOverRelaxation, Omega_h::Real);
205 vtkGetMacro(ElementCountOverRelaxation, Omega_h::Real);
212 vtkSetMacro(NsmoothingSteps, Omega_h::Int);
213 vtkGetMacro(NsmoothingSteps, Omega_h::Int);
226 vtkSetMacro(MinLengthDesired, Omega_h::Real);
227 vtkGetMacro(MinLengthDesired, Omega_h::Real);
234 vtkSetMacro(MaxLengthDesired, Omega_h::Real);
235 vtkGetMacro(MaxLengthDesired, Omega_h::Real);
242 vtkSetMacro(MaxLengthAllowed, Omega_h::Real);
243 vtkGetMacro(MaxLengthAllowed, Omega_h::Real);
250 vtkSetMacro(MinQualityAllowed, Omega_h::Real);
251 vtkGetMacro(MinQualityAllowed, Omega_h::Real);
258 vtkSetMacro(MinQualityDesired, Omega_h::Real);
259 vtkGetMacro(MinQualityDesired, Omega_h::Real);
266 vtkSetMacro(NsliverLayers, Omega_h::Int);
267 vtkGetMacro(NsliverLayers, Omega_h::Int);
278 vtkSetMacro(Verbosity,
const std::string &);
279 vtkGetMacro(Verbosity,
const std::string &);
286 vtkSetMacro(LengthHistogramMin, Omega_h::Real);
287 vtkGetMacro(LengthHistogramMin, Omega_h::Real);
294 vtkSetMacro(LengthHistogramMax, Omega_h::Real);
295 vtkGetMacro(LengthHistogramMax, Omega_h::Real);
302 vtkSetMacro(NlengthHistogramBins, Omega_h::Int);
303 vtkGetMacro(NlengthHistogramBins, Omega_h::Int);
310 vtkSetMacro(NqualityHistogramBins, Omega_h::Int);
311 vtkGetMacro(NqualityHistogramBins, Omega_h::Int);
318 vtkSetMacro(ShouldRefine,
bool);
319 vtkGetMacro(ShouldRefine,
bool);
320 vtkBooleanMacro(ShouldRefine,
bool);
327 vtkSetMacro(ShouldCoarsen,
bool);
328 vtkGetMacro(ShouldCoarsen,
bool);
329 vtkBooleanMacro(ShouldCoarsen,
bool);
336 vtkSetMacro(ShouldSwap,
bool);
337 vtkGetMacro(ShouldSwap,
bool);
338 vtkBooleanMacro(ShouldSwap,
bool);
345 vtkSetMacro(ShouldCoarsenSlivers,
bool);
346 vtkGetMacro(ShouldCoarsenSlivers,
bool);
347 vtkBooleanMacro(ShouldCoarsenSlivers,
bool);
354 vtkSetMacro(ShouldPreventCoarsenFlip,
bool);
355 vtkGetMacro(ShouldPreventCoarsenFlip,
bool);
356 vtkBooleanMacro(ShouldPreventCoarsenFlip,
bool);
375 const std::string &integral_name =
"") {
376 TransferOptsTypeMap[name] = method;
377 if (!integral_name.empty()) TransferOptsIntegralMap[name] = integral_name;
383 const std::string &type,
384 Omega_h::Real tolerance,
385 Omega_h::Real floor) {
386 TransferOptsIntegralDiffuseMap[integral_name] = {type, tolerance, floor};
395 int RequestData(vtkInformation *request, vtkInformationVector **inputVector,
396 vtkInformationVector *outputVector)
override;
399 int FillInputPortInformation(
int port, vtkInformation *info)
override;
400 int FillOutputPortInformation(
int port, vtkInformation *info)
override;
406 bool ShouldLimitLengths{
false};
407 Omega_h::Real MaxLength{-1.0};
408 Omega_h::Real MinLength{-1.0};
409 bool ShouldLimitGradation{
false};
410 Omega_h::Real MaxGradationRate{-1.0};
411 Omega_h::Real GradationConvergenceTolerance{-1.0};
412 bool ShouldLimitElementCount{
false};
413 Omega_h::Real MaxElementCount{-1.0};
414 Omega_h::Real MinElementCount{-1.0};
415 Omega_h::Real ElementCountOverRelaxation{-1.0};
416 Omega_h::Int NsmoothingSteps{-1};
419 Omega_h::Real MinLengthDesired{-1.0};
420 Omega_h::Real MaxLengthDesired{-1.0};
421 Omega_h::Real MaxLengthAllowed{-1.0};
422 Omega_h::Real MinQualityAllowed{-1.0};
423 Omega_h::Real MinQualityDesired{-1.0};
424 Omega_h::Int NsliverLayers{-1};
425 std::string Verbosity{
"Each Rebuild"};
426 Omega_h::Real LengthHistogramMin{-1.0};
427 Omega_h::Real LengthHistogramMax{-1.0};
428 Omega_h::Int NlengthHistogramBins{-1};
429 Omega_h::Int NqualityHistogramBins{-1};
430 bool ShouldRefine{
true};
431 bool ShouldCoarsen{
true};
432 bool ShouldSwap{
true};
433 bool ShouldCoarsenSlivers{
true};
434 bool ShouldPreventCoarsenFlip{
false};
439 std::map<std::string, omegahRefineVarCompareOpts>
446 #endif // NEMOSYS_OMEGAHREFINESRV_H_ std::vector< omegahRefineMetricSource > MetricSources
std::map< std::string, omegahRefineVarCompareOpts > TransferOptsIntegralDiffuseMap
geoMeshBase * New(MeshType meshType)
Create a new mesh object.
std::map< std::string, std::string > TransferOptsIntegralMap
void AddTransferOpts(const std::string &name, Omega_h_Transfer method, const std::string &integral_name="")
Add a field to be transferred.
std::string type
NONE, RELATIVE, or ABSOLUTE comparison of data.
std::map< std::string, Omega_h_Transfer > TransferOptsTypeMap
omegahRefineMetricSource(Omega_h_Source type, Omega_h::Real knob, std::string tag_name, Omega_h_Isotropy isotropy, Omega_h_Scales scales)
Omega_h::Real floor
RELATIVE: values below floor snap to 0.0.
Omega_h::Real tolerance
tolerance threshold for comparison
A service to use the Omega_h library for refinement.
abstract class for services acting on geoMeshBase
Store variables to create Omega_h's VarCompareOpts object used to define integral diffuse map during ...
void AddTransferOptsIntegralDiffuse(const std::string &integral_name, const std::string &type, Omega_h::Real tolerance, Omega_h::Real floor)
When specifying integral quantities, set tolerances.
Store variables to create Omega_h's MetricSource object used to define metrics for refinement...