VTK  9.7.1
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.
20 #include "vtkDataArraySelection.h"
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 
45 VTK_ABI_NAMESPACE_BEGIN
46 class vtkCellGrid;
47 class vtkCellArray;
48 class vtkCellMetadata;
49 class vtkDGCell;
50 class vtkDataSet;
51 VTK_ABI_NAMESPACE_END
52 
54 {
55 VTK_ABI_NAMESPACE_BEGIN
56 
69 vtkSmartPointer<vtkCellMetadata> GetCellMetadata(const Ioss::ElementTopology* topology,
70  int& ioss_cell_points, int& ioss_cell_order, vtkCellGrid* cellGrid = nullptr);
71 
78 const Ioss::ElementTopology* GetElementTopology(vtkCellMetadata* cellType);
79 
87 bool 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 
113 vtkSmartPointer<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 
126 bool 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 
130 VTK_ABI_NAMESPACE_END
131 }
132 
133 #endif
134 // VTK-HeaderTest-Exclude: vtkIOSSCellGridUtilities.h
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...
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Metadata for a particular type of cell (finite element).
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:48
Base class for a discontinuous Galerkin cells of all shapes.
Definition: vtkDGCell.h:43
internal utilities for vtkIOSSCellGridReader
object to represent cell connectivity
Definition: vtkCellArray.h:177
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...