diff --git a/src/Pstream/mpi/Pstream.C b/src/Pstream/mpi/Pstream.C index 074ba1aa28..a535f4804e 100644 --- a/src/Pstream/mpi/Pstream.C +++ b/src/Pstream/mpi/Pstream.C @@ -131,6 +131,19 @@ void Foam::Pstream::exit(int errnum) delete[] buff; # endif + if (PstreamGlobals::outstandingRequests_.size()) + { + label n = PstreamGlobals::outstandingRequests_.size(); + PstreamGlobals::outstandingRequests_.clear(); + + WarningIn("Pstream::exit(int)") + << "There are still " << n << " outstanding MPI_Requests." << endl + << "This means that your code exited before doing a" + << " Pstream::waitRequests()." << endl + << "This should not happen for a normal code exit." + << endl; + } + if (errnum == 0) { MPI_Finalize(); diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index b406fb0467..0e97a63316 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -2560,7 +2560,7 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List& pts) // Triangulate int nTris = 0; - dtris2 + int err = dtris2 ( pts.size(), geompackVertices.begin(), @@ -2569,6 +2569,13 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List& pts) triangle_neighbor.begin() ); + if (err != 0) + { + FatalErrorIn("triSurfaceTools::delaunay2D(const List&)") + << "Failed dtris2 with vertices:" << pts.size() + << abort(FatalError); + } + // Trim triangle_node.setSize(3*nTris); triangle_neighbor.setSize(3*nTris); diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index 9f5789bba6..03b5a80288 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -355,7 +355,7 @@ void Foam::streamLineParticle::hitWallPatch streamLineParticle::trackData& td ) { - // Keep particle + // Remove particle td.keepParticle = false; } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/U b/tutorials/incompressible/simpleFoam/motorBike/0/U index d24226ef2f..b074474b00 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/U +++ b/tutorials/incompressible/simpleFoam/motorBike/0/U @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "initialConditions" +#include "include/initialConditions" dimensions [0 1 -1 0 0 0 0]; @@ -23,7 +23,7 @@ internalField uniform $flowVelocity; boundaryField { - #include "fixedInlet" + #include "include/fixedInlet" outlet { @@ -44,7 +44,7 @@ boundaryField value uniform (0 0 0); } - #include "frontBackUpperPatches" + #include "include/frontBackUpperPatches" } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/fixedInlet b/tutorials/incompressible/simpleFoam/motorBike/0/include/fixedInlet similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/fixedInlet rename to tutorials/incompressible/simpleFoam/motorBike/0/include/fixedInlet diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/frontBackUpperPatches b/tutorials/incompressible/simpleFoam/motorBike/0/include/frontBackUpperPatches similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/frontBackUpperPatches rename to tutorials/incompressible/simpleFoam/motorBike/0/include/frontBackUpperPatches diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/initialConditions b/tutorials/incompressible/simpleFoam/motorBike/0/include/initialConditions similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/0/initialConditions rename to tutorials/incompressible/simpleFoam/motorBike/0/include/initialConditions diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/k b/tutorials/incompressible/simpleFoam/motorBike/0/k index 457efefed2..f8da4fe9ab 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/k +++ b/tutorials/incompressible/simpleFoam/motorBike/0/k @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "initialConditions" +#include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; @@ -22,7 +22,7 @@ internalField uniform $turbulentKE; boundaryField { - #include "fixedInlet" + #include "include/fixedInlet" outlet { @@ -41,7 +41,7 @@ boundaryField type kqRWallFunction; } - #include "frontBackUpperPatches" + #include "include/frontBackUpperPatches" } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/omega b/tutorials/incompressible/simpleFoam/motorBike/0/omega index 16424f9bb3..dcd88e8d67 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/omega +++ b/tutorials/incompressible/simpleFoam/motorBike/0/omega @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "initialConditions" +#include "include/initialConditions" dimensions [0 0 -1 0 0 0 0]; @@ -22,7 +22,7 @@ internalField uniform $turbulentOmega; boundaryField { - #include "fixedInlet" + #include "include/fixedInlet" outlet { @@ -41,7 +41,7 @@ boundaryField type omegaWallFunction; } - #include "frontBackUpperPatches" + #include "include/frontBackUpperPatches" } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/p b/tutorials/incompressible/simpleFoam/motorBike/0/p index a7ef4983d1..9bf8e9d43d 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/p +++ b/tutorials/incompressible/simpleFoam/motorBike/0/p @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "initialConditions" +#include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; @@ -43,7 +43,7 @@ boundaryField type zeroGradient; } - #include "frontBackUpperPatches" + #include "include/frontBackUpperPatches" } // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 65174d65d1..eeb1d43a1d 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -14,6 +14,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +libs ("libincompressibleRASModels.so"); + application simpleFoam; startFrom latestTime;