diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index c9fee2364d274fad9ee02ecfa3aabec38ea73889..7ec94c7e6f7a2c15a88fe1a2d5dfddf80fca306b 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -964,6 +964,13 @@ Foam::label Foam::checkGeometry : patchWriter() ); + // Currently only do AMI checks + + const fileName outputDir + ( + mesh.time().globalPath()/functionObject::outputPrefix/"checkMesh" + ); + forAll(pbm, patchi) { if (isA<cyclicAMIPolyPatch>(pbm[patchi])) @@ -1021,8 +1028,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "src_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-src_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1054,8 +1064,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "src_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-src_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1109,8 +1122,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "tgt_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-tgt_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1142,8 +1158,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "tgt_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-tgt_" + tmName + ), meshedSurfRef ( mergedPoints, diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index 76e4fc5b18cdcfa602cdd962d64f16634284445b..29d24377673ac670b3892095319e61589d21dd7a 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -284,8 +284,7 @@ void Foam::mergeAndWrite fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() / set.name() @@ -378,8 +377,7 @@ void Foam::mergeAndWrite fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() / set.name() @@ -478,8 +476,7 @@ void Foam::mergeAndWrite // postProcessing/<time>/p0.vtk fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() // set.name() diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 531721b32def97d1c76011110db9082cafa9c3bf..a56d685d0f3a1ce6d284fdb425655d72ec9cb172 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -116,6 +116,11 @@ void writeWeights void writeWeights(const polyMesh& mesh) { + const fileName outputDir + ( + mesh.time().globalPath()/functionObject::outputPrefix/"checkAMI" + ); + for (const polyPatch& pp : mesh.boundaryMesh()) { if (isA<cyclicAMIPolyPatch>(pp)) @@ -137,8 +142,8 @@ void writeWeights(const polyMesh& mesh) mesh, ami.tgtWeightsSum(), cpp.neighbPatch(), - functionObject::outputPrefix, - "tgt", + outputDir, + "patch" + Foam::name(pp.index()) + "-tgt", mesh.time() ); writeWeights @@ -146,8 +151,8 @@ void writeWeights(const polyMesh& mesh) mesh, ami.srcWeightsSum(), cpp, - functionObject::outputPrefix, - "src", + outputDir, + "patch" + Foam::name(pp.index()) + "-src", mesh.time() ); } @@ -170,7 +175,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createNamedDynamicFvMesh.H" - const bool checkAMI = args.found("checkAMI"); + const bool checkAMI = args.found("checkAMI"); if (checkAMI) { diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 3a538119b5a69576097fdaa8f0c91d593b4d3ba9..117bcdb955a9de544a45dda4d36ce0d9e52abebf 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2285,8 +2285,7 @@ Foam::label Foam::meshRefinement::findRegions if (Pstream::master()) { outputDir = - mesh.time().path() - / (Pstream::parRun() ? ".." : "") + mesh.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance(); outputDir.clean(); diff --git a/src/sampling/sampledSet/shortestPath/shortestPathSet.C b/src/sampling/sampledSet/shortestPath/shortestPathSet.C index bc8cd1a467e8aed33491c673004a6e532ffcaa33..4bc1df916a122d4bfcf6fb66e38da2aa50ce8975 100644 --- a/src/sampling/sampledSet/shortestPath/shortestPathSet.C +++ b/src/sampling/sampledSet/shortestPath/shortestPathSet.C @@ -844,8 +844,7 @@ Foam::shortestPathSet::shortestPathSet if (Pstream::master()) { outputDir = - mesh.time().path() - / (Pstream::parRun() ? ".." : "") + mesh.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance(); outputDir.clean();