From 68e7533847dde7514df4cd8dcb444ec32dc380d6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 20 Sep 2017 17:01:56 +0200 Subject: [PATCH 1/4] STYLE: include in stdFoam, formatting of list loop macros --- .../containers/Lists/FixedList/FixedList.C | 6 +- src/OpenFOAM/containers/Lists/List/List.C | 18 ++++-- .../containers/Lists/List/ListLoopM.H | 12 +--- src/OpenFOAM/containers/Lists/UList/UList.C | 12 ++-- src/OpenFOAM/fields/Fields/Field/FieldM.H | 58 ++++++++++++------- src/OpenFOAM/include/stdFoam.H | 24 ++++---- 6 files changed, 78 insertions(+), 52 deletions(-) diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.C b/src/OpenFOAM/containers/Lists/FixedList/FixedList.C index 03c3d16768..19163402da 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.C +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.C @@ -35,10 +35,11 @@ void Foam::FixedList::swap(FixedList& a) List_ACCESS(T, a, ap); T tmp; List_FOR_ALL((*this), i) + { tmp = List_CELEM((*this), vp, i); List_ELEM((*this), vp, i) = List_CELEM(a, ap, i); List_ELEM(a, ap, i) = tmp; - List_END_FOR_ALL + } } @@ -53,9 +54,10 @@ bool Foam::FixedList::operator==(const FixedList& a) const List_CONST_ACCESS(T, (a), ap); List_FOR_ALL((*this), i) + { equal = (List_ELEM((*this), vp, i) == List_ELEM((a), ap, i)); if (!equal) break; - List_END_FOR_ALL + } return equal; } diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index ab8aea673f..04f731f211 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -69,8 +69,9 @@ Foam::List::List(const label s, const T& a) { List_ACCESS(T, (*this), vp); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = a; - List_END_FOR_ALL + } } } @@ -93,8 +94,9 @@ Foam::List::List(const label s, const zero) { List_ACCESS(T, (*this), vp); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = Zero; - List_END_FOR_ALL + } } } @@ -119,8 +121,9 @@ Foam::List::List(const List& a) List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = List_ELEM(a, ap, i); - List_END_FOR_ALL + } } } } @@ -139,8 +142,9 @@ Foam::List::List(const List& a) List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T2, a, ap); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = T(List_ELEM(a, ap, i)); - List_END_FOR_ALL + } } } @@ -178,8 +182,9 @@ Foam::List::List(List& a, bool reuse) List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = List_ELEM(a, ap, i); - List_END_FOR_ALL + } } } } @@ -390,8 +395,9 @@ void Foam::List::operator=(const UList& a) List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = List_ELEM(a, ap, i); - List_END_FOR_ALL + } } } } diff --git a/src/OpenFOAM/containers/Lists/List/ListLoopM.H b/src/OpenFOAM/containers/Lists/List/ListLoopM.H index 032edb3052..5f74321bc6 100644 --- a/src/OpenFOAM/containers/Lists/List/ListLoopM.H +++ b/src/OpenFOAM/containers/Lists/List/ListLoopM.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,10 +37,7 @@ Description #define List_FOR_ALL(f, i) \ const label _n##i = (f).size(); \ - for (label i=0; i<_n##i; ++i) \ - { - -#define List_END_FOR_ALL } + for (label i=0; i<_n##i; ++i) // Provide current element #define List_CELEM(f, fp, i) (fp[i]) @@ -60,10 +57,7 @@ Description #define List_FOR_ALL(f, i) \ label i = (f).size(); \ - while (i--) \ - { \ - -#define List_END_FOR_ALL } + while (i--) // Provide current element without incrementing pointer #define List_CELEM(f, fp, i) (*fp) diff --git a/src/OpenFOAM/containers/Lists/UList/UList.C b/src/OpenFOAM/containers/Lists/UList/UList.C index f479698744..599dd0f998 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.C +++ b/src/OpenFOAM/containers/Lists/UList/UList.C @@ -95,8 +95,9 @@ void Foam::UList::deepCopy(const UList& a) List_ACCESS(T, (*this), vp); List_CONST_ACCESS(T, a, ap); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = List_ELEM(a, ap, i); - List_END_FOR_ALL + } } } } @@ -152,8 +153,9 @@ void Foam::UList::operator=(const T& t) { List_ACCESS(T, (*this), vp); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = t; - List_END_FOR_ALL + } } @@ -162,8 +164,9 @@ void Foam::UList::operator=(const zero) { List_ACCESS(T, (*this), vp); List_FOR_ALL((*this), i) + { List_ELEM((*this), vp, i) = Zero; - List_END_FOR_ALL + } } @@ -244,9 +247,10 @@ bool Foam::UList::operator==(const UList& a) const List_CONST_ACCESS(T, (a), ap); List_FOR_ALL((*this), i) + { equal = (List_ELEM((*this), vp, i) == List_ELEM((a), ap, i)); if (!equal) break; - List_END_FOR_ALL + } return equal; } diff --git a/src/OpenFOAM/fields/Fields/Field/FieldM.H b/src/OpenFOAM/fields/Fields/Field/FieldM.H index 28d4788c17..46be4b350d 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldM.H +++ b/src/OpenFOAM/fields/Fields/Field/FieldM.H @@ -120,8 +120,9 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i)); \ - List_END_FOR_ALL \ + } #define TFOR_ALL_F_OP_F_FUNC(typeF1, f1, OP, typeF2, f2, FUNC) \ @@ -135,13 +136,14 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i).FUNC(); \ - List_END_FOR_ALL \ + } // member function : this field f1 OP fUNC f2, f3 -#define TFOR_ALL_F_OP_FUNC_F_F(typeF1, f1, OP, FUNC, typeF2, f2, typeF3, f3)\ +#define TFOR_ALL_F_OP_FUNC_F_F(typeF1, f1, OP, FUNC, typeF2, f2, typeF3, f3) \ \ /* check the three fields have same Field mesh */ \ checkFields(f1, f2, f3, "f1 " #OP " " #FUNC "(f2, f3)"); \ @@ -153,9 +155,10 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) \ OP FUNC(List_ELEM(f2, f2P, i), List_ELEM(f3, f3P, i)); \ - List_END_FOR_ALL \ + } // member function : this field f1 OP fUNC f2, f3 @@ -171,8 +174,9 @@ void checkFields \ /* loop through fields performing s OP FUNC(f1, f2) */ \ List_FOR_ALL(f1, i) \ + { \ (s) OP FUNC(List_ELEM(f1, f1P, i), List_ELEM(f2, f2P, i)); \ - List_END_FOR_ALL \ + } // member function : this f1 OP fUNC f2, s @@ -188,8 +192,9 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i), (s)); \ - List_END_FOR_ALL + } // member function : s1 OP fUNC f, s2 @@ -201,8 +206,9 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f, i) \ + { \ (s1) OP FUNC(List_ELEM(f, fP, i), (s2)); \ - List_END_FOR_ALL \ + } // member function : this f1 OP fUNC s, f2 @@ -218,21 +224,23 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP FUNC((s), List_ELEM(f2, f2P, i)); \ - List_END_FOR_ALL \ + } // member function : this f1 OP fUNC s, f2 -#define TFOR_ALL_F_OP_FUNC_S_S(typeF1, f1, OP, FUNC, typeS1, s1, typeS2, s2)\ +#define TFOR_ALL_F_OP_FUNC_S_S(typeF1, f1, OP, FUNC, typeS1, s1, typeS2, s2) \ \ /* set access to f1 at end of field */ \ List_ACCESS(typeF1, f1, f1P); \ \ /* loop through fields performing f1 OP1 FUNC(s1, s2) */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP FUNC((s1), (s2)); \ - List_END_FOR_ALL \ + } // member function : this f1 OP1 f2 OP2 FUNC s @@ -248,8 +256,9 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i) FUNC((s)); \ - List_END_FOR_ALL \ + } // define high performance macro functions for Field operations @@ -268,9 +277,10 @@ void checkFields \ /* loop through fields performing f1 OP1 f2 OP2 f3 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i) \ OP2 List_ELEM(f3, f3P, i); \ - List_END_FOR_ALL \ + } // member operator : this field f1 OP1 s OP2 f2 @@ -286,8 +296,9 @@ void checkFields \ /* loop through fields performing f1 OP1 s OP2 f2 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP1 (s) OP2 List_ELEM(f2, f2P, i); \ - List_END_FOR_ALL \ + } // member operator : this field f1 OP1 f2 OP2 s @@ -303,8 +314,9 @@ void checkFields \ /* loop through fields performing f1 OP1 s OP2 f2 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i) OP2 (s); \ - List_END_FOR_ALL \ + } // member operator : this field f1 OP f2 @@ -321,8 +333,9 @@ void checkFields \ /* loop through fields performing f1 OP f2 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i); \ - List_END_FOR_ALL \ + } // member operator : this field f1 OP1 OP2 f2 @@ -338,8 +351,9 @@ void checkFields \ /* loop through fields performing f1 OP1 OP2 f2 */ \ List_FOR_ALL(f1, i) \ + { \ List_ELEM(f1, f1P, i) OP1 OP2 List_ELEM(f2, f2P, i); \ - List_END_FOR_ALL \ + } // member operator : this field f OP s @@ -351,8 +365,9 @@ void checkFields \ /* loop through field performing f OP s */ \ List_FOR_ALL(f, i) \ + { \ List_ELEM(f, fP, i) OP (s); \ - List_END_FOR_ALL \ + } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -367,8 +382,9 @@ void checkFields \ /* loop through field performing s OP f */ \ List_FOR_ALL(f, i) \ + { \ (s) OP List_ELEM(f, fP, i); \ - List_END_FOR_ALL + } // friend operator function : s OP1 f1 OP2 f2, allocates storage for s @@ -381,8 +397,9 @@ void checkFields \ /* loop through field performing s OP f */ \ List_FOR_ALL(f1, i) \ + { \ (s) OP1 List_ELEM(f1, f1P, i) OP2 List_ELEM(f2, f2P, i); \ - List_END_FOR_ALL + } // friend operator function : s OP FUNC(f), allocates storage for s @@ -394,8 +411,9 @@ void checkFields \ /* loop through field performing s OP f */ \ List_FOR_ALL(f, i) \ + { \ (s) OP FUNC(List_ELEM(f, fP, i)); \ - List_END_FOR_ALL + } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/include/stdFoam.H b/src/OpenFOAM/include/stdFoam.H index 59b0d9f704..3141c38351 100644 --- a/src/OpenFOAM/include/stdFoam.H +++ b/src/OpenFOAM/include/stdFoam.H @@ -25,12 +25,13 @@ Namespace stdFoam Description - Includes some global templates and macros used by OpenFOAM. + Some global templates and macros used by OpenFOAM and some standard + C++ headers. - Some of the templates are defined here correspond to useful + Some of the templates defined here correspond to useful std templates that are part of future C++ standards, or that are in a state of change. Defining them here provides some additional - control over which definition are used within the OpenFOAM code-base. + control over which definitions are used within the OpenFOAM code-base. SeeAlso - http://en.cppreference.com/w/cpp/iterator/end @@ -42,6 +43,7 @@ SeeAlso #define StdFoam_H #include +#include // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -114,12 +116,12 @@ constexpr auto cend(const C& c) -> decltype(c.end()) // } // \endcode // \sa forAllConstIters, forAllIter, forAllConstIters -#define forAllIters(container,it) \ +#define forAllIters(container,iter) \ for \ ( \ - auto it = stdFoam::begin(container); \ - it != stdFoam::end(container); \ - ++it \ + auto iter = stdFoam::begin(container); \ + iter != stdFoam::end(container); \ + ++iter \ ) @@ -132,12 +134,12 @@ constexpr auto cend(const C& c) -> decltype(c.end()) // } // \endcode // \sa forAllIters, forAllIter, forAllConstIter -#define forAllConstIters(container,cit) \ +#define forAllConstIters(container,iter) \ for \ ( \ - auto cit = stdFoam::cbegin(container); \ - cit != stdFoam::cend(container); \ - ++cit \ + auto iter = stdFoam::cbegin(container); \ + iter != stdFoam::cend(container); \ + ++iter \ ) From 049617d037d963533d554a1efc9e110f70e05589 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 20 Sep 2017 17:20:54 +0200 Subject: [PATCH 2/4] 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 --- .../test/DynamicList/Test-DynamicList.C | 109 ++- applications/test/Field/Make/files | 3 - applications/test/Field/Make/options | 2 - applications/test/Field/Test-Field.C | 11 - applications/test/Field/Test-Field.H | 58 -- applications/test/FixedList/Test-FixedList.C | 65 +- applications/test/FixedList/fixedListFile | Bin 30 -> 0 bytes applications/test/FixedList2/Make/files | 3 + applications/test/FixedList2/Make/options | 0 .../test/FixedList2/Test-FixedList2.C | 190 ++++++ applications/test/Function1/Test-Function1.C | 7 +- applications/test/HashSet/Test-hashSet.C | 25 + applications/test/HashTable/Test-hashTable.C | 28 + .../test/IndirectList/Test-IndirectList.C | 56 +- applications/test/List/Test-List.C | 24 +- applications/test/List2/Make/files | 3 + applications/test/List2/Make/options | 0 applications/test/List2/Test-List2.C | 269 ++++++++ applications/test/ListOps2/Make/files | 2 + applications/test/ListOps2/Make/options | 3 + applications/test/ListOps2/Test-ListOps2.C | 144 ++++ applications/test/Map/Test-Map.C | 58 +- .../test/UIndirectList/Test-UIndirectList.C | 87 ++- applications/test/sort/Test-sortList.C | 169 +++-- .../ideasUnvToFoam/ideasUnvToFoam.C | 3 +- .../containers/HashTables/HashSet/HashSet.C | 11 +- .../containers/HashTables/HashSet/HashSet.H | 35 +- .../HashTables/HashTable/HashTable.C | 39 ++ .../HashTables/HashTable/HashTable.H | 20 + .../HashTables/HashTable/HashTableI.H | 13 + src/OpenFOAM/containers/HashTables/Map/Map.H | 31 +- .../Lists/BiIndirectList/BiIndirectList.H | 20 +- .../Lists/BiIndirectList/BiIndirectListI.H | 38 +- .../Lists/DynamicList/DynamicList.C | 76 ++- .../Lists/DynamicList/DynamicList.H | 231 +++++-- .../Lists/DynamicList/DynamicListI.H | 645 +++++++++++++----- .../containers/Lists/FixedList/FixedList.C | 94 ++- .../containers/Lists/FixedList/FixedList.H | 91 ++- .../containers/Lists/FixedList/FixedListI.H | 115 +++- .../Lists/IndirectList/IndirectList.H | 60 +- .../Lists/IndirectList/IndirectListI.H | 1 - src/OpenFOAM/containers/Lists/List/List.C | 168 +++-- src/OpenFOAM/containers/Lists/List/List.H | 59 +- src/OpenFOAM/containers/Lists/List/ListI.H | 14 +- .../containers/Lists/List/ListLoopM.H | 49 +- .../Lists/ListOps/ListOpsTemplates.C | 2 +- .../Lists/SortableList/SortableList.C | 107 ++- .../Lists/SortableList/SortableList.H | 48 +- .../Lists/UIndirectList/UIndirectList.C | 87 +++ .../Lists/UIndirectList/UIndirectList.H | 81 ++- .../Lists/UIndirectList/UIndirectListI.H | 11 + .../Lists/UIndirectList/UIndirectListIO.C | 4 +- src/OpenFOAM/containers/Lists/UList/UList.C | 135 +++- src/OpenFOAM/containers/Lists/UList/UList.H | 75 +- src/OpenFOAM/containers/Lists/UList/UListI.H | 59 +- .../fields/Fields/DynamicField/DynamicField.C | 24 +- .../fields/Fields/DynamicField/DynamicField.H | 56 +- .../Fields/DynamicField/DynamicFieldI.H | 282 ++++---- src/OpenFOAM/fields/Fields/Field/FieldM.H | 179 +++-- src/OpenFOAM/meshes/meshShapes/face/face.H | 7 +- src/OpenFOAM/meshes/meshShapes/face/faceI.H | 4 +- .../meshes/meshShapes/face/faceTemplates.C | 4 +- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 6 +- .../primitiveMesh/primitiveMeshCellEdges.C | 6 +- src/OpenFOAM/primitives/Swap/Swap.H | 44 +- .../enrichedPatch/enrichedPatchPointPoints.C | 6 +- .../searchableBox/searchableBox.C | 2 +- .../searchableRotatedBox.C | 2 +- .../triSurfaceMesh/triSurfaceMesh.H | 2 +- .../triSurfaceSearch/triSurfaceSearch.C | 4 +- .../triSurfaceSearch/triSurfaceSearch.H | 2 +- wmake/rules/linux64GccKNL/c | 2 +- wmake/rules/linux64GccKNL/c++ | 2 +- wmake/rules/linux64IccKNL/c++ | 2 +- 74 files changed, 3205 insertions(+), 1169 deletions(-) delete mode 100644 applications/test/Field/Make/files delete mode 100644 applications/test/Field/Make/options delete mode 100644 applications/test/Field/Test-Field.C delete mode 100644 applications/test/Field/Test-Field.H delete mode 100644 applications/test/FixedList/fixedListFile create mode 100644 applications/test/FixedList2/Make/files create mode 100644 applications/test/FixedList2/Make/options create mode 100644 applications/test/FixedList2/Test-FixedList2.C create mode 100644 applications/test/List2/Make/files create mode 100644 applications/test/List2/Make/options create mode 100644 applications/test/List2/Test-List2.C create mode 100644 applications/test/ListOps2/Make/files create mode 100644 applications/test/ListOps2/Make/options create mode 100644 applications/test/ListOps2/Test-ListOps2.C create mode 100644 src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.C diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C index c8e2ed4a93..ca3f4fc787 100644 --- a/applications/test/DynamicList/Test-DynamicList.C +++ b/applications/test/DynamicList/Test-DynamicList.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,10 @@ Description #include "DynamicList.H" #include "IOstreams.H" +#include "FlatOutput.H" #include "ListOps.H" +#include "labelRange.H" +#include "labelIndList.H" using namespace Foam; @@ -44,15 +47,15 @@ void printInfo { Info<< " size=\"" << lst.size() << "\""; } - Info<< ">" << lst << "" << endl; + Info<< ">" << nl << flatOutput(lst) << nl << "" << endl; } -template +template void printInfo ( const word& tag, - const DynamicList& lst, + const DynamicList& lst, const bool showSize = false ) { @@ -62,7 +65,7 @@ void printInfo Info<< " size=\"" << lst.size() << "\" capacity=\"" << lst.capacity() << "\""; } - Info<< ">" << lst << "" << endl; + Info<< ">" << nl << flatOutput(lst) << nl << "" << endl; } @@ -71,7 +74,7 @@ void printInfo int main(int argc, char *argv[]) { - List> ldl(2); + List> ldl(2); ldl[0](0) = 0; ldl[0](2) = 2; @@ -89,7 +92,7 @@ int main(int argc, char *argv[]) ldl[1] = 3; - Info<< "" << ldl << "" << nl << "sizes: "; + Info<< "" << flatOutput(ldl) << "" << nl << "sizes: "; forAll(ldl, i) { Info<< " " << ldl[i].size() << "/" << ldl[i].capacity(); @@ -100,7 +103,7 @@ int main(int argc, char *argv[]) ll[0].transfer(ldl[0]); ll[1].transfer(ldl[1].shrink()); - Info<< "" << ldl << "" << nl << "sizes: "; + Info<< "" << flatOutput(ldl) << "" << nl << "sizes: "; forAll(ldl, i) { Info<< " " << ldl[i].size() << "/" << ldl[i].capacity(); @@ -111,18 +114,18 @@ int main(int argc, char *argv[]) // test the transfer between DynamicLists - DynamicList dlA + DynamicList