Set default size for Dynamic List to avoid re-allocation of memory, 2.

This commit is contained in:
Dominik Christ 2015-08-07 18:15:00 +01:00
parent 958b3603cd
commit d44419f584

View file

@ -123,7 +123,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::findNeighbours3D
labelListList& result labelListList& result
) const ) const
{ {
List<DynamicList<label> > candidateMasterNeighbors(masterPatch_.size()); List<DynamicList<label, 8> > candidateMasterNeighbors(masterPatch_.size());
// First, compute the face center and the sphere radius (squared) // First, compute the face center and the sphere radius (squared)
// of the slave patch faces so we will not have to recompute this // of the slave patch faces so we will not have to recompute this
@ -276,7 +276,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::findNeighboursAABB
labelListList& result labelListList& result
) const ) const
{ {
List<DynamicList<label> > candidateMasterNeighbors(masterPatch_.size()); List<DynamicList<label, 8> > candidateMasterNeighbors(masterPatch_.size());
// Grab the master patch faces bounding boxes // Grab the master patch faces bounding boxes
List<boundBox> masterPatchBB(masterPatch_.size()); List<boundBox> masterPatchBB(masterPatch_.size());
@ -431,7 +431,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::findNeighboursBBOctree
labelListList& result labelListList& result
) const ) const
{ {
List<DynamicList<label> > candidateMasterNeighbors(masterPatch_.size()); List<DynamicList<label, 8> > candidateMasterNeighbors(masterPatch_.size());
// Initialize the list of master patch faces bounding box // Initialize the list of master patch faces bounding box
treeBoundBoxList lmasterFaceBB(masterPatch_.size()); treeBoundBoxList lmasterFaceBB(masterPatch_.size());