Go to the documentation of this file.
40 #include "vtkCellArray.h"
41 #include "vtkCellData.h"
42 #include "vtkCellDataToPointData.h"
43 #include "vtkCompositeDataGeometryFilter.h"
44 #include "vtkCompositeDataSet.h"
45 #include "vtkCompositePolyDataMapper.h"
46 #include "vtkMultiPieceDataSet.h"
47 #include "vtkPointData.h"
48 #include "vtkPolyData.h"
49 #include "vtkPolyDataMapper.h"
50 #include "vtkProperty.h"
51 #include "vtkRenderer.h"
52 #include "vtkSmartPointer.h"
59 namespace functionObjects
61 namespace runTimePostPro
82 nearCellValue_(
dict.getOrDefault(
"nearCellValue",
false))
84 dict.readEntry(
"patches", selectPatches_);
92 const scalar position,
96 if (!visible_ || selectPatches_.empty())
107 if (isType<emptyPolyPatch>(pp) || pp.empty())
111 else if (isA<processorPolyPatch>(pp))
116 if (selectPatches_.match(pp.name()))
118 selectedPatchIds.
set(pp.index());
124 patchIds[Pstream::myProcNo()] = selectedPatchIds.sortedToc();
132 nPieces += ids.size();
141 <<
"No patches selected: " <<
flatOutput(selectPatches_)
159 if (representation_ == rtGlyph)
161 multiPiece = gatherPatchFaceCentres(
patchIds);
165 multiPiece = gatherPatchPieces(
patchIds);
173 if (representation_ == rtGlyph || colourBy_ == cbField)
177 nCmpt = addPatchField<scalar>
181 parent().
mesh().cfindObject<volScalarField>(fieldName_),
187 nCmpt = addPatchField<vector>
191 parent().
mesh().cfindObject<volVectorField>(fieldName_),
210 <<
" Field " << fieldName_ <<
' ' <<
fieldInfo.info() <<
endl;
225 polyData->SetInputData(multiPiece);
228 if (representation_ == rtGlyph)
236 polyData->GetOutput(),
246 if (smooth_ && !
fieldInfo.hasPointData())
251 polyData->SetInputConnection(
cellToPoint->GetOutputPort());
255 polyData->SetInputData(multiPiece);
262 addFeatureEdges(renderer, polyData);
266 mapper->SetInputConnection(polyData->GetOutputPort());
275 : FieldAssociation::CELL_DATA
281 surfaceActor_->SetMapper(mapper);
283 setRepresentation(surfaceActor_);
285 renderer->AddActor(surfaceActor_);
293 const scalar position
303 surfaceActor_->GetProperty()->SetOpacity(opacity(position));
305 vector sc = surfaceColour_->value(position);
306 surfaceActor_->GetProperty()->SetColor(sc[0], sc[1], sc[2]);
308 vector ec = edgeColour_->value(position);
309 surfaceActor_->GetProperty()->SetEdgeColor(ec[0], ec[1], ec[2]);
addToRunTimeSelectionTable(surface, contourFilter, dictionary)
General field characteristics.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
A topoSetPointSource to select points based on usage in cells.
Helper class to store a wordRe and label used by Foam::functionObjects::fieldSelection.
void set(const bitSet &bitset)
Set specified bits from another bitset.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void updateActors(const scalar position)
Update actors.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
static void updateActors(PtrList< Type > &objects, const scalar position)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void addGeometryToScene(const scalar position, vtkRenderer *renderer)
Add geometry surface(s) to scene.
Generate images during run-time.
A patch is a list of labels that address the faces in the global face list.
geometryPatches(const geometryPatches &)=delete
No copy construct.
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.
virtual bool clear()
Clear files used to create the object(s)
Base class for scene objects.
#define DebugInfo
Report an information message using Foam::Info.
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
A HashTable of pointers to objects of type <T>.
defineTypeName(contourFilter)
Read and visualize surface geometry files.
const polyBoundaryMesh & patches
#define WarningInFunction
Report a warning using Foam::Warning.
const fvMesh & mesh() const
Reference to the underlying OpenFOAM mesh.