Go to the documentation of this file.
51 bool Foam::functionObjects::ensightWrite::updateSubset
53 fvMeshSubset& subsetter
56 if (selection_.empty())
61 const fvMesh&
mesh = subsetter.baseMesh();
64 cellBitSet cellsToSelect(
mesh,
false);
67 for (
const entry& dEntry : selection_)
72 <<
"Ignoring non-dictionary entry "
77 const dictionary&
dict = dEntry.dict();
84 cellsToSelect.invert(
mesh.nCells());
90 dict.get<word>(
"source"),
92 dict.optionalSubDict(
"sourceInfo")
94 source->verbose(
false);
105 cellsToSelect.reset();
107 source->applyToSet(action, cellsToSelect);
112 cellBitSet other(
mesh,
false);
115 cellsToSelect.subset(other);
122 <<
"Ignoring unhandled action '"
128 subsetter.setCellSubset(cellsToSelect.addressing());
134 bool Foam::functionObjects::ensightWrite::update()
156 updateSubset(meshSubset_);
162 ensMesh_.reset(
new ensightMesh(meshSubset_.mesh(), writeOpts_));
164 else if (ensMesh_->needsUpdate())
175 bool Foam::functionObjects::ensightWrite::readSelection(
const dictionary&
dict)
183 selectFields_.clear();
184 dict.readEntry(
"fields", selectFields_);
185 selectFields_.uniq();
188 selection_ =
dict.subOrEmptyDict(
"selection");
Add elements to current set.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
static autoPtr< topoSetCellSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
Union of elements with current set.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
Subtract elements from current set.
Invert the elements in the current set.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Enum< topoSetSource::setAction > actionNames({ { topoSetSource::NEW, "use" }, { topoSetSource::ADD, "add" }, { topoSetSource::SUBTRACT, "subtract" }, { topoSetSource::SUBSET, "subset" }, { topoSetSource::INVERT, "invert" }, })
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void movePoints(const polyMesh &mpm)
Update for mesh point-motion.