[Gmsh] Interpolating mesh values

Mayank Jog mayankjog at gmail.com
Wed Nov 29 03:44:09 CET 2017


To add on to the previous email:
I figured out "2.", and I am able to use the GUI to write out a grid.

My remaining questions are
A :: "1" from prev. email ::
what interpolation kernel/ method is gmsh using?
        [I wanted to use an interpolation scheme such that if I specify a
point outside the mesh (which can happen when I spec a regular grid), I
don't want gmsh to extrapolate]

and a newer one :
B :: I noticed that you wrote a code snippet. I'm able to run it by saving
it as .geo/ as well as do the same through the GUI.
But how do I go about batching the following: (i) use Plugin(CutGrid) to
create a new view, (ii) save the points in the new view in a .pos?

I suspect the latter question is something very simple I'm missing, but can
you guide me on it?
Thank you!
Mayank

On Tue, Nov 28, 2017 at 7:53 AM, Mayank Jog <mayankjog at gmail.com> wrote:

> This is awesome!
> 2 Quick questions :
>   1. When I use probe to get value @ a point, what interpolation kernel/
> method is gmsh using?
>         [I wanted to use an interpolation scheme such that if I specify a
> point outside the mesh (which can happen when I spec a regular grid), I
> don't want gmsh to extrapolate]
>
>   2. I took a quick look @ the format of plugin(cutgrid) : {
> http://www.manpagez.com/info/gmsh/gmsh-2.4.0/gmsh_53.php }
>        Once I specify an origin, u & v vectors (for two axes), and number
> of points "nu" and "nv" ;
>           are "nu" and "nv" points sampled on both sides of the origin, or
> along +u and +v?
>
> Thank you!
> Mayank
>
> On Tue, Nov 28, 2017 at 7:39 AM, Christophe Geuzaine <cgeuzaine at uliege.be>
> wrote:
>
>>
>>
>> > On 27 Nov 2017, at 23:41, Mayank Jog <mayankjog at gmail.com> 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)
>>
>> Plugin(Probe) for a single evaluation; or Plugin(CutGrid) and
>> Plugin(CutBox) for multiple evaluations on regular grids.
>>
>> For example:
>>
>> Merge "data.msh";
>> Plugin(Probe).X = 0.3;
>> Plugin(Probe).Y = 0.3;
>> Plugin(Probe).Z = 0.3;
>> Plugin(Probe).Run;
>>
>>
>> >
>> > 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
>>
>>
>> --
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
>>
>> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171128/f2290f51/attachment.html>


More information about the gmsh mailing list