Support of integration points in finite elements
Paraview is a wonderful program. What is please the current status of integration points on unstructured mesh ? Mapping of stress/strain to nodes presents a lot of troubles and may violate discontinuity. Thanks.
-
Stephane Ploix commented
Vit,
You already have this possibility in VTK/ParaView, (look for the "Quadrature" keywork in class names in VTK), but you have to develop your own reader to fill the necessary information to VTK.
Basically, you need to :
1/ for each bloc, and for each cell type in the bloc, define a vtkQuadraturePointsDefinition and store those definitions in a vtkQuadratureSchemeDictionnary that you set in vtkInformationKeys to your bloc.
2/ store the array of values of your field at integration points a a field array.
3/ As the number of quadrature points do not match the number of cells nor the number of points, you have to create a cell-centered offset array that will store for each cell the offset of the first quadrature point for this cell.
4/ Then, you will be able to use the vtkQuadraturePointsGenerator that will generate points at each integration point in all your cells and map the values stored in the field array.This mechanism allow to use some filters between the reader and the vtkQuadraturePointsGenerator, as long as those filters do not modify the cell type.
-
nooj commented
to avoid the discontinuity issue, you have to solve the extrapolation to the nodes globally, not just element by element.
it is probably most accurate for you to map stress/strain values to the nodes by using the solver which gave you the integration point values you are trying to interpolate in the first place. this is because the proper interpolation depends on the basis functions you are using in your computations, which is not something paraview knows about.
this is the relevant equation one needs to solve for this problem:
<basis functions>*<unknown nodal coefficients>
= <continuous function whose values are known at gauss points>the nice thing is that the newton-raphson scheme for computing this uses a constant mass matrix! thus the matrix can be precomputed, and solving the linear system is very fast and takes about one iteration.
i hope this helps you (or future readers) with your simulations. i felt the same way you did until i sat down and worked out a generic "nodal interpolation" code. it's really not as hard as it seems at first, and it can be reused to interpolate any calculated value.