41 { algorithmType::ALGO_DEFAULT,
"default" },
42 { algorithmType::ALGO_CELL,
"cell" },
43 { algorithmType::ALGO_POINT,
"point" },
44 { algorithmType::ALGO_TOPO,
"topo" },
54 { filterType::NONE,
"none" },
55 { filterType::PARTIAL,
"partial" },
56 { filterType::FULL,
"full" },
57 { filterType::CLEAN,
"clean" },
59 { filterType::CELL,
"cell" },
60 { filterType::DIAGCELL,
"diagcell" },
70 const algorithmType deflt
76 !
dict.readIfPresentCompat
78 "isoMethod", {{
"isoAlgorithm", 0}},
86 if (!algorithmNames.found(enumName))
89 << enumName <<
" is not in enumeration: " 90 << (algorithmNames) <<
nl 94 return algorithmNames[enumName];
102 const filterType deflt
116 return (sw ? deflt : filterType::NONE);
120 if (!filterNames.found(enumName))
123 << enumName <<
" is not in enumeration: " 124 << (filterNames) <<
nl 128 return filterNames[enumName];
136 const algorithmType algo,
137 const filterType filter
158 snap_ =
dict.getOrDefault(
"snap",
true);
159 dict.readIfPresent(
"mergeTol", mergeTol_);
160 dict.readIfPresent(
"bounds", clipBounds_);
167 const algorithmType algo,
168 const filterType filter
185 os <<
" isoMethod:" << algorithmNames[algo_]
186 <<
" regularise:" << filterNames[filter_]
187 <<
" snap:" << snap_;
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Preferences for controlling iso-surface algorithms.
static filterType getFilterType(const dictionary &dict, const filterType deflt)
Get 'regularise' as bool or enumeration.
constexpr char nl
The newline '\n' character (0x0a)
void print(Ostream &os) const
Print information about the settings.
A bounding box defined in terms of min/max extrema points.
algorithmType
The algorithm types.
void setClipBounds(const boundBox &bb)
Set optional clipping bounding box.
isoSurfaceParams(const algorithmType algo=algorithmType::ALGO_DEFAULT, const filterType filter=filterType::DIAGCELL) noexcept
Default construct, or with specified algorithm.
const dimensionedScalar e
Elementary charge.
A class for handling words, derived from Foam::string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
OBJstream os(runTime.globalPath()/outputName)
filterType
The filtering (regularization) to apply.
static const Enum< algorithmType > algorithmNames
Names for the iso-surface algorithms.
static const Enum< filterType > filterNames
Names for the filtering types.
static algorithmType getAlgorithmType(const dictionary &dict, const algorithmType deflt)
Get 'isoMethod' or 'isoAlgorithm' as enumeration.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
static Switch find(const std::string &str)
Find switchType for the given string, returning as a Switch that can be tested for good() or bad()...
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...