Go to the documentation of this file.
11 #ifndef vtk_m_worklet_CellMeasure_h
12 #define vtk_m_worklet_CellMeasure_h
48 template <
typename CellShape,
typename Po
intCoordVecType,
typename OutType>
51 const PointCoordVecType& pts,
52 OutType& volume)
const
57 this->ComputeMeasure<OutType>(numPoints, pts, CellShapeTag()));
59 this->
RaiseError(
"Asked for volume of unknown cell shape.");
60 volume = OutType(0.0);
65 template <
typename OutType,
typename Po
intCoordVecType,
typename CellShapeType>
67 const PointCoordVecType& pts,
70 #if defined(VTKM_MSVC)
72 #pragma warning(disable : 4068) //unknown pragma
77 #if (CUDART_VERSION >= 11050)
78 #pragma nv_diag_suppress = code_is_unreachable
80 #pragma diag_suppress = code_is_unreachable
92 if ((this->
measure & IntegrationType::ArcLength) == IntegrationType::ArcLength)
94 return vtkm::exec::CellMeasure<OutType>(numPts, pts, CellShapeType(), ec);
98 if ((this->
measure & IntegrationType::Area) == IntegrationType::Area)
100 return vtkm::exec::CellMeasure<OutType>(numPts, pts, CellShapeType(), ec);
104 if ((this->
measure & IntegrationType::Volume) == IntegrationType::Volume)
106 return vtkm::exec::CellMeasure<OutType>(numPts, pts, CellShapeType(), ec);
117 #if defined(VTKM_MSVC)
127 #endif // vtk_m_worklet_CellMeasure_h
Simple functor that returns the spatial integral of each cell as a cell field.
Definition: filter/mesh_info/worklet/CellMeasure.h:34
ErrorCode
Definition: ErrorCode.h:19
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
IncidentElementCount PointCount
Definition: WorkletMapTopology.h:267
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::filter::mesh_info::IntegrationType measure
Definition: filter/mesh_info/worklet/CellMeasure.h:122
_1 InputDomain
Definition: filter/mesh_info/worklet/CellMeasure.h:41
VTKM_EXEC OutType ComputeMeasure(const vtkm::IdComponent &numPts, const PointCoordVecType &pts, CellShapeType) const
Definition: filter/mesh_info/worklet/CellMeasure.h:66
VTKM_EXEC void operator()(CellShape shape, const vtkm::IdComponent &numPoints, const PointCoordVecType &pts, OutType &volume) const
Definition: filter/mesh_info/worklet/CellMeasure.h:49
#define vtkmGenericCellShapeMacro(call)
A macro used in a switch statement to determine cell shape.
Definition: CellShape.h:230
void(CellShape, PointCount, _2, _3) ExecutionSignature
Definition: filter/mesh_info/worklet/CellMeasure.h:40
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
FieldInIncident FieldInPoint
Definition: WorkletMapTopology.h:259
CellMeasure(vtkm::filter::mesh_info::IntegrationType m)
Definition: filter/mesh_info/worklet/CellMeasure.h:43
void(CellSetIn cellset, FieldInPoint pointCoords, FieldOutCell volumesOut) ControlSignature
Definition: filter/mesh_info/worklet/CellMeasure.h:39
Information about a cell based on its tag.
Definition: CellTraits.h:46
VTKM_EXEC void RaiseError(const char *message) const
Definition: FunctorBase.h:40
FieldOut FieldOutCell
Definition: WorkletMapTopology.h:263
IntegrationType
Specifies over what types of mesh elements CellMeasures will operate.
Definition: CellMeasures.h:25