Go to the documentation of this file.
11 #ifndef vtk_m_filter_flow_worklet_GridEvaluators_h
12 #define vtk_m_filter_flow_worklet_GridEvaluators_h
34 template <
typename FieldType>
47 const FieldType& field,
52 ,
Field(field.PrepareForExecution(device, token))
53 ,
GhostCells(ghostCells.PrepareForInput(device, token))
56 ,
Locator(locator.PrepareForExecution(device, token))
60 template <
typename Po
int>
66 this->
Locator.FindCell(point, cellId, parametric);
84 return direction > 0 ? vtkm::Infinity<vtkm::FloatDefault>()
85 : vtkm::NegativeInfinity<vtkm::FloatDefault>();
88 template <
typename Po
int>
104 this->
Locator.FindCell(point, cellId, parametric);
128 this->
Field.GetValue(ptIndices, nVerts, parametric, cellShape, out);
132 this->
Field.GetValue(cellId, out);
153 typename FieldType::ExecutionType
Field;
160 template <
typename FieldType>
177 :
Bounds(dataSet.GetCoordinateSystem().GetBounds())
193 const FieldType& field)
194 :
Bounds(coordinates.GetBounds())
218 this->
Locator.SetCoordinates(coordinates);
219 this->
Locator.SetCellSet(cellset);
235 #endif // vtk_m_filter_flow_worklet_GridEvaluators_h
vtkm::cont::CellInterpolationHelper InterpolationHelper
Definition: GridEvaluators.h:227
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_CONT ExecutionGridEvaluator()=default
Definition: GridEvaluators.h:161
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC vtkm::Bounds GetSpatialBoundary() const
Definition: GridEvaluators.h:78
VTKM_CONT ExecutionGridEvaluator(const vtkm::cont::CellLocatorGeneral &locator, const vtkm::cont::CellInterpolationHelper interpolationHelper, const vtkm::Bounds &bounds, const FieldType &field, const GhostCellArrayType &ghostCells, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: GridEvaluators.h:44
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
VTKM_EXEC bool IsWithinTemporalBoundary(const vtkm::FloatDefault &vtkmNotUsed(time)) const
Definition: GridEvaluators.h:75
Definition: CastAndCall.h:32
VTKM_CONT GridEvaluator(const vtkm::cont::CoordinateSystem &coordinates, const vtkm::cont::UnknownCellSet &cellset, const FieldType &field)
Definition: GridEvaluators.h:191
VTKM_CONT void ArrayCopyShallowIfPossible(const vtkm::cont::UnknownArrayHandle source, vtkm::cont::ArrayHandle< T, S > &destination)
Copies from an unknown to a known array type.
Definition: ArrayCopy.h:182
bool HaveGhostCells
Definition: GridEvaluators.h:155
ArrayHandleCartesianProduct is a specialization of ArrayHandle.
Definition: ArrayHandleCartesianProduct.h:326
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
VTKM_CONT GridEvaluator()=default
typename StorageType::ReadPortalType ReadPortalType
Definition: ArrayHandle.h:294
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::Bounds Bounds
Definition: GridEvaluators.h:224
@ Ghost
Definition: CellClassification.h:40
const vtkm::cont::UnknownArrayHandle & GetData() const
VTKM_EXEC GridEvaluatorStatus Evaluate(const Point &point, const vtkm::FloatDefault &time, vtkm::VecVariable< Point, 2 > &out) const
Definition: GridEvaluators.h:89
vtkm::cont::CellLocatorGeneral::ExecObjType Locator
Definition: GridEvaluators.h:157
VTKM_CONT GridEvaluator(const vtkm::cont::DataSet &dataSet, const FieldType &field)
Definition: GridEvaluators.h:176
Definition: CoordinateSystem.h:25
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
VTKM_CONT void InitializeLocator(const vtkm::cont::CoordinateSystem &coordinates, const vtkm::cont::UnknownCellSet &cellset)
Definition: GridEvaluators.h:215
VTKM_CONT vtkm::cont::CoordinateSystem GetCoordinateSystem(vtkm::Id index=0) const
A short variable-length array with maximum length.
Definition: VecVariable.h:30
VTKM_CONT ExecutionGridEvaluator< FieldType > PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Definition: GridEvaluators.h:201
const VTKM_CONT vtkm::cont::Field & GetGhostCellField() const
Returns the cell field that matches the ghost cell field name.
Definition: CellInterpolationHelper.h:33
VTKM_EXEC void GetCellInfo(const vtkm::Id &cellId, vtkm::UInt8 &cellShape, vtkm::IdComponent &numVerts, vtkm::VecVariable< vtkm::Id, 8 > &indices) const
Definition: CellInterpolationHelper.h:90
#define VTKM_CONT
Definition: ExportMacros.h:57
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
uint8_t UInt8
Definition: Types.h:157
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::ListApply< ExecLocatorList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: CellLocatorGeneral.h:56
VTKM_EXEC_CONT bool CheckOk() const
Definition: GridEvaluatorStatus.h:36
A CellLocator that works generally well for any supported cell set.
Definition: CellLocatorGeneral.h:41
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
Definition: DeviceAdapterTag.h:52
VTKM_EXEC_CONT void SetFail()
Definition: GridEvaluatorStatus.h:38
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
vtkm::exec::CellInterpolationHelper InterpolationHelper
Definition: GridEvaluators.h:156
FieldType Field
Definition: GridEvaluators.h:225
Definition: CellInterpolationHelper.h:184
vtkm::Bounds Bounds
Definition: GridEvaluators.h:152
GhostCellArrayType GhostCellArray
Definition: GridEvaluators.h:226
VTKM_EXEC_CONT void SetOk()
Definition: GridEvaluatorStatus.h:35
VTKM_EXEC_CONT void SetTemporalBounds()
Definition: GridEvaluatorStatus.h:44
vtkm::cont::CellLocatorGeneral Locator
Definition: GridEvaluators.h:228
VTKM_EXEC_CONT vtkm::FloatDefault GetTemporalBoundary(vtkm::Id direction) const
Definition: GridEvaluators.h:81
GhostCellPortal GhostCells
Definition: GridEvaluators.h:154
VTKM_EXEC bool InGhostCell(const vtkm::Id &cellId) const
Definition: GridEvaluators.h:142
VTKM_EXEC_CONT void SetInGhostCell()
Definition: GridEvaluatorStatus.h:47
FieldType::ExecutionType Field
Definition: GridEvaluators.h:153
VTKM_EXEC_CONT void SetSpatialBounds()
Definition: GridEvaluatorStatus.h:41
VTKM_CONT bool HasGhostCellField() const
const VTKM_CONT vtkm::cont::UnknownCellSet & GetCellSet() const
Definition: DataSet.h:362
typename vtkm::cont::ArrayHandle< vtkm::UInt8 >::ReadPortalType GhostCellPortal
Definition: GridEvaluators.h:150
VTKM_EXEC bool IsWithinSpatialBoundary(const Point &point) const
Definition: GridEvaluators.h:61
Definition: GridEvaluators.h:35
Definition: GridEvaluatorStatus.h:23