Interpolating at vertices of a mesh
Show older comments
I have created a mesh using the initmesh in 2D, which gives the nodes (p), boundary (e) and triangular elements (t). I have a function/vector calculated at each triangular elements, I need to interpolate the function at the vertices of the mesh. How do I do it?
1 Comment
Bruno Luong
on 6 Aug 2020
In theory you cannot.
A function that is piecewise constant on elements is discontinuos at the vertices and you cannot speak about value at the vertices. So there is no interpolation that can provide you this value.
Accepted Answer
More Answers (1)
Bruno Luong
on 6 Aug 2020
Edited: Bruno Luong
on 6 Aug 2020
In theory you cannot.
A function that is piecewise constant on elements is discontinuos at the vertices and you cannot speak about value at the vertices. So there is no interpolation that can provide you this value.
Now you might be able to make a fake discrete weighted mean at the vertices v for all elements Ti that share this vertice. There is two common strategies is take the weight as
f(v) = sum (wi*f(Ti)) / sum(wi)
- wi = surface of the elements
- wi = angle at the vertice
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!