Class that used to setup the Poincare plot.
More...
|
| __init__ (self, problem, params=dict(), integrator=None, integrator_params=dict()) |
| Sets up the Poincare plot.
|
|
| compute (self) |
| Computes the Poincare plot.
|
|
| compute_iota (self) |
| Compute the iota profile.
|
|
| compute_q (self) |
| Compute the q profile.
|
|
| plot (self, plottype=None, xlabel=None, ylabel=None, xlim=None, ylim=None, **kwargs) |
|
| plot_iota (self, xlim=None, ylim=None, **kwargs) |
| Generates the iota plot.
|
|
| plot_q (self, xlim=None, ylim=None, **kwargs) |
| Generates the q plot.
|
|
| is_successful (self) |
| Returns True if the computation is successfully completed.
|
|
Class that used to setup the Poincare plot.
◆ __init__()
pyoculus.solvers.poincare_plot.PoincarePlot.__init__ |
( |
| self, |
|
|
| problem, |
|
|
| params = dict(), |
|
|
| integrator = None, |
|
|
| integrator_params = dict() ) |
Sets up the Poincare plot.
- Parameters
-
problem | must inherit pyoculus.problems.BaseProblem, the problem to solve |
params | dict, the parameters for the solver |
integrator | the integrator to use, must inherit \pyoculus.integrators.BaseIntegrator, if set to None by default using RKIntegrator |
integrator_params | dict, the parmaters passed to the integrator |
params['theta']=0
– the Poincare plots starts from theta
params['zeta']=0
– the Poincare plots for which toroidal section: zeta
params['nPpts']=500
– the number of iterations
params['nPtrj']=10
– the number of equidistant points in s coordinates
params['sbegin']=-1.0
– the lower bound of s
params['send']=-1.0
– the upper bound of s
params['nthreads']=1
– the number of threads
Reimplemented from pyoculus.solvers.base_solver.BaseSolver.
◆ _run_poincare()
pyoculus.solvers.poincare_plot.PoincarePlot._run_poincare |
( |
| params | ) |
|
|
staticprotected |
A function called in parallel to generate the Poincare plot for one starting point
Called in PoincarePlot.compute, do not call otherwise
◆ compute()
pyoculus.solvers.poincare_plot.PoincarePlot.compute |
( |
| self | ) |
|
Computes the Poincare plot.
- Returns
- pdata – a class that contains the results
pdata.x,pdata.y,pdata,z
– the Poincare data in xyz coordinates pdata.s,pdata,theta,pdata,zeta
– the Poincare data in s,theta,zeta coordinates
◆ compute_iota()
pyoculus.solvers.poincare_plot.PoincarePlot.compute_iota |
( |
| self | ) |
|
Compute the iota profile.
◆ compute_q()
pyoculus.solvers.poincare_plot.PoincarePlot.compute_q |
( |
| self | ) |
|
◆ plot()
pyoculus.solvers.poincare_plot.PoincarePlot.plot |
( |
| self, |
|
|
| plottype = None, |
|
|
| xlabel = None, |
|
|
| ylabel = None, |
|
|
| xlim = None, |
|
|
| ylim = None, |
|
|
** | kwargs ) |
◆ plot_iota()
pyoculus.solvers.poincare_plot.PoincarePlot.plot_iota |
( |
| self, |
|
|
| xlim = None, |
|
|
| ylim = None, |
|
|
** | kwargs ) |
Generates the iota plot.
- Parameters
-
xlim,ylim | the range of plotting, by default plotting the range of all data |
**kwargs | passed to the plotting routine "plot" |
◆ plot_q()
pyoculus.solvers.poincare_plot.PoincarePlot.plot_q |
( |
| self, |
|
|
| xlim = None, |
|
|
| ylim = None, |
|
|
** | kwargs ) |
Generates the q plot.
- Parameters
-
xlim,ylim | the range of plotting, by default plotting the range of all data |
**kwargs | passed to the plotting routine "plot" |
◆ _begin
pyoculus.solvers.poincare_plot.PoincarePlot._begin = params["sbegin"] |
|
protected |
◆ _end
pyoculus.solvers.poincare_plot.PoincarePlot._end = params["send"] |
|
protected |
◆ _fixed_coords
pyoculus.solvers.poincare_plot.PoincarePlot._fixed_coords = params["theta"] |
|
protected |
◆ _is_cylindrical_problem [1/2]
int pyoculus.solvers.poincare_plot.PoincarePlot._is_cylindrical_problem = False |
|
protected |
◆ _is_cylindrical_problem [2/2]
int pyoculus.solvers.poincare_plot.PoincarePlot._is_cylindrical_problem = 20) |
◆ dt
int pyoculus.solvers.poincare_plot.PoincarePlot.dt = 2 * np.pi / float(self.Nfp) |
◆ iota
pyoculus.solvers.poincare_plot.PoincarePlot.iota = np.zeros_like(self.siota) |
◆ iota_successful
pyoculus.solvers.poincare_plot.PoincarePlot.iota_successful = False |
◆ Nfp
pyoculus.solvers.poincare_plot.PoincarePlot.Nfp = problem.Nfp |
pyoculus.solvers.poincare_plot.PoincarePlot.s = np.zeros_like(self.x) |
◆ siota
pyoculus.solvers.poincare_plot.PoincarePlot.siota = self.x[:,0] |
◆ successful
bool pyoculus.solvers.poincare_plot.PoincarePlot.successful = False |
◆ theta
pyoculus.solvers.poincare_plot.PoincarePlot.theta = np.zeros_like(self.x) |
pyoculus.solvers.poincare_plot.PoincarePlot.x |
Initial value:= np.zeros(
[self._params["nPtrj"] + 1, self._params["nPpts"] + 1], dtype=np.float64
)
pyoculus.solvers.poincare_plot.PoincarePlot.y = np.zeros_like(self.x) |
pyoculus.solvers.poincare_plot.PoincarePlot.z = np.zeros_like(self.x) |
◆ zeta
pyoculus.solvers.poincare_plot.PoincarePlot.zeta = np.zeros_like(self.x) |
The documentation for this class was generated from the following file: