33 #include <unordered_map>
35 VTK_ABI_NAMESPACE_BEGIN
89 const std::unordered_map<int, vtkSmartPointer<vtkDataSetAttributes>>&
GetArrayGroups()
const
91 return this->ArrayGroups;
137 template <
typename CellType>
140 CellType* result = this->GetCellsOfType<CellType>();
146 if (metadata->SetCellGrid(
this))
148 auto ok = this->Cells.insert(
149 std::make_pair(
vtkStringToken(vtk::TypeName<CellType>()).GetId(), metadata));
152 result = ok.first.GetPointer();
165 template <
typename CellType>
168 auto it = this->Cells.find(
vtkStringToken(vtk::TypeName<CellType>()).GetId());
169 if (it == this->Cells.end())
173 return static_cast<const CellType*
>(it->second);
175 template <
typename CellType>
178 auto it = this->Cells.find(
vtkStringToken(vtk::TypeName<CellType>()).GetId());
179 if (it == this->Cells.end())
183 return static_cast<CellType*
>(it->second);
191 template <
typename Container>
194 for (
const auto& entry : this->Cells)
196 cellTypes.insert(cellTypes.end(), entry.first);
199 template <
typename Container>
203 this->CellTypes(cellTypes);
208 #if defined(_MSC_VER) && _MSC_VER >= 1930 && _MSC_VER < 1940
213 static std::vector<vtkStringToken> cellTypes;
215 static thread_local std::vector<vtkStringToken> cellTypes;
217 this->CellTypes(cellTypes);
299 bool ComputeBoundsInternal();
301 std::unordered_map<int, vtkSmartPointer<vtkDataSetAttributes>>
ArrayGroups;
302 std::unordered_map<CellTypeId, vtkSmartPointer<vtkCellMetadata>>
Cells;
303 std::unordered_map<vtkStringToken::Hash, vtkSmartPointer<vtkCellAttribute>>
Attributes;
304 int NextAttribute = 0;
306 bool HaveShape{
false };
316 VTK_ABI_NAMESPACE_END
virtual vtkUnsignedCharArray * GetGhostArray(int type)
Returns the ghost arrays of the data object of the specified attribute type.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void GetBounds(T a, double bds[6])
Perform an operation on cells in a vtkCellMetadata instance.
virtual vtkDataSetAttributes * GetAttributes(int type)
Returns the attributes of the data object of the specified attribute type.
static vtkDataObject * New()
CellType * GetCellsOfType()
Get a cell metadata object of the given type.
std::unordered_map< CellTypeId, vtkSmartPointer< vtkCellMetadata > > Cells
Abstract superclass for all arrays.
const std::unordered_map< int, vtkSmartPointer< vtkDataSetAttributes > > & GetArrayGroups() const
Fetch a partition of DOF arrays.
int GetDataObjectType() override
Return class name of data type.
std::unordered_map< vtkStringToken::Hash, vtkSmartPointer< vtkCellAttribute > > Attributes
record modification and/or execution time
virtual void Initialize()
Restore data object to initial state,.
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
std::unordered_map< int, vtkSmartPointer< vtkDataSetAttributes > > ArrayGroups
Visualization data composed of cells of arbitrary type.
a simple class to control print indentation
std::vector< vtkStringToken > CellTypeArray() const
Fill a container with all the cell types (as string tokens).
A function defined over the physical domain of a vtkCellGrid.
represent and manipulate attribute data in a dataset
Container CellTypes() const
Fill a container with all the cell types (as string tokens).
Represent a string by its integer hash.
virtual unsigned long GetActualMemorySize()
Return the actual size of the data in kibibytes (1024 bytes).
CellType * AddCellMetadata()
Insert a cell type, if possible.
int GetCellType(const Ioss::ElementTopology *topology)
Returns VTK celltype for a Ioss topology element.
dynamic, self-adjusting array of unsigned char
virtual int GetAttributeTypeForArray(vtkAbstractArray *arr)
Retrieves the attribute type that an array came from.
virtual vtkIdType GetNumberOfElements(int type)
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
vtkStringToken ShapeAttribute
const CellType * GetCellsOfType() const
Get a cell metadata object of the given type.
vtkTimeStamp CachedBoundsTime
general representation of visualization data
void CellTypes(Container &cellTypes) const
Fill a container with all the cell types (as string tokens).
virtual void DeepCopy(vtkDataObject *src)
The goal of the method is to copy the complete data from src into this object.
virtual void ShallowCopy(vtkDataObject *src)
The goal of the method is to copy the data up to the array pointers only.
std::array< double, 6 > CachedBounds