177 using namespace Foam;
197 int main(
int argc,
char *argv[])
204 "Writes blockMeshDict, surfaceFeaturesDict and snappyHexMeshDict "
205 "files from surface geometry files.\n"
206 "For more information, see 'Description' in snappyHexMeshConfig.C "
207 "or run\n\n foamInfo snappyHexMeshConfig"
216 "single surface geometry file for meshing"
223 "number of cells in each direction, e.g. '(10 20 30)'"
230 "bounding box of the mesh, e.g. '((-10 -5 0) (10 5 10))'"
235 "cylindricalBackground",
236 "generate a cylindrical background mesh aligned with the z-axis"
243 "integer multiplier for the number of cells (>= 1)"
250 "refinement level used by snappyHexMesh, default 2"
257 "refinement level at specified surfaces, e.g. '((pipe 2) (baffles 1))'"
264 "refinement regions specfied by '( (<surface> <level>) (...) )'"
271 "refinement boxes specfied by '( (<min> <max> <level>) (...) )'"
278 "refinement distance specified by "
279 "'( (<surface> <dist> <level>) (...) )'"
286 "name and type of default patch, '(<name> <type>)'"
299 +
" direction, format '(<name> <type>)'"
306 "do not set default patch entries, i.e. xMin, xMax, etc"
312 "use implicit feature capturing"
319 "specify <int> surface layers at wall boundaries, default 0"
326 "surfaces that form cellZones, e.g. '(porousZone heatSource)'"
333 "surfaces that form rotatingZones, e.g. '(rotatingZone)'"
340 "surfaces that form baffles, e.g. '(helical)'"
347 "point location inside the region of geometry to be meshed"
352 "nCellsBetweenLevels",
354 "number of cells at successive refinement levels, default 3"
361 "inlet regions on an external surface, e.g. '(inletA inletB)'"
368 "outlet regions on an external surface, e.g. '(outletA outletB)'"
398 surfaceNames.
append(surfDir/files[i]);
402 if (surfaceNames.
empty())
405 <<
"No surface geometry files found in "
407 <<
"or provided using the '-surface' option"
435 if (bounds.size() != 2)
438 <<
"Argument to '-bounds'"
439 <<
" should be of the form '(<min> <max>)'" <<
nl
440 <<
"with the <min> and <max> bounds of a bounding box"
441 <<
"\n\nFound instead the argument: "
446 bb =
boundBox(bounds[0], bounds[1]);
447 Info<<
"Bounding box specified by '-bounds' option: "
479 const label refineFactor
488 readPatchOption(
args, patchOpts,
patches[i] +
"Patch");
507 blockMeshConfig.write();
523 blockMeshConfig.write();
527 const label refinementLevel
575 const point insidePoint
580 const label nCellsBetweenLevels
587 "surfaceFeaturesDict",
593 surfaceFeaturesConfig.write();
612 snappyConfig.write();
#define forAll(list, i)
Loop across all elements in list.
An STL-conforming hash table.
void append(const T &)
Append an element at the end of the list.
void append(T *)
Append an element at the end of the list.
A 2-tuple for storing two objects of different types.
A 3-tuple for storing three objects of different types.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
Extract command arguments and options from the supplied argc and argv parameters.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
T optionRead(const word &opt) const
Read a value from the named option.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
static string::size_type usageMin
Min offset for displaying usage (default: 20)
List< T > optionReadList(const word &opt) const
Read a List of values from the named option.
static string::size_type usageMax
Max screen width for displaying usage (default: 80)
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
From a set of input surface geometry files and a set of configuration parameters, writes out a blockM...
static const List< word > patches
Default patch names for the background mesh.
From a set of input surface geometry files and a set of configuration parameters, writes out a blockM...
A bounding box defined in terms of the points at its extremities.
A class for handling file names.
List of meshingSurfaces which stores the overall bounding box of all the meshingSurfaces.
static bool isSurfaceExt(const fileName &file)
Encapsulates queries for volume refinement ('refine all cells within shell').
static const word & geometryDir()
Return the geometry directory name.
From a set of input surface geometry files and some configuration parameters, writes out a snappyHexM...
From a set of input surface geometry files and some configuration parameters, writes out a surfacesFe...
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
fileNameList readDir(const fileName &, const fileType=fileType::file, const bool filterVariants=true, const bool followLink=true)
Read a directory and return the entries as a string list.
Foam::argList args(argc, argv)