diff --git a/applications/test/contiguous/Test-contiguous.C b/applications/test/contiguous/Test-contiguous.C index 9840caedf0..22480baea0 100644 --- a/applications/test/contiguous/Test-contiguous.C +++ b/applications/test/contiguous/Test-contiguous.C @@ -104,6 +104,8 @@ int main(int argc, char *argv[]) printInfo>(); printInfo>(); + printInfo>(); + printInfo, 2>>(); printInfo(); diff --git a/applications/test/gatherValues1/Test-gatherValues1.C b/applications/test/gatherValues1/Test-gatherValues1.C index 183fcd517e..7fdbf92bf3 100644 --- a/applications/test/gatherValues1/Test-gatherValues1.C +++ b/applications/test/gatherValues1/Test-gatherValues1.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2021 OpenCFD Ltd. + Copyright (C) 2021-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -180,6 +180,36 @@ int main(int argc, char *argv[]) } } + // This will likely fail - not declared as is_contiguous + // Cannot even catch since it triggers an abort() + + #if 0 + { + std::pair sendData(Pstream::myProcNo(), vector::one); + + const bool oldThrowingError = FatalError.throwing(true); + + try + { + List> countValues + ( + UPstream::listGatherValues> + ( + sendData + ) + ); + + Pout<< "listGather: " << flatOutput(countValues) << nl; + } + catch (const Foam::error& err) + { + Info<< err.message().c_str() << nl; + } + + FatalError.throwing(oldThrowingError); + } + #endif + Info<< "\nEnd\n" << endl; return 0; diff --git a/src/fileFormats/vtk/output/foamVtkOutputTemplates.C b/src/fileFormats/vtk/output/foamVtkOutputTemplates.C index b1d9176415..7106db9001 100644 --- a/src/fileFormats/vtk/output/foamVtkOutputTemplates.C +++ b/src/fileFormats/vtk/output/foamVtkOutputTemplates.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2021 OpenCFD Ltd. + Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -140,20 +140,15 @@ void Foam::vtk::writeValueParallel } // Gather [count, value] tuples, including from master - const List> countValues - ( - UPstream::listGatherValues> - ( - std::pair(count, val) - ) - ); + const List