diff --git a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C index 6e9ee2f228690de91729390ff9ab93eb500ce6cd..18ba96c4f1919cdb9687d53b7109755f6203fb37 100644 --- a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C +++ b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C @@ -39,10 +39,12 @@ using namespace Foam; int main(int argc, char *argv[]) { timeSelector::addOptions(); +# include "addRegionOption.H" + # include "setRootCase.H" # include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); -# include "createMesh.H" +# include "createNamedMesh.H" IOprobes sniff ( diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 91c588c6d3ef1128ca0d7f47325f092cd027c0a8..5a6686aad04b6c7a5e17169f42bdcd91a92e3360 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -182,15 +182,24 @@ bool Foam::probes::checkFieldTypes() if (Pstream::master()) { fileName probeDir; + + fileName probeSubDir = name_; + + if (obr_.name() != polyMesh::defaultRegion) + { + probeSubDir = probeSubDir/obr_.name(); + } + probeSubDir = probeSubDir/obr_.time().timeName(); + if (Pstream::parRun()) { // Put in undecomposed case // (Note: gives problems for distributed data running) - probeDir = obr_.time().path()/".."/name_/obr_.time().timeName(); + probeDir = obr_.time().path()/".."/probeSubDir; } else { - probeDir = obr_.time().path()/name_/obr_.time().timeName(); + probeDir = obr_.time().path()/probeSubDir; } // Close the file if any fields have been removed.