# How to implement integration point

Hello everyone,
I would like to implement integration point in my celltype line.
I’m doing some analysis on beam element, so I have the node “i” and “j” and the connectivity of the element i - j.
StressStrain of this element is evaluated at integration points, that locations are known for me.
So for example the length of the beam is 3meters, I know that integration points are at [0, 0.2, … , 3].
I also have StressStrain value at each integration point.
Is it possible to make a .vtk file that contains this kind of informations?
Obviously I also know the coordinate x,y,z of each node.

What you could do is use `vtkPolyLine`, with each points aligned in it. Do you want to store information at each of those points and display it, or do you just want to compute something behind the scene with it?

Yes I want to store some data in it, cause at those integration points I know stress and strain of the element (it’s a Fiber element).
I have to face the problem of connectivity, because It’s true I know the position of the integration point between the main 2 nodes of my element, but I do not have the connectivity of integration points.

I’ll post a picture to explain better.

As you can see in the picture, in red i’ve highlighted the real 2 node of the element and in blue the intergration points, but I haven’t the information about connectivity between them.
So I would like to know if it’s possible to insert this relation in the vtk file along with this information ad integration point.
For example I’d say: ok vtk, my element is the line element “k” and it has 2 point of coordinate “i” and “j”, but this element has also integration point 1, 2, 3, …n, with this stress, deformation, force, ect, value.
Another option could be recreate the entire mesh after the analysis, but generate the connectivity will be quite a challenge.

Btw you also told me I can compute something behind the scene, so it’s possible to not show them and get just the result displayed?

If I use vtkPolyline maybe I do not need connectivity?

With a `vtkPolyLine`, the connectivity is inferred in the cell topology. As far as I can tell, you should use those cells and map a `vtkPointData` scalar field to it. When your data set is built, you can save it in a `.vtk` file like you could save anything. Integrating on a `vtkPolyLine` can be easily done by iterating on the points in the cell.