VTK  9.4.20250420
vtkIOSSCellGridUtilities.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkIOSSCellGridUtilities_h
5#define vtkIOSSCellGridUtilities_h
6
19#include "vtkCellAttribute.h" // For CellTypeInfo internal class.
21#include "vtkDoubleArray.h"
22#include "vtkIOSSReader.h"
23#include "vtkIOSSUtilities.h"
24#include "vtkLogger.h"
25#include "vtkObject.h"
26#include "vtkSmartPointer.h"
27#include "vtkStringToken.h"
28#include "vtkTypeInt32Array.h"
29#include "vtkTypeInt64Array.h"
30#include "vtkTypeList.h" // Needed for ArrayList definition
31
32// Ioss includes
33#include <vtk_ioss.h>
34// clang-format off
35#include VTK_IOSS(Ioss_Region.h)
36#include VTK_IOSS(Ioss_Transform.h)
37#include VTK_IOSS(Ioss_StructuredBlock.h)
38#include VTK_IOSS(Ioss_SideSet.h)
39#include VTK_IOSS(Ioss_SideBlock.h)
40// clang-format on
41
42#include <cassert>
43#include <set>
44
45VTK_ABI_NAMESPACE_BEGIN
46class vtkCellGrid;
47class vtkCellArray;
48class vtkCellMetadata;
49class vtkDGCell;
50class vtkDataSet;
51VTK_ABI_NAMESPACE_END
52
54{
55VTK_ABI_NAMESPACE_BEGIN
56
69vtkSmartPointer<vtkCellMetadata> GetCellMetadata(const Ioss::ElementTopology* topology,
70 int& ioss_cell_points, int& ioss_cell_order, vtkCellGrid* cellGrid = nullptr);
71
78const Ioss::ElementTopology* GetElementTopology(vtkCellMetadata* cellType);
79
87bool GetConnectivity(const Ioss::GroupingEntity* group_entity, vtkCellGrid* grid, vtkDGCell* meta,
88 int ioss_cell_points, int spec_index = -1, const std::string& group_name = std::string(),
89 vtkIOSSUtilities::Cache* cache = nullptr);
90
113vtkSmartPointer<vtkCellMetadata> GetCellMetadata(const Ioss::GroupingEntity* group_entity,
114 int& ioss_cell_points, int& ioss_cell_order, vtkCellGrid* cell_grid = nullptr,
115 vtkIOSSUtilities::Cache* cache = nullptr);
116
126bool GetShape(Ioss::Region* region, const Ioss::GroupingEntity* group_entity,
127 vtkCellAttribute::CellTypeInfo& cellShapeInfo, int timestep, vtkDGCell* meta,
128 vtkCellGrid* grid = nullptr, vtkIOSSUtilities::Cache* cache = nullptr);
129
130VTK_ABI_NAMESPACE_END
131}
132
133#endif
134// VTK-HeaderTest-Exclude: vtkIOSSCellGridUtilities.h
object to represent cell connectivity
Visualization data composed of cells of arbitrary type.
Definition vtkCellGrid.h:49
Metadata for a particular type of cell (finite element).
Base class for a discontinuous Galerkin cells of all shapes.
Definition vtkDGCell.h:44
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
Hold a reference to a vtkObjectBase instance.
internal utilities for vtkIOSSCellGridReader
vtkSmartPointer< vtkCellMetadata > 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 I...
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.
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.
const Ioss::ElementTopology * GetElementTopology(vtkCellMetadata *cellType)
Return (if possible) an Ioss::ElementTopology object that corresponds to the input cell metadata.