Go to the documentation of this file.
10 #ifndef vtk_m_cont_PartitionedDataSet_h
11 #define vtk_m_cont_PartitionedDataSet_h
30 using iterator =
typename StorageVec::iterator;
52 vtkm::cont::Field GetFieldFromPartition(
const std::string& field_name,
int partition_index)
const;
56 vtkm::Id GetNumberOfPartitions()
const;
61 vtkm::Id GetGlobalNumberOfPartitions()
const;
69 const std::vector<vtkm::cont::DataSet>& GetPartitions()
const;
86 void AppendPartitions(
const std::vector<vtkm::cont::DataSet>& partitions);
96 template <
typename T,
typename Storage>
103 template <
typename T>
110 template <
typename T>
117 template <
typename T,
typename Storage>
124 template <
typename T>
131 template <
typename T>
146 const std::string& name,
149 return this->Fields.GetField(name, assoc);
154 const std::string& name,
157 return this->Fields.GetField(name, assoc);
188 return this->Fields.HasField(name, assoc);
209 void PrintSummary(std::ostream& stream)
const;
VTKM_CONT void AddPartitionsField(const std::string &fieldName, const std::vector< T > &field)
Definition: PartitionedDataSet.h:125
Manages an array-worth of data.
Definition: ArrayHandle.h:283
Groups connected points that have the same field value.
Definition: Atomic.h:19
const VTKM_CONT vtkm::cont::Field & GetPartitionsField(const std::string &name) const
Definition: PartitionedDataSet.h:167
const VTKM_CONT vtkm::cont::Field & GetField(vtkm::Id index) const
Definition: PartitionedDataSet.h:139
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
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 bool HasGlobalField(const std::string &name) const
Definition: PartitionedDataSet.h:192
VTKM_CONT vtkm::cont::Field & GetField(const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::Any)
Definition: PartitionedDataSet.h:153
VTKM_CONT iterator end() noexcept
Definition: PartitionedDataSet.h:216
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_CONT void AddGlobalField(const std::string &fieldName, const T *field, const vtkm::Id &n)
Definition: PartitionedDataSet.h:111
VTKM_CONT const_iterator cbegin() const noexcept
Definition: PartitionedDataSet.h:222
VTKM_CONT vtkm::cont::Field & GetField(vtkm::Id index)
Definition: PartitionedDataSet.h:142
VTKM_CONT iterator begin() noexcept
Definition: PartitionedDataSet.h:214
VTKM_CONT const_iterator end() const noexcept
Definition: PartitionedDataSet.h:220
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
const VTKM_CONT vtkm::cont::Field & GetField(const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::Any) const
Definition: PartitionedDataSet.h:145
VTKM_CONT void AddPartitionsField(const std::string &fieldName, const T *field, const vtkm::Id &n)
Definition: PartitionedDataSet.h:132
VTKM_CONT vtkm::cont::Field & GetPartitionsField(const std::string &name)
Definition: PartitionedDataSet.h:179
#define VTKM_CONT
Definition: ExportMacros.h:57
VTKM_CONT bool HasPartitionsField(const std::string &name) const
Definition: PartitionedDataSet.h:198
VTKM_CONT void AddField(const Field &field)
Definition: PartitionedDataSet.h:94
VTKM_CONT void AddPartitionsField(const std::string &fieldName, const vtkm::cont::ArrayHandle< T, Storage > &field)
Definition: PartitionedDataSet.h:118
VTKM_CONT bool HasField(const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::Any) const
Definition: PartitionedDataSet.h:185
VTKM_CONT void AddGlobalField(const std::string &fieldName, const vtkm::cont::ArrayHandle< T, Storage > &field)
Definition: PartitionedDataSet.h:97
std::vector< vtkm::cont::DataSet > Partitions
Definition: PartitionedDataSet.h:228
VTKM_CONT const_iterator begin() const noexcept
Definition: PartitionedDataSet.h:218
const VTKM_CONT vtkm::cont::Field & GetGlobalField(const std::string &name) const
Definition: PartitionedDataSet.h:161
typename StorageVec::iterator iterator
Definition: PartitionedDataSet.h:30
VTKM_CONT const_iterator cend() const noexcept
Definition: PartitionedDataSet.h:224
typename StorageVec::value_type value_type
Definition: PartitionedDataSet.h:32
typename StorageVec::const_reference const_reference
Definition: PartitionedDataSet.h:34
VTKM_CONT void AddGlobalField(const std::string &fieldName, const std::vector< T > &field)
Definition: PartitionedDataSet.h:104
VTKM_CONT vtkm::cont::Field & GetGlobalField(const std::string &name)
Definition: PartitionedDataSet.h:173
VTKM_CONT vtkm::IdComponent GetNumberOfFields() const
Definition: PartitionedDataSet.h:91
typename StorageVec::const_iterator const_iterator
Definition: PartitionedDataSet.h:31
std::vector< vtkm::cont::DataSet > StorageVec
Definition: PartitionedDataSet.h:27
Definition: PartitionedDataSet.h:25
typename StorageVec::reference reference
Definition: PartitionedDataSet.h:33