Go to the documentation of this file.
35 #include "vtkCellDataToPointData.h"
36 #include "vtkCompositeDataGeometryFilter.h"
37 #include "vtkCompositeDataSet.h"
38 #include "vtkCompositePolyDataMapper.h"
39 #include "vtkCutter.h"
40 #include "vtkMultiPieceDataSet.h"
42 #include "vtkPolyData.h"
43 #include "vtkPolyDataMapper.h"
44 #include "vtkRenderer.h"
45 #include "vtkSmartPointer.h"
51 namespace functionObjects
53 namespace runTimePostPro
76 dict.readIfPresent(
"offsets", values_);
81 values_.first() =
Zero;
91 const scalar position,
100 if (needsCollective())
102 Info<<
type() <<
" : Not available for collective operation" <<
endl;
118 if (representation_ == rtGlyph || colourBy_ == cbField)
125 nCmpt = addDimField<scalar>
127 multiPiece, adaptor, ioptr, fieldName_
132 nCmpt = addDimField<vector>
134 multiPiece, adaptor, ioptr, fieldName_
184 cutter->SetInputData(multiPiece);
185 cutter->SetCutFunction(pln);
187 cutter->SetNumberOfContours(values_.size());
191 cutter->SetValue(pointi, values_[pointi]);
194 cutter->SetInputArrayToProcess
196 (nCmpt == 3 ? 1 : 0),
199 vtkDataObject::FIELD_ASSOCIATION_CELLS,
208 polyData->SetInputConnection(cutter->GetOutputPort());
212 mapper->SetInputConnection(polyData->GetOutputPort());
214 if (representation_ == rtGlyph)
222 polyData->GetOutput(),
232 if (smooth_ && !
fieldInfo.hasPointData())
235 cellToPoint->SetInputConnection(cutter->GetOutputPort());
237 polyData->SetInputConnection(
cellToPoint->GetOutputPort());
254 surfaceActor_->SetMapper(mapper);
256 setRepresentation(surfaceActor_);
258 renderer->AddActor(surfaceActor_);
269 const scalar position,
270 vtkRenderer* renderer
276 if (addGeometry(position, renderer))
282 <<
"Unsupported for OpenFOAM parallel and VTK serial"
addToRunTimeSelectionTable(surface, contourFilter, dictionary)
General field characteristics.
static constexpr const zero Zero
Global zero.
A topoSetPointSource to select points based on usage in cells.
Helper class to store a wordRe and label used by Foam::functionObjects::fieldSelection.
virtual bool clear()
Cleanup files etc.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
#define forAll(list, i)
Loop across all elements in list.
FieldAssociation
The field association for patch expressions (mutually exclusive)
cuttingPlaneFilter(const cuttingPlaneFilter &)=delete
No copy construct.
bool addGeometry(const scalar position, vtkRenderer *renderer)
Add cutting planes to scene (using simulation source)
Generate images during run-time.
messageStream Info
Information stream (uses stdout - output is on the master only)
surfacesMesh setField(triSurfaceToAgglom)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Base class for scene objects.
#define DebugInfo
Report an information message using Foam::Info.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
A HashTable of pointers to objects of type <T>.
defineTypeName(contourFilter)
Bookkeeping for vtkUnstructuredGrid.
virtual void addGeometryToScene(const scalar position, vtkRenderer *renderer)
Add cutting planes to scene (using simulation source)
#define WarningInFunction
Report a warning using Foam::Warning.
const fvMesh & mesh() const
Reference to the underlying OpenFOAM mesh.
Visualisation of OpenFOAM volume fields as surface data using a VTK filter cascade.