[Gmsh] Quadrangles and Q1 shape functions

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Sep 25 18:40:47 CEST 2015


> On 25 Sep 2015, at 09:58, Torquil Macdonald Sørensen <torquil at gmail.com> wrote:
> 
> On 24/09/15 21:43, Véronique et Christophe Geuzaine wrote:
>> 
>>> On 24 Sep 2015, at 15:52, Torquil Macdonald Sørensen <torquil at gmail.com> wrote:
>>> 
>>> Hi!
>>> 
>>> I have a MSH file for a mesh of one quadrangle and four associated
>>> scalar field node values. Looking at the GMSH visualization, it uses two
>>> triangles to define the function shape inside the quadrangle, and it
>>> seems to use P1 shape functions within each triangle.
>>> 
>>> Is it possible to have GMSH not use any triangles for the visualization,
>>> but instead assume that the scalar field should be represented with Q1
>>> shape functions inside the quadrangle?
>>> 
>> 
>> Yes: select "Adapt visualization grid" in the options of the view. (Set the target error to a negative number to force subdivisions all the way to the maximum recursion level.)
> 
> Thanks! This is much easier than for me to interpolate my FEM solutions onto a finer mesh before  visualization. It even looks as if the GMSH recursive adaptation procedure converges towards something that looks like Q1 shape functions...
> 

It does not just look like it; it converges to the exact shape function. This is actually a general procedure, that can be applied to any polynomial shape function (of any order). See http://geuz.org/gmsh/doc/preprints/gmsh_visu_preprint.pdf for a detailed explanation.


> Best regards and thanks,
> Torquil Macdonald Sørensen
> 

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Tetrahedron V, July 4-5 2016: http://tetrahedron.montefiore.ulg.ac.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info