pyoculus.utils.convergence_domain.compute_convergence_domain
- pyoculus.utils.convergence_domain.compute_convergence_domain(map: BaseMap, x1s: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], x2s: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], find_with_iota: bool = True, eps: float = 0.001, **kwargs) tuple
Compute where the FixedPoint solver converges to for each of the [x1, x2] point pair. If a point converges, it is assigned a number which is the index corresponding to the equal first fixedpoint converging to the same place, otherwise it is assigned -1. The number corresponds to the index of the fixed point in the returned list of fixed points.
- Parameters:
map (pyoculus.maps) – The problem to solve.
x1s (np.ndarray) – The x1 values of the meshgrid.
x2s (np.ndarray) – The x2 values of the meshgrid.
find_with_iota (bool, optional) – Whether to use the find_with_iota method. Defaults to True.
eps (float, optional) – The tolerance for the comparison with the fixed points. Defaults to 1e-3.
- Keyword Arguments:
m (int) – The poloidal mode to use.
n (int) – The toroidal mode to use.
tol (float) – The tolerance of the fixed point finder.
t (float) – The parameter t for the find method.
nrestart (int) – The number of restarts for the fixed point finder.
niter (int) – The number of iterations for the fixed point finder.
- Returns:
A tuple containing: - np.ndarray: The meshgrid of x1s and x2s, the assigned number for each point in the meshgrid, and the list of all fixed points objects convergent or not. - np.ndarray: The list of fixed points.
- Return type:
tuple