Skip to content
Snippets Groups Projects
Commit 8567ef59 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: remove unneed DynamicList::reserve() call

- DynamicList now has SizeMin=16, which eliminates the need for reserve()
  in some cases

- remove unused enrichedPatch static variable
parent c70d7237
Branches
Tags
No related merge requests found
...@@ -176,9 +176,6 @@ class enrichedPatch ...@@ -176,9 +176,6 @@ class enrichedPatch
//- Estimated ratio of original-to-enriched face size //- Estimated ratio of original-to-enriched face size
static const label enrichedFaceRatio_; static const label enrichedFaceRatio_;
//- Estimated number of master face hits by slave points
static const label nFaceHits_;
//- Size of face on which the check is forced //- Size of face on which the check is forced
static const label maxFaceSizeDebug_; static const label maxFaceSizeDebug_;
......
...@@ -28,11 +28,6 @@ License ...@@ -28,11 +28,6 @@ License
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "DynamicList.H" #include "DynamicList.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::label Foam::enrichedPatch::nFaceHits_ = 4;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::enrichedPatch::calcMasterPointFaces() const void Foam::enrichedPatch::calcMasterPointFaces() const
...@@ -63,11 +58,8 @@ void Foam::enrichedPatch::calcMasterPointFaces() const ...@@ -63,11 +58,8 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
for (const label pointi : curFace) for (const label pointi : curFace)
{ {
DynamicList<label>& dynLst = mpf(pointi); // Get or create // Existing or auto-vivify DynamicList
mpf(pointi).append(facei);
dynLst.reserve(primitiveMesh::facesPerPoint_); // Min size for list
dynLst.append(facei);
} }
} }
...@@ -86,11 +78,8 @@ void Foam::enrichedPatch::calcMasterPointFaces() const ...@@ -86,11 +78,8 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
// Index of projected point corresponding to this slave point // Index of projected point corresponding to this slave point
const label mergedPointi = pointMergeMap()[slaveMeshPoints[pointi]]; const label mergedPointi = pointMergeMap()[slaveMeshPoints[pointi]];
DynamicList<label>& dynLst = mpf(mergedPointi); // Get or create // Existing or auto-vivify DynamicList
mpf(mergedPointi).append(slavePointFaceHits_[pointi].hitObject());
dynLst.reserve(primitiveMesh::facesPerPoint_); // Min size for list
dynLst.append(slavePointFaceHits_[pointi].hitObject());
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment