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()];
155 if (layerIDs.
found(mpi) && !layerIDs.
found(spi))
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))
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);
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);
bool found(const Key &key) const
Return true if hashed entry is found in table.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
fileName path() const
Return path.
A List with indirect addressing. Like IndirectList but does not store addressing.
T & first()
Return the first element of the list.
static bool & parRun() noexcept
Test if this a parallel run.
label size() const noexcept
The number of elements in the list.
static labelListList globalEdgeFaces(const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp)
Per patch edge the pp faces (in global indices) using it.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base class for domain decomposition.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh corresponding to the given map.
virtual void movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
void clearOut()
Clear all geometry and addressing.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const labelIOList & cellLevel() const
scalar level0EdgeLength() const
Typical edge length between unrefined points.
Simple container to keep together layer specific information.
label nRelaxedIter() const
Number of iterations after which relaxed motion rules.
label nLayerIter() const
Number of overall layer addition iterations.
const labelList & numLayers() const
How many layers to add.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & faceMap() const
Old face map.
const pointField & preMotionPoints() const
Pre-motion point positions.
bool hasMotionPoints() const
Has valid preMotionPoints?
labelList getZones(const List< surfaceZonesInfo::faceZoneType > &fzTypes) const
Get zones of given type.
bool getFaceZoneInfo(const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const
Lookup faceZone information. Return false if no information.
void updateMesh(const mapPolyMesh &, const labelList &changedFaces)
Update for external change to mesh. changedFaces are in new mesh.
writeType
Enumeration for what to write. Used as a bit-pattern.
const hexRef8 & meshCutter() const
Reference to meshcutting engine.
autoPtr< mapDistributePolyMesh > balance(const bool keepZoneFaces, const bool keepBaffles, const scalarField &cellWeights, decompositionMethod &decomposer, fvMeshDistribute &distributor)
Redecompose according to cell count.
autoPtr< mapPolyMesh > dupNonManifoldBoundaryPoints()
Find boundary points that are on faceZones of type boundary.
debugType
Enumeration for what to debug. Used as a bit-pattern.
const fvMesh & mesh() const
Reference to mesh.
static autoPtr< indirectPrimitivePatch > makePatch(const polyMesh &, const labelList &)
Create patch from set of patches.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
bool write() const
Write mesh and all data.
static writeType writeLevel()
Get/set write level.
autoPtr< mapPolyMesh > createZoneBaffles(const labelList &zoneIDs, List< labelPair > &baffles, labelList &originatingFaceZone)
Create baffles for faces on faceZones. Return created baffles.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
bool moving() const noexcept
Is mesh moving.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Direct mesh changes based on v1.3 polyTopoChange syntax.
autoPtr< mapPolyMesh > changeMesh(polyMesh &mesh, const labelUList &patchMap, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
void addLayersSinglePass(const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
For debugging. Can be removed.
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)
faceZoneType
What to do with faceZone faces.
Pair< label > labelPair
A pair of labels.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.