ENH: update List and DynamicList methods (issue #595)

- improve functional compatibility with DynList (remove methods)
  * eg, remove an element from any position in a DynamicList
  * reduce the number of template parameters
  * remove/subset regions of DynamicList

- propagate Swap template specializations for lists, hashtables

- move construct/assignment to various containers.

- add find/found methods for FixedList and UList for a more succinct
  (and clearer?) usage than the equivalent global findIndex() function.

- simplify List_FOR_ALL loops
This commit is contained in:
Mark Olesen
2017-09-20 17:20:54 +02:00
parent 68e7533847
commit 049617d037
74 changed files with 3205 additions and 1169 deletions

View File

@ -503,7 +503,7 @@ void Foam::searchableBox::findLineAll
info.setSize(start.size());
// Work array
DynamicList<pointIndexHit, 1, 1> hits;
DynamicList<pointIndexHit> hits;
// Tolerances:
// To find all intersections we add a small vector to the last intersection

View File

@ -301,7 +301,7 @@ void Foam::searchableRotatedBox::findLineAll
info.setSize(start.size());
// Work array
DynamicList<pointIndexHit, 1, 1> hits;
DynamicList<pointIndexHit> hits;
// Tolerances:
// To find all intersections we add a small vector to the last intersection

View File

@ -131,7 +131,7 @@ class triSurfaceMesh
const point& start,
const point& end,
const vector& smallVec,
DynamicList<pointIndexHit, 1, 1>& hits
DynamicList<pointIndexHit>& hits
);
//- Disallow default bitwise copy construct

View File

@ -33,7 +33,7 @@ License
bool Foam::triSurfaceSearch::checkUniqueHit
(
const pointIndexHit& currHit,
const DynamicList<pointIndexHit, 1, 1>& hits,
const UList<pointIndexHit>& hits,
const vector& lineVec
) const
{
@ -387,7 +387,7 @@ void Foam::triSurfaceSearch::findLineAll
indexedOctree<treeDataTriSurface>::perturbTol() = tolerance();
// Work array
DynamicList<pointIndexHit, 1, 1> hits;
DynamicList<pointIndexHit> hits;
DynamicList<label> shapeMask;

View File

@ -80,7 +80,7 @@ class triSurfaceSearch
bool checkUniqueHit
(
const pointIndexHit& currHit,
const DynamicList<pointIndexHit, 1, 1>& hits,
const UList<pointIndexHit>& hits,
const vector& lineVec
) const;