57 int main(
int argc,
char *argv[])
61 "Conformal Voronoi 2D automatic mesh generator" 92 const bool extrude = extrusionDict.
get<
bool>(
"extrude");
93 const bool overwrite =
args.
found(
"overwrite");
108 mesh.insertSurfacePointPairs();
109 mesh.boundaryConform();
123 Info<<
"Begin filtering short edges:" <<
endl;
128 Info<<
"Meshed surface after edge filtering :" <<
endl;
129 sef.fMesh().writeStats(
Info);
131 if (
mesh.meshControls().meshedSurfaceOutput())
133 Info<<
"Write .obj file of the 2D mesh: MeshedSurface.obj" <<
endl;
134 sef.fMesh().
write(
"MeshedSurface.obj");
140 Info<<
"Begin constructing a polyMesh:" <<
endl;
163 std::move(poly2DMesh.points()),
164 std::move(poly2DMesh.faces()),
165 std::move(poly2DMesh.owner()),
166 std::move(poly2DMesh.neighbour())
169 Info<<
"Constructing patches." <<
endl;
173 forAll(newPatches, patchi)
175 if (poly2DMesh.patchSizes()[patchi] != 0)
182 poly2DMesh.patchNames()[patchi],
183 poly2DMesh.patchSizes()[patchi],
184 poly2DMesh.patchStarts()[patchi],
186 pMesh.boundaryMesh(),
195 pMesh.addPatches(newPatches);
199 Info<<
"Begin extruding the polyMesh:" <<
endl;
207 extruder.addFrontBackPatches();
211 extruder.setRefinement(meshMod);
215 pMesh.updateMesh(morphMap());
225 pMesh.setInstance(
"constant");
230 Info<<
"Finished extruding in = "
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
constexpr char nl
The newline '\n' character (0x0a)
virtual bool loop()
Return true if run should continue and if so increment time.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
Ignore writing from objectRegistry::writeObject()
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
const word & executable() const noexcept
Name of executable without the path.
Reading required, file watched for runTime modification.
static word defaultRegion
Return the default region name.
const word & system() const noexcept
Return system name.
static const word null
An empty word.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
runTime controlDict().readEntry("adjustTimeStep"
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
const word & constant() const noexcept
Return constant name.
Convert a primitivePatch into a 2D polyMesh.
static autoPtr< extrudeModel > New(const dictionary &dict)
Select null constructed.
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
T get(const label index) const
Get a value from the argument at index.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
void createMesh()
Create the mesh.
Direct mesh changes based on v1.3 polyTopoChange syntax.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
This class filters short edges generated by the CV2D mesher.
virtual bool write(const bool valid=true) const
Write using setting from DB.
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
bool found(const word &optName) const
Return true if the named option is found.