38 #include <unordered_map>
40 VTK_ABI_NAMESPACE_BEGIN
96 bool CopyStructure(
vtkCellGrid* other,
bool byReference =
true);
118 const std::unordered_map<int, vtkSmartPointer<vtkDataSetAttributes>>&
GetArrayGroups()
const
120 return this->ArrayGroups;
129 void MapArrayLocations(
130 std::unordered_map<vtkAbstractArray*, vtkStringToken>& arrayLocations)
const;
180 template <
typename CellType>
183 CellType* result = this->GetCellsOfType<CellType>();
189 if (metadata->SetCellGrid(
this))
191 auto ok = this->
Cells.insert(
192 std::make_pair(
vtkStringToken(vtk::TypeName<CellType>()).GetId(), metadata));
195 result =
dynamic_cast<CellType*
>(ok.first->second.GetPointer());
216 int AddAllCellMetadata();
223 template <
typename CellType>
226 CellType*
meta = this->GetCellsOfType<CellType>();
231 return this->RemoveCellMetadata(meta);
244 int RemoveUnusedCellMetadata();
251 template <
typename CellType>
255 if (it == this->
Cells.end())
259 return static_cast<const CellType*
>(it->second.GetPointer());
261 template <
typename CellType>
265 if (it == this->
Cells.end())
269 return static_cast<CellType*
>(it->second.GetPointer());
277 template <
typename Container>
280 for (
const auto& entry : this->
Cells)
282 cellTypes.insert(cellTypes.end(), entry.first);
285 template <
typename Container>
289 this->CellTypes(cellTypes);
292 std::vector<vtkStringToken> CellTypeArray()
const;
293 std::vector<std::string> GetCellTypes()
const;
342 virtual bool GetCellAttributeRange(
vtkCellAttribute* attribute,
int componentIndex,
343 double range[2],
bool finiteRange =
false)
const;
359 std::set<int> GetCellAttributeIds()
const;
360 std::vector<int> GetUnorderedCellAttributeIds()
const;
365 std::vector<vtkSmartPointer<vtkCellAttribute>> GetCellAttributeList()
const;
423 vtkGetStringTokenMacro(SchemaName);
424 vtkGetMacro(SchemaVersion, vtkTypeUInt32);
431 vtkSetMacro(ContentVersion, vtkTypeUInt32);
432 vtkGetMacro(ContentVersion, vtkTypeUInt32)
468 bool ComputeBoundsInternal();
474 int NextAttribute = 0;
476 bool HaveShape{
false };
483 vtkTypeUInt32 SchemaVersion{ 0 };
488 vtkTypeUInt32 ContentVersion{ 0 };
501 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.
void GetBounds(T a, double bds[6])
Perform an operation on cells in a vtkCellMetadata instance.
virtual vtkFieldData * GetAttributesAsFieldData(int type)
Returns the attributes of the data object as a vtkFieldData.
virtual vtkDataSetAttributes * GetAttributes(int type)
Returns the attributes of the data object of the specified attribute type.
vtkCellGridRangeQuery::CacheMap RangeCache
Cache for cell attribute component ranges.
static vtkDataObject * New()
CellType * GetCellsOfType()
Get a cell metadata object of the given type.
Copy the cell metadata and attribute(s) of one cell-grid into another.
Abstract superclass for all arrays.
const std::unordered_map< int, vtkSmartPointer< vtkDataSetAttributes > > & GetArrayGroups() const
Fetch a partition of DOF arrays.
record modification and/or execution time
vtkCellGridRangeQuery::CacheMap & GetRangeCache() const
Return the cache of cell-attribute range data.
std::map< vtkCellAttribute *, std::vector< ComponentRange >> CacheMap
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type.
virtual bool SupportsGhostArray(int type)
Returns if this type of data object support ghost array for specified type.
virtual void Initialize()
Restore data object to initial state,.
Hold a reference to a vtkObjectBase instance.
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
Visualization data composed of cells of arbitrary type.
VTKIOCATALYSTCONDUIT_EXPORT int GetCellType(const std::string &shape)
Get vtk cell type from conduit shape name throw a runtime_error on unsupported type.
a simple class to control print indentation
A function defined over the physical domain of a vtkCellGrid.
abstract superclass for arrays of numeric data
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.
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
vtkStringToken SchemaName
A string specifying the schema which generated this cell-grid.
dynamic, self-adjusting array of unsigned char
virtual int GetAttributeTypeForArray(vtkAbstractArray *arr)
Retrieves the attribute type that an array came from.
A cell specified by degrees of freedom held in arrays.
virtual vtkIdType GetNumberOfElements(int type)
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
const CellType * GetCellsOfType() const
Get a cell metadata object of the given type.
bool RemoveCellMetadata()
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.
Represents and manipulates a collection of data arrays.
std::array< double, 6 > CachedBounds