52 const label nAllowableErrors,
60 const scalar edge0Len = meshRefiner_.meshCutter().level0EdgeLength();
68 internalOrBaffleFaceZones = meshRefiner_.getZones(fzTypes);
90 meshRefiner_.createZoneBaffles
100 Info<<
"Writing baffled mesh to time "
101 << meshRefiner_.timeName() <<
endl;
110 mesh.time().path()/meshRefiner_.timeName()
122 const labelList& reverseFaceMap = map->reverseFaceMap();
125 label f0 = reverseFaceMap[baffles[i].
first()];
126 label f1 = reverseFaceMap[baffles[i].second()];
145 bool hasInfo = meshRefiner_.getFaceZoneInfo
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 "
262 const label nIdealTotAddedCells = setPointNumLayers
284 meshRefiner_.timeName(),
291 calculateLayerThickness
296 meshRefiner_.meshCutter().cellLevel(),
315 avgPointData(*
pp, thickness);
383 mesh.updateMesh(map);
397 mesh.setInstance(meshRefiner_.timeName());
399 meshRefiner_.updateMesh(map,
labelList(0));
426 Info<<
"Writing mesh with layers but disconnected to time "
427 << meshRefiner_.timeName() <<
endl;
436 mesh.time().path()/meshRefiner_.timeName()
462 <<
"Doing final balancing" <<
nl
463 <<
"---------------------" <<
nl
483 map().distributeCellData(cellNLayers);
484 map().distributeFaceData(faceWantedThickness);
485 map().distributeFaceData(faceRealThickness);
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
bool found(const Key &key) const
Same as contains().
@ NO_READ
Nothing to be read.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static const List< label > & null() noexcept
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A List with indirect addressing. Like IndirectList but does not store addressing.
T & first()
Access first element of the list, position [0].
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static labelListList globalEdgeFaces(const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp, const bitSet &orientation)
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.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
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 pointField & preMotionPoints() const noexcept
Pre-motion point positions.
const labelList & faceMap() const noexcept
Old face map.
bool hasMotionPoints() const noexcept
Has valid preMotionPoints?
writeType
Enumeration for what to write. Used as a bit-pattern.
debugType
Enumeration for what to debug. Used as a bit-pattern.
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.
static writeType writeLevel()
Get/set write level.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
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.
void addLayersSinglePass(const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
For debugging. Can be removed.
static autoPtr< mapPolyMesh > dupFaceZonePoints(meshRefinement &meshRefiner, const labelList &patchIDs, const labelList &numLayers, List< labelPair > baffles, labelList &pointToMaster)
Duplicate points on faceZones with layers. Re-used when adding buffer layers. Can be made private aga...
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)
static void determineSidePatches(meshRefinement &meshRefiner, const globalIndex &globalFaces, const labelListList &edgeGlobalFaces, const indirectPrimitivePatch &pp, labelList &edgePatchID, labelList &edgeZoneID, boolList &edgeFlip, labelList &inflateFaceID)
Helper: see what zones and patches edges should be extruded into.
static void mapFaceZonePoints(meshRefinement &meshRefiner, const mapPolyMesh &map, labelPairList &baffles, labelList &pointToMaster)
Map numbering after adding cell layers.
faceZoneType
What to do with faceZone faces.
Namespace for handling debugging switches.
Pair< label > labelPair
A pair of labels.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
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.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
IOField< scalar > scalarIOField
IO for a Field of scalar.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.