[ncl-talk] Finite element mesh plot

ivica ivica.jan at gmail.com
Mon Feb 16 08:19:44 MST 2015


Dear all,
I am looking into some elegant way to plot finite element mesh using 
NCL. Recent (6.2.1) version has support for TriangularMesh and CellFill
so in principle it should be possible to plot outline of mesh (triangle 
edges)?

i.e. something like:

   res at trGridType          = "TriangularMesh"
   res at sfXArray            = x
   res at sfYArray            = y
   res at sfElementNodes      = e
   res at sfFirstNodeIndex    = 1
   res at cnLinesOn           = False         ; Turn lines off
   res at cnLineLabelsOn      = False         ; Turn labels off
   res at cnFillMode              = "CellFill"
   res at cnCellFillEdgeColor           = "black"

where x, y are coords of triangles and e is element list, z is scalar to 
plot.This works for RasterFill, but I want CellFill to use Cell boundary 
outline.

However, there is error like:
fatal:ContourPlotDraw: The CellFill method for non-rectangular Mesh data 
requires vertices to be explicitly defined using the sf[XY]CellBounds 
resources

Brutal approach is to loop over the elements and use polylines which for 
1 mil nodes mesh is not feasible.


Thanks,
Ivica



-- 
Marine & Environmental Research Division
Rudjer Boskovic Institute
P.O.Box 180
10002 Zagreb, Croatia
http://www.irb.hr/eng/People/Ivica-Janekovic
fax: +385-1-468 0242, phone: +385-1-456 1139


More information about the ncl-talk mailing list