[Gmsh] Interpolating mesh values
Jeremy Theler
jeremy at seamplex.com
Tue Nov 28 15:24:58 CET 2017
Hi Mayank
I have written that functionality into my own framework called wasora (www.seamplex.com/wasora)
Say you have a .msh file with point-wise defined data as inhttps://bitbucket.org/seamplex/wasora/src/0321d32894d66056e64b2035ac98887b7aa4f29b/examples/tiny.msh?at=master&fileviewer=file-view-default
Then you would have a wasora input file like this onehttps://bitbucket.org/seamplex/wasora/src/0321d32894d66056e64b2035ac98887b7aa4f29b/examples/mesh_function_from_msh.was?at=master&fileviewer=file-view-default
That would leave you a file "tiny-rect.dat" with the data from the msh file interpolated in a rectangular grid.The same should work for 3D meshes.
Let me know if you have any question.--jeremy thelerwww.seamplex.com id="-x-evo-selection-start-marker">
On Mon, 2017-11-27 at 14:41 -0800, Mayank Jog wrote:
> Hello,
> I've started using gmsh recently, and I wonder if there is a functionality to interpolate data.
>
> I have a mesh, and a value associated with each element of the mesh (electric potential)*.
> I want to use this mesh to calculate the value of the electric potential on a uniform cartesian grid specified by points (= (x, y, z) ; known in millimeters; = same unit as in $nodes)
>
> I'm guessing some sort of interpolation is needed...how would I go about it?
>
> I tried using MATLAB functions to interpolate, but they all use triangulation techniques which work for convex volumes. My volume is non-convex (it has a U-shape)...how would I do the interpolation? Does gmsh have a function to interpolate?
>
> Thank you,
> Mayank
>
> *I have the original mesh (containing $nodes, $elements, and $elementdata) in .msh format.
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171128/7608f461/attachment.html>
More information about the gmsh
mailing list