mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: have single region surface named as <surface> instead of <surface>_<region>
This commit is contained in:
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user