53 enum class extrudeSurfaceType
68 int main(
int argc,
char *argv[])
86 const extrudeSurfaceType surfaceFormat = extrudeSurfaceTypeNames[
args[1]];
89 Info<<
"Extruding from " << extrudeSurfaceTypeNames[surfaceFormat]
90 <<
" at time " << runTimeExtruded.name() <<
endl;
97 runTimeExtruded.system(),
122 labelList patchSizes(1, fMesh().nEdges() - fMesh().nInternalEdges());
124 const edgeList& edges = fMesh().edges();
127 if (!fMesh().isInternalEdge(edgeI))
129 edgeRegionMap.
insert(edges[edgeI], 0);
141 poly2DMesh.createMesh();
150 runTimeExtruded.constant(),
156 move(poly2DMesh.points()),
157 move(poly2DMesh.faces()),
158 move(poly2DMesh.owner()),
159 move(poly2DMesh.neighbour())
163 Info<<
"Constructing patches." <<
endl;
170 poly2DMesh.patchNames()[
patchi],
171 poly2DMesh.patchSizes()[
patchi],
172 poly2DMesh.patchStarts()[
patchi],
174 mesh().boundaryMesh(),
181 else if (surfaceFormat == extrudeSurfaceType::polyMesh2D)
190 runTimeExtruded.name(),
201 extruder.addFrontBackPatches();
205 extruder.setRefinement(meshMod());
210 extruder.updateZones();
221 const scalar mergeDim = 1
e-4 * bb.
minDim();
228 const edge&
e = edges[edgeI];
234 Info<<
"Merging edge " <<
e <<
" since length " << d
235 <<
" << " << mergeDim <<
nl;
238 collapsePointToLocation.set(
e[1],
points[
e[0]]);
246 collapser.consistentCollapse
250 collapsePointToLocation,
257 collapser.setRefinement(allPointInfo, meshModCollapse);
275 Info<<
"\nWriting extruded mesh to time = " << runTimeExtruded.name()
#define forAll(list, i)
Loop across all elements in list.
bool set(const Key &, const T &newElmt)
Set a new hashedEntry, overwriting existing entries.
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)
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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
virtual void topoChange(const polyTopoChangeMap &map)
Update mesh corresponding to the given map.
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.
void addPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches.
virtual const pointField & points() const
Return raw points.
void setInstance(const fileName &)
Set the instance for mesh files.
const boundBox & bounds() const
Return mesh bounding box.
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.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label collapseEdge(triSurface &surf, const scalar minLen)
Keep collapsing all edges < minLen.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
int main(int argc, char *argv[])
const fvPatchList & patches
Ostream & endl(Ostream &os)
Add newline and flush stream.
MeshedSurface< face > meshedSurface
wordList patchNames(nPatches)
Foam::argList args(argc, argv)