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();
87 return this->Structure.GetGlobalCellDimensions();
92 return this->Structure.GetGlobalPointIndexStart();
97 return this->Structure.GetNumberOfPointsInCell();
102 return static_cast<vtkm::UInt8>(this->Structure.GetCellShape());
107 auto asVec = this->Structure.GetPointsOfCell(
id);
116 return std::make_shared<CellSetStructured>();
127 this->Structure = other->Structure;
130 template <
typename TopologyElement>
134 return this->Structure.GetSchedulingRange(TopologyElement());
137 template <
typename VisitTopology,
typename Inc
identTopology>
138 using ExecConnectivityType =
155 template <
typename VisitTopology,
typename Inc
identTopology>
158 VisitTopology visitTopology,
159 IncidentTopology incidentTopology,
164 (void)incidentTopology;
171 out <<
" StructuredCellSet:\n";
172 this->Structure.PrintSummary(out);
184 , Structure(src.Structure)
196 , Structure(std::move(src.Structure))
202 this->Structure = std::move(src.Structure);
210 #ifndef vtkm_cont_CellSetStructured_cxx
226 template <vtkm::IdComponent DIMENSION>
227 struct SerializableTypeString<vtkm::cont::CellSetStructured<DIMENSION>>
231 static std::string name =
"CS_Structured<" + std::to_string(DIMENSION) +
">";
241 template <vtkm::IdComponent DIMENSION>
242 struct Serialization<
vtkm::cont::CellSetStructured<DIMENSION>>
248 static VTKM_CONT void save(BinaryBuffer& bb,
const Type& cs)
250 vtkmdiy::save(bb, cs.GetPointDimensions());
251 vtkmdiy::save(bb, cs.GetGlobalPointDimensions());
252 vtkmdiy::save(bb, cs.GetGlobalPointIndexStart());
257 typename Type::SchedulingRangeType dims, gdims, start;
263 cs.SetPointDimensions(dims);
264 cs.SetGlobalPointDimensions(gdims);
265 cs.SetGlobalPointIndexStart(start);
272 #endif //vtk_m_cont_CellSetStructured_h
void PrintSummary(std::ostream &out) const override
Definition: CellSetStructured.h:169
CellSetStructured(const CellSetStructured &src)
Definition: CellSetStructured.h:182
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:207
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:114
CellSetStructured(CellSetStructured &&src) noexcept
Definition: CellSetStructured.h:194
#define VTKM_IS_TOPOLOGY_ELEMENT_TAG(type)
Definition: TopologyElementTag.h:92
vtkm::UInt8 GetCellShape(vtkm::Id=0) const override
Definition: CellSetStructured.h:100
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:119
Definition: Particle.h:351
CellSetStructured & operator=(const CellSetStructured &src)
Definition: CellSetStructured.h:188
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:131
#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
ExecConnectivityType< VisitTopology, IncidentTopology > PrepareForInput(vtkm::cont::DeviceAdapterId device, VisitTopology visitTopology, IncidentTopology incidentTopology, vtkm::cont::Token &token) const
Prepares the data for a particular device and returns the execution object for it.
Definition: CellSetStructured.h:156
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:105
A class holding information about topology connections.
Definition: ConnectivityStructured.h:30
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:85
SchedulingRangeType GetCellDimensions() const
Get the dimensions of the cells.
Definition: CellSetStructured.h:83
void SetGlobalPointDimensions(SchedulingRangeType dimensions)
Definition: CellSetStructured.h:63
void ReleaseResourcesExecution() override
Definition: CellSetStructured.h:55
CellSetStructured & operator=(CellSetStructured &&src) noexcept
Definition: CellSetStructured.h:200
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89
vtkm::IdComponent GetNumberOfPointsInCell(vtkm::Id=0) const override
Definition: CellSetStructured.h:95
void SetGlobalPointIndexStart(SchedulingRangeType start)
Definition: CellSetStructured.h:68
SchedulingRangeType GetGlobalPointIndexStart() const
Definition: CellSetStructured.h:90
SchedulingRangeType GetGlobalPointDimensions() const
Definition: CellSetStructured.h:76
~CellSetStructured() override
Definition: CellSetStructured.h:178