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

@ -58,7 +58,7 @@ Info<< "Creating patch dictionaries" << endl;
wordList patchNames(boundary.size());
forAll(patchNames, patchi)
{
patchNames[patchi] = "patch" + Foam::name(patchi);
patchNames[patchi] = polyPatch::defaultName(patchi);
}
PtrList<dictionary> boundaryDicts(boundary.size());
@ -69,11 +69,11 @@ forAll(boundaryDicts, patchi)
word nbrPatchName;
if (patchi % 2 == 0)
{
nbrPatchName = "patch" + Foam::name(patchi + 1);
nbrPatchName = polyPatch::defaultName(patchi + 1);
}
else
{
nbrPatchName = "patch" + Foam::name(patchi - 1);
nbrPatchName = polyPatch::defaultName(patchi - 1);
}
patchDict.add("type", cyclicPolyPatch::typeName);