57int main(
int argc,
char *argv[])
61 "Conformal Voronoi 2D automatic mesh generator"
64 argList::noParallel();
65 argList::addOption(
"pointsFile",
"filename");
81 IOobject::MUST_READ_IF_MODIFIED,
92 const bool extrude = extrusionDict.get<
bool>(
"extrude");
93 const bool overwrite =
args.
found(
"overwrite");
108 mesh.insertSurfacePointPairs();
109 mesh.boundaryConform();
120 Info<<
"Finished Delaunay in = " <<
runTime.cpuTimeIncrement() <<
" s."
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");
137 Info<<
"Finished filtering in = " <<
runTime.cpuTimeIncrement() <<
" s."
140 Info<<
"Begin constructing a polyMesh:" <<
endl;
150 poly2DMesh.createMesh();
156 polyMesh::defaultRegion,
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;
171 label countPatches = 0;
175 if (poly2DMesh.patchSizes()[patchi] != 0)
179 poly2DMesh.patchNames()[patchi],
180 poly2DMesh.patchSizes()[patchi],
181 poly2DMesh.patchStarts()[patchi],
183 pMesh.boundaryMesh(),
195 Info<<
"Begin extruding the polyMesh:" <<
endl;
203 extruder.addFrontBackPatches();
207 extruder.setRefinement(meshMod);
211 pMesh.updateMesh(morphMap());
221 pMesh.setInstance(
"constant");
226 Info<<
"Finished extruding in = "
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
T get(const label index) const
Get a value from the argument at index.
bool found(const word &optName) const
Return true if the named option is found.
const word & executable() const noexcept
Name of executable without the path.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
A class for handling file names.
Convert a primitivePatch into a 2D polyMesh.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
This class filters short edges generated by the CV2D mesher.
runTime controlDict().readEntry("adjustTimeStep"
const polyBoundaryMesh & patches
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.