Go to the documentation of this file.
10 #ifndef vtk_m_cont_CellSetStructured_h
11 #define vtk_m_cont_CellSetStructured_h
32 template <vtkm::IdComponent DIMENSION>
37 using InternalsType = vtkm::internal::ConnectivityStructuredInternals<DIMENSION>;
60 this->Structure.SetPointDimensions(dimensions);
65 this->Structure.SetGlobalPointDimensions(dimensions);
70 this->Structure.SetGlobalPointIndexStart(start);
78 return this->Structure.GetGlobalPointDimensions();
85 return this->Structure.GetGlobalCellDimensions();
90 return this->Structure.GetGlobalPointIndexStart();
95 return this->Structure.GetNumberOfPointsInCell();
100 return static_cast<vtkm::UInt8>(this->Structure.GetCellShape());
105 auto asVec = this->Structure.GetPointsOfCell(
id);
114 return std::make_shared<CellSetStructured>();
125 this->Structure = other->Structure;
128 template <
typename TopologyElement>
132 return this->Structure.GetSchedulingRange(TopologyElement());
135 template <
typename VisitTopology,
typename Inc
identTopology>
136 using ExecConnectivityType =
139 template <
typename VisitTopology,
typename Inc
identTopology>
150 out <<
" StructuredCellSet:\n";
151 this->Structure.PrintSummary(out);
163 , Structure(src.Structure)
175 , Structure(std::move(src.Structure))
181 this->Structure = std::move(src.Structure);
189 #ifndef vtkm_cont_CellSetStructured_cxx
205 template <vtkm::IdComponent DIMENSION>
206 struct SerializableTypeString<vtkm::cont::CellSetStructured<DIMENSION>>
210 static std::string name =
"CS_Structured<" + std::to_string(DIMENSION) +
">";
220 template <vtkm::IdComponent DIMENSION>
221 struct Serialization<
vtkm::cont::CellSetStructured<DIMENSION>>
227 static VTKM_CONT void save(BinaryBuffer& bb,
const Type& cs)
229 vtkmdiy::save(bb, cs.GetPointDimensions());
230 vtkmdiy::save(bb, cs.GetGlobalPointDimensions());
231 vtkmdiy::save(bb, cs.GetGlobalPointIndexStart());
236 typename Type::SchedulingRangeType dims, gdims, start;
242 cs.SetPointDimensions(dims);
243 cs.SetGlobalPointDimensions(gdims);
244 cs.SetGlobalPointIndexStart(start);
251 #endif //vtk_m_cont_CellSetStructured_h
void PrintSummary(std::ostream &out) const override
Definition: CellSetStructured.h:148
CellSetStructured(const CellSetStructured &src)
Definition: CellSetStructured.h:161
vtkm::Id GetNumberOfCells() const override
Get the number of cells in the topology.
Definition: CellSetStructured.h:45
T load(const U &u, vtkm::Id v)
Definition: FetchTagArrayDirectIn.h:36
Groups connected points that have the same field value.
Definition: Atomic.h:19
auto Get(const vtkm::Tuple< Ts... > &tuple)
Retrieve the object from a vtkm::Tuple at the given index.
Definition: Tuple.h:81
InternalsType Structure
Definition: CellSetStructured.h:186
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
Defines a 1-, 2-, or 3-dimensional structured grid of points.
Definition: CastAndCall.h:32
vtkm::Id GetNumberOfFaces() const override
Definition: CellSetStructured.h:50
std::shared_ptr< CellSet > NewInstance() const override
Definition: CellSetStructured.h:112
CellSetStructured(CellSetStructured &&src) noexcept
Definition: CellSetStructured.h:173
#define VTKM_IS_TOPOLOGY_ELEMENT_TAG(type)
Definition: TopologyElementTag.h:92
vtkm::UInt8 GetCellShape(vtkm::Id=0) const override
Definition: CellSetStructured.h:98
This class is thrown when VTK-m encounters data of a type that is incompatible with the current opera...
Definition: ErrorBadType.h:25
void DeepCopy(const CellSet *src) override
Definition: CellSetStructured.h:117
Definition: Particle.h:351
CellSetStructured & operator=(const CellSetStructured &src)
Definition: CellSetStructured.h:167
vtkm::Id GetNumberOfEdges() const override
Definition: CellSetStructured.h:52
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::Id GetNumberOfPoints() const override
Get the number of points in the topology.
Definition: CellSetStructured.h:48
vtkm::internal::ConnectivityStructuredInternals< DIMENSION > InternalsType
Definition: CellSetStructured.h:37
SchedulingRangeType GetSchedulingRange(TopologyElement) const
Definition: CellSetStructured.h:129
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
Defines the topological structure of the data in a DataSet.
Definition: CellSet.h:28
typename InternalsType::SchedulingRangeType SchedulingRangeType
Definition: CellSetStructured.h:42
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
void GetCellPointIds(vtkm::Id id, vtkm::Id *ptids) const override
Definition: CellSetStructured.h:103
Definition: ConnectivityStructured.h:25
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
SchedulingRangeType GetPointDimensions() const
Get the dimensions of the points.
Definition: CellSetStructured.h:74
#define VTKM_CONT_TEMPLATE_EXPORT
Definition: vtkm_cont_export.h:62
void SetPointDimensions(SchedulingRangeType dimensions)
Set the dimensions of the structured array of points.
Definition: CellSetStructured.h:58
SchedulingRangeType GetGlobalCellDimensions() const
Definition: CellSetStructured.h:83
SchedulingRangeType GetCellDimensions() const
Definition: CellSetStructured.h:81
void SetGlobalPointDimensions(SchedulingRangeType dimensions)
Definition: CellSetStructured.h:63
void ReleaseResourcesExecution() override
Definition: CellSetStructured.h:55
ExecConnectivityType< VisitTopology, IncidentTopology > PrepareForInput(vtkm::cont::DeviceAdapterId, VisitTopology, IncidentTopology, vtkm::cont::Token &) const
Definition: CellSetStructured.h:140
CellSetStructured & operator=(CellSetStructured &&src) noexcept
Definition: CellSetStructured.h:179
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89
vtkm::IdComponent GetNumberOfPointsInCell(vtkm::Id=0) const override
Definition: CellSetStructured.h:93
void SetGlobalPointIndexStart(SchedulingRangeType start)
Definition: CellSetStructured.h:68
SchedulingRangeType GetGlobalPointIndexStart() const
Definition: CellSetStructured.h:88
SchedulingRangeType GetGlobalPointDimensions() const
Definition: CellSetStructured.h:76
~CellSetStructured() override
Definition: CellSetStructured.h:157