132 using namespace Foam;
152 const word& patchName,
153 const word& patchType,
169 <<
"Already have patch " << patchName
170 <<
" but of type " << newPatches[
patchi]->type()
177 label startFacei = 0;
185 patchDict.set(
"type", patchType);
186 patchDict.set(
"nFaces", 0);
187 patchDict.set(
"startFace", startFacei);
222 forAll(masterNames, masterI)
236 oldToNew[
patchi] = --notUsedI;
240 oldToNew[
patchi] = usedI++;
251 oldToNew[
patchi] = --notUsedI;
255 oldToNew[
patchi] = usedI++;
264 if (oldToNew[
patchi] == -1)
273 oldToNew[
patchi] = --notUsedI;
277 oldToNew[
patchi] = usedI++;
286 enum class connectivity
295 struct isInternalEqOp
297 void operator()(connectivity&
x,
const connectivity&
y)
const
299 if (
x == connectivity::unset)
304 else if (
y == connectivity::unset)
315 x = connectivity::error;
323 return os << static_cast<label>(
p);
331 p =
static_cast<connectivity
>(l);
350 const label facei = extrudeFaces[i];
351 const label zonei = extrudeFaceZoneIDs[i];
354 zoneConnectivity[zonei],
356 ? connectivity::internal
365 forAll(zoneConnectivity, zonei)
367 switch (zoneConnectivity[zonei])
369 case connectivity::unset:
372 zoneIsInternal[zonei] =
false;
375 zoneIsInternal[zonei] =
false;
377 case connectivity::internal:
378 zoneIsInternal[zonei] =
true;
380 case connectivity::error:
382 <<
"Zone " << zoneNames[zonei]
383 <<
" contains both internal and boundary faces."
389 return zoneIsInternal;
437 const labelList& eFaces = edgeFaces[edgeI];
440 labelList& globalEFaces = globalEdgeFaces[edgeI];
444 globalEFaces[i] = globalFaces.
toGlobal(eFaces[i]);
458 return globalEdgeFaces;
463 label findUncoveredPatchFace
467 const label meshEdgeI
474 extrudeFaceSet.insert(extrudeFaces[i]);
481 label facei = eFaces[i];
488 && !extrudeFaceSet.found(facei)
499 label findUncoveredCyclicPatchFace
503 const label meshEdgeI
510 extrudeFaceSet.insert(extrudeFaces[i]);
517 label facei = eFaces[i];
523 && isA<cyclicPolyPatch>(pbm[
patchi])
524 && !extrudeFaceSet.found(facei)
535 void addCouplingPatches
538 const bool isShellMesh,
541 const word& nbrRegionName,
551 Pout<<
"Adding coupling patches:" <<
nl <<
nl
552 <<
"patchID\tpatch\ttype" <<
nl
553 <<
"-------\t-----\t----"
586 oppositePatchNames.swap(regionOppositePatchNames);
600 patchDict.
add(
"neighbourRegion", nbrRegionName);
605 const word patchNamePrefix =
608 const word nbrPatchNamePrefix =
611 word bottomPatchName;
612 word bottomNbrPatchName;
614 word topNbrPatchName;
616 if (zoneIsInternal[zonei])
619 patchNamePrefix + zoneNames[zonei] +
"_bottom";
621 nbrPatchNamePrefix + zoneNames[zonei] +
"_bottom";
623 patchNamePrefix + zoneNames[zonei] +
"_top";
625 nbrPatchNamePrefix + zoneNames[zonei] +
"_top";
627 else if (!oppositeZoneNames[zonei].empty())
629 bottomPatchName = patchNamePrefix + zoneNames[zonei];
630 bottomNbrPatchName = nbrPatchNamePrefix + zoneNames[zonei];
631 topPatchName = patchNamePrefix + oppositeZoneNames[zonei];
632 topNbrPatchName = nbrPatchNamePrefix + oppositeZoneNames[zonei];
636 bottomPatchName = patchNamePrefix + zoneNames[zonei];
637 bottomNbrPatchName = nbrPatchNamePrefix + zoneNames[zonei];
638 topPatchName = zoneNames[zonei] +
"_top";
646 if (regionPatchNames.size())
648 bottomNbrPatchName = regionPatchNames[zonei];
650 if (oppositePatchNames.size())
652 topPatchName = oppositePatchNames[zonei];
654 if (regionOppositePatchNames.size())
656 topNbrPatchName = regionOppositePatchNames[zonei];
659 const bool bothMapped =
660 zoneIsInternal[zonei] || !oppositeZoneNames[zonei].
empty();
662 const bool bottomMapped = bothMapped || !(intrude && isShellMesh);
663 const bool topMapped = bothMapped || intrude;
665 const bool bottomExtruded = !isShellMesh && intrude;
666 const bool topExtruded = !bottomExtruded;
671 bottomPatchDict = patchDict;
675 !intrude ? bottomNbrPatchName : topNbrPatchName
679 bottomPatchDict.
add(
"isExtrudedRegion", isShellMesh);
683 zoneBottomPatch[zonei] = addPatch
688 : !bottomMapped ? polyPatch::typeName
690 ? mappedWallPolyPatch::typeName
691 : mappedExtrudedWallPolyPatch::typeName,
696 Pout<< zoneBottomPatch[zonei]
697 <<
'\t' << newPatches[zoneBottomPatch[zonei]]->name()
698 <<
'\t' << newPatches[zoneBottomPatch[zonei]]->type()
701 if (!isShellMesh && !bothMapped)
continue;
706 topPatchDict = patchDict;
710 !intrude ? topNbrPatchName : bottomNbrPatchName
714 topPatchDict.
add(
"isExtrudedRegion", isShellMesh);
718 zoneTopPatch[zonei] = addPatch
722 oppositePatchTypes.
size() ? oppositePatchTypes[zonei]
723 : !topMapped ? polyPatch::typeName
725 ? mappedWallPolyPatch::typeName
726 : mappedExtrudedWallPolyPatch::typeName,
731 Pout<< zoneTopPatch[zonei]
732 <<
'\t' << newPatches[zoneTopPatch[zonei]]->name()
733 <<
'\t' << newPatches[zoneTopPatch[zonei]]->type()
737 Pout<<
"Added " << newPatches.
size()-nOldPatches
738 <<
" inter-region patches." <<
nl
761 if (eFaces.
size() == 2)
768 && extrudeEdgeGlobalFaces[edgeI].size() == 2
778 const label facei = findUncoveredPatchFace
782 extrudeEdgeMeshEdges[edgeI]
790 zoneSideNFaces[extrudeFaceZoneIDs[facei]] ++;
799 return zoneSideNFaces;
809 const word& oneDPolyPatchType,
813 Pout<<
"Adding patches for sides on zones:" <<
nl <<
nl
814 <<
"patchID\tpatch" <<
nl <<
"-------\t-----" <<
endl;
818 const label nOldPatches = newPatches.
size();
822 forAll(zoneSideNFaces, zoneI)
826 if (oneDPolyPatchType ==
"empty")
828 patchName =
"oneDEmptyPatch";
829 zoneSidePatches[zoneI] = addPatch
833 emptyPolyPatch::typeName,
838 else if (oneDPolyPatchType ==
"wedge")
840 patchName =
"oneDWedgePatch";
841 zoneSidePatches[zoneI] = addPatch
845 wedgePolyPatch::typeName,
853 <<
"Type " << oneDPolyPatchType <<
" does not exist "
857 Pout<< zoneSidePatches[zoneI] <<
'\t' << patchName <<
nl;
862 forAll(zoneSideNFaces, zoneI)
864 if (zoneSideNFaces[zoneI] > 0)
866 word patchName = zoneNames[zoneI] +
"_" +
"side";
868 zoneSidePatches[zoneI] = addPatch
877 Pout<< zoneSidePatches[zoneI] <<
'\t' << patchName <<
nl;
882 Pout<<
"Added " << newPatches.
size() - nOldPatches <<
" zone-side patches."
885 return zoneSidePatches;
910 forAll(extrudeEdgeGlobalFaces, edgeI)
912 const labelList& eFaces = extrudeEdgeGlobalFaces[edgeI];
917 label proci = procID[eFaces[i]];
918 minProcID[edgeI] =
min(minProcID[edgeI], proci);
919 maxProcID[edgeI] =
max(maxProcID[edgeI], proci);
926 extrudeEdgeMeshEdges,
934 extrudeEdgeMeshEdges,
940 Pout<<
"Adding processor or cyclic patches:" <<
nl <<
nl
941 <<
"patchID\tpatch" <<
nl <<
"-------\t-----" <<
endl;
943 const label nOldPatches = newPatches.
size();
953 && extrudeEdgeGlobalFaces[edgeI].size() == 2
957 label nbrProci = minProcID[edgeI];
960 nbrProci = maxProcID[edgeI];
968 const label facei = findUncoveredCyclicPatchFace
972 extrudeEdgeMeshEdges[edgeI]
985 extrudeEdgeSidePatches[edgeI] = newPatchi;
990 <<
"Unable to determine coupled patch addressing"
1000 extrudeEdgeSidePatches[edgeI] =
findIndex(newPatches,
name);
1002 if (extrudeEdgeSidePatches[edgeI] == -1)
1006 patchDict.
add(
"neighbProcNo", nbrProci);
1008 extrudeEdgeSidePatches[edgeI] = addPatch
1012 processorPolyPatch::typeName,
1017 Pout<< extrudeEdgeSidePatches[edgeI] <<
'\t' <<
name <<
nl;
1023 Pout<<
"Added " << newPatches.
size() - nOldPatches
1024 <<
" coupled patches." <<
nl <<
endl;
1026 return extrudeEdgeSidePatches;
1030 int main(
int argc,
char *argv[])
1050 <<
"Patches are not synchronised on all processors."
1051 <<
" Per processor patches " << allNames
1068 <<
"Cannot extrude into same region as mesh." <<
endl
1070 <<
"Shell region : " << shellRegionName
1075 enum class zoneSourceType
1082 static const wordList zoneSourceTypeNames
1089 static const wordList zoneSourcesTypeNames
1100 auto lookupZones = [&](
const zoneSourceType&
type)
1102 const word& keyword = zoneSourcesTypeNames[unsigned(
type)];
1113 "opposite" + keyword.capitalise(),
1118 zoneNames.
size() - oppositeZoneNames.
size(),
1127 lookupZones(zoneSourceType::zone);
1128 lookupZones(zoneSourceType::set);
1129 lookupZones(zoneSourceType::patch);
1134 const unsigned typei = unsigned(zoneSourceTypes[zonei]);
1136 if (oppositeZoneNames[zonei].empty())
1138 Info<<
indent <<
"From " << zoneSourceTypeNames[typei] <<
" \""
1139 << zoneNames[zonei] <<
"\"" <<
nl;
1143 Info<<
indent <<
"Between " << zoneSourcesTypeNames[typei] <<
" \""
1144 << zoneNames[zonei] <<
"\" and \"" << oppositeZoneNames[zonei]
1152 Switch oneDNonManifoldEdges(
false);
1153 word oneDPatchType(emptyPolyPatch::typeName);
1157 dict.
lookup(
"oneDPolyPatchType") >> oneDPatchType;
1162 if (oneDNonManifoldEdges)
1164 Info<<
"Extruding as 1D columns with sides in patch type "
1166 <<
" and connected points (except on non-manifold areas)."
1171 Info<<
"Extruding as 1D columns with sides in patch type "
1173 <<
" and duplicated points (overlapping volumes)."
1190 meshInstance = runTime.name();
1196 Info<<
"Writing meshes to " << meshInstance <<
nl <<
endl;
1204 if (zoneSourceTypes[zonei] != zoneSourceType::zone)
continue;
1206 zoneMeshZoneID[zonei] =
1209 if (zoneMeshZoneID[zonei] == -1)
1212 <<
"Cannot find zone " << zoneNames[zonei]
1217 if (!oppositeZoneNames[zonei].empty())
1219 oppositeZoneMeshZoneID[zonei] =
1222 if (oppositeZoneMeshZoneID[zonei] == -1)
1225 <<
"Cannot find opposite zone " << oppositeZoneNames[zonei]
1234 labelList extrudeFaces, oppositeExtrudeFaces;
1235 labelList extrudeFaceZoneIDs, oppositeExtrudeFaceZoneIDs;
1236 boolList extrudeFaceFlips, oppositeExtrudeFaceFlips;
1243 if (zoneSourceTypes[zonei] == zoneSourceType::set)
1245 zoneSets.set(zonei,
new faceSet(
mesh, zoneNames[zonei]));
1246 if (!oppositeZoneNames.
empty())
1248 oppositeZoneSets.set
1263 switch (zoneSourceTypes[zonei])
1265 case zoneSourceType::zone:
1273 if (!oppositeZoneNames[zonei].empty())
1280 <<
"Opposite zone " << oppositeZoneNames[zonei]
1281 <<
"is a different size from its "
1282 <<
"corresponding zone " << zoneNames[zonei]
1285 oppositeFacesDyn.
append(sfz);
1297 case zoneSourceType::set:
1299 const faceSet& fs = zoneSets[zonei];
1304 if (!oppositeZoneNames[zonei].empty())
1306 const faceSet& sfs = oppositeZoneSets[zonei];
1310 <<
"Opposite set " << oppositeZoneNames[zonei]
1311 <<
"is a different size from its "
1312 <<
"corresponding zone " << zoneNames[zonei]
1327 case zoneSourceType::patch:
1335 if (!oppositeZoneNames[zonei].empty())
1342 <<
"Opposite patch " << oppositeZoneNames[zonei]
1343 <<
"is a different size from its "
1344 <<
"corresponding zone " << zoneNames[zonei]
1367 extrudeFaceZoneIDs.
transfer(zoneIDsDyn);
1368 extrudeFaceFlips.
transfer(flipsDyn);
1369 oppositeExtrudeFaces.
transfer(oppositeFacesDyn);
1370 oppositeExtrudeFaceZoneIDs.
transfer(oppositeZoneIDsDyn);
1371 oppositeExtrudeFaceFlips.
transfer(oppositeFlipsDyn);
1376 forAll(extrudeFaceList, facei)
1378 if (intrude != extrudeFaceFlips[facei])
1380 extrudeFaceList[facei].flip();
1394 calcZoneIsInternal(
mesh, zoneNames, extrudeFaces, extrudeFaceZoneIDs)
1398 Info<<
"extrudePatch :"
1418 const globalIndex globalExtrudeFaces(extrudePatch.size());
1428 extrudeEdgeMeshEdges
1435 extrudeEdgeGlobalFaces,
1447 regionPatches.append
1452 regionPatches.
size(),
1465 labelList zoneTopPatch, zoneBottomPatch;
1513 interMeshBottomPatch
1544 labelList extrudeFaceTopPatchID(extrudePatch.size());
1545 labelList extrudeFaceBottomPatchID(extrudePatch.size());
1546 forAll(extrudeFaceZoneIDs, facei)
1548 extrudeFaceTopPatchID[facei] =
1549 zoneTopPatch[extrudeFaceZoneIDs[facei]];
1550 extrudeFaceBottomPatchID[facei] =
1551 zoneBottomPatch[extrudeFaceZoneIDs[facei]];
1565 extrudeEdgeMeshEdges,
1566 extrudeEdgeGlobalFaces
1589 addExtrudeEdgeSidePatches
1594 extrudeEdgeMeshEdges,
1595 extrudeEdgeFacesMap,
1596 extrudeEdgeGlobalFaces,
1616 labelList& ePatches = extrudeEdgePatches[edgeI];
1624 zoneSidePatches[extrudeFaceZoneIDs[eFaces[i]]];
1627 if (oneDNonManifoldEdges)
1629 if (eFaces.
size() != 2)
1631 nonManifoldEdge[edgeI] =
true;
1636 nonManifoldEdge[edgeI] =
true;
1639 else if (eFaces.
size() == 2)
1643 else if (extrudeEdgeSidePatches[edgeI] != -1)
1649 ePatches[i] = extrudeEdgeSidePatches[edgeI];
1655 const label facei = findUncoveredPatchFace
1659 extrudeEdgeMeshEdges[edgeI]
1664 const label newPatchi =
1681 zoneSidePatches[extrudeFaceZoneIDs[eFaces[i]]];
1685 nonManifoldEdge[edgeI] =
true;
1712 forAll(pointLocalRegions, facei)
1715 const face& pRegions = pointLocalRegions[facei];
1718 localRegionPoints[pRegions[fp]] =
f[fp];
1727 forAll(pointLocalRegions, facei)
1729 const face& pRegions = pointLocalRegions[facei];
1732 const label localRegionI = pRegions[fp];
1737 localSum[localRegionI] +=
1740 extrudePatch.
points()[extrudePatch[facei][fp]]
1752 forAll(localSum, localRegionI)
1754 label globalRegionI = localToGlobalRegion[localRegionI];
1755 globalSum.insert(globalRegionI, localSum[localRegionI]);
1762 forAll(localToGlobalRegion, localRegionI)
1764 label globalRegionI = localToGlobalRegion[localRegionI];
1765 localRegionNormals[localRegionI] = globalSum[globalRegionI];
1767 localRegionNormals /=
mag(localRegionNormals) ;
1773 forAll(firstDisp, regionI)
1779 localRegionPoints[regionI]
1782 const vector&
n = localRegionNormals[regionI];
1783 firstDisp[regionI] = model()(regionPt,
n, 1) - regionPt;
1813 regionPatches[
patchi] = ppPtr->
clone(regionMesh.boundaryMesh()).ptr();
1817 regionMesh.removeFvBoundary();
1818 regionMesh.addFvPatches(regionPatches,
true);
1831 extruder.setRefinement
1834 model().expansionRatio(),
1836 extrudeFaceTopPatchID,
1837 extrudeFaceBottomPatchID,
1848 forAll(localRegionPoints, regioni)
1850 const label pointi = localRegionPoints[regioni];
1852 const vector&
n = localRegionNormals[regioni];
1854 for (
label layeri = 1; layeri <= model().nLayers(); layeri++)
1856 newPoints[meshPointi++] = model()(pt,
n, layeri);
1860 meshMod.changeMesh(regionMesh);
1864 deleteEmptyPatches(regionMesh);
1867 regionMesh.setInstance(meshInstance);
1869 Info<<
"Writing mesh " << regionMesh.name() <<
" to "
1870 << regionMesh.facesInstance() <<
nl <<
endl;
1885 forAll(extrudeFaces, facei)
1887 const label meshFacei = extrudeFaces[facei];
1888 const label zonei = extrudeFaceZoneIDs[facei];
1889 const bool flip = extrudeFaceFlips[facei];
1901 interMeshBottomPatch[zonei]
1913 interMeshBottomPatch[zonei]
1918 forAll(extrudeFaces, facei)
1920 if (oppositeExtrudeFaces[facei] != -1)
1922 const label meshFacei = oppositeExtrudeFaces[facei];
1923 const label zonei = oppositeExtrudeFaceZoneIDs[facei];
1924 const bool flip = oppositeExtrudeFaceFlips[facei];
1936 interMeshTopPatch[zonei]
1948 interMeshTopPatch[zonei]
1954 const label meshFacei = extrudeFaces[facei];
1955 const label zonei = extrudeFaceZoneIDs[facei];
1956 const bool flip = extrudeFaceFlips[facei];
1970 interMeshTopPatch[zonei]
1983 interMeshTopPatch[zonei]
1990 addBafflesMap = meshMod.changeMesh(
mesh);
1996 deleteEmptyPatches(
mesh);
#define forAll(list, i)
Loop across all elements in list.
wordList toc() const
Return the table of contents.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
List< Key > toc() const
Return the table of contents.
label size() const
Return number of elements in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
autoPtr< IOobject > clone() const
Clone.
const word & name() const
Return name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & write(const char)=0
Write character.
A list of faces which address into the list of points.
label nEdges() const
Return number of edges in patch.
label nPoints() const
Return number of points supporting patch faces.
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const Field< PointType > & points() const
Return reference to global points.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const labelListList & edgeFaces() const
Return edge-face addressing.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
const Field< PointType > & faceNormals() const
Return face normals for patch.
const Field< PointType > & faceCentres() const
Return face centres for patch.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void mapCombineScatter(const List< commsStruct > &comms, Container &Values, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void mapCombineGather(const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A List with indirect addressing.
label size() const
Return the number of elements in the list.
label size() const
Return the number of elements in the UList.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
void swap(UList< T > &)
Swap two ULists of the same type in constant time.
T & last()
Return the last element of the list.
static bool master(const label communicator=0)
Am I the master process.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the number of elements in the UPtrList.
static void addNote(const string &)
Add extra notes for the usage information.
const word & executable() const
Name of executable without the path.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Creates mesh by extruding a patch.
static void calcPointRegions(const globalMeshData &globalData, const primitiveFacePatch &patch, const PackedBoolList &nonManifoldEdge, const bool syncNonCollocated, faceList &pointGlobalRegions, faceList &pointLocalRegions, labelList &localToGlobalRegion)
Helper: calculate point regions. The point region is the.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefaultBackwardsCompatible(const wordList &, const T &) const
Find and return a T, trying a list of keywords in sequence,.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
T lookupOrDefault(const word &, const T &, const bool writeDefault=writeOptionalEntries > 0) const
Find and return a T, if not found return the given default.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Class containing processor-to-processor mapping information.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
static autoPtr< extrudeModel > New(const dictionary &)
Select null constructed.
Named list of face indices representing a sub-set of the mesh faces.
const boolList & flipMap() const
Return face flip map.
A face is a list of labels corresponding to mesh vertices.
Mesh data needed to do the Finite Volume discretisation.
void addFvPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches. Constructor helper.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
const word & name() const
Return reference to name.
virtual void topoChange(const polyTopoChangeMap &map)
Update mesh corresponding to the given map.
void clearOut()
Clear all geometry and addressing.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
wordList names() const
Return the list of patch names.
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order. Return.
Mesh consisting of general polyhedral cells.
const fileName & facesInstance() const
Return the current instance directory for faces.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const globalMeshData & globalData() const
Return parallel info.
const fileName & pointsInstance() const
Return the current instance directory for points.
const faceZoneList & faceZones() const
Return face zones.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
virtual const pointField & points() const
Return raw points.
void setInstance(const fileName &)
Set the instance for mesh files.
A patch is a list of labels that address the faces in the global face list.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
label start() const
Return start label of this patch in the polyMesh face list.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Direct mesh changes based on v1.3 polyTopoChange syntax.
const labelListList & pointEdges() const
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const labelListList & edgeFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
static word newName(const label myProcNo, const label neighbProcNo)
Return the name of a processorPolyPatch.
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
const word & regionName(const solver ®ion)
vectorField pointField
pointField is a vectorField.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
List< bool > boolList
Bool container classes.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Istream & operator>>(Istream &, pistonPointEdgeData &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
prefixOSstream Pout(cout, "Pout")
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
static const label labelMax
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion, const fileName &path=fileName::null)
Ostream & indent(Ostream &os)
Indent stream.
static const label labelMin
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
wordList patchTypes(nPatches)
wordList patchNames(nPatches)
faceListList boundary(nPatches)
Foam::argList args(argc, argv)