VTK  9.4.20241217
Functions
vtkIOSSCellGridUtilities Namespace Reference

internal utilities for vtkIOSSCellGridReader More...

Functions

vtkSmartPointer< vtkCellMetadataGetCellMetadata (const Ioss::ElementTopology *topology, int &ioss_cell_points, int &ioss_cell_order, vtkCellGrid *cellGrid=nullptr)
 Returns the an instance of a vtkCellMetadata subclass that can hold data corresponding to the input Ioss topology element.
 
const Ioss::ElementTopology * GetElementTopology (vtkCellMetadata *cellType)
 Return (if possible) an Ioss::ElementTopology object that corresponds to the input cell metadata.
 
bool GetConnectivity (const Ioss::GroupingEntity *group_entity, vtkCellGrid *grid, vtkDGCell *meta, int ioss_cell_points, int spec_index=-1, const std::string &group_name=std::string(), vtkIOSSUtilities::Cache *cache=nullptr)
 Read connectivity and possibly ghost-node markings into meta.
 
vtkSmartPointer< vtkCellMetadataGetCellMetadata (const Ioss::GroupingEntity *group_entity, int &ioss_cell_points, int &ioss_cell_order, vtkCellGrid *cell_grid=nullptr, vtkIOSSUtilities::Cache *cache=nullptr)
 Read connectivity information from the group_entity with offsetting but without permutation.
 
bool GetShape (Ioss::Region *region, const Ioss::GroupingEntity *group_entity, vtkCellAttribute::CellTypeInfo &cellShapeInfo, int timestep, vtkDGCell *meta, vtkCellGrid *grid=nullptr, vtkIOSSUtilities::Cache *cache=nullptr)
 Fetch the nodal coordinates for group_entity and create the cell_grid's shape attribute.
 

Detailed Description

internal utilities for vtkIOSSCellGridReader

vtkIOSSCellGridReader provides some helper functions to go between vtkCellGrid and Ioss. Not intended for public consumption. API likely to change without notice.

We limit this namespace for utility functions that go between Ioss and vtkCellGrid or vice-versa. Thus, methods that are not straddling that fence should be not be added here.

Function Documentation

◆ GetCellMetadata() [1/2]

vtkSmartPointer< vtkCellMetadata > vtkIOSSCellGridUtilities::GetCellMetadata ( const Ioss::ElementTopology *  topology,
int &  ioss_cell_points,
int &  ioss_cell_order,
vtkCellGrid cellGrid = nullptr 
)

Returns the an instance of a vtkCellMetadata subclass that can hold data corresponding to the input Ioss topology element.

This may return a null pointer for unsupported types. If the returned pointer is non-null, ioss_cell_points will be set to a positive integer specifying the number of connectivity entries per cell and ioss_cell_order will return the (presumably uniform) polynomial degree of the cell along each parameter-space axis. (The cell order is the value returned by Ioss_ElementTopology::order() which does not appear to be the total order of the shape function.)

◆ GetElementTopology()

const Ioss::ElementTopology * vtkIOSSCellGridUtilities::GetElementTopology ( vtkCellMetadata cellType)

Return (if possible) an Ioss::ElementTopology object that corresponds to the input cell metadata.

This may return a null pointer.

◆ GetConnectivity()

bool vtkIOSSCellGridUtilities::GetConnectivity ( const Ioss::GroupingEntity *  group_entity,
vtkCellGrid grid,
vtkDGCell meta,
int  ioss_cell_points,
int  spec_index = -1,
const std::string &  group_name = std::string(),
vtkIOSSUtilities::Cache cache = nullptr 
)

Read connectivity and possibly ghost-node markings into meta.

This also adds the arrays to grid in instances of vtkDataSetAttributes corresponding to the cell- or side-specification which the arrays are referenced.

◆ GetCellMetadata() [2/2]

vtkSmartPointer< vtkCellMetadata > vtkIOSSCellGridUtilities::GetCellMetadata ( const Ioss::GroupingEntity *  group_entity,
int &  ioss_cell_points,
int &  ioss_cell_order,
vtkCellGrid cell_grid = nullptr,
vtkIOSSUtilities::Cache cache = nullptr 
)

Read connectivity information from the group_entity with offsetting but without permutation.

Unlike GetConnectivity(), which may permute the connectivity entries from the IOSS/Exodus standard into the expected VTK node ordering, this method does no processing and returns a raw array of node IDs. This is used to construct vtkCellGrid objects that use different basis functions (and thus different node orderings).

However, all connectivity arrays returned by this method adjust node IDs to be zero-based (instead of 1-based).

Returns an integer array and the element type for elements in this group_entity. Note that the returned array may be vtkTypeInt32Array, vtkTypeInt64Array, or vtkIdTypeArray; no guarantees are made for which type is returned.

NOTE: this does not support entity groups with mixed topological elements.

Throws std::runtime_error on error.

◆ GetShape()

bool vtkIOSSCellGridUtilities::GetShape ( Ioss::Region *  region,
const Ioss::GroupingEntity *  group_entity,
vtkCellAttribute::CellTypeInfo cellShapeInfo,
int  timestep,
vtkDGCell meta,
vtkCellGrid grid = nullptr,
vtkIOSSUtilities::Cache cache = nullptr 
)

Fetch the nodal coordinates for group_entity and create the cell_grid's shape attribute.

The ioss_cell_order refers to the polynomial order of the interpolating function along each axis of the cell. This is used to choose the cell-attribute's type (in turn used to choose basis functions for evaluating/rendering cells).