[Gmsh] P2 visualisation

Charles Pierre charles.pierre at univ-pau.fr
Fri Jun 1 16:28:30 CEST 2018


Hi,

   I try to visualize a P2 scalar field. I created a '.msh' file including 
a mesh made of second order triangles and of node data at the mesh 
vertices and edges (P2 degrees of freedom).
   It seems that gmsh performs a P1 interpolation by considering only the 
vertex data.
   Here is an example on the reference triangle where the vertex values are 
set to 0 whereas the edge values are set to 1. Running 'gmsh P2.vtk' only 
displays a blue triangle corresponding to the 0-value.

   Is there a way to visualise the P2 funstion without P1 interpolation ? 
(and to truly see the quadratic function defined in the '.msh' file) ?
   If yes is it also possible with higher order data (P3) ?


Best regards; Charles PIERRE.

----------------------

$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
6
1   0.0        0.0        0.0
2   1.0        0.0        0.0
3   0.0        1.0        0.0
4   0.5        0.0        0.0
5   0.5        0.5        0.0
6   0.0        0.5        0.0
$EndNodes
$Elements
1
1  9  0  1  2  3  4  5  6
$EndElements
$NodeData
1
"Function f"
1
0.0
3
0
1
6
1   0.0
2   0.0
3   0.0
4   1.0
5   1.0
6   1.0
$EndNodeData





---
Charles PIERRE
Laboratoire de Mathématiques et de leurs Applications de Pau
Université de Pau et des Pays de l'Adour, France
05 59 40 75 27
http://cpierre1.perso.univ-pau.fr/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: P2.msh
Type: model/mesh
Size: 435 bytes
Desc: 
URL: <http://onelab.info/pipermail/gmsh/attachments/20180601/69db9e49/attachment.msh>


More information about the gmsh mailing list