Go to the documentation of this file.
18 #ifndef viskores_worklet_AveragePointNeighborhood_h
19 #define viskores_worklet_AveragePointNeighborhood_h
48 template <
typename InputFieldPortalType>
53 using T =
typename InputFieldPortalType::ValueType;
66 sum = sum + inputField.
Get(i, j, k);
71 return static_cast<T
>(sum / size);
81 #endif // viskores_worklet_AveragePointNeighborhood_h
A control signature tag for output fields.
Definition: WorkletNeighborhood.h:106
AveragePointNeighborhood(viskores::IdComponent radius)
Definition: AveragePointNeighborhood.h:42
viskores::IdComponent3 MaxNeighborIndices(viskores::IdComponent radius) const
Returns the minimum neighborhood indices that are within the bounds of the data.
Definition: BoundaryState.h:166
Base class for worklets that map over the points in a structured grid with neighborhood information.
Definition: WorkletPointNeighborhood.h:40
Provides a neighborhood's placement with respect to the mesh's boundary.
Definition: BoundaryState.h:39
The ExecutionSignature tag to query if the current iteration is inside the boundary.
Definition: WorkletNeighborhood.h:62
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::IdComponent BoundaryRadius
Definition: AveragePointNeighborhood.h:75
viskores::IdComponent3 MinNeighborIndices(viskores::IdComponent radius) const
Returns the minimum neighborhood indices that are within the bounds of the data.
Definition: BoundaryState.h:135
void(CellSetIn cellSet, FieldInNeighborhood inputField, FieldOut outputField) ControlSignature
Definition: AveragePointNeighborhood.h:38
Groups connected points that have the same field value.
Definition: Atomic.h:27
_1 InputDomain
Definition: AveragePointNeighborhood.h:40
Retrieves field values from a neighborhood.
Definition: FieldNeighborhood.h:42
#define VISKORES_ASSERT(condition)
Definition: Assert.h:51
InputFieldPortalType::ValueType operator()(const viskores::exec::FieldNeighborhood< InputFieldPortalType > &inputField, const viskores::exec::BoundaryState &boundary) const
Definition: AveragePointNeighborhood.h:49
ValueType Get(viskores::IdComponent i, viskores::IdComponent j, viskores::IdComponent k) const
Retrieve a field value relative to the visited element.
Definition: FieldNeighborhood.h:69
Definition: AveragePointNeighborhood.h:33
A control signature tag for neighborhood input values.
Definition: WorkletNeighborhood.h:165
_3(_2, Boundary) ExecutionSignature
Definition: AveragePointNeighborhood.h:39
A control signature tag for input connectivity.
Definition: WorkletNeighborhood.h:137
#define VISKORES_EXEC
Definition: ExportMacros.h:59