openfoam/applications/utilities/mesh/generation/PDRblockMesh/cleanMeshDirectory.H
Mark Olesen f959c8eb36 ENH: generate local orientation vectors for blockMesh VTK output (#1903)
- can help when designing/debugging blockMesh layouts

- propagate low-level cellModel methods face() and edge() to cellShape

STYLE: relocate blockMesh OBJ output to application only

- remove blockTopology files in cleanCase function

- improve code consistency in top-level blockMesh, PDRblockMesh
  generation.
2020-10-28 16:04:12 +01:00

46 lines
1.4 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
Description
Removal of polyMesh directory
\*---------------------------------------------------------------------------*/
{
// Shadows enclosing parameter (dictName)
const word blockMeshDictName("blockMeshDict");
const fileName polyMeshPath
(
runTime.path()/meshInstance/regionPath/polyMesh::meshSubDir
);
if (exists(polyMeshPath))
{
if (exists(polyMeshPath/blockMeshDictName))
{
Info<< "Not deleting polyMesh directory "
<< runTime.relativePath(polyMeshPath) << nl
<< " because it contains " << blockMeshDictName << endl;
}
else
{
Info<< "Deleting polyMesh directory "
<< runTime.relativePath(polyMeshPath) << endl;
rmDir(polyMeshPath);
}
}
}
// ************************************************************************* //