diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/wallDistData.C index c7b9debba8..ebe0aa16ee 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistData.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDistData.C @@ -83,11 +83,11 @@ void Foam::wallDistData::correct() labelHashSet wallPatchIDs(getPatchIDs(wallPolyPatch::typeName)); // Collect pointers to data on patches - List*> patchData(mesh.boundaryMesh().size()); + UPtrList > patchData(mesh.boundaryMesh().size()); forAll(field_.boundaryField(), patchI) { - patchData[patchI] = &(field_.boundaryField()[patchI]); + patchData.set(patchI, &field_.boundaryField()[patchI]); } // Do mesh wave diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C index 4d196fb1e9..beb76631c5 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.C +++ b/src/meshTools/cellDist/patchWave/patchDataWave.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "patchDataWave.H" @@ -50,8 +48,7 @@ void Foam::patchDataWave::setChangedFaces { const polyPatch& patch = mesh.boundaryMesh()[patchI]; - const Field& patchField = - *initialPatchValuePtrs_[patchI]; + const Field& patchField = initialPatchValuePtrs_[patchI]; forAll(patch.faceCentres(), patchFaceI) { @@ -176,7 +173,7 @@ Foam::patchDataWave::patchDataWave ( const polyMesh& mesh, const labelHashSet& patchIDs, - const List*>& initialPatchValuePtrs, + const UPtrList >& initialPatchValuePtrs, const bool correctWalls ) : diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.H b/src/meshTools/cellDist/patchWave/patchDataWave.H index be7aae205f..241c378310 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.H +++ b/src/meshTools/cellDist/patchWave/patchDataWave.H @@ -45,7 +45,7 @@ SourceFiles #include "cellDistFuncs.H" #include "FieldField.H" - +#include "UPtrList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -78,7 +78,7 @@ private: labelHashSet patchIDs_; //- Reference to initial extra data at patch faces - const List*>& initialPatchValuePtrs_; + const UPtrList >& initialPatchValuePtrs_; //- Do accurate distance calculation for near-wall cells. bool correctWalls_; @@ -129,7 +129,7 @@ public: ( const polyMesh& mesh, const labelHashSet& patchIDs, - const List*>& initialPatchValuePtrs, + const UPtrList >& initialPatchValuePtrs, bool correctWalls = true );