ENH: snappyHexMesh: have single region surface named as <surface> instead of <surface>_<region>

This commit is contained in:
mattijs
2014-01-27 12:44:45 +00:00
parent 7506490ecf
commit 1f192f8b73
27 changed files with 120 additions and 79 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -175,7 +175,8 @@ Foam::searchableSurfaces::searchableSurfaces(const label size)
Foam::searchableSurfaces::searchableSurfaces
(
const IOobject& io,
const dictionary& topDict
const dictionary& topDict,
const bool singleRegionName
)
:
PtrList<searchableSurface>(topDict.size()),
@ -233,9 +234,16 @@ Foam::searchableSurfaces::searchableSurfaces
wordList& rNames = regionNames_[surfI];
rNames.setSize(localNames.size());
forAll(localNames, regionI)
if (singleRegionName && localNames.size() == 1)
{
rNames[regionI] = names_[surfI] + '_' + localNames[regionI];
rNames[0] = names_[surfI];
}
else
{
forAll(localNames, regionI)
{
rNames[regionI] = names_[surfI] + '_' + localNames[regionI];
}
}
// See if dictionary provides any global region names.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -101,8 +101,16 @@ public:
////- Construct from list of dictionaries
//searchableSurfaces(const IOobject&, const PtrList<dictionary>&);
//- Construct from dictionary
searchableSurfaces(const IOobject&, const dictionary&);
//- Construct from dictionary and whether to construct names always
// as surfaceName "_" regionName (singleRegionName false) or
// for single region surfaces as surfaceName only (singleRegionName
// true)
searchableSurfaces
(
const IOobject&,
const dictionary&,
const bool singleRegionName
);
// Member Functions