diff --git a/applications/test/CompactListList/Make/files b/applications/test/CompactListList/Make/files index 7b7e043c6e..79a127a7be 100644 --- a/applications/test/CompactListList/Make/files +++ b/applications/test/CompactListList/Make/files @@ -1,3 +1,3 @@ -Test-CompactListList.C +Test-CompactListList.cxx EXE = $(FOAM_USER_APPBIN)/Test-CompactListList diff --git a/applications/test/CompactListList/Test-CompactListList.C b/applications/test/CompactListList/Test-CompactListList.cxx similarity index 90% rename from applications/test/CompactListList/Test-CompactListList.C rename to applications/test/CompactListList/Test-CompactListList.cxx index 45d45e0996..080adf25f3 100644 --- a/applications/test/CompactListList/Test-CompactListList.C +++ b/applications/test/CompactListList/Test-CompactListList.cxx @@ -38,6 +38,8 @@ Description #include "SpanStream.H" #include "faceList.H" +#include // for back_inserter + using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -161,6 +163,25 @@ int main(int argc, char *argv[]) faceList fcs2 = compactFcs.unpack(); Info<< "deserialized:" << fcs2 << endl; + // Unpack some faces + DynamicList extracted(compactFcs.size()); + + compactFcs.copy_unpack + ( + std::back_inserter(extracted), + 2, 2 + ); + + Info<< "copy_unpack 1: " << extracted << nl; + + compactFcs.copy_unpack + ( + std::back_inserter(extracted) + // labelRange(2, 1) + ); + + Info<< "copy_unpack 2: " << extracted << nl; + // From some faces IndirectList subfaces(fcs, labelList({2, 4, 1})); diff --git a/applications/test/globalIndex/Make/files b/applications/test/globalIndex/Make/files deleted file mode 100644 index ba9900cd82..0000000000 --- a/applications/test/globalIndex/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Test-globalIndex.C - -EXE = $(FOAM_USER_APPBIN)/Test-globalIndex diff --git a/applications/test/globalIndex/Make/options b/applications/test/globalIndex/Make/options deleted file mode 100644 index 90f18e878f..0000000000 --- a/applications/test/globalIndex/Make/options +++ /dev/null @@ -1 +0,0 @@ -EXE_INC = /* -DFULLDEBUG -g -O0 */ diff --git a/applications/test/globalIndex1/Make/files b/applications/test/globalIndex1/Make/files new file mode 100644 index 0000000000..109f344340 --- /dev/null +++ b/applications/test/globalIndex1/Make/files @@ -0,0 +1,3 @@ +Test-globalIndex1.cxx + +EXE = $(FOAM_USER_APPBIN)/Test-globalIndex1 diff --git a/applications/test/globalIndex1/Make/options b/applications/test/globalIndex1/Make/options new file mode 100644 index 0000000000..18e6fe47af --- /dev/null +++ b/applications/test/globalIndex1/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = */ +/* EXE_LIBS = */ diff --git a/applications/test/globalIndex/Test-globalIndex.C b/applications/test/globalIndex1/Test-globalIndex1.cxx similarity index 98% rename from applications/test/globalIndex/Test-globalIndex.C rename to applications/test/globalIndex1/Test-globalIndex1.cxx index a33bccc6d1..6fbc328707 100644 --- a/applications/test/globalIndex/Test-globalIndex.C +++ b/applications/test/globalIndex1/Test-globalIndex1.cxx @@ -25,7 +25,7 @@ License along with OpenFOAM. If not, see . Application - globalIndexTest + Test-globalIndex1 Description Simple tests for the globalIndex class. @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) #include "createPolyMesh.H" // Global numbering of cells (proc0 elements first, then proc1, etc.) - globalIndex globalNumbering(mesh.nCells()); + const globalIndex globalNumbering(mesh.nCells()); Pout<< "local-offset: " << globalIndex::calcOffset(mesh.nCells()) << nl; Pout<< "local-range: " << globalIndex::calcRange(mesh.nCells()) << nl; @@ -185,7 +185,7 @@ int main(int argc, char *argv[]) // Get a few cell indices - const label nTotalCells = globalNumbering.size(); + const label nTotalCells = globalNumbering.totalSize(); Random rndGen(UPstream::myProcNo()); DynamicList