pyoculus 0.1.1
Loading...
Searching...
No Matches
pyoculus.problems.qfm_bfield.QFMBfield Class Reference

Class that used to setup the bfield problem based on QFM. More...

Inheritance diagram for pyoculus.problems.qfm_bfield.QFMBfield:
pyoculus.problems.toroidal_bfield.ToroidalBfield pyoculus.problems.toroidal_problem.ToroidalProblem pyoculus.problems.bfield_problem.BfieldProblem pyoculus.problems.base_problem.BaseProblem

Public Member Functions

 __init__ (self, ToroidalBfield pb, SurfacesToroidal surfaces)
 Set up the problems based on a known magnetic field and the QFM surfaces.
 
 B (self, coords, *args)
 Returns magnetic fields.
 
 dBdX (self, coords, *args)
 Returns magnetic fields.
 
 B_many (self, x1arr, x2arr, x3arr, input1D=True, *args)
 Returns magnetic fields, with multipy coordinate inputs.
 
 dBdX_many (self, x1arr, x2arr, x3arr, input1D=True, *args)
 Returns magnetic fields.
 
 convert_coords (self, stz)
 Python wrapper for getting the xyz coordinates from stz.
 
- Public Member Functions inherited from pyoculus.problems.toroidal_bfield.ToroidalBfield
 f (self, zeta, st, *args)
 Returns ODE RHS.
 
 f_tangent (self, zeta, st, *args)
 Returns ODE RHS, with tangent.
 
- Public Member Functions inherited from pyoculus.problems.toroidal_problem.ToroidalProblem
- Public Member Functions inherited from pyoculus.problems.base_problem.BaseProblem
- Public Member Functions inherited from pyoculus.problems.bfield_problem.BfieldProblem

Public Attributes

 pb = pb
 
 surfaces = surfaces
 
 poincare_plot_type = pb.poincare_plot_type
 
 poincare_plot_xlabel = pb.poincare_plot_xlabel
 
 poincare_plot_ylabel = pb.poincare_plot_ylabel
 
 Nfp = pb.Nfp
 
 has_jacobian = pb.has_jacobian
 
- Public Attributes inherited from pyoculus.problems.toroidal_problem.ToroidalProblem
int problem_size = 2
 
str poincare_plot_type = "yx"
 
str poincare_plot_xlabel = "x"
 
str poincare_plot_ylabel = "y"
 
- Public Attributes inherited from pyoculus.problems.base_problem.BaseProblem
int problem_size = 2
 
str poincare_plot_type = "yx"
 
str poincare_plot_xlabel = "y"
 
str poincare_plot_ylabel = "x"
 
- Public Attributes inherited from pyoculus.problems.bfield_problem.BfieldProblem
bool has_jacobian = False
 if the output magnetic field contains the jacobian factor or not
 

Detailed Description

Class that used to setup the bfield problem based on QFM.

Constructor & Destructor Documentation

◆ __init__()

pyoculus.problems.qfm_bfield.QFMBfield.__init__ ( self,
ToroidalBfield pb,
SurfacesToroidal surfaces )

Set up the problems based on a known magnetic field and the QFM surfaces.

Parameters
pbthe TorodialBfield problem we will used as the original coordinates and fields
surfacesthe QFM surfaces

Reimplemented from pyoculus.problems.toroidal_bfield.ToroidalBfield.

Member Function Documentation

◆ B()

pyoculus.problems.qfm_bfield.QFMBfield.B ( self,
coords,
* args )

Returns magnetic fields.

Parameters
coords\((\rho,\vartheta,\zeta)\)
*argsextra parameters
Returns
the contravariant magnetic fields

Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.

◆ B_many()

pyoculus.problems.qfm_bfield.QFMBfield.B_many ( self,
x1arr,
x2arr,
x3arr,
input1D = True,
* args )

Returns magnetic fields, with multipy coordinate inputs.

Parameters
x1arrthe first coordinates. Should have the same length as the other two if input1D=True.
x2arrthe second coordinates. Should have the same length as the other two if input1D=True.
x3arrthe third coordinates. Should have the same length as the other two if input1D=True.
input1Dif False, create a meshgrid with sarr, tarr and zarr, if True, treat them as a list of points
*argsparameter
Returns
the contravariant magnetic fields

Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.

◆ convert_coords()

pyoculus.problems.qfm_bfield.QFMBfield.convert_coords ( self,
stz )

Python wrapper for getting the xyz coordinates from stz.

Parameters
stzthe stz coordinate
Returns
the xyz coordinates

Reimplemented from pyoculus.problems.toroidal_problem.ToroidalProblem.

◆ dBdX()

pyoculus.problems.qfm_bfield.QFMBfield.dBdX ( self,
coords,
* args )

Returns magnetic fields.

Parameters
coords\((s,\theta,\zeta)\)
*argsextra parameters
Returns
B, dBdX, the contravariant magnetic fields, the derivatives of them

Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.

◆ dBdX_many()

pyoculus.problems.qfm_bfield.QFMBfield.dBdX_many ( self,
x1arr,
x2arr,
x3arr,
input1D = True,
* args )

Returns magnetic fields.

Parameters
x1arrthe first coordinates. Should have the same length as the other two if input1D=True.
x2arrthe second coordinates. Should have the same length as the other two if input1D=True.
x3arrthe third coordinates. Should have the same length as the other two if input1D=True.
input1Dif False, create a meshgrid with sarr, tarr and zarr, if True, treat them as a list of points
*argsextra parameters
Returns
B, dBdX, the contravariant magnetic fields, the derivatives of them

Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.

Member Data Documentation

◆ has_jacobian

pyoculus.problems.qfm_bfield.QFMBfield.has_jacobian = pb.has_jacobian

◆ Nfp

pyoculus.problems.qfm_bfield.QFMBfield.Nfp = pb.Nfp

◆ pb

pyoculus.problems.qfm_bfield.QFMBfield.pb = pb

◆ poincare_plot_type

pyoculus.problems.qfm_bfield.QFMBfield.poincare_plot_type = pb.poincare_plot_type

◆ poincare_plot_xlabel

pyoculus.problems.qfm_bfield.QFMBfield.poincare_plot_xlabel = pb.poincare_plot_xlabel

◆ poincare_plot_ylabel

pyoculus.problems.qfm_bfield.QFMBfield.poincare_plot_ylabel = pb.poincare_plot_ylabel

◆ surfaces

pyoculus.problems.qfm_bfield.QFMBfield.surfaces = surfaces

The documentation for this class was generated from the following file: