Go to the documentation of this file.
10 #ifndef vtk_m_cont_Field_h
11 #define vtk_m_cont_Field_h
13 #include <vtkm/cont/vtkm_cont_export.h>
50 template <
typename T,
typename Storage>
70 return this->FieldAssociation == Association::WholeDataSet;
74 return this->FieldAssociation == Association::Partitions;
145 template <
typename T,
typename StorageTag>
152 virtual void PrintSummary(std::ostream& out)
const;
157 this->Data.ReleaseResourcesExecution();
158 this->
Range.ReleaseResourcesExecution();
167 mutable bool ModifiedFlag =
true;
170 template <
typename Functor,
typename... Args>
178 template <
typename T>
189 template <
typename T>
192 const std::vector<T>& data,
198 template <
typename T>
201 std::vector<T>&& data)
206 template <
typename T>
209 std::vector<T>&& data,
215 template <
typename T>
218 std::initializer_list<T>&& data)
226 template <
typename T,
typename S>
240 template <
typename T,
typename S>
265 struct DynamicTransformTraits<
vtkm::cont::Field>
267 using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
281 struct VTKM_CONT_EXPORT Serialization<
vtkm::cont::Field>
290 #endif //vtk_m_cont_Field_h
VTKM_CONT bool IsPointField() const
Definition: cont/Field.h:67
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle(const T *array, vtkm::Id numberOfValues, vtkm::CopyFlag copy)
A convenience function for creating an ArrayHandle from a standard C array.
Definition: ArrayHandleBasic.h:217
Manages an array-worth of data.
Definition: ArrayHandle.h:283
Groups connected points that have the same field value.
Definition: Atomic.h:19
Association
Definition: cont/Field.h:34
vtkm::cont::Field make_Field(std::string name, Field::Association association, const T *data, vtkm::Id size, vtkm::CopyFlag copy)
Convenience functions to build fields from C style arrays and std::vector.
Definition: cont/Field.h:180
VTKM_CONT Field(std::string name, Association association, const vtkm::cont::ArrayHandle< T, Storage > &data)
Definition: cont/Field.h:51
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
VTKM_CONT Association GetAssociation() const
Definition: cont/Field.h:85
vtkm::cont::ArrayHandle< vtkm::Range > Range
Definition: cont/Field.h:166
std::string Name
name of field
Definition: cont/Field.h:162
void CastAndCall(const DynamicObject &dynamicObject, Functor &&f, Args &&... args)
A Generic interface to CastAndCall.
Definition: CastAndCall.h:47
Definition: Particle.h:331
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC T load(const U &u, vtkm::Id v)
Definition: FetchTagArrayDirectIn.h:36
const vtkm::cont::UnknownArrayHandle & GetData() const
vtkm::cont::UnknownArrayHandle Data
Definition: cont/Field.h:165
virtual VTKM_CONT void ReleaseResourcesExecution()
Definition: cont/Field.h:155
VTKM_CONT void SetData(const vtkm::cont::ArrayHandle< T, StorageTag > &newdata)
Definition: cont/Field.h:146
vtkm::cont::Field make_FieldCell(std::string name, const vtkm::cont::ArrayHandle< T, S > &data)
Convenience function to build cell fields from vtkm::cont::ArrayHandle.
Definition: cont/Field.h:241
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandleMove(T *&array, vtkm::Id numberOfValues, vtkm::cont::internal::BufferInfo::Deleter deleter=internal::SimpleArrayDeleter< T >, vtkm::cont::internal::BufferInfo::Reallocater reallocater=internal::SimpleArrayReallocater< T >)
A convenience function to move a user-allocated array into an ArrayHandle.
Definition: ArrayHandleBasic.h:241
VTKM_CONT bool IsPartitionsField() const
Definition: cont/Field.h:72
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
#define VTKM_CONT
Definition: ExportMacros.h:57
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
VTKM_CONT bool IsWholeDataSetField() const
Definition: cont/Field.h:68
VTKM_CONT bool IsCellField() const
Definition: cont/Field.h:66
const VTKM_CONT std::string & GetName() const
Definition: cont/Field.h:84
VTKM_CONT vtkm::Id GetNumberOfValues() const
Definition: cont/Field.h:82
CopyFlag
Definition: Flags.h:16
vtkm::cont::Field make_FieldMove(std::string name, Field::Association association, std::vector< T > &&data)
Definition: cont/Field.h:199
vtkm::cont::Field make_FieldPoint(std::string name, const vtkm::cont::ArrayHandle< T, S > &data)
Convenience function to build point fields from vtkm::cont::ArrayHandle.
Definition: cont/Field.h:227
VTKM_CONT bool IsGlobalField() const
Definition: cont/Field.h:76
Represent a continuous scalar range of values.
Definition: Range.h:31