Derivative#

class cherab.lhd.emc3.inversion.derivative.Derivative(grid: CenterGrid, diff_type: Literal['forward', 'central'] = 'forward')Source#

Bases: object

Class for derivative matrices.

This class is used to represent derivative matrices of the EMC3-EIRENE-defined center grids, and calculate radial, poloidal and toroidal derivative matrices.

This derivative matrices follows the radial (\(\rho\)), poloidal (\(\theta\)) and toroidal (\(\zeta\)) directions of the magnetic field lines, which are based on the EMC3-EIRENE-defined center grids.

Parameters:
gridCenterGrid

CenterGrid instance of the EMC3-EIRENE-defined center grids.

diff_type{“forward”, “central”}, optional

Numerical differentiation type for radial and poloidal direction. The default is “forward”, which means the forward difference method is used to calculate the derivative matrices. The other option is and “central”.

Methods

create_dmats_pairs([mode])

Create derivative matrices for each coordinate pair.

Attributes

diff_type

Numerical differentiation type.

dmat_rho

Radial (:math:rho: direction) derivative matrix.

dmat_theta

Poloidal (:math:theta: direction) derivative matrix.

dmat_zeta

Toroidal (:math:zeta: direction) derivative matrix.

grid

EMC3-EIRENE-defined center grids.

index

Index of the EMC3-EIRENE-defined center grids.