20 #ifndef vtkmCellSetExplicit_h 21 #define vtkmCellSetExplicit_h 23 #ifndef VTK_WRAPPING_CXX 27 #include <vtkm/CellShape.h> 28 #include <vtkm/TopologyElementTag.h> 29 #include <vtkm/cont/ArrayHandle.h> 30 #include <vtkm/cont/CellSet.h> 32 #include <vtkm/cont/serial/DeviceAdapterSerial.h> 33 #include <vtkm/cont/cuda/DeviceAdapterCuda.h> 34 #include <vtkm/cont/tbb/DeviceAdapterTBB.h> 49 , ReverseConnectivityBuilt(false)
64 , Connectivity(src.Connectivity)
65 , IndexOffsets(src.IndexOffsets)
66 , ReverseConnectivityBuilt(src.ReverseConnectivityBuilt)
68 , RNumIndices(src.RNumIndices)
69 , RIndexOffsets(src.RIndexOffsets)
70 , NumberOfPoints(src.NumberOfPoints)
76 this->CellSet::operator=(src);
77 this->Shapes = src.Shapes;
78 this->Connectivity = src.Connectivity;
79 this->IndexOffsets = src.IndexOffsets;
80 this->ReverseConnectivityBuilt = src.ReverseConnectivityBuilt;
81 this->RConn = src.RConn;
82 this->RNumIndices = src.RNumIndices;
83 this->RIndexOffsets = src.RIndexOffsets;
84 this->NumberOfPoints = src.NumberOfPoints;
90 return this->Shapes.GetNumberOfValues();
95 return this->NumberOfPoints;
105 return this->GetNumberOfCells();
110 return this->GetNumberOfPoints();
113 vtkm::IdComponent GetNumberOfPointsInCell(vtkm::Id
index)
const;
115 vtkm::Id GetCellShape(vtkm::Id index)
const;
120 vtkm::Id numberOfPoints,
121 const vtkm::cont::ArrayHandle<vtkm::UInt8,
123 const vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>&
125 const vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkAOSArrayContainerTag>&
128 template <
typename DeviceAdapter,
typename FromTopology,
typename ToTopology>
131 template <
typename DeviceAdapter>
137 template <
typename DeviceAdapter>
143 template <
typename Device>
145 PrepareForInput(Device, vtkm::TopologyElementTagPoint,
146 vtkm::TopologyElementTagCell)
const;
148 template <
typename Device>
150 PrepareForInput(Device, vtkm::TopologyElementTagCell,
151 vtkm::TopologyElementTagPoint)
const;
153 const vtkm::cont::ArrayHandle<vtkm::UInt8, tovtkm::vtkAOSArrayContainerTag>&
155 vtkm::TopologyElementTagCell)
const 160 const vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>&
162 vtkm::TopologyElementTagCell)
const 164 return this->Connectivity;
167 const vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkAOSArrayContainerTag>&
169 vtkm::TopologyElementTagCell)
const 171 return this->IndexOffsets;
174 void PrintSummary(std::ostream& out)
const override;
178 this->Shapes.ReleaseResourcesExecution();
179 this->Connectivity.ReleaseResourcesExecution();
180 this->IndexOffsets.ReleaseResourcesExecution();
181 this->RConn.ReleaseResourcesExecution();
182 this->RNumIndices.ReleaseResourcesExecution();
183 this->RIndexOffsets.ReleaseResourcesExecution();
187 vtkm::cont::ArrayHandle<vtkm::UInt8, tovtkm::vtkAOSArrayContainerTag> Shapes;
188 vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>
190 vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkAOSArrayContainerTag>
197 mutable bool ReverseConnectivityBuilt;
198 mutable vtkm::cont::ArrayHandle<vtkm::Id> RConn;
199 mutable vtkm::cont::ArrayHandle<vtkm::IdComponent> RNumIndices;
200 mutable vtkm::cont::ArrayHandle<vtkm::Id> RIndexOffsets;
201 mutable vtkm::Id NumberOfPoints;
206 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
209 vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell)
const;
211 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
214 vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint)
const;
216 #ifdef VTKM_ENABLE_TBB 217 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
220 vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell)
const;
222 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
225 vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint)
const;
228 #ifdef VTKM_ENABLE_OPENMP 229 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
232 vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell)
const;
234 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
237 vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint)
const;
240 #if defined(VTKM_ENABLE_CUDA) && defined(VTKM_CUDA) 241 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
244 vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell)
const;
246 extern template VTKACCELERATORSVTKM_TEMPLATE_EXPORT
249 vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint)
const;
const vtkm::cont::ArrayHandle< vtkm::Id, tovtkm::vtkCellArrayContainerTag > & GetConnectivityArray(vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell) const
vtkmCellSetExplicitAOS(const std::string &name=std::string())
vtkm::exec::ConnectivityVTKAOS< DeviceAdapter > ExecObjectType
const vtkm::cont::ArrayHandle< vtkm::UInt8, tovtkm::vtkAOSArrayContainerTag > & GetShapesArray(vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell) const
const vtkm::cont::ArrayHandle< vtkm::Id, tovtkm::vtkAOSArrayContainerTag > & GetIndexOffsetArray(vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell) const
void ReleaseResourcesExecution() override
vtkm::exec::ReverseConnectivityVTK< DeviceAdapter > ExecObjectType
vtkm::exec::ConnectivityVTKAOS< Device > PrepareForInput(Device, vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell) const
vtkmCellSetExplicitAOS(const vtkmCellSetExplicitAOS &src)
vtkm::Id GetSchedulingRange(vtkm::TopologyElementTagCell) const
vtkm::Id GetNumberOfEdges() const override
vtkm::Id GetNumberOfFaces() const override
vtkmCellSetExplicitAOS & operator=(const vtkmCellSetExplicitAOS &src)
virtual ~vtkmCellSetExplicitAOS()
vtkm::Id GetNumberOfCells() const override
vtkm::Id GetSchedulingRange(vtkm::TopologyElementTagPoint) const
vtkm::Id GetNumberOfPoints() const override