ENH: provide defaultName() static method for patches, zones

- consistent way of writing "patch" + Foam::name(id) etc.
This commit is contained in:
Mark Olesen
2020-01-16 13:24:23 +01:00
parent 2a98c4e665
commit f0be8679f6
24 changed files with 105 additions and 62 deletions

View File

@ -78,7 +78,7 @@ void Foam::searchableSurfaceModifiers::cut::triangulate
{
patches[patchi] = geometricSurfacePatch
(
"patch" + Foam::name(patchi),
geometricSurfacePatch::defaultName(patchi),
patchi
);
}

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -72,11 +73,11 @@ int main(int argc, char *argv[])
{
const geometricSurfacePatch& pp = patches[patchi];
word patchName = pp.name();
word patchName(pp.name());
if (patchName.empty())
{
patchName = "patch" + Foam::name(patchi);
patchName = geometricSurfacePatch::defaultName(patchi);
}
fileName outFile(surfBase + '_' + patchName + '.' + extension);