ENH: ensightWrite, vtkWrite support for excluding fields and patches
- functionality similar to that provided by foamToEnsight, foamToVTK which allows blocking out patches (eg, outer walls, inlet/outlet) that are not particularly interesting to visualize
This commit is contained in:
@ -59,6 +59,8 @@ Foam::labelList Foam::functionObjects::vtkWrite::getSelectedPatches
|
||||
{
|
||||
DynamicList<label> patchIDs(patches.size());
|
||||
|
||||
wordRes::filter patchFilter(selectPatches_, blockPatches_);
|
||||
|
||||
for (const polyPatch& pp : patches)
|
||||
{
|
||||
if (isType<emptyPolyPatch>(pp))
|
||||
@ -70,12 +72,7 @@ Foam::labelList Foam::functionObjects::vtkWrite::getSelectedPatches
|
||||
break; // No processor patches
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
selectPatches_.size()
|
||||
? selectPatches_.match(pp.name())
|
||||
: true
|
||||
)
|
||||
if (patchFilter(pp.name()))
|
||||
{
|
||||
patchIDs.append(pp.index());
|
||||
}
|
||||
@ -180,9 +177,14 @@ bool Foam::functionObjects::vtkWrite::readSelection(const dictionary& dict)
|
||||
selectPatches_.clear();
|
||||
dict.readIfPresent("patches", selectPatches_);
|
||||
|
||||
blockPatches_.clear();
|
||||
dict.readIfPresent("excludePatches", blockPatches_);
|
||||
|
||||
selectFields_.clear();
|
||||
dict.readEntry("fields", selectFields_);
|
||||
selectFields_.uniq();
|
||||
|
||||
blockFields_.clear();
|
||||
dict.readIfPresent("excludeFields", blockFields_);
|
||||
|
||||
// Actions to define selection
|
||||
selection_ = dict.subOrEmptyDict("selection");
|
||||
|
||||
Reference in New Issue
Block a user