[Gmsh] Problem with cutgrid plugin

Dalton Harvie daltonh at unimelb.edu.au
Fri Mar 25 12:52:18 CET 2011


Dear Christophe,

I'm the author of the code that produced the file Lachlan refers to.  It's a finite volume code.

An workaround would be to remove the line data from this file specifically for this cutgrid operation, however generally this line data is required for restart purposes as some variables are stored there (and to visualise BCs etc too).

This search to find the relevant element - is it based on distance to the centroid?  If so, could it instead be based on minimum distance to an element's boundary?

Kind regards, Dalton Harvie.

On 25/03/2011, at 6:52 PM, Lachlan Mason wrote:

> ---------- Forwarded message ----------
> From: Christophe Geuzaine <cgeuzaine at ulg.ac.be>
> Date: Fri, Mar 25, 2011 at 6:09 PM
> Subject: Re: [Gmsh] Problem with cutgrid plugin
> To: Lachlan Mason <lachmason at gmail.com>
> Cc: gmsh mailing list <gmsh at geuz.org>
> 
> 
> On 25/03/11 07:38, Christophe Geuzaine wrote:
> On 25/03/11 04:30, Lachlan Mason wrote:
> Hi,
> 
> I am having problems when using the cutgrid plugin to make a line
> profile though a scalar field. The sample ".msh" file containing the
> mesh is attached with the ".opt" options file used for the cutgrid
> plugin.
> 
> When I make a two-dimensional plot of the scalar field value over a
> range of x-coordinates the profile is identically zero (ie. 0) for
> particular regions of x-coordinate points. This is shown in the ".png"
> file attached.
> 
> Indeed, I can reproduce the problem here. I will investigate.
> 
> 
> I think I understand the problem: in addition to triangles your mesh contains "line" elements for each edge of the mesh. The CutGrid plugin uses an octree to find to which element a "cut point" belongs; sometimes it returns a line element, to which no value is associated in the postprocessing view.
> 
> Not sure how we should fix this...
> 
> 
> 
> Thanks for the report,
> 
> Christophe
> 
> 
> Can you please help me with this issue? I am using Gmsh 2.5.0.
> 
> Regards,
> 
> Lachlan Mason
> 
> 
> 
> 
> -- 
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>