mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: autoHexMesh: rewrite of zone allocation
This commit is contained in:
@ -74,7 +74,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
|
||||
if (dict.readIfPresent("locationInMesh", locationInMesh))
|
||||
{
|
||||
locationsInMesh_.append(locationInMesh);
|
||||
zonesInMesh_.append("noneIfNotSet");// special name for no cellZone
|
||||
zonesInMesh_.append("none"); // special name for no cellZone
|
||||
}
|
||||
|
||||
List<Tuple2<point, word> > pointsToZone;
|
||||
@ -88,6 +88,10 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
|
||||
{
|
||||
locationsInMesh_[nZones] = pointsToZone[i].first();
|
||||
zonesInMesh_[nZones] = pointsToZone[i].second();
|
||||
if (zonesInMesh_[nZones] == word::null)
|
||||
{
|
||||
zonesInMesh_[nZones] = "none";
|
||||
}
|
||||
nZones++;
|
||||
}
|
||||
}
|
||||
@ -145,12 +149,7 @@ Foam::labelList Foam::refinementParameters::addCellZonesToMesh
|
||||
labelList zoneIDs(zonesInMesh_.size(), -1);
|
||||
forAll(zonesInMesh_, i)
|
||||
{
|
||||
if
|
||||
(
|
||||
zonesInMesh_[i] != word::null
|
||||
&& zonesInMesh_[i] != "none"
|
||||
&& zonesInMesh_[i] != "noneIfNotSet"
|
||||
)
|
||||
if (zonesInMesh_[i] != word::null && zonesInMesh_[i] != "none")
|
||||
{
|
||||
zoneIDs[i] = surfaceZonesInfo::addCellZone
|
||||
(
|
||||
@ -238,8 +237,8 @@ Foam::labelList Foam::refinementParameters::zonedLocations
|
||||
{
|
||||
if
|
||||
(
|
||||
zonesInMesh[i] == word::null
|
||||
|| zonesInMesh[i] != "noneIfNotSet"
|
||||
zonesInMesh[i] != word::null
|
||||
&& zonesInMesh[i] != "none"
|
||||
)
|
||||
{
|
||||
indices.append(i);
|
||||
@ -260,8 +259,8 @@ Foam::labelList Foam::refinementParameters::unzonedLocations
|
||||
{
|
||||
if
|
||||
(
|
||||
zonesInMesh[i] != word::null
|
||||
&& zonesInMesh[i] == "noneIfNotSet"
|
||||
zonesInMesh[i] == word::null
|
||||
|| zonesInMesh[i] == "none"
|
||||
)
|
||||
{
|
||||
indices.append(i);
|
||||
|
||||
@ -507,7 +507,6 @@ private:
|
||||
void getIntersections
|
||||
(
|
||||
const labelList& surfacesToTest,
|
||||
const labelList& neiLevel,
|
||||
const pointField& neiCc,
|
||||
const labelList& testFaces,
|
||||
|
||||
@ -515,6 +514,18 @@ private:
|
||||
labelList& globalRegion2
|
||||
) const;
|
||||
|
||||
//- Calculate intersections on zoned faces. Return per face -1
|
||||
// or the index of the surface and the orientation w.r.t. surface
|
||||
void getIntersections
|
||||
(
|
||||
const labelList& surfacesToTest,
|
||||
const pointField& neiCc,
|
||||
const labelList& testFaces,
|
||||
|
||||
labelList& namedSurfaceIndex,
|
||||
PackedBoolList& posOrientation
|
||||
) const;
|
||||
|
||||
//- Determine patches for baffles
|
||||
void getBafflePatches
|
||||
(
|
||||
@ -635,13 +646,13 @@ private:
|
||||
labelList& cellToZone
|
||||
) const;
|
||||
|
||||
//- Finds zone per cell for cells inside named surfaces that have
|
||||
// an inside point specified.
|
||||
//- Finds zone per cell for cells inside region for which name
|
||||
// is specified.
|
||||
void findCellZoneInsideWalk
|
||||
(
|
||||
const labelList& locationSurfaces,
|
||||
const labelList& namedSurfaceIndex,
|
||||
const labelList& surfaceToCellZone,
|
||||
const pointField& locationsInMesh,
|
||||
const labelList& zonesInMesh,
|
||||
const labelList& blockedFace, // per face -1 or some index >= 0
|
||||
labelList& cellToZone
|
||||
) const;
|
||||
|
||||
@ -650,8 +661,8 @@ private:
|
||||
void findCellZoneInsideWalk
|
||||
(
|
||||
const pointField& locationsInMesh,
|
||||
const wordList& regionsInMesh,
|
||||
const labelList& blockedFace, // per face -1 or some index >= 0
|
||||
const wordList& zoneNamesInMesh,
|
||||
const labelList& faceToZone, // per face -1 or some index >= 0
|
||||
labelList& cellToZone
|
||||
) const;
|
||||
|
||||
@ -670,6 +681,7 @@ private:
|
||||
void findCellZoneTopo
|
||||
(
|
||||
const pointField& locationsInMesh,
|
||||
const labelList& allSurfaceIndex,
|
||||
const labelList& namedSurfaceIndex,
|
||||
const labelList& surfaceToCellZone,
|
||||
labelList& cellToZone
|
||||
@ -677,10 +689,23 @@ private:
|
||||
|
||||
void makeConsistentFaceIndex
|
||||
(
|
||||
const labelList& zoneToNamedSurface,
|
||||
const labelList& cellToZone,
|
||||
labelList& namedSurfaceIndex
|
||||
) const;
|
||||
|
||||
//- Calculate cellZone allocation
|
||||
void zonify
|
||||
(
|
||||
const bool allowFreeStandingZoneFaces,
|
||||
const pointField& locationsInMesh,
|
||||
const wordList& zonesInMesh,
|
||||
|
||||
labelList& cellToZone,
|
||||
labelList& namedSurfaceIndex,
|
||||
PackedBoolList& posOrientation
|
||||
) const;
|
||||
|
||||
//- Put cells into cellZone, faces into faceZone
|
||||
void zonify
|
||||
(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user