ENH: expose subset name in meshSubsetHelper

This commit is contained in:
Mark Olesen
2018-07-25 00:14:30 +02:00
parent e7b82aad9e
commit 8610a95ad8
2 changed files with 15 additions and 9 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -72,8 +72,10 @@ void Foam::meshSubsetHelper::correct(bool verbose)
Info<< "Subsetting mesh based on cellSet " << name_ << endl; Info<< "Subsetting mesh based on cellSet " << name_ << endl;
} }
cellSet subset(baseMesh_, name_); subsetter_.setLargeCellSubset
subsetter_.setLargeCellSubset(subset); (
cellSet(baseMesh_, name_)
);
} }
else if (type_ == ZONE) else if (type_ == ZONE)
{ {

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -59,7 +59,7 @@ public:
//- Internal book-keeping for subset type //- Internal book-keeping for subset type
enum subsetType enum subsetType
{ {
NONE, //<! Not a subset NONE = 0, //<! Not a subset
SET, //<! Using a cellSet for the subset SET, //<! Using a cellSet for the subset
ZONE //<! Using a cellZone for the subset ZONE //<! Using a cellZone for the subset
}; };
@ -134,10 +134,14 @@ public:
{ {
return subsetter_.subMesh(); return subsetter_.subMesh();
} }
else
{ return baseMesh_;
return baseMesh_; }
}
//- The associated (set or zone) name if any.
inline const word& name() const
{
return name_;
} }