Go to the documentation of this file.
56 int main(
int argc,
char *argv[])
60 "Conformal Voronoi 2D automatic mesh generator"
91 const bool extrude = extrusionDict.
get<
bool>(
"extrude");
92 const bool overwrite =
args.
found(
"overwrite");
100 mesh.insertPoints(
args[
"pointsFile"]);
107 mesh.insertSurfacePointPairs();
108 mesh.boundaryConform();
122 Info<<
"Begin filtering short edges:" <<
endl;
127 Info<<
"Meshed surface after edge filtering :" <<
endl;
128 sef.fMesh().writeStats(
Info);
130 if (
mesh.meshControls().meshedSurfaceOutput())
132 Info<<
"Write .obj file of the 2D mesh: MeshedSurface.obj" <<
endl;
133 sef.fMesh().
write(
"MeshedSurface.obj");
139 Info<<
"Begin constructing a polyMesh:" <<
endl;
162 std::move(poly2DMesh.points()),
163 std::move(poly2DMesh.faces()),
164 std::move(poly2DMesh.owner()),
165 std::move(poly2DMesh.neighbour())
168 Info<<
"Constructing patches." <<
endl;
170 label countPatches = 0;
174 if (poly2DMesh.patchSizes()[patchi] != 0)
178 poly2DMesh.patchNames()[patchi],
179 poly2DMesh.patchSizes()[patchi],
180 poly2DMesh.patchStarts()[patchi],
182 pMesh.boundaryMesh(),
194 Info<<
"Begin extruding the polyMesh:" <<
endl;
202 extruder.addFrontBackPatches();
206 extruder.setRefinement(meshMod);
210 pMesh.updateMesh(morphMap());
220 pMesh.setInstance(
"constant");
225 Info<<
"Finished extruding in = "
This class filters short edges generated by the CV2D mesher.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void createMesh()
Create the mesh.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
static word defaultRegion
Return the default region name.
static word timeName(const scalar t, const int precision=precision_)
Direct mesh changes based on v1.3 polyTopoChange syntax.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
const word & executable() const
Name of executable without the path.
virtual bool write(const bool valid=true) const
Write using setting from DB.
messageStream Info
Information stream (uses stdout - output is on the master only)
Conformal-Voronoi 2D automatic mesher with grid or read initial points and point position relaxation ...
A patch is a list of labels that address the faces in the global face list.
runTime controlDict().readEntry("adjustTimeStep"
void setSize(const label newLen)
Same as resize()
static autoPtr< extrudeModel > New(const dictionary &dict)
Select null constructed.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool loop()
Return true if run should continue and if so increment time.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & system() const
Return system name.
Convert a primitivePatch into a 2D polyMesh.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static const word null
An empty word.
const polyBoundaryMesh & patches
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
static void noParallel()
Remove the parallel options.
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
const word & constant() const
Return constant name.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.