113 int main(
int argc,
char *argv[])
131 const ExtrudeMode surfaceFormat = ExtrudeModeNames[
args[1]];
134 Info<<
"Extruding from " << ExtrudeModeNames[surfaceFormat]
135 <<
" at time " << runTimeExtruded.name() <<
endl;
142 runTimeExtruded.system(),
161 if (surfaceFormat == MESHEDSURFACE)
167 labelList patchSizes(1, fMesh().nEdges() - fMesh().nInternalEdges());
169 const edgeList& edges = fMesh().edges();
172 if (!fMesh().isInternalEdge(edgeI))
174 edgeRegionMap.
insert(edges[edgeI], 0);
186 poly2DMesh.createMesh();
195 runTimeExtruded.constant(),
201 move(poly2DMesh.points()),
202 move(poly2DMesh.faces()),
203 move(poly2DMesh.owner()),
204 move(poly2DMesh.neighbour())
208 Info<<
"Constructing patches." <<
endl;
215 poly2DMesh.patchNames()[
patchi],
216 poly2DMesh.patchSizes()[
patchi],
217 poly2DMesh.patchStarts()[
patchi],
219 mesh().boundaryMesh(),
226 else if (surfaceFormat == POLYMESH2D)
235 runTimeExtruded.name(),
246 extruder.addFrontBackPatches();
250 extruder.setRefinement(meshMod());
255 extruder.updateZones();
257 mesh().topoChange(map);
262 const edgeList& edges = mesh().edges();
265 const boundBox& bb = mesh().bounds();
266 const scalar mergeDim = 1
e-4 * bb.
minDim();
273 const edge&
e = edges[edgeI];
279 Info<<
"Merging edge " <<
e <<
" since length " << d
280 <<
" << " << mergeDim <<
nl;
283 collapsePointToLocation.set(
e[1],
points[
e[0]]);
291 collapser.consistentCollapse
295 collapsePointToLocation,
302 collapser.setRefinement(allPointInfo, meshModCollapse);
307 mesh().topoChange(map);
316 mesh().setInstance(
"constant");
320 Info<<
"\nWriting extruded mesh to time = " << runTimeExtruded.name()
#define forAll(list, i)
Loop across all elements in list.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A HashTable to objects of type <T> with a label key.
Initialise the NamedEnum HashTable from the static list of names.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word controlDictName
The default control dictionary name (normally "controlDict")
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
bool optionFound(const word &opt) const
Return true if the named option is found.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const fileName & rootPath() const
Return root path.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void set(T *)
Set pointer to that given.
A bounding box defined in terms of the points at its extremities.
scalar minDim() const
Smallest length/height/width dimension.
Does polyTopoChanges to remove edges. Can remove faces due to edge collapse but can not remove cells ...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Given a 2D mesh insert all the topology changes to extrude. Does not work in parallel.
static autoPtr< extrudeModel > New(const dictionary &)
Select null constructed.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Calculates points shared by more than two processor patches or cyclic patches.
Convert a primitivePatch into a 2D polyMesh.
Mesh consisting of general polyhedral cells.
static word defaultRegion
Return the default region name.
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.
label collapseEdge(triSurface &surf, const scalar minLen)
Keep collapsing all edges < minLen.
int main(int argc, char *argv[])
const fvPatchList & patches
Ostream & endl(Ostream &os)
Add newline and flush stream.
wordList patchNames(nPatches)
Foam::argList args(argc, argv)