diff --git a/applications/test/CompactListList/CompactListListTest.C b/applications/test/CompactListList/CompactListListTest.C index bdc043814b..cd3270a169 100644 --- a/applications/test/CompactListList/CompactListListTest.C +++ b/applications/test/CompactListList/CompactListListTest.C @@ -34,6 +34,7 @@ Description #include "IOstreams.H" #include "OStringStream.H" #include "IStringStream.H" +#include "faceList.H" using namespace Foam; @@ -139,6 +140,18 @@ int main(int argc, char *argv[]) Info<< "cll5 = " << cll5 << endl; } + { + faceList fcs(2); + fcs[0] = face(labelList(1, 111)); + fcs[1] = face(labelList(2, 222)); + + CompactListList compactFcs(fcs); + Info<< "comactFcs:" << compactFcs << endl; + + faceList fcs2 = compactFcs(); + Info<< "fcs2:" << fcs2 << endl; + } + return 0; } diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C index 0ce02f7e81..e91b725624 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C @@ -28,8 +28,8 @@ License // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // -template -Foam::CompactListList::CompactListList(const List >& ll) +template +Foam::CompactListList::CompactListList(const List& ll) : size_(ll.size()), offsets_(ll.size()+1) @@ -47,7 +47,7 @@ Foam::CompactListList::CompactListList(const List >& ll) label k = 0; forAll(ll, i) { - const List& lli = ll[i]; + const Container& lli = ll[i]; forAll(lli, j) { @@ -57,8 +57,8 @@ Foam::CompactListList::CompactListList(const List >& ll) } -template -Foam::CompactListList::CompactListList +template +Foam::CompactListList::CompactListList ( const UList