FaceCellWave: Removed unnecessary intermediate MeshWave class

This commit is contained in:
Will Bainbridge
2022-03-25 12:41:50 +00:00
parent 20ef804fa2
commit b2eff135e6
15 changed files with 108 additions and 405 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ Description
#include "cellClassification.H"
#include "cellSet.H"
#include "cellInfo.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
#include "edgeStats.H"
#include "treeDataTriSurface.H"
#include "indexedOctree.H"
@ -297,27 +297,27 @@ label selectOutsideCells
}
// Floodfill starting from outsideFaces (of type meshInfo)
MeshWave<cellInfo> regionCalc
List<cellInfo> faceInfoList(mesh.nFaces()), cellInfoList(mesh.nCells());
FaceCellWave<cellInfo> regionCalc
(
mesh,
outsideFaces.shrink(),
outsideFacesInfo.shrink(),
mesh.globalData().nTotalCells()+1 // max iterations
faceInfoList,
cellInfoList,
mesh.globalData().nTotalCells() + 1 // max iterations
);
// Now regionCalc should hold info on cells that are reachable from
// Now cellInfoList should hold info on cells that are reachable from
// changedFaces. Use these to subset cellType
const List<cellInfo>& allCellInfo = regionCalc.allCellInfo();
label nChanged = 0;
forAll(allCellInfo, celli)
forAll(cellInfoList, celli)
{
if (cellType[celli] == MESH)
{
// Original cell was selected for meshing. Check if cell was
// reached from outsidePoints
if (allCellInfo[celli].type() != MESH)
if (cellInfoList[celli].type() != MESH)
{
cellType[celli] = NONMESH;
nChanged++;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ License
#include "polyMesh.H"
#include "twoDPointCorrector.H"
#include "directionInfo.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
#include "OFstream.H"
#include "meshTools.H"
#include "hexMatcher.H"
@ -203,16 +203,17 @@ Foam::vectorField Foam::directions::propagateDirection
}
}
MeshWave<directionInfo> directionCalc
List<directionInfo> faceInfo(mesh.nFaces()), cellInfo(mesh.nCells());
FaceCellWave<directionInfo> directionCalc
(
mesh,
changedFaces,
changedFacesInfo,
mesh.globalData().nTotalCells()+1
faceInfo,
cellInfo,
mesh.globalData().nTotalCells() + 1
);
const List<directionInfo>& cellInfo = directionCalc.allCellInfo();
vectorField dirField(cellInfo.size());
label nUnset = 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,7 @@ License
#include "wallLayerCells.H"
#include "DynamicList.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
#include "wallNormalInfo.H"
#include "OFstream.H"
@ -137,23 +137,24 @@ Foam::wallLayerCells::wallLayerCells
// (cannot use local patchIDs since we might get info from neighbouring
// processor)
MeshWave<wallNormalInfo> regionCalc
List<wallNormalInfo> faceInfo(mesh.nFaces()), cellInfo(mesh.nCells());
FaceCellWave<wallNormalInfo> regionCalc
(
mesh,
changedFaces,
changedFacesInfo,
faceInfo,
cellInfo,
0
);
regionCalc.iterate(nLayers);
// Now regionCalc should hold info on faces that are reachable from
// Now faceInfo should hold info on faces that are reachable from
// changedFaces within nLayers iterations. We use face info since that is
// guaranteed to be consistent across processor boundaries.
const List<wallNormalInfo>& faceInfo = regionCalc.allFaceInfo();
if (debug)
{
InfoInFunction << "Dumping selected faces to selectedFaces.obj" << endl;
@ -204,8 +205,6 @@ Foam::wallLayerCells::wallLayerCells
DynamicList<refineCell> refineCells(3*nWalls);
const List<wallNormalInfo>& cellInfo = regionCalc.allCellInfo();
forAll(cellInfo, celli)
{
const wallNormalInfo& info = cellInfo[celli];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ License
#include "surfaceFields.H"
#include "HashSet.H"
#include "wallPoint.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -128,17 +128,17 @@ Foam::inverseFaceDistanceDiffusivity::operator()() const
faceDist.setSize(nPatchFaces);
changedFaces.setSize(nPatchFaces);
MeshWave<wallPoint> waveInfo
List<wallPoint> faceInfo(mesh().nFaces()), cellInfo(mesh().nCells());
FaceCellWave<wallPoint> waveInfo
(
mesh(),
changedFaces,
faceDist,
mesh().globalData().nTotalCells()+1 // max iterations
faceInfo,
cellInfo,
mesh().globalData().nTotalCells() + 1 // max iterations
);
const List<wallPoint>& faceInfo = waveInfo.allFaceInfo();
const List<wallPoint>& cellInfo = waveInfo.allCellInfo();
for (label facei=0; facei<mesh().nInternalFaces(); facei++)
{
const scalar dist = faceInfo[facei].distSqr();

View File

@ -85,12 +85,9 @@ $(patchWave)/patchPatchDist.C
$(patchWave)/patchEdgeFaceRegion.C
$(patchWave)/patchEdgeFaceRegions.C
meshWave = $(algorithms)/MeshWave
$(meshWave)/MeshWaveName.C
meshWave = $(algorithms)/FaceCellWave
$(meshWave)/FaceCellWaveName.C
regionSplit/regionSplit.C
regionSplit/localPointRegion.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -80,6 +80,19 @@ class FaceCellWave
{
protected:
// Protected static data
//- ...
static const scalar geomTol_;
//- ...
static scalar propagationTol_;
//- Used as default trackdata value to satisfy default template
// argument.
static int dummyTrackData_;
// Protected data
//- Reference to mesh
@ -109,7 +122,6 @@ protected:
// Cells that have changed
DynamicList<label> changedCells_;
//- Contains cyclics
const bool hasCyclicPatches_;
@ -119,11 +131,15 @@ protected:
//- Number of evaluations
label nEvals_;
//- Number of unvisited cells/faces
//- Number of unvisited cells
label nUnvisitedCells_;
//- Number of unvisited faces
label nUnvisitedFaces_;
// Protected member functions
//- Updates cellInfo with information from neighbour. Updates all
// statistics.
bool updateCell
@ -242,16 +258,6 @@ protected:
void handleExplicitConnections();
// Protected static data
static const scalar geomTol_;
static scalar propagationTol_;
//- Used as default trackdata value to satisfy default template
// argument.
static int dummyTrackData_;
public:
// Static Functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "MeshWave.H"
#include "polyMesh.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class Type, class TrackingData>
int Foam::MeshWave<Type, TrackingData>::dummyTrackData_ = 12345;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Iterate, propagating changedFacesInfo across mesh, until no change (or
// maxIter reached).
template<class Type, class TrackingData>
Foam::MeshWave<Type, TrackingData>::MeshWave
(
const polyMesh& mesh,
const labelList& changedFaces,
const List<Type>& changedFacesInfo,
const label maxIter,
TrackingData& td
)
:
allFaceInfo_(mesh.nFaces()),
allCellInfo_(mesh.nCells()),
calc_
(
mesh,
changedFaces,
changedFacesInfo,
allFaceInfo_,
allCellInfo_,
maxIter,
td
)
{}
// Iterate, propagating changedFacesInfo across mesh, until no change (or
// maxIter reached). Initial cell values specified.
template<class Type, class TrackingData>
Foam::MeshWave<Type, TrackingData>::MeshWave
(
const polyMesh& mesh,
const labelList& changedFaces,
const List<Type>& changedFacesInfo,
const List<Type>& allCellInfo,
const label maxIter,
TrackingData& td
)
:
allFaceInfo_(mesh.nFaces()),
allCellInfo_(allCellInfo),
calc_
(
mesh,
changedFaces,
changedFacesInfo,
allFaceInfo_,
allCellInfo_,
maxIter,
td
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -1,186 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::MeshWave
Description
FaceCellWave plus data
SourceFiles
MeshWave.C
\*---------------------------------------------------------------------------*/
#ifndef MeshWave_H
#define MeshWave_H
#include "FaceCellWave.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class MeshWaveName Declaration
\*---------------------------------------------------------------------------*/
TemplateName(MeshWave);
/*---------------------------------------------------------------------------*\
Class MeshWave Declaration
\*---------------------------------------------------------------------------*/
template<class Type, class TrackingData = int>
class MeshWave
:
public MeshWaveName
{
// Private Data
//- Wall information for all faces
List<Type> allFaceInfo_;
//- Wall information for all cells
List<Type> allCellInfo_;
//- Wave calculation engine.
FaceCellWave<Type, TrackingData> calc_;
// Private static data
//- Used as default trackdata value to satisfy default template
// argument.
static int dummyTrackData_;
public:
// Constructors
//- Construct from mesh and list of changed faces with the Type
// for these faces. Iterates until nothing changes or maxIter reached.
// (maxIter can be 0)
MeshWave
(
const polyMesh& mesh,
const labelList& initialChangedFaces,
const List<Type>& changedFacesInfo,
const label maxIter,
TrackingData& td = dummyTrackData_
);
//- Construct from mesh, list of changed faces with the Type
// for these faces and initial field.
// Iterates until nothing changes or maxIter reached.
// (maxIter can be 0)
MeshWave
(
const polyMesh& mesh,
const labelList& initialChangedFaces,
const List<Type>& changedFacesInfo,
const List<Type>& allCellInfo,
const label maxIter,
TrackingData& td = dummyTrackData_
);
//- Disallow default bitwise copy construction
MeshWave(const MeshWave&) = delete;
// Member Functions
//- Get allFaceInfo
const List<Type>& allFaceInfo() const
{
return allFaceInfo_;
}
//- Get allCellInfo
const List<Type>& allCellInfo() const
{
return allCellInfo_;
}
//- Additional data to be passed into container
const TrackingData& data() const
{
return calc_.data();
}
//- Additional data to be passed into container
TrackingData& data()
{
return calc_.data();
}
//- Iterate until no changes or maxIter reached. Returns actual
// number of iterations.
label iterate(const label maxIter)
{
return calc_.iterate(maxIter);
}
//- Get number of unvisited cells, i.e. cells that were not (yet)
// reached from walking across mesh. This can happen from
// - not enough iterations done
// - a disconnected mesh
// - a mesh without walls in it
label getUnsetCells() const
{
return calc_.getUnsetCells();
}
//- Get number of unvisited faces
label getUnsetFaces() const
{
return calc_.getUnsetFaces();
}
// Member Operators
//- Disallow default bitwise assignment
void operator=(const MeshWave&) = delete;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "MeshWave.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,36 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "MeshWave.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(MeshWaveName, 0);
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ License
#include "meshSearch.H"
#include "cellInfo.H"
#include "polyMesh.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
#include "ListOps.H"
#include "meshTools.H"
#include "cpuTime.H"
@ -320,21 +320,20 @@ void Foam::cellClassification::markCells
cellInfo(cellClassification::OUTSIDE)
);
MeshWave<cellInfo> cellInfoCalc
List<cellInfo> faceInfoList(mesh().nFaces());
FaceCellWave<cellInfo> cellInfoCalc
(
mesh_,
changedFaces, // Labels of changed faces
changedFacesInfo, // Information on changed faces
cellInfoList, // Information on all cells
mesh_.globalData().nTotalCells()+1 // max iterations
changedFaces, // Labels of changed faces
changedFacesInfo, // Information on changed faces
faceInfoList,
cellInfoList, // Information on all cells
mesh_.globalData().nTotalCells() + 1 // max iterations
);
// Get information out of cellInfoList
const List<cellInfo>& allInfo = cellInfoCalc.allCellInfo();
forAll(allInfo, celli)
forAll(cellInfoList, celli)
{
label t = allInfo[celli].type();
label t = cellInfoList[celli].type();
if (t == cellClassification::NOTSET)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,7 +160,7 @@ private:
//- Mark all faces intersected by or intersecting surface
boolList markFaces(const triSurfaceSearch&) const;
//- Divide cells into cut/inside/outside by using MeshWave from cut
//- Divide cells into cut/inside/outside by using FaceCellWave from cut
// faces. No check is done on whether outsidePts are in different
// domains.
void markCells

View File

@ -25,8 +25,8 @@ Class
Foam::patchDistWave
Description
Takes a set of patches to start MeshWave from and computed the distance at
patches and possibly additional transported data.
Takes a set of patches to start FaceCellWave from and computed the distance
at patches and possibly additional transported data.
SourceFiles
patchDistWave.C
@ -39,7 +39,7 @@ SourceFiles
#include "Field.H"
#include "FieldField.H"
#include "UPtrList.H"
#include "MeshWave.H"
#include "FaceCellWave.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,18 +66,18 @@ void setChangedFaces
const InitialPatchData& ... initialPatchData
);
//- Copy MeshWave values into the cell fields
//- Copy FaceCellWave values into the cell fields
template<class PatchPointType, class DataType, class DataMethod>
label getCellValues
(
const polyMesh& mesh,
MeshWave<PatchPointType>& waveInfo,
FaceCellWave<PatchPointType>& waveInfo,
Field<DataType>& cellValues,
DataMethod method,
const DataType& stabiliseValue = pTraits<DataType>::zero
);
//- Copy MeshWave values into the patch field-fields
//- Copy FaceCellWave values into the patch field-fields
template
<
class PatchPointType,
@ -88,7 +88,7 @@ template
label getPatchValues
(
const polyMesh& mesh,
MeshWave<PatchPointType>& wave,
FaceCellWave<PatchPointType>& wave,
FieldField<PatchField, DataType>& patchValues,
DataMethod method,
const DataType& stabiliseValue = pTraits<DataType>::zero

View File

@ -34,7 +34,7 @@ void Foam::patchDistWave::setChangedFaces
const polyMesh& mesh,
const labelHashSet& patchIDs,
labelList& changedFaces,
List<PatchPointType>& faceDist,
List<PatchPointType>& changedFacesInfo,
const InitialPatchData& ... initialPatchData
)
{
@ -45,7 +45,7 @@ void Foam::patchDistWave::setChangedFaces
}
changedFaces.resize(nChangedFaces);
faceDist.resize(nChangedFaces);
changedFacesInfo.resize(nChangedFaces);
label changedFacei = 0;
@ -61,7 +61,7 @@ void Foam::patchDistWave::setChangedFaces
changedFaces[changedFacei] = meshFacei;
faceDist[changedFacei] =
changedFacesInfo[changedFacei] =
PatchPointType
(
patch.faceCentres()[patchFacei],
@ -79,7 +79,7 @@ template<class PatchPointType, class DataType, class DataMethod>
Foam::label Foam::patchDistWave::getCellValues
(
const polyMesh& mesh,
MeshWave<PatchPointType>& waveInfo,
FaceCellWave<PatchPointType>& waveInfo,
Field<DataType>& cellValues,
DataMethod method,
const DataType& stabiliseValue
@ -112,7 +112,7 @@ template
Foam::label Foam::patchDistWave::getPatchValues
(
const polyMesh& mesh,
MeshWave<PatchPointType>& waveInfo,
FaceCellWave<PatchPointType>& waveInfo,
FieldField<PatchField, DataType>& patchValues,
DataMethod method,
const DataType& stabiliseValue
@ -151,17 +151,26 @@ Foam::label Foam::patchDistWave::wave
const bool correct
)
{
// Initialise to faceDist information to face centre on patches
List<PatchPointType> faceDist;
// Initialise to changedFacesInfo information to face centre on patches
List<PatchPointType> changedFacesInfo;
labelList changedFaces;
setChangedFaces(mesh, patchIDs, changedFaces, faceDist);
setChangedFaces
(
mesh,
patchIDs,
changedFaces,
changedFacesInfo
);
// Do calculate patch distance by 'growing' from faces.
MeshWave<PatchPointType> wave
List<PatchPointType> faceInfo(mesh.nFaces()), cellInfo(mesh.nCells());
FaceCellWave<PatchPointType> wave
(
mesh,
changedFaces,
faceDist,
changedFacesInfo,
faceInfo,
cellInfo,
mesh.globalData().nTotalCells() + 1 // max iterations
);
@ -174,7 +183,7 @@ Foam::label Foam::patchDistWave::wave
// Correct patch cells for true distance
if (correct)
{
Map<label> nearestFace(2*faceDist.size());
Map<label> nearestFace(2*changedFacesInfo.size());
patchDistFuncs::correctBoundaryFaceCells
(
mesh,
@ -209,17 +218,27 @@ Foam::label Foam::patchDistWave::wave
const bool correct
)
{
// Initialise to faceDist information to face centre on patches
List<PatchPointType> faceDist;
// Initialise to changedFacesInfo information to face centre on patches
List<PatchPointType> changedFacesInfo;
labelList changedFaces;
setChangedFaces(mesh, patchIDs, changedFaces, faceDist, initialPatchData);
setChangedFaces
(
mesh,
patchIDs,
changedFaces,
changedFacesInfo,
initialPatchData
);
// Do calculate patch distance by 'growing' from faces.
MeshWave<PatchPointType> wave
List<PatchPointType> faceInfo(mesh.nFaces()), cellInfo(mesh.nCells());
FaceCellWave<PatchPointType> wave
(
mesh,
changedFaces,
faceDist,
changedFacesInfo,
faceInfo,
cellInfo,
mesh.globalData().nTotalCells() + 1 // max iterations
);
@ -240,7 +259,7 @@ Foam::label Foam::patchDistWave::wave
// Correct patch cells for true distance
if (correct)
{
Map<label> nearestFace(2*faceDist.size());
Map<label> nearestFace(2*changedFacesInfo.size());
patchDistFuncs::correctBoundaryFaceCells
(
mesh,