checkMesh: Added the region name to the postProcessing directory for the output from writeSets option

This commit is contained in:
Henry Weller
2023-06-12 12:21:34 +01:00
parent c1e0dbcfc5
commit 1e9e0c141b
2 changed files with 26 additions and 24 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -257,6 +257,21 @@ void Foam::mergeAndWrite
}
Foam::fileName Foam::checkMeshOutputDir(const polyMesh& mesh)
{
return
mesh.time().globalPath()
/functionObjects::writeFile::outputPrefix
/(
(mesh.name() != polyMesh::defaultRegion)
? mesh.name()
: word::null
)
/"checkMesh"
/mesh.pointsInstance();
}
void Foam::mergeAndWrite
(
const surfaceWriter& writer,
@ -271,15 +286,7 @@ void Foam::mergeAndWrite
mesh.points()
);
fileName outputDir
(
set.time().globalPath()
/functionObjects::writeFile::outputPrefix
/mesh.pointsInstance()
/set.name()
);
mergeAndWrite(mesh, writer, set.name(), setPatch, outputDir);
mergeAndWrite(mesh, writer, set.name(), setPatch, checkMeshOutputDir(mesh));
}
@ -363,13 +370,7 @@ void Foam::mergeAndWrite
mesh.points()
);
fileName outputDir
(
set.time().globalPath()
/functionObjects::writeFile::outputPrefix
/mesh.pointsInstance()
/set.name()
);
const fileName outputDir(checkMeshOutputDir(mesh));
outputDir.clean();
mergeAndWrite(mesh, writer, set.name(), setPatch, outputDir);
@ -453,9 +454,7 @@ void Foam::mergeAndWrite
{
writer.write
(
set.time().globalPath()
/functionObjects::writeFile::outputPrefix
/mesh.pointsInstance(),
checkMeshOutputDir(mesh),
set.name(),
coordSet(false, word::null, mergedPts),
"pointID",

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,6 +48,9 @@ namespace Foam
class fileName;
class polyMesh;
//- Output directory for sets and surfaces
fileName checkMeshOutputDir(const polyMesh& mesh);
//- Print mesh statistics
void printMeshStats(const polyMesh& mesh, const bool allTopology);
@ -62,15 +65,15 @@ namespace Foam
const fileName& outputDir
);
//- Write vtk representation of (assembled) faceSet to surface file in
//- Write representation of (assembled) faceSet to surface file in
// postProcessing/ directory
void mergeAndWrite(const surfaceWriter&, const faceSet&);
//- Write vtk representation of (assembled) cellSet to surface file in
//- Write representation of (assembled) cellSet to surface file in
// postProcessing/ directory
void mergeAndWrite(const surfaceWriter&, const cellSet&);
//- Write vtk representation of (assembled) pointSet to 'set' file in
//- Write representation of (assembled) pointSet to 'set' file in
// postProcessing/ directory
void mergeAndWrite(const setWriter&, const pointSet&);
}