VTK/VTK integration point support
Integration point support in VTK
What are integration points?
In Finite Element Analysis (FEA) the simulation results are managed in so called integration points. Integration points are used to control and monitor values inside of a finite element. These values may be stress or strain tensors, thickness and so on. Integration points are located within a finite element and therefore strongly connected to them. The position of an integration point inside a finite element is based on the quadrature and the integration method (gauss, newton-cotes).
Why should VTK support integration points?
To analyze/visualize and process data from FEA simulation programs, it is highly recommended to handle the integration points as a part of a finite element.
As far as i can tell, VTK is widely used to analyze and process FEA simulation results. Because of that there is a need to handle, processes and visualize integration points with VTK. Currently several different approaches are implemented independently from each other to handle integration points in VTK.
Based on several opinions (accordingly the VTK developers mailing list) would it be very useful to implement integration point support into the official VTK version. This would avoid parallel incompatible implementations.
Many FEA analysts may benefit from a native approach, because analysing and processing of integration points are handled in each FEA simulation program differently. VTK can provide a unified interface to analyse and process integration point data, if import classes for specific FEA programs are available.
How to implement integration point support in VTK?
Approach heavy invasive
Integration points are related to a finite element. A finite element is represented in VTK as a cell. The most of the finite elements used in FEA programs are covered in VTK. They are available in vtkUnstructuredGrid. Therefore integration point support should be implemented in vtkUnstructuredGrid and VTK cells.
The approach i prefer will be very invasive and would require an review of many vtkUnstructuredGrid processing classes to provide consistent integration point support. The main idea is to handle integration points as part of a cell and to store the data which is defined in the integration points as an additional data array within the vtkUnstructuredGrid.
This approach should be implemented in a way, that the existing functionality of VTK is not interferred. The visualization and all vtkUnstructuredGrid filter should work with the modified vtkUnstructuredGrid without problems.
I suggest the implementation and modification of the following classes:
- vtkIntegrationPointData A class derived from vtkDataSetAttributes which stores all scalars, vectors and tensors which are defined in the integration points
- vtkIntegrationPointDataCollection A collection of vtkIntegrationPointData
- vtkIntegrationMethodBase An abstract class which defines the interface for any integration method and quadrature which may appear in FEA.
- A specific integration model must be derived from vtkIntegrationMethodBase and implement the interface defined in the abstract class (same principle as vtkCell and derived classes). Typical integration models may be provided by VTK, other can be created very easily for specific purposes outside of VTK.
- The interface of vtkIntegrationMethodBase should define the following variables and methods:
- The type of the integration model (layered/not layered/...)
- The distribution of the integration points within the cell (quadrature) as parametric coordinates
- The number of integration points within the cell
- The number of layers (optionally)
- Methods to extrapolate the integration point values into cell nodes
- Methods to compute the x, y and z position in global coordinates for all integration points of a cell, based on the interpolation functions defined in the corresponding cell and the parametric coordinates of the integration point.
- Methods to extract the integration points in global coordinates with related point data (scalars, vectors and tensors). It should be possible to extract all integration points as vertices's with point data from an vtkUnstructuredGrid by using these methods.
- Methods to create a triangular or vertices's dataset used by mapper/actor/renderer?
- vtkIntegrationMethodCollection a collection to store the specified integration method objects
- An object array storing the links to specific integration models
The following classes should be modified:
- Adding a link to the corresponding integration method and the access methods (Set/Get/Has)
- Adding an additional a vtkDataSetAttribute named vtkIntegrationPointData
- Adding a collection to store all integration-method-objects which appear in the dataset. Normally only a few integration models are used within a dataset. The total number of usual integration models may be 50 - 60?
- Adding an array of size(NumberOfCells) to store a link to the corresponding integration model for each cell
- Change the GetCell(cellid) method to apply the corresponding integration method to the delivered cell
- Implementation of GetIntegrationModel(cellid) which delivers a specific integration model and apply the corresponding cell to the model (to have access to the interpolation methods of the cell)
- Implementation of SetIntegrationModel(cellid, model) to set the integration model of a specific cell (adding a link to the link array) and, in case a new integration model is added, insert the model into the collection
- Adding the method HasIntegrationPoints() to check for integration points support in the ugrid
- All classes which process vtkUnstructuredGrids() (inputs and outputs are ugrids) must be modified to support integration points. This should, of course, be implemented successively, because only a few ugrid filters may be relevant for integration point processing.
This approach is just a simple sketch and may be modified and extended in the future. An UML diagram may follow.
An important issue is, how to store such data in the VTK XML format?