xbout.cherab.triangulate.TriangularData

class xbout.cherab.triangulate.TriangularData(vertices, triangles, data)[source]

Bases: object

Represents a set of triangles with data constant on them. Creates a Cherab Discrete2DMesh, and can then convert that to a 3D (axisymmetric) emitting material.

__init__(vertices, triangles, data)[source]

Methods

__init__(vertices, triangles, data)

plot_2d([ax, nr, nz])

Make a 2D plot of the data

to_emitter([parent, cylinder_zmin, ...])

Returns a 3D Cherab emitter, by rotating the 2D mesh about the Z axis

plot_2d(ax=None, nr=150, nz=150)[source]

Make a 2D plot of the data

nr, nz - Number of samples in R and Z

Parameters:
  • nr (int)

  • nz (int)

to_emitter(parent=None, cylinder_zmin=None, cylinder_zmax=None, cylinder_rmin=None, cylinder_rmax=None, step=0.01)[source]

Returns a 3D Cherab emitter, by rotating the 2D mesh about the Z axis

step: Volume integration step length [m]

Parameters:

step (float)