52 const label nAllowableErrors,
68 internalOrBaffleFaceZones = meshRefiner_.
getZones(fzTypes);
100 Info<<
"Writing baffled mesh to time " 122 const labelList& reverseFaceMap = map->reverseFaceMap();
125 label f0 = reverseFaceMap[baffles[i].first()];
126 label f1 = reverseFaceMap[baffles[i].second()];
147 mesh.faceZones()[zonei].name(),
155 if (layerIDs.
found(mpi) && !layerIDs.
found(spi))
158 Info<<
"On faceZone " <<
mesh.faceZones()[zonei].name()
159 <<
" adding layers to master patch " <<
pbm[mpi].name()
160 <<
" only. Freezing points on slave patch " 164 else if (!layerIDs.
found(mpi) && layerIDs.
found(spi))
167 Info<<
"On faceZone " <<
mesh.faceZones()[zonei].name()
168 <<
" adding layers to slave patch " <<
pbm[spi].name()
169 <<
" only. Freezing points on master patch " 260 const label nIdealTotAddedCells = setPointNumLayers
289 calculateLayerThickness
313 avgPointData(*
pp, thickness);
381 mesh.updateMesh(map);
423 Info<<
"Writing mesh with layers but disconnected to time " 439 mapFaceZonePoints(map, baffles, pointToMaster);
459 <<
"Doing final balancing" <<
nl 460 <<
"---------------------" <<
nl 479 map().distributeCellData(cellNLayers);
480 map().distributeFaceData(faceWantedThickness);
481 map().distributeFaceData(faceRealThickness);
const polyBoundaryMesh & pbm
const labelList patchIDs(pbm.patchSet(polyPatchNames, false, true).sortedToc())
Simple container to keep together layer specific information.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
bool found(const Key &key) const
Same as contains()
bool getFaceZoneInfo(const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const
Lookup faceZone information. Return false if no information.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
static writeType writeLevel()
Get/set write level.
labelList getZones(const List< surfaceZonesInfo::faceZoneType > &fzTypes) const
Get zones of given type.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool hasMotionPoints() const
Has valid preMotionPoints?
const labelList & numLayers() const
How many layers to add.
scalar level0EdgeLength() const
Typical edge length between unrefined points.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const fvMesh & mesh() const
Reference to mesh.
label nRelaxedIter() const
Number of iterations after which relaxed motion rules.
#define forAll(list, i)
Loop across all elements in list.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
void addLayersSinglePass(const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
For debugging. Can be removed.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Abstract base class for domain decomposition.
autoPtr< mapDistributePolyMesh > balance(const bool keepZoneFaces, const bool keepBaffles, const scalarField &cellWeights, decompositionMethod &decomposer, fvMeshDistribute &distributor)
Redecompose according to cell count.
label nLayerIter() const
Number of overall layer addition iterations.
word timeName() const
Replacement for Time::timeName() that returns oldInstance (if overwrite_)
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const hexRef8 & meshCutter() const
Reference to meshcutting engine.
int debug
Static debugging option.
Pair< label > labelPair
A pair of labels.
static autoPtr< indirectPrimitivePatch > makePatch(const polyMesh &, const labelList &)
Create patch from set of patches.
const labelList & faceMap() const
Old face map.
void updateMesh(const mapPolyMesh &, const labelList &changedFaces)
Update for external change to mesh. changedFaces are in new mesh.
autoPtr< mapPolyMesh > createZoneBaffles(const labelList &zoneIDs, List< labelPair > &baffles, labelList &originatingFaceZone)
Create baffles for faces on faceZones. Return created baffles.
autoPtr< mapPolyMesh > dupNonManifoldBoundaryPoints()
Find boundary points that are on faceZones of type boundary.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
Direct mesh changes based on v1.3 polyTopoChange syntax.
messageStream Info
Information stream (stdout output on master, null elsewhere)
writeType
Enumeration for what to write. Used as a bit-pattern.
static labelListList globalEdgeFaces(const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp)
Per patch edge the pp faces (in global indices) using it.
faceZoneType
What to do with faceZone faces.
debugType
Enumeration for what to debug. Used as a bit-pattern.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void addLayers(const layerParameters &layerParams, const label nLayerIter, const dictionary &motionDict, const label nRelaxedIter, const label nAllowableErrors, const labelList &patchIDs, const labelList &internalFaceZones, const List< labelPair > &baffles, const labelList &numLayers, const label nIdealTotAddedCells, const globalIndex &globalFaces, indirectPrimitivePatch &pp, const labelListList &edgeGlobalFaces, const labelList &edgePatchID, const labelList &edgeZoneID, const boolList &edgeFlip, const labelList &inflateFaceID, const scalarField &thickness, const scalarIOField &minThickness, const scalarField &expansionRatio, vectorField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus, polyTopoChange &savedMeshMod, labelList &cellNLayers, scalarField &faceRealThickness)
bool write() const
Write mesh and all data.
List< label > labelList
A List of labels.
Defines the attributes of an object for which implicit objectRegistry management is supported...
A primitive field of type <T> with automated input and output.
const labelIOList & cellLevel() const
const pointField & preMotionPoints() const
Pre-motion point positions.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)