diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index 48926a07f..b53322842 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, macos-11] + platform: [ubuntu-latest, macos-12] python-version: ["3.9"] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/extensive_test.yml b/.github/workflows/extensive_test.yml index f60d2e15f..b7e07749e 100644 --- a/.github/workflows/extensive_test.yml +++ b/.github/workflows/extensive_test.yml @@ -98,7 +98,7 @@ jobs: - name: Install python dependencies run: | sudo apt-get install graphviz graphviz-dev - pip install wheel numpy scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz ground bentley_ottmann + pip install wheel "numpy<2.0.0" scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz ground bentley_ottmann - name: Install booz_xform if: contains(matrix.packages, 'vmec') || contains(matrix.packages, 'all') diff --git a/.github/workflows/non_simd_tests.yml b/.github/workflows/non_simd_tests.yml index f3ae7c6c3..121cc36ee 100644 --- a/.github/workflows/non_simd_tests.yml +++ b/.github/workflows/non_simd_tests.yml @@ -84,7 +84,7 @@ jobs: - name: Install python dependencies run: | sudo apt-get install graphviz graphviz-dev - pip install wheel numpy scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz + pip install wheel "numpy<2.0.0" scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz ground bentley_ottmann - name: Install booz_xform run: pip install -v git+https://github.com/hiddenSymmetries/booz_xform diff --git a/.github/workflows/singularity.yml b/.github/workflows/singularity.yml index 55f686e49..809197d44 100644 --- a/.github/workflows/singularity.yml +++ b/.github/workflows/singularity.yml @@ -12,6 +12,7 @@ on: # Do the builds on all pull requests (to test them) pull_request: [] + workflow_dispatch: jobs: build-containers: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 637981a4c..f91910245 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,7 +93,7 @@ jobs: - name: Install python dependencies run: | sudo apt-get install graphviz graphviz-dev - pip install numpy cmake scikit-build f90nml ninja wheel setuptools sympy qsc pyevtk matplotlib plotly networkx pygraphviz mpi4py py_spec pyoculus h5py + pip install "numpy<2.0.0" cmake scikit-build f90nml ninja wheel setuptools sympy qsc pyevtk matplotlib plotly networkx pygraphviz mpi4py py_spec pyoculus h5py ground bentley_ottmann - name: Install booz_xform run: pip install -v git+https://github.com/hiddenSymmetries/booz_xform diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 8044ebfe4..159b78e8f 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11, ubuntu-20.04] + os: [macos-12, ubuntu-20.04] steps: - uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index e6e63ec9b..92663e5d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,11 +56,11 @@ else() unset(COMPILER_SUPPORTS_MARCH_NATIVE CACHE) CHECK_CXX_COMPILER_FLAG(-march=native COMPILER_SUPPORTS_MARCH_NATIVE) if(COMPILER_SUPPORTS_MARCH_NATIVE) - set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast") - elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64") - set(CMAKE_CXX_FLAGS "-O3 -mcpu=apple-a14 -mfma -ffp-contract=fast") + set(CMAKE_CXX_FLAGS "-O3 -march=native -ffp-contract=fast") + elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64") + set(CMAKE_CXX_FLAGS "-O3 -mcpu=apple-a14 -ffp-contract=fast") else() - set(CMAKE_CXX_FLAGS "-O3 -ffp-contract=fast") + set(CMAKE_CXX_FLAGS "-O3 -ffp-contract=fast") endif() endif() # Ensure all code used from Eigen does not have LGPL license: @@ -119,6 +119,7 @@ set(XTENSOR_USE_TBB 0) pybind11_add_module(${PROJECT_NAME} src/simsoptpp/python.cpp src/simsoptpp/python_surfaces.cpp src/simsoptpp/python_curves.cpp + src/simsoptpp/boozerresidual_py.cpp src/simsoptpp/python_magneticfield.cpp src/simsoptpp/python_tracing.cpp src/simsoptpp/python_distance.cpp src/simsoptpp/biot_savart_py.cpp src/simsoptpp/biot_savart_vjp_py.cpp @@ -127,7 +128,7 @@ pybind11_add_module(${PROJECT_NAME} src/simsoptpp/surface.cpp src/simsoptpp/surfacerzfourier.cpp src/simsoptpp/surfacexyzfourier.cpp src/simsoptpp/integral_BdotN.cpp src/simsoptpp/dipole_field.cpp src/simsoptpp/permanent_magnet_optimization.cpp - src/simsoptpp/dommaschk.cpp src/simsoptpp/reiman.cpp src/simsoptpp/tracing.cpp + src/simsoptpp/dommaschk.cpp src/simsoptpp/reiman.cpp src/simsoptpp/tracing.cpp src/simsoptpp/magneticfield_biotsavart.cpp src/simsoptpp/python_boozermagneticfield.cpp src/simsoptpp/boozerradialinterpolant.cpp ) diff --git a/LICENSE b/LICENSE index 47140c918..9c839b9b3 100644 --- a/LICENSE +++ b/LICENSE @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/ci/Dockerfile.ubuntu b/ci/Dockerfile.ubuntu index 4a56d374a..dfbbe8a06 100644 --- a/ci/Dockerfile.ubuntu +++ b/ci/Dockerfile.ubuntu @@ -5,7 +5,7 @@ FROM --platform=linux/amd64 ubuntu:22.04 as intermediate RUN apt update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential gfortran git m4 wget cmake ninja-build \ libopenblas-dev libfftw3-dev libhdf5-dev libhdf5-serial-dev libnetcdf-dev libnetcdff-dev libgl1-mesa-dev \ - python3-dev python3-pip python3-venv + python3-dev python3-pip python3-venv libxrender1 # Install mpich manually WORKDIR /src @@ -40,20 +40,22 @@ RUN python3 -m pip install wheel RUN python3 -m venv /venv/ RUN /venv/bin/pip install -U pip -RUN /venv/bin/python -m pip install numpy scipy jax jaxlib f90nml mpi4py jupyter notebook ipython qsc sympy scikit-build ninja "pybind11[global]" cmake desc-opt toml -RUN /venv/bin/pip install git+https://github.com/zhucaoxiang/f90wrap +RUN /venv/bin/python -m pip install numpy scipy jax jaxlib f90nml mpi4py jupyter notebook ipython qsc sympy scikit-build ninja "pybind11[global]" cmake f90wrap h5py desc-opt ENV PATH="/venv/bin:${PATH}" RUN git clone --depth 1 https://github.com/PrincetonUniversity/SPEC.git /src/SPEC && \ cd /src/SPEC && \ - /venv/bin/pip install -v . 2>&1 | tee spec_build.log + /venv/bin/pip install -v . 2>&1 | tee spec_build.log && \ + cd Utilities/pythontools && \ + /venv/bin/pip install -r requirements.txt && \ + /venv/bin/pip install -v . RUN git clone --depth 1 https://github.com/hiddenSymmetries/VMEC2000.git /src/VMEC && \ cd /src/VMEC && \ cp cmake/machines/ubuntu.json cmake_config_file.json && \ /venv/bin/pip install -v . 2>&1 | tee vmec_build.log -RUN /venv/bin/pip install h5py pyoculus py_spec +RUN /venv/bin/pip install pyoculus RUN /venv/bin/pip install vtk==9.2.6 pyqt5 matplotlib pyevtk plotly # RUN /venv/bin/pip install mayavi RUN /venv/bin/pip install git+https://github.com/hiddenSymmetries/booz_xform diff --git a/ci/singularity.def b/ci/singularity.def index 03ddd49f5..11a70ac81 100644 --- a/ci/singularity.def +++ b/ci/singularity.def @@ -8,7 +8,7 @@ Stage: devel libfabric-dev libfabric-bin \ libhwloc-dev libpmix-dev libevent-dev \ libopenblas-dev libfftw3-dev libhdf5-dev libhdf5-serial-dev libnetcdf-dev libnetcdff-dev libgl1-mesa-dev \ - python3-dev python3-pip python3-venv + python3-dev python3-pip python3-venv libxrender1 %post @@ -44,8 +44,7 @@ Stage: devel python3 -m venv /venv/ . /venv/bin/activate /venv/bin/pip install -U pip - /venv/bin/pip install numpy scipy jax jaxlib f90nml jupyter notebook ipython qsc sympy scikit-build ninja "pybind11[global]" cmake - /venv/bin/pip install git+https://github.com/zhucaoxiang/f90wrap + /venv/bin/pip install numpy scipy jax jaxlib f90nml jupyter notebook ipython qsc sympy scikit-build ninja "pybind11[global]" cmake f90wrap h5py PATH="/usr/local/bin:/venv/bin:${PATH}" LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}" @@ -60,7 +59,10 @@ Stage: devel cd SPEC && \ /venv/bin/python setup.py bdist_wheel && \ /venv/bin/pip install -v dist/*.whl && \ - cd .. && \ + cd Utilities/pythontools && \ + /venv/bin/pip install -r requirements.txt && \ + /venv/bin/pip install . && \ + cd ../../.. && \ rm -rf SPEC git clone --depth 1 https://github.com/hiddenSymmetries/VMEC2000.git && \ @@ -70,7 +72,7 @@ Stage: devel cd .. && \ rm -rf VMEC2000 - /venv/bin/pip install h5py pyoculus py_spec + /venv/bin/pip install pyoculus /venv/bin/pip install vtk==9.2.6 pyqt5 matplotlib pyevtk plotly /venv/bin/pip install mayavi /venv/bin/pip install git+https://github.com/hiddenSymmetries/booz_xform diff --git a/docs/source/containers.rst b/docs/source/containers.rst index a9f28effd..9bc0043f0 100644 --- a/docs/source/containers.rst +++ b/docs/source/containers.rst @@ -130,7 +130,7 @@ issues associated with Docker containers. Shifter allows to you use the simsopt Docker image files hosted on Docker Hub. Detailed instructions for using Shifter can be found at the `NERSC page on the simsopt wiki -`_. +`_. .. _singularity_doc: diff --git a/docs/source/simsopt.geo.rst b/docs/source/simsopt.geo.rst index 0a1bf5c32..92859f7c7 100644 --- a/docs/source/simsopt.geo.rst +++ b/docs/source/simsopt.geo.rst @@ -76,6 +76,14 @@ simsopt.geo.curvexyzfourier module :undoc-members: :show-inheritance: +simsopt.geo.curvexyzfouriersymmetries module +-------------------------------------------- + +.. automodule:: simsopt.geo.curvexyzfouriersymmetries + :members: + :undoc-members: + :show-inheritance: + simsopt.geo.finitebuild module ------------------------------ diff --git a/examples/2_Intermediate/boozer.py b/examples/2_Intermediate/boozer.py index 222a763d7..3b847d2fc 100755 --- a/examples/2_Intermediate/boozer.py +++ b/examples/2_Intermediate/boozer.py @@ -50,6 +50,8 @@ print(f"After LBFGS: iota={res['iota']:.3f}, tf={tf.J():.3f}, area={s.area():.3f}, ||residual||={np.linalg.norm(boozer_surface_residual(s, res['iota'], res['G'], bs, derivatives=0)):.3e}") if "DISPLAY" in os.environ: s.plot() + +boozer_surface.need_to_run_code = True # now drive the residual down using a specialised least squares algorithm res = boozer_surface.minimize_boozer_penalty_constraints_ls(tol=1e-10, maxiter=100, constraint_weight=100., iota=res['iota'], G=res['G'], method='manual') print(f"After Lev-Mar: iota={res['iota']:.3f}, tf={tf.J():.3f}, area={s.area():.3f}, ||residual||={np.linalg.norm(boozer_surface_residual(s, res['iota'], res['G'], bs, derivatives=0)):.3e}") diff --git a/examples/2_Intermediate/boozerQA_ls_mpi.py b/examples/2_Intermediate/boozerQA_ls_mpi.py new file mode 100755 index 000000000..f754fb170 --- /dev/null +++ b/examples/2_Intermediate/boozerQA_ls_mpi.py @@ -0,0 +1,222 @@ +#!/usr/bin/env python + +r""" +This example optimizes the NCSX coils and currents for QA on potentially multiple surfaces using the BoozerLS approach. +For a single surface, the objective is: + + J = ( \int_S B_nonQA**2 dS )/(\int_S B_QA dS) + + \int \int BoozerResidual(varphi, theta)^2 d\varphi d\theta + + 0.5*(iota - iota_0)**2 + + 0.5*(major_radius - target_major_radius)**2 + + 0.5*max(\sum_{coils} CurveLength - CurveLengthTarget, 0)**2 + + other coil regularization penalties on curvature, mean squared curvature, + coil-to-coil distance, and coil arclength. + +We first load surfaces in the NCSX equilibrium, then optimize for QA on them. +The first term the objective minimizes the deviation from quasi-axisymmetry on the loaded surfaces. +The second term minimizes the Boozer residual on the surfaces, which pushes the optimizer to heal +islands and generalized chaos. It is typically a good idea to weight this penalty term to be ~ the +same order of magnitude of the first term in the objective. + +The objective also includes penalty terms on the rotational transform, major radius, total coil length, curvature, +mean squared curvature, and coil arclength. The rotational transform and major radius penalty ensures +that the surfaces' rotational transform and aspect ratio do not stray too far from the value in the initial configuration. +There are also a few coil regularization penalties to prevent the coils from becoming too complex. The BFGS +optimizer is used, and quasisymmetry is improved substantially on the surface. Surface solves using the BoozerLS +approach can be costly, so this script supports distributing the solves across multiple MPI ranks. + +You can change the value of the variable `nsurfaces` below to optimize for nested surfaces and QS on up to 10 surfaces. +The BoozerSurface solves can be distributed to Nranks ranks using: + mpirun -np Nranks ./boozerQA_ls_mpi.py +where `nsurfaces` is the number of surfaces your optimizing on. For example, if you want one surface solve per rank, +and nsurfaces=Nranks=2, then the proper call is: + mpirun -np 2 ./boozerQA_ls_mpi.py + +More details on this work can be found at +A Giuliani et al, "Direct stellarator coil optimization for nested magnetic surfaces with precise +quasi-symmetry", Physics of Plasmas 30, 042511 (2023) doi:10.1063/5.0129716 +or arxiv:2210.03248. +""" + +import os +import numpy as np +from scipy.optimize import minimize +from simsopt.geo import curves_to_vtk, MajorRadius, CurveLength, CurveCurveDistance, NonQuasiSymmetricRatio, Iotas,\ + BoozerResidual, LpCurveCurvature, MeanSquaredCurvature, ArclengthVariation +from simsopt._core import load +from simsopt.objectives import MPIObjective, MPIOptimizable +from simsopt.field import BiotSavart +from simsopt.objectives import QuadraticPenalty +from simsopt.util import proc0_print, in_github_actions +try: + from mpi4py import MPI + comm = MPI.COMM_WORLD + rank = comm.rank + size = comm.size + +except ImportError: + comm = None + size = 1 + rank = 0 + +# Directory for output +IN_DIR = "./inputs/input_ncsx/" +OUT_DIR = "./output/" +os.makedirs(OUT_DIR, exist_ok=True) + +proc0_print("Running 2_Intermediate/boozerQA_ls_mpi.py") +proc0_print("=========================================") + +base_curves, base_currents, coils, curves, surfaces, boozer_surfaces, ress = load(IN_DIR + "ncsx_init.json") + +# you can optimize for QA on up to 10 surfaces, by changing nsurfaces below. +nsurfaces = 2 +assert nsurfaces <= 10 + +surfaces = surfaces[:nsurfaces] +boozer_surfaces = boozer_surfaces[:nsurfaces] +ress = ress[:nsurfaces] +for boozer_surface, res in zip(boozer_surfaces, ress): + boozer_surface.run_code(res['iota'], res['G']) + +mpi_surfaces = MPIOptimizable(surfaces, ["x"], comm) +mpi_boozer_surfaces = MPIOptimizable(boozer_surfaces, ["res", "need_to_run_code"], comm) + +mrs = [MajorRadius(boozer_surface) for boozer_surface in boozer_surfaces] +mrs_equality = [len(mrs)*QuadraticPenalty(mr, mr.J(), 'identity') if idx == len(mrs)-1 else 0*QuadraticPenalty(mr, mr.J(), 'identity') for idx, mr in enumerate(mrs)] +iotas = [Iotas(boozer_surface) for boozer_surface in boozer_surfaces] +nonQSs = [NonQuasiSymmetricRatio(boozer_surface, BiotSavart(coils)) for boozer_surface in boozer_surfaces] +brs = [BoozerResidual(boozer_surface, BiotSavart(coils)) for boozer_surface in boozer_surfaces] + +MIN_DIST_THRESHOLD = 0.15 +KAPPA_THRESHOLD = 15. +MSC_THRESHOLD = 15. +IOTAS_TARGET = -0.4 + +RES_WEIGHT = 1e4 +LENGTH_WEIGHT = 1. +MR_WEIGHT = 1. +MIN_DIST_WEIGHT = 1e2 +KAPPA_WEIGHT = 1. +MSC_WEIGHT = 1. +IOTAS_WEIGHT = 1. +ARCLENGTH_WEIGHT = 1e-2 + +mean_iota = MPIObjective(iotas, comm, needs_splitting=True) +Jiotas = QuadraticPenalty(mean_iota, IOTAS_TARGET, 'identity') +JnonQSRatio = MPIObjective(nonQSs, comm, needs_splitting=True) +JBoozerResidual = MPIObjective(brs, comm, needs_splitting=True) +Jmajor_radius = MPIObjective(mrs_equality, comm, needs_splitting=True) + +ls = [CurveLength(c) for c in base_curves] +Jls = QuadraticPenalty(sum(ls), float(sum(ls).J()), 'max') +Jccdist = CurveCurveDistance(curves, MIN_DIST_THRESHOLD, num_basecurves=len(base_curves)) +Jcs = sum([LpCurveCurvature(c, 2, KAPPA_THRESHOLD) for c in base_curves]) +msc_list = [MeanSquaredCurvature(c) for c in base_curves] +Jmsc = sum(QuadraticPenalty(J, MSC_THRESHOLD, "max") for J in msc_list) +Jals = sum([ArclengthVariation(c) for c in base_curves]) + +JF = JnonQSRatio + RES_WEIGHT * JBoozerResidual + IOTAS_WEIGHT * Jiotas + MR_WEIGHT * Jmajor_radius \ + + LENGTH_WEIGHT * Jls + MIN_DIST_WEIGHT * Jccdist + KAPPA_WEIGHT * Jcs\ + + MSC_WEIGHT * Jmsc \ + + ARCLENGTH_WEIGHT * Jals + +# let's fix the coil current +base_currents[0].fix_all() + +if comm is None or rank == 0: + curves_to_vtk(curves, OUT_DIR + "curves_init") +for idx, surface in enumerate(mpi_surfaces): + if comm is None or rank == 0: + surface.to_vtk(OUT_DIR + f"surf_init_{idx}") + +# dictionary used to save the last accepted surface dofs in the line search, in case Newton's method fails +prevs = {'sdofs': [surface.x.copy() for surface in mpi_surfaces], 'iota': [boozer_surface.res['iota'] for boozer_surface in mpi_boozer_surfaces], + 'G': [boozer_surface.res['G'] for boozer_surface in mpi_boozer_surfaces], 'J': JF.J(), 'dJ': JF.dJ().copy(), 'it': 0} + +def fun(dofs): + # initialize to last accepted surface values + for idx, surface in enumerate(mpi_surfaces): + surface.x = prevs['sdofs'][idx] + for idx, boozer_surface in enumerate(mpi_boozer_surfaces): + boozer_surface.res['iota'] = prevs['iota'][idx] + boozer_surface.res['G'] = prevs['G'][idx] + + # this check makes sure that all ranks have exactly the same dofs + if comm is not None: + alldofs = comm.allgather(dofs) + assert np.all(np.all(alldofs[0]-d == 0) for d in alldofs) + + JF.x = dofs + J = JF.J() + grad = JF.dJ() + + # check to make sure that all the surface solves succeeded + success1 = np.all([boozer_surface.res['success'] for boozer_surface in mpi_boozer_surfaces]) + # check to make sure that the surfaces are not self-intersecting + success2 = np.all([not surface.is_self_intersecting() for surface in mpi_surfaces]) + if not (success1 and success2): + J = prevs['J'] + grad = -prevs['dJ'] + for idx, boozer_surface in enumerate(mpi_boozer_surfaces): + boozer_surface.surface.x = prevs['sdofs'][idx] + boozer_surface.res['iota'] = prevs['iota'][idx] + boozer_surface.res['G'] = prevs['G'][idx] + return J, grad + + +def callback(x): + # since this set of coil dofs was accepted, set the backup surface dofs + # to accepted ones in case future Newton solves fail. + for idx, surface in enumerate(mpi_surfaces): + prevs['sdofs'][idx] = surface.x.copy() + for idx, boozer_surface in enumerate(mpi_boozer_surfaces): + prevs['iota'][idx] = boozer_surface.res['iota'] + prevs['G'][idx] = boozer_surface.res['G'] + prevs['J'] = JF.J() + prevs['dJ'] = JF.dJ().copy() + + width = 35 + outstr = f"\nIteration {prevs['it']}\n" + outstr += f"{'J':{width}} {JF.J():.6e} \n" + outstr += f"{'║∇J║':{width}} {np.linalg.norm(JF.dJ()):.6e} \n\n" + outstr += f"{'nonQS ratio':{width}}" + ", ".join([f'{np.sqrt(nonqs.J()):.6e}' for nonqs in nonQSs]) + "\n" + outstr += f"{'Boozer Residual':{width}}" + ", ".join([f'{br.J():.6e}' for br in brs]) + "\n" + outstr += f"{'<ι>':{width}} {mean_iota.J():.6f} \n" + outstr += f"{'ι on surfaces':{width}}" + ", ".join([f"{boozer_surface.res['iota']:.6f}" for boozer_surface in mpi_boozer_surfaces]) + "\n" + outstr += f"{'major radius on surfaces':{width}}" + ', '.join([f'{surface.major_radius():.6f}' for surface in mpi_surfaces]) + "\n" + outstr += f"{'minor radius on surfaces':{width}}" + ', '.join([f'{surface.minor_radius():.6f}' for surface in mpi_surfaces]) + "\n" + outstr += f"{'aspect ratio radius on surfaces':{width}}" + ', '.join([f'{surface.aspect_ratio():.6f}' for surface in mpi_surfaces]) + "\n" + outstr += f"{'volume':{width}}" + ', '.join([f'{surface.volume():.6f}' for surface in mpi_surfaces]) + "\n" + outstr += f"{'surfaces are self-intersecting':{width}}" + ', '.join([f'{surface.is_self_intersecting()}' for surface in mpi_surfaces]) + "\n" + outstr += f"{'shortest coil to coil distance':{width}} {Jccdist.shortest_distance():.3f} \n" + outstr += f"{'coil lengths':{width}}" + ', '.join([f'{J.J():5.6f}' for J in ls]) + "\n" + outstr += f"{'coil length sum':{width}} {sum(J.J() for J in ls):.3f} \n" + outstr += f"{'max κ':{width}}" + ', '.join([f'{np.max(c.kappa()):.6f}' for c in base_curves]) + "\n" + outstr += f"{'∫ κ^2 dl / ∫ dl':{width}}" + ', '.join([f'{Jmsc.J():.6f}' for Jmsc in msc_list]) + "\n" + outstr += "\n\n" + + proc0_print(outstr) + prevs['it'] += 1 + + +dofs = JF.x +callback(dofs) + +proc0_print(""" +################################################################################ +### Run the optimization ####################################################### +################################################################################ +""") +# Number of iterations to perform: +MAXITER = 50 if in_github_actions else 1e3 + +res = minimize(fun, dofs, jac=True, method='BFGS', options={'maxiter': MAXITER}, tol=1e-15, callback=callback) +if comm is None or rank == 0: + curves_to_vtk(curves, OUT_DIR + "curves_opt") +for idx, surface in enumerate(mpi_surfaces): + if comm is None or rank == 0: + surface.to_vtk(OUT_DIR + f"surf_opt_{idx}") + +proc0_print("End of 2_Intermediate/boozerQA_ls_mpi.py") +proc0_print("========================================") diff --git a/examples/2_Intermediate/inputs/input_ncsx/ncsx_init.json b/examples/2_Intermediate/inputs/input_ncsx/ncsx_init.json new file mode 100644 index 000000000..557585731 --- /dev/null +++ b/examples/2_Intermediate/inputs/input_ncsx/ncsx_init.json @@ -0,0 +1,35305 @@ +{ + "@module": "simsopt._core.json", + "@class": "SIMSON", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "graph": [ + [ + { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + { + "$type": "ref", + "value": "CurveXYZFourier3" + } + ], + [ + { + "$type": "ref", + "value": "Current1" + }, + { + "$type": "ref", + "value": "Current2" + }, + { + "$type": "ref", + "value": "Current3" + } + ], + [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + [ + { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + { + "$type": "ref", + "value": "RotatedCurve1" + }, + { + "$type": "ref", + "value": "RotatedCurve2" + }, + { + "$type": "ref", + "value": "RotatedCurve3" + }, + { + "$type": "ref", + "value": "RotatedCurve4" + }, + { + "$type": "ref", + "value": "RotatedCurve5" + }, + { + "$type": "ref", + "value": "RotatedCurve6" + }, + { + "$type": "ref", + "value": "RotatedCurve7" + }, + { + "$type": "ref", + "value": "RotatedCurve8" + }, + { + "$type": "ref", + "value": "RotatedCurve9" + }, + { + "$type": "ref", + "value": "RotatedCurve10" + }, + { + "$type": "ref", + "value": "RotatedCurve11" + }, + { + "$type": "ref", + "value": "RotatedCurve12" + }, + { + "$type": "ref", + "value": "RotatedCurve13" + }, + { + "$type": "ref", + "value": "RotatedCurve14" + }, + { + "$type": "ref", + "value": "RotatedCurve15" + } + ], + [ + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier2" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier3" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier4" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier5" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier6" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier7" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier8" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier9" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier10" + }, + { + "$type": "ref", + "value": "SurfaceXYZTensorFourier11" + } + ], + [ + { + "$type": "ref", + "value": "BoozerSurface1" + }, + { + "$type": "ref", + "value": "BoozerSurface2" + }, + { + "$type": "ref", + "value": "BoozerSurface3" + }, + { + "$type": "ref", + "value": "BoozerSurface4" + }, + { + "$type": "ref", + "value": "BoozerSurface5" + }, + { + "$type": "ref", + "value": "BoozerSurface6" + }, + { + "$type": "ref", + "value": "BoozerSurface7" + }, + { + "$type": "ref", + "value": "BoozerSurface8" + }, + { + "$type": "ref", + "value": "BoozerSurface9" + }, + { + "$type": "ref", + "value": "BoozerSurface10" + } + ], + [ + { + "iota": -0.40631609681948844, + "G": 13.887479272946356 + }, + { + "iota": -0.41509506277976643, + "G": 13.887479123477119 + }, + { + "iota": -0.42145063080395145, + "G": 13.887479020465973 + }, + { + "iota": -0.42717511941641934, + "G": 13.887478977083424 + }, + { + "iota": -0.4332178171343971, + "G": 13.887479145269527 + }, + { + "iota": -0.4403634108356372, + "G": 13.887479671253498 + }, + { + "iota": -0.44954721967115147, + "G": 13.887480382072356 + }, + { + "iota": -0.46234216527695604, + "G": 13.887480473728608 + }, + { + "iota": -0.48069685445092036, + "G": 13.887479122262995 + }, + { + "iota": -0.5014269911050369, + "G": 13.887481889208226 + } + ] + ], + "simsopt_objs": { + "140417158339744": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417158339744", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.506387961733893, + 0.1058930714809362, + 0.7258942274042265, + -0.001249592121112775, + 0.2763105569564668, + 0.01482550301512887, + -0.1280092780227772, + 0.005921392096802394, + 0.01864241438718947, + -0.01034831723350223, + 0.0001022108294955593, + 0.01892666378143068, + -0.007192153616853929, + -0.007355339046239706, + -0.01884714563379878, + -0.002596706082945131, + 0.01131859363705868, + 0.00964754529816095, + -0.0113260687651076, + -0.006628855789771619, + 0.000322284209286623, + 0.001842953924532827, + -0.0004161340928027646, + 0.00176264188836799, + 0.001814459617914206, + -0.001883356200860781, + -0.003584967425237995, + 0.0003165409191237933, + 0.00198839685289703, + 0.0007998064690618334, + 0.0005809753916376526, + 4.996792424044994e-05, + -0.0009656219012175038, + -0.001300735471703214, + -0.0004500391754653399, + 0.002413016477450284, + 0.00190334965179141, + -0.001622873850792805, + -0.001817132111793323, + 0.0005008124937015768, + 0.0009410326413637304, + 0.0005073038161052906, + -0.0001747050570155717, + -0.0004010070348672179, + 0.0002171330554898199, + 0.0001868680753017027, + -0.00049371483741256, + -1.263882515020243e-05, + 0.0005663593123846766, + 0.0001291744509577553, + -0.0002415255915965764, + 0.2855239540187146, + 0.02831674064739627, + 0.1230646086878452, + -0.1881027707999307, + -0.03092022550185042, + 0.07598032813641656, + 0.032842960392996, + -0.02022733960800226, + 0.03368541189764687, + -0.02527069889002642, + 0.03990545352197854, + 0.03266977475756579, + 0.007041509561223136, + -0.01843202758194484, + -0.003255107459418295, + 0.001087406605704745, + 0.02057587403483786, + 0.004332699549632209, + -0.003239348172858322, + -0.008060517809116506, + 0.0008303250764389791, + 0.002593682135814645, + 0.005122620691996364, + 0.002329497971206275, + -0.007021762243403233, + -0.002076255998522319, + 0.005455573755227739, + 0.0004034355313731426, + -0.002121189074115063, + -0.001155709211846629, + 0.0007060503790857225, + 0.001458108819397405, + 0.0007612900914783658, + -0.001579374591052191, + -0.0005648184298353118, + -3.483600030825498e-05, + 0.0006434230018098444, + 0.0002266872576160417, + -0.0005870263149471541, + -0.0004782734366555642, + 0.0004131000234993432, + -0.0002086017812282408, + -0.0002217317708794842, + 0.0004459870616389726, + 0.0002232186481886098, + -0.000550989811641543, + -0.0004679750418668452, + 0.0001971289820931924, + 0.0006305703105299488, + 1.94634036466225e-05, + -0.0005071137243856577, + 0.0009455853398023695, + -1.066704925256128, + 0.01954765252843791, + -0.03091192279856904, + -0.009251669123731003, + 0.03622032973711591, + 0.01289395028459556, + -0.01341289215090563, + -0.01055557464591715, + -0.007044726977866961, + -0.007171173731457627, + 0.01327231838496817, + 0.003220259676106272, + -0.006043809337864334, + -0.006228107449831786, + -0.0004722020937025503, + -0.0007632924616726337, + 0.0002557840887866895, + -0.0008300983337148277, + 0.001290373849098229, + 0.0002249498117545818, + -0.0003276137574950353, + -0.001560853624251917, + -0.003125967131907846, + 0.0007111137798287738, + 0.001688245514976161, + 0.00083638883723687, + -3.216802700299113e-05, + -0.003601309499252412, + -0.003364173533240832, + 0.003283863928203238, + 0.003620244544063828, + -0.001109032285114347, + -0.002277398193829699, + -0.0015519788484098, + 0.0002155015553257128, + 0.002349143532954114, + 0.000703914196138795, + -0.001628934087145739, + -0.0005728748367786014, + 0.000379102967651227, + 3.674770297429017e-05, + 0.0003644795696035227, + 0.0001196573774128766, + -0.0004826910821886253, + 1.895960151025164e-05, + 0.0002282029938596129, + -3.982416558199763e-05, + -0.0001869395233315697, + -0.0002051724761620464, + 0.0001303574263284748 + ] + }, + "names": [ + "xc(0)", + "xs(1)", + "xc(1)", + "xs(2)", + "xc(2)", + "xs(3)", + "xc(3)", + "xs(4)", + "xc(4)", + "xs(5)", + "xc(5)", + "xs(6)", + "xc(6)", + "xs(7)", + "xc(7)", + "xs(8)", + "xc(8)", + "xs(9)", + "xc(9)", + "xs(10)", + "xc(10)", + "xs(11)", + "xc(11)", + "xs(12)", + "xc(12)", + "xs(13)", + "xc(13)", + "xs(14)", + "xc(14)", + "xs(15)", + "xc(15)", + "xs(16)", + "xc(16)", + "xs(17)", + "xc(17)", + "xs(18)", + "xc(18)", + "xs(19)", + "xc(19)", + "xs(20)", + "xc(20)", + "xs(21)", + "xc(21)", + "xs(22)", + "xc(22)", + "xs(23)", + "xc(23)", + "xs(24)", + "xc(24)", + "xs(25)", + "xc(25)", + "yc(0)", + "ys(1)", + "yc(1)", + "ys(2)", + "yc(2)", + "ys(3)", + "yc(3)", + "ys(4)", + "yc(4)", + "ys(5)", + "yc(5)", + "ys(6)", + "yc(6)", + "ys(7)", + "yc(7)", + "ys(8)", + "yc(8)", + "ys(9)", + "yc(9)", + "ys(10)", + "yc(10)", + "ys(11)", + "yc(11)", + "ys(12)", + "yc(12)", + "ys(13)", + "yc(13)", + "ys(14)", + "yc(14)", + "ys(15)", + "yc(15)", + "ys(16)", + "yc(16)", + "ys(17)", + "yc(17)", + "ys(18)", + "yc(18)", + "ys(19)", + "yc(19)", + "ys(20)", + "yc(20)", + "ys(21)", + "yc(21)", + "ys(22)", + "yc(22)", + "ys(23)", + "yc(23)", + "ys(24)", + "yc(24)", + "ys(25)", + "yc(25)", + "zc(0)", + "zs(1)", + "zc(1)", + "zs(2)", + "zc(2)", + "zs(3)", + "zc(3)", + "zs(4)", + "zc(4)", + "zs(5)", + "zc(5)", + "zs(6)", + "zc(6)", + "zs(7)", + "zc(7)", + "zs(8)", + "zc(8)", + "zs(9)", + "zc(9)", + "zs(10)", + "zc(10)", + "zs(11)", + "zc(11)", + "zs(12)", + "zc(12)", + "zs(13)", + "zc(13)", + "zs(14)", + "zc(14)", + "zs(15)", + "zc(15)", + "zs(16)", + "zc(16)", + "zs(17)", + "zc(17)", + "zs(18)", + "zc(18)", + "zs(19)", + "zc(19)", + "zs(20)", + "zc(20)", + "zs(21)", + "zc(21)", + "zs(22)", + "zc(22)", + "zs(23)", + "zc(23)", + "zs(24)", + "zc(24)", + "zs(25)", + "zc(25)" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "CurveXYZFourier1": { + "@module": "simsopt.geo.curvexyzfourier", + "@class": "CurveXYZFourier", + "@name": "CurveXYZFourier1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "quadpoints": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.004, + 0.008, + 0.012, + 0.016, + 0.02, + 0.024, + 0.028, + 0.032, + 0.036000000000000004, + 0.04, + 0.044, + 0.048, + 0.052000000000000005, + 0.056, + 0.06, + 0.064, + 0.068, + 0.07200000000000001, + 0.076, + 0.08, + 0.084, + 0.088, + 0.092, + 0.096, + 0.1, + 0.10400000000000001, + 0.108, + 0.112, + 0.116, + 0.12, + 0.124, + 0.128, + 0.132, + 0.136, + 0.14, + 0.14400000000000002, + 0.148, + 0.152, + 0.156, + 0.16, + 0.164, + 0.168, + 0.17200000000000001, + 0.176, + 0.18, + 0.184, + 0.188, + 0.192, + 0.196, + 0.2, + 0.20400000000000001, + 0.20800000000000002, + 0.212, + 0.216, + 0.22, + 0.224, + 0.228, + 0.232, + 0.23600000000000002, + 0.24, + 0.244, + 0.248, + 0.252, + 0.256, + 0.26, + 0.264, + 0.268, + 0.272, + 0.276, + 0.28, + 0.28400000000000003, + 0.28800000000000003, + 0.292, + 0.296, + 0.3, + 0.304, + 0.308, + 0.312, + 0.316, + 0.32, + 0.324, + 0.328, + 0.332, + 0.336, + 0.34, + 0.34400000000000003, + 0.34800000000000003, + 0.352, + 0.356, + 0.36, + 0.364, + 0.368, + 0.372, + 0.376, + 0.38, + 0.384, + 0.388, + 0.392, + 0.396, + 0.4, + 0.404, + 0.40800000000000003, + 0.41200000000000003, + 0.41600000000000004, + 0.42, + 0.424, + 0.428, + 0.432, + 0.436, + 0.44, + 0.444, + 0.448, + 0.452, + 0.456, + 0.46, + 0.464, + 0.468, + 0.47200000000000003, + 0.47600000000000003, + 0.48, + 0.484, + 0.488, + 0.492, + 0.496, + 0.5, + 0.504, + 0.508, + 0.512, + 0.516, + 0.52, + 0.524, + 0.528, + 0.532, + 0.536, + 0.54, + 0.544, + 0.548, + 0.552, + 0.556, + 0.56, + 0.5640000000000001, + 0.5680000000000001, + 0.5720000000000001, + 0.5760000000000001, + 0.58, + 0.584, + 0.588, + 0.592, + 0.596, + 0.6, + 0.604, + 0.608, + 0.612, + 0.616, + 0.62, + 0.624, + 0.628, + 0.632, + 0.636, + 0.64, + 0.644, + 0.648, + 0.652, + 0.656, + 0.66, + 0.664, + 0.668, + 0.672, + 0.676, + 0.68, + 0.684, + 0.6880000000000001, + 0.6920000000000001, + 0.6960000000000001, + 0.7000000000000001, + 0.704, + 0.708, + 0.712, + 0.716, + 0.72, + 0.724, + 0.728, + 0.732, + 0.736, + 0.74, + 0.744, + 0.748, + 0.752, + 0.756, + 0.76, + 0.764, + 0.768, + 0.772, + 0.776, + 0.78, + 0.784, + 0.788, + 0.792, + 0.796, + 0.8, + 0.804, + 0.808, + 0.812, + 0.8160000000000001, + 0.8200000000000001, + 0.8240000000000001, + 0.8280000000000001, + 0.8320000000000001, + 0.836, + 0.84, + 0.844, + 0.848, + 0.852, + 0.856, + 0.86, + 0.864, + 0.868, + 0.872, + 0.876, + 0.88, + 0.884, + 0.888, + 0.892, + 0.896, + 0.9, + 0.904, + 0.908, + 0.912, + 0.916, + 0.92, + 0.924, + 0.928, + 0.932, + 0.936, + 0.9400000000000001, + 0.9440000000000001, + 0.9480000000000001, + 0.9520000000000001, + 0.9560000000000001, + 0.96, + 0.964, + 0.968, + 0.972, + 0.976, + 0.98, + 0.984, + 0.988, + 0.992, + 0.996 + ] + }, + "order": 25, + "dofs": { + "$type": "ref", + "value": "140417158339744" + } + }, + "140417157910592": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157910592", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.268960636199869, + 0.2234285580503567, + 0.5468300987692021, + -0.07598922426224614, + 0.2314838962751658, + 0.01035784318060333, + -0.08314304549672957, + -0.04624738986383844, + 0.05377747860630284, + -0.001074456865203822, + -0.02151604922154927, + -0.01446679290684195, + 0.008416712252875694, + -0.009228184118107326, + 0.005277266362275169, + 0.01142201731157229, + 0.01681398796325401, + 0.009993706195866578, + 0.001370286955930781, + -0.008399573830195455, + -0.005099919856215084, + 0.005334309041669094, + -0.001419513324650316, + -0.003333508834690296, + 0.0002887180426140212, + -0.0001690909516323616, + -0.001592036575525169, + -4.507713399549196e-05, + 0.005287560419413426, + 0.001265480827581528, + -0.001229918688675425, + 0.001129035262308468, + -0.002142778995712242, + -0.001748186446934164, + 0.000763477629872682, + 0.0006002693299791978, + -0.0003618301004192371, + 0.000988040168005559, + 0.0007880569343915778, + -0.001135722890360471, + -0.0008706368325040781, + 0.0005507322770281398, + 0.0009555809731928289, + -0.0001476990895937402, + -0.001054028588515068, + -1.482885559572655e-05, + -0.0001592869344899095, + -0.0004579572172035079, + 0.0006274586578504227, + 0.0005393401407410331, + -3.182089243244368e-05, + 0.7629396044020591, + 0.189701305549749, + 0.2946730680990991, + -0.1569360429309221, + -0.08805875862294558, + -0.03077704895086764, + 0.1149783480591024, + 0.1301411562027019, + -0.001461622206151801, + 0.04030157913855995, + 0.0006901390690664732, + -0.02740323125842794, + -0.02323299800745342, + 0.006389595554305861, + 0.003627095782551136, + -0.01015301262258172, + -0.00621023311542419, + -0.003238881121248944, + -0.006852312518149265, + 0.005609446955056436, + 0.004762124576622897, + 0.006665063843140196, + -6.70526269177163e-05, + -0.003587348009623233, + -0.00322170321999071, + -0.004203038352780501, + 0.0006017815497404605, + 0.001489961187320675, + 0.002190828148742953, + -0.001018226063168117, + -0.002311412742654803, + 0.0005349636274747352, + 0.0005836793424641873, + 0.0003330260000362103, + 0.0006191475972028521, + 0.0004562062905476333, + -0.0003998259903290102, + -0.001606870160409875, + -0.0001005634411503442, + 0.0003784623778643909, + 0.0003873441313675419, + 0.0004934685418203405, + 0.0004248568990090018, + -0.0001368925780341768, + -0.0005224641202364183, + 7.402330001924084e-06, + 0.0001942482764948633, + 3.004761739695799e-05, + 0.0001571480542442944, + -1.517325817427362e-05, + -0.0001596571201453762, + -0.004342453367498795, + -0.8322915538683627, + 0.01842619538559772, + -0.1445740110997678, + -0.03919221672360253, + 0.0181885023851906, + 0.007857938792447916, + -0.0008409533080505334, + 0.0679882056193599, + -0.008440199737942872, + -0.05052693032193879, + 0.0111459982531894, + -0.002854468104354866, + -0.01157234174126346, + -0.002254287431014864, + 0.01222589681633306, + 0.007524606302699996, + -0.006381505382857464, + 0.003239076046582923, + 0.00341366498860203, + -0.00384676331619515, + 0.0004019843766106519, + 0.003278371413101953, + -0.001659157168404143, + -0.008498109023400214, + -0.0005869360684358228, + 0.001643969359882166, + -0.001687685453312147, + 0.001913710312578008, + 0.00307704389234268, + -0.001526906838827543, + -0.002096608532065649, + 0.002116359835823416, + 0.0002080593023590777, + -0.001289011271870523, + 0.0003465163727308783, + 0.0003373949660992973, + -0.0005853247790129025, + -0.0007569823284455652, + -3.821511752005806e-05, + 0.0008610335506290439, + 0.0002833895542749826, + -4.205984435378816e-05, + 0.0001112528084110792, + -0.0002379239249443648, + -0.0002104661224579025, + 0.0001263747200842462, + -0.0001533284829536013, + 0.0001522993485716547, + 0.0003185888026784711, + -0.0001603437887349448 + ] + }, + "names": [ + "xc(0)", + "xs(1)", + "xc(1)", + "xs(2)", + "xc(2)", + "xs(3)", + "xc(3)", + "xs(4)", + "xc(4)", + "xs(5)", + "xc(5)", + "xs(6)", + "xc(6)", + "xs(7)", + "xc(7)", + "xs(8)", + "xc(8)", + "xs(9)", + "xc(9)", + "xs(10)", + "xc(10)", + "xs(11)", + "xc(11)", + "xs(12)", + "xc(12)", + "xs(13)", + "xc(13)", + "xs(14)", + "xc(14)", + "xs(15)", + "xc(15)", + "xs(16)", + "xc(16)", + "xs(17)", + "xc(17)", + "xs(18)", + "xc(18)", + "xs(19)", + "xc(19)", + "xs(20)", + "xc(20)", + "xs(21)", + "xc(21)", + "xs(22)", + "xc(22)", + "xs(23)", + "xc(23)", + "xs(24)", + "xc(24)", + "xs(25)", + "xc(25)", + "yc(0)", + "ys(1)", + "yc(1)", + "ys(2)", + "yc(2)", + "ys(3)", + "yc(3)", + "ys(4)", + "yc(4)", + "ys(5)", + "yc(5)", + "ys(6)", + "yc(6)", + "ys(7)", + "yc(7)", + "ys(8)", + "yc(8)", + "ys(9)", + "yc(9)", + "ys(10)", + "yc(10)", + "ys(11)", + "yc(11)", + "ys(12)", + "yc(12)", + "ys(13)", + "yc(13)", + "ys(14)", + "yc(14)", + "ys(15)", + "yc(15)", + "ys(16)", + "yc(16)", + "ys(17)", + "yc(17)", + "ys(18)", + "yc(18)", + "ys(19)", + "yc(19)", + "ys(20)", + "yc(20)", + "ys(21)", + "yc(21)", + "ys(22)", + "yc(22)", + "ys(23)", + "yc(23)", + "ys(24)", + "yc(24)", + "ys(25)", + "yc(25)", + "zc(0)", + "zs(1)", + "zc(1)", + "zs(2)", + "zc(2)", + "zs(3)", + "zc(3)", + "zs(4)", + "zc(4)", + "zs(5)", + "zc(5)", + "zs(6)", + "zc(6)", + "zs(7)", + "zc(7)", + "zs(8)", + "zc(8)", + "zs(9)", + "zc(9)", + "zs(10)", + "zc(10)", + "zs(11)", + "zc(11)", + "zs(12)", + "zc(12)", + "zs(13)", + "zc(13)", + "zs(14)", + "zc(14)", + "zs(15)", + "zc(15)", + "zs(16)", + "zc(16)", + "zs(17)", + "zc(17)", + "zs(18)", + "zc(18)", + "zs(19)", + "zc(19)", + "zs(20)", + "zc(20)", + "zs(21)", + "zc(21)", + "zs(22)", + "zc(22)", + "zs(23)", + "zc(23)", + "zs(24)", + "zc(24)", + "zs(25)", + "zc(25)" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "CurveXYZFourier2": { + "@module": "simsopt.geo.curvexyzfourier", + "@class": "CurveXYZFourier", + "@name": "CurveXYZFourier2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "quadpoints": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.004, + 0.008, + 0.012, + 0.016, + 0.02, + 0.024, + 0.028, + 0.032, + 0.036000000000000004, + 0.04, + 0.044, + 0.048, + 0.052000000000000005, + 0.056, + 0.06, + 0.064, + 0.068, + 0.07200000000000001, + 0.076, + 0.08, + 0.084, + 0.088, + 0.092, + 0.096, + 0.1, + 0.10400000000000001, + 0.108, + 0.112, + 0.116, + 0.12, + 0.124, + 0.128, + 0.132, + 0.136, + 0.14, + 0.14400000000000002, + 0.148, + 0.152, + 0.156, + 0.16, + 0.164, + 0.168, + 0.17200000000000001, + 0.176, + 0.18, + 0.184, + 0.188, + 0.192, + 0.196, + 0.2, + 0.20400000000000001, + 0.20800000000000002, + 0.212, + 0.216, + 0.22, + 0.224, + 0.228, + 0.232, + 0.23600000000000002, + 0.24, + 0.244, + 0.248, + 0.252, + 0.256, + 0.26, + 0.264, + 0.268, + 0.272, + 0.276, + 0.28, + 0.28400000000000003, + 0.28800000000000003, + 0.292, + 0.296, + 0.3, + 0.304, + 0.308, + 0.312, + 0.316, + 0.32, + 0.324, + 0.328, + 0.332, + 0.336, + 0.34, + 0.34400000000000003, + 0.34800000000000003, + 0.352, + 0.356, + 0.36, + 0.364, + 0.368, + 0.372, + 0.376, + 0.38, + 0.384, + 0.388, + 0.392, + 0.396, + 0.4, + 0.404, + 0.40800000000000003, + 0.41200000000000003, + 0.41600000000000004, + 0.42, + 0.424, + 0.428, + 0.432, + 0.436, + 0.44, + 0.444, + 0.448, + 0.452, + 0.456, + 0.46, + 0.464, + 0.468, + 0.47200000000000003, + 0.47600000000000003, + 0.48, + 0.484, + 0.488, + 0.492, + 0.496, + 0.5, + 0.504, + 0.508, + 0.512, + 0.516, + 0.52, + 0.524, + 0.528, + 0.532, + 0.536, + 0.54, + 0.544, + 0.548, + 0.552, + 0.556, + 0.56, + 0.5640000000000001, + 0.5680000000000001, + 0.5720000000000001, + 0.5760000000000001, + 0.58, + 0.584, + 0.588, + 0.592, + 0.596, + 0.6, + 0.604, + 0.608, + 0.612, + 0.616, + 0.62, + 0.624, + 0.628, + 0.632, + 0.636, + 0.64, + 0.644, + 0.648, + 0.652, + 0.656, + 0.66, + 0.664, + 0.668, + 0.672, + 0.676, + 0.68, + 0.684, + 0.6880000000000001, + 0.6920000000000001, + 0.6960000000000001, + 0.7000000000000001, + 0.704, + 0.708, + 0.712, + 0.716, + 0.72, + 0.724, + 0.728, + 0.732, + 0.736, + 0.74, + 0.744, + 0.748, + 0.752, + 0.756, + 0.76, + 0.764, + 0.768, + 0.772, + 0.776, + 0.78, + 0.784, + 0.788, + 0.792, + 0.796, + 0.8, + 0.804, + 0.808, + 0.812, + 0.8160000000000001, + 0.8200000000000001, + 0.8240000000000001, + 0.8280000000000001, + 0.8320000000000001, + 0.836, + 0.84, + 0.844, + 0.848, + 0.852, + 0.856, + 0.86, + 0.864, + 0.868, + 0.872, + 0.876, + 0.88, + 0.884, + 0.888, + 0.892, + 0.896, + 0.9, + 0.904, + 0.908, + 0.912, + 0.916, + 0.92, + 0.924, + 0.928, + 0.932, + 0.936, + 0.9400000000000001, + 0.9440000000000001, + 0.9480000000000001, + 0.9520000000000001, + 0.9560000000000001, + 0.96, + 0.964, + 0.968, + 0.972, + 0.976, + 0.98, + 0.984, + 0.988, + 0.992, + 0.996 + ] + }, + "order": 25, + "dofs": { + "$type": "ref", + "value": "140417157910592" + } + }, + "140417157911264": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157911264", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.8980851593547453, + 0.1942559921705813, + 0.3889755333770718, + -0.1446923384557668, + 0.2616477438027761, + 0.03731920597998046, + -0.03289705406442186, + 0.02547136484396155, + 0.0532217952204826, + 0.050428478861979, + -0.03624366941253683, + -0.005451626158324006, + -0.01668041626206209, + 0.008182439166261426, + 0.003842296843932926, + 0.01470476196344816, + 0.01901860245900076, + 0.0218942171541043, + -0.00945061997881808, + 0.002564135600286371, + -0.006766476390874592, + -0.001269140258791196, + 0.002139997339095541, + 0.001657675366985779, + 0.0002979912903074711, + 0.006328865782046154, + 0.0004567550240531948, + -0.0008525115686061069, + -0.000977103914377314, + 0.0005522046297053057, + -0.0009600861596635313, + -0.001340814451660981, + -0.001495132545615355, + 0.0006434008787568705, + 0.000495245187218385, + -0.00134743162348104, + 0.0002393656261548005, + 0.0003132890671380592, + 0.0006144326019911972, + -0.0005029044211924421, + -0.000783957033721161, + -0.0004002250154653492, + 0.0002391300413782915, + -0.0003806672575232206, + -0.000145466845504183, + -7.221379723120868e-05, + 0.0006927366534479363, + -0.0001275371930022123, + -0.0001401106599127933, + -0.0002158625680600062, + -7.139828388354475e-05, + 1.129181984052873, + 0.2708936854358476, + 0.468646640557997, + 0.02081652240284051, + -0.1928735276123626, + -0.03518255586981031, + 0.01192001522947444, + -0.06439441858177399, + -0.004172035660790115, + -0.016589458610143, + 0.001628354566592241, + 0.003299047220307412, + 0.02371335634022325, + -0.02489732104888577, + 0.01517053799913132, + -0.007490250276888437, + -0.02121728304870823, + -0.006509759115093021, + 0.002045879344162137, + 0.0002421911767798572, + 0.005286626183968976, + -0.002423351884665077, + 0.003037404376098953, + -0.001045524131070646, + -0.001371894636819662, + 0.0002683048956511064, + 0.0006396825080884871, + 0.0006110891778951719, + -0.001898949452431453, + -0.001413075309279682, + -0.000175565426273192, + 0.00025798969577147, + 0.001643409441239691, + 7.18696208370806e-05, + -0.0001583133254478763, + 0.001580406281910882, + -0.002161287927547965, + -0.0003891297580205399, + 0.0004807171148380796, + -0.0003779554431875909, + -0.000203599914921071, + 0.0002418121495980502, + -0.0001924002563136939, + 0.0004205862222447268, + -0.0003081775538974041, + -1.457104090324735e-05, + -0.0001305465480840895, + -2.931233724533855e-05, + 3.39235991969411e-05, + -8.787891234509293e-05, + -0.0002714497625897205, + 0.01443108431390148, + -0.5884600992390547, + 0.1639153375972931, + -0.02326901782799053, + -0.09503676743509344, + -0.001882227773385535, + -0.1358423641287697, + -0.04946480830906624, + 0.01080325660372903, + -0.004462853204566593, + 0.02204832208587066, + -0.01988057349197482, + 0.006713767349457029, + 0.009816410920710776, + -0.004595941635687146, + 0.01307328931917959, + 0.0183731152740804, + -0.002049019816619709, + -0.009421893063595877, + 0.0003683472428279665, + 0.005559370162880608, + -0.001158799750525409, + 0.002656529580593774, + 0.005458828901239469, + 0.003685058507882478, + 0.005539080181031877, + 0.0003319744004354147, + 0.003297209047830778, + -0.001172958360845208, + -6.403055114502017e-05, + -0.0028127900802783, + -7.412199662635927e-05, + -1.404234804116165e-06, + 0.002212349409834762, + 0.001726905111358576, + 0.0009310945379894919, + -0.0002426222281296402, + 0.0007504861042380895, + -0.001511448440947522, + -0.0002060956498950368, + -0.000206480198377301, + 8.668234567299965e-05, + 0.0001267761162311387, + 1.493158313140079e-05, + 0.0001119337013982711, + 0.0003201242558262467, + 0.00016404919743365, + -0.0002679743018523173, + -0.000169663995881007, + 0.0002693900147788098, + -0.0001731877336642894 + ] + }, + "names": [ + "xc(0)", + "xs(1)", + "xc(1)", + "xs(2)", + "xc(2)", + "xs(3)", + "xc(3)", + "xs(4)", + "xc(4)", + "xs(5)", + "xc(5)", + "xs(6)", + "xc(6)", + "xs(7)", + "xc(7)", + "xs(8)", + "xc(8)", + "xs(9)", + "xc(9)", + "xs(10)", + "xc(10)", + "xs(11)", + "xc(11)", + "xs(12)", + "xc(12)", + "xs(13)", + "xc(13)", + "xs(14)", + "xc(14)", + "xs(15)", + "xc(15)", + "xs(16)", + "xc(16)", + "xs(17)", + "xc(17)", + "xs(18)", + "xc(18)", + "xs(19)", + "xc(19)", + "xs(20)", + "xc(20)", + "xs(21)", + "xc(21)", + "xs(22)", + "xc(22)", + "xs(23)", + "xc(23)", + "xs(24)", + "xc(24)", + "xs(25)", + "xc(25)", + "yc(0)", + "ys(1)", + "yc(1)", + "ys(2)", + "yc(2)", + "ys(3)", + "yc(3)", + "ys(4)", + "yc(4)", + "ys(5)", + "yc(5)", + "ys(6)", + "yc(6)", + "ys(7)", + "yc(7)", + "ys(8)", + "yc(8)", + "ys(9)", + "yc(9)", + "ys(10)", + "yc(10)", + "ys(11)", + "yc(11)", + "ys(12)", + "yc(12)", + "ys(13)", + "yc(13)", + "ys(14)", + "yc(14)", + "ys(15)", + "yc(15)", + "ys(16)", + "yc(16)", + "ys(17)", + "yc(17)", + "ys(18)", + "yc(18)", + "ys(19)", + "yc(19)", + "ys(20)", + "yc(20)", + "ys(21)", + "yc(21)", + "ys(22)", + "yc(22)", + "ys(23)", + "yc(23)", + "ys(24)", + "yc(24)", + "ys(25)", + "yc(25)", + "zc(0)", + "zs(1)", + "zc(1)", + "zs(2)", + "zc(2)", + "zs(3)", + "zc(3)", + "zs(4)", + "zc(4)", + "zs(5)", + "zc(5)", + "zs(6)", + "zc(6)", + "zs(7)", + "zc(7)", + "zs(8)", + "zc(8)", + "zs(9)", + "zc(9)", + "zs(10)", + "zc(10)", + "zs(11)", + "zc(11)", + "zs(12)", + "zc(12)", + "zs(13)", + "zc(13)", + "zs(14)", + "zc(14)", + "zs(15)", + "zc(15)", + "zs(16)", + "zc(16)", + "zs(17)", + "zc(17)", + "zs(18)", + "zc(18)", + "zs(19)", + "zc(19)", + "zs(20)", + "zc(20)", + "zs(21)", + "zc(21)", + "zs(22)", + "zc(22)", + "zs(23)", + "zc(23)", + "zs(24)", + "zc(24)", + "zs(25)", + "zc(25)" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "CurveXYZFourier3": { + "@module": "simsopt.geo.curvexyzfourier", + "@class": "CurveXYZFourier", + "@name": "CurveXYZFourier3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "quadpoints": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.004, + 0.008, + 0.012, + 0.016, + 0.02, + 0.024, + 0.028, + 0.032, + 0.036000000000000004, + 0.04, + 0.044, + 0.048, + 0.052000000000000005, + 0.056, + 0.06, + 0.064, + 0.068, + 0.07200000000000001, + 0.076, + 0.08, + 0.084, + 0.088, + 0.092, + 0.096, + 0.1, + 0.10400000000000001, + 0.108, + 0.112, + 0.116, + 0.12, + 0.124, + 0.128, + 0.132, + 0.136, + 0.14, + 0.14400000000000002, + 0.148, + 0.152, + 0.156, + 0.16, + 0.164, + 0.168, + 0.17200000000000001, + 0.176, + 0.18, + 0.184, + 0.188, + 0.192, + 0.196, + 0.2, + 0.20400000000000001, + 0.20800000000000002, + 0.212, + 0.216, + 0.22, + 0.224, + 0.228, + 0.232, + 0.23600000000000002, + 0.24, + 0.244, + 0.248, + 0.252, + 0.256, + 0.26, + 0.264, + 0.268, + 0.272, + 0.276, + 0.28, + 0.28400000000000003, + 0.28800000000000003, + 0.292, + 0.296, + 0.3, + 0.304, + 0.308, + 0.312, + 0.316, + 0.32, + 0.324, + 0.328, + 0.332, + 0.336, + 0.34, + 0.34400000000000003, + 0.34800000000000003, + 0.352, + 0.356, + 0.36, + 0.364, + 0.368, + 0.372, + 0.376, + 0.38, + 0.384, + 0.388, + 0.392, + 0.396, + 0.4, + 0.404, + 0.40800000000000003, + 0.41200000000000003, + 0.41600000000000004, + 0.42, + 0.424, + 0.428, + 0.432, + 0.436, + 0.44, + 0.444, + 0.448, + 0.452, + 0.456, + 0.46, + 0.464, + 0.468, + 0.47200000000000003, + 0.47600000000000003, + 0.48, + 0.484, + 0.488, + 0.492, + 0.496, + 0.5, + 0.504, + 0.508, + 0.512, + 0.516, + 0.52, + 0.524, + 0.528, + 0.532, + 0.536, + 0.54, + 0.544, + 0.548, + 0.552, + 0.556, + 0.56, + 0.5640000000000001, + 0.5680000000000001, + 0.5720000000000001, + 0.5760000000000001, + 0.58, + 0.584, + 0.588, + 0.592, + 0.596, + 0.6, + 0.604, + 0.608, + 0.612, + 0.616, + 0.62, + 0.624, + 0.628, + 0.632, + 0.636, + 0.64, + 0.644, + 0.648, + 0.652, + 0.656, + 0.66, + 0.664, + 0.668, + 0.672, + 0.676, + 0.68, + 0.684, + 0.6880000000000001, + 0.6920000000000001, + 0.6960000000000001, + 0.7000000000000001, + 0.704, + 0.708, + 0.712, + 0.716, + 0.72, + 0.724, + 0.728, + 0.732, + 0.736, + 0.74, + 0.744, + 0.748, + 0.752, + 0.756, + 0.76, + 0.764, + 0.768, + 0.772, + 0.776, + 0.78, + 0.784, + 0.788, + 0.792, + 0.796, + 0.8, + 0.804, + 0.808, + 0.812, + 0.8160000000000001, + 0.8200000000000001, + 0.8240000000000001, + 0.8280000000000001, + 0.8320000000000001, + 0.836, + 0.84, + 0.844, + 0.848, + 0.852, + 0.856, + 0.86, + 0.864, + 0.868, + 0.872, + 0.876, + 0.88, + 0.884, + 0.888, + 0.892, + 0.896, + 0.9, + 0.904, + 0.908, + 0.912, + 0.916, + 0.92, + 0.924, + 0.928, + 0.932, + 0.936, + 0.9400000000000001, + 0.9440000000000001, + 0.9480000000000001, + 0.9520000000000001, + 0.9560000000000001, + 0.96, + 0.964, + 0.968, + 0.972, + 0.976, + 0.98, + 0.984, + 0.988, + 0.992, + 0.996 + ] + }, + "order": 25, + "dofs": { + "$type": "ref", + "value": "140417157911264" + } + }, + "140417157911648": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157911648", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 652271.9419853 + ] + }, + "names": [ + "x0" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity + ] + } + }, + "Current1": { + "@module": "simsopt.field.coil", + "@class": "Current", + "@name": "Current1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current": 652271.9419853, + "dofs": { + "$type": "ref", + "value": "140417157911648" + } + }, + "140417157911840": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157911840", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 651868.5693674 + ] + }, + "names": [ + "x0" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity + ] + } + }, + "Current2": { + "@module": "simsopt.field.coil", + "@class": "Current", + "@name": "Current2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current": 651868.5693674, + "dofs": { + "$type": "ref", + "value": "140417157911840" + } + }, + "140417157912320": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157912320", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 537743.5886473 + ] + }, + "names": [ + "x0" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity + ] + } + }, + "Current3": { + "@module": "simsopt.field.coil", + "@class": "Current", + "@name": "Current3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current": 537743.5886473, + "dofs": { + "$type": "ref", + "value": "140417157912320" + } + }, + "Coil1": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "current": { + "$type": "ref", + "value": "Current1" + } + }, + "Coil2": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "current": { + "$type": "ref", + "value": "Current2" + } + }, + "Coil3": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "current": { + "$type": "ref", + "value": "Current3" + } + }, + "RotatedCurve1": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "phi": 0.0, + "flip": true + }, + "ScaledCurrent1": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current1" + }, + "scale": -1.0 + }, + "Coil4": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve1" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent1" + } + }, + "RotatedCurve2": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "phi": 0.0, + "flip": true + }, + "ScaledCurrent2": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current2" + }, + "scale": -1.0 + }, + "Coil5": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve2" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent2" + } + }, + "RotatedCurve3": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "phi": 0.0, + "flip": true + }, + "ScaledCurrent3": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current3" + }, + "scale": -1.0 + }, + "Coil6": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve3" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent3" + } + }, + "RotatedCurve4": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "phi": 2.0943951023931953, + "flip": false + }, + "Coil7": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve4" + }, + "current": { + "$type": "ref", + "value": "Current1" + } + }, + "RotatedCurve5": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "phi": 2.0943951023931953, + "flip": false + }, + "Coil8": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve5" + }, + "current": { + "$type": "ref", + "value": "Current2" + } + }, + "RotatedCurve6": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "phi": 2.0943951023931953, + "flip": false + }, + "Coil9": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve6" + }, + "current": { + "$type": "ref", + "value": "Current3" + } + }, + "RotatedCurve7": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "phi": 2.0943951023931953, + "flip": true + }, + "ScaledCurrent4": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current1" + }, + "scale": -1.0 + }, + "Coil10": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve7" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent4" + } + }, + "RotatedCurve8": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "phi": 2.0943951023931953, + "flip": true + }, + "ScaledCurrent5": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current2" + }, + "scale": -1.0 + }, + "Coil11": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil11", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve8" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent5" + } + }, + "RotatedCurve9": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "phi": 2.0943951023931953, + "flip": true + }, + "ScaledCurrent6": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current3" + }, + "scale": -1.0 + }, + "Coil12": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil12", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve9" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent6" + } + }, + "RotatedCurve10": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "phi": 4.1887902047863905, + "flip": false + }, + "Coil13": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil13", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve10" + }, + "current": { + "$type": "ref", + "value": "Current1" + } + }, + "RotatedCurve11": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve11", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "phi": 4.1887902047863905, + "flip": false + }, + "Coil14": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil14", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve11" + }, + "current": { + "$type": "ref", + "value": "Current2" + } + }, + "RotatedCurve12": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve12", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "phi": 4.1887902047863905, + "flip": false + }, + "Coil15": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil15", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve12" + }, + "current": { + "$type": "ref", + "value": "Current3" + } + }, + "RotatedCurve13": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve13", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier1" + }, + "phi": 4.1887902047863905, + "flip": true + }, + "ScaledCurrent7": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current1" + }, + "scale": -1.0 + }, + "Coil16": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil16", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve13" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent7" + } + }, + "RotatedCurve14": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve14", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier2" + }, + "phi": 4.1887902047863905, + "flip": true + }, + "ScaledCurrent8": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current2" + }, + "scale": -1.0 + }, + "Coil17": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil17", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve14" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent8" + } + }, + "RotatedCurve15": { + "@module": "simsopt.geo.curve", + "@class": "RotatedCurve", + "@name": "RotatedCurve15", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "CurveXYZFourier3" + }, + "phi": 4.1887902047863905, + "flip": true + }, + "ScaledCurrent9": { + "@module": "simsopt.field.coil", + "@class": "ScaledCurrent", + "@name": "ScaledCurrent9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "current_to_scale": { + "$type": "ref", + "value": "Current3" + }, + "scale": -1.0 + }, + "Coil18": { + "@module": "simsopt.field.coil", + "@class": "Coil", + "@name": "Coil18", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "curve": { + "$type": "ref", + "value": "RotatedCurve15" + }, + "current": { + "$type": "ref", + "value": "ScaledCurrent9" + } + }, + "140417157680672": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157680672", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4685535038273063, + 0.10885907615580677, + 0.001063517263773178, + -0.0006461718819618995, + -0.00011134663223633435, + -6.59595083028951e-05, + 3.468090318155798e-05, + 0.07193407142257575, + -0.0313865662814103, + -0.0003348078453899413, + 0.00027298712038913744, + 6.776308125400895e-05, + -6.503890761751121e-05, + -1.7207687200451525e-05, + 0.009437830460041995, + 0.011169529347572775, + 0.0029094199526264416, + -0.00011432268686608993, + 4.9902292730414044e-05, + -1.5821954750967447e-05, + 7.235607280095801e-06, + -0.001947059354364199, + -0.001160038704384391, + -0.0004840648311813534, + -4.772179349375025e-05, + 2.9534574790716033e-05, + -1.3118292503877197e-06, + -3.097628967086517e-07, + 0.00022471888614946335, + 0.00029003113493776853, + 0.0001271818181284359, + 2.4442120839258265e-05, + 1.5428313799917422e-05, + 4.5796943158756766e-07, + 8.537872703465683e-07, + -7.506451846943892e-05, + -2.1275176566224788e-05, + -3.093416273264101e-05, + -8.228989905633043e-06, + -1.0608475240545668e-06, + -1.073694920757087e-06, + 3.082114521119653e-07, + 1.4974869906873829e-05, + -4.4151414235509715e-06, + 2.8949620495440976e-06, + 3.921756003228191e-06, + 7.11441116406671e-07, + 1.2774367932475938e-07, + 7.329307510368631e-08, + 0.07075450090578987, + 0.0017194346351063268, + 0.00022335554812756117, + 3.996816274531678e-05, + 1.246976391194163e-05, + -1.064693503198292e-05, + -0.008585605426675254, + -0.002184621428776987, + 0.00021139536058014803, + -6.153138509621074e-05, + 1.082925075144573e-06, + -1.243767198149423e-06, + 0.0009640144872580066, + 0.0005241936165419604, + 0.00011834258889306653, + 1.0776518965582102e-06, + 6.9822957771182605e-06, + 3.7353333049273367e-07, + -0.00011699802712723451, + -0.00011741962277839896, + -2.1194208555700878e-05, + -1.9541681536638643e-05, + 7.818224352441765e-07, + -3.6492035614366365e-07, + -1.5111257719049579e-05, + 2.6627411650777872e-05, + 1.1604457867404614e-05, + 3.574964648692253e-06, + 1.7626369498385609e-06, + 1.1210200324160136e-07, + 9.58381411454066e-06, + -1.7232843186943095e-06, + -4.795941288632566e-06, + -1.176654143363589e-06, + -2.0561795580566815e-07, + -1.9972400407300538e-07, + -0.03950441948098543, + 0.0037429873308512675, + 0.0007329785322719282, + 0.00019177885009865725, + -0.00010212330864891752, + -4.382806225538554e-05, + 0.01446887040008142, + -4.276088542717664e-05, + -0.0003698710527655154, + 3.0662861090488924e-05, + -5.85639465093322e-05, + 3.219358993106075e-05, + -0.0058162371725935585, + -0.00045906794809304446, + 0.00023199417710226828, + 0.00014376845308851352, + 2.563546396287839e-05, + -2.497647579370646e-06, + 0.00030969597167758233, + 0.0002395180971485346, + -3.080171139038066e-05, + -1.409443315344161e-05, + -1.3426777248471762e-05, + 1.8080113517970444e-07, + -3.5015677146688984e-05, + -1.877292471447359e-05, + -1.302229447498967e-06, + 1.533915987021856e-05, + 7.426500405931181e-06, + 2.6842843193904198e-06, + 1.9784588595899777e-06, + 4.440613307122717e-06, + 1.472065575437298e-06, + -9.260857983160854e-07, + -1.6830087266962853e-06, + -8.7104694140375e-07, + 3.857957565056739e-06, + 4.213368192226091e-07, + -4.824004271888926e-07, + 6.328667379394951e-07, + 5.219901284506246e-07, + 3.930095552212195e-07, + 0.013656110406525035, + 0.02411124263354406, + -0.0016182879050003636, + -0.0005325520908748356, + -0.00010129759543937518, + 1.721264186415697e-05, + 4.121700312627859e-05, + 0.0008192694188570492, + -0.005014199195743326, + -0.000478425231690586, + -2.3924938694194728e-05, + 5.9294209021373415e-06, + 2.3963389657418054e-05, + 7.332229039364805e-06, + -0.0002730960923606502, + 0.00015450202158842673, + 0.00016936272233597413, + -0.00010511331870970046, + -2.3218743642489977e-05, + -1.2101230207051284e-05, + -3.7848160992581174e-06, + 4.510522677741358e-05, + 5.375741143107477e-05, + -2.2160152240811962e-05, + -1.3565325919787582e-05, + 4.487301874974961e-06, + 4.926898773871761e-06, + 2.1023402009489775e-06, + -1.6482887439341785e-05, + -1.5081629794344637e-05, + 2.2672040002814692e-06, + 1.6735393526318605e-06, + -8.230578057805614e-08, + -1.8975203100866856e-06, + -1.0204313029931235e-06, + 2.2095722001029348e-06, + 6.741079986578086e-06, + 1.8733519808498557e-06, + -5.985683688433944e-07, + 1.5055683990358914e-07, + 2.961586783506627e-07, + 2.9428572839592034e-07, + 0.0577540007060477, + 0.00028888137172467096, + 5.4793080551868285e-05, + -9.486631478079195e-05, + -5.430440104327416e-07, + -4.7000639959297365e-06, + -0.03896743983611575, + -0.0013426537826345052, + -0.00020457035722809037, + 7.678943314136919e-05, + 2.5983461138248685e-05, + -6.6929767964535525e-06, + 0.00552783391938162, + 0.002060467341181512, + -0.00035254064533581764, + 4.0341009702604096e-05, + 1.3383015509627485e-06, + -5.8395156843773704e-06, + -0.0004720720887216189, + -0.000497843079129734, + -0.00010672737118728858, + 1.9746663064755266e-05, + 1.4850648668777294e-06, + 1.0148344185712917e-06, + 0.00012622286338572608, + 0.00012638497418081344, + 1.1872951632868682e-05, + 1.716397545210004e-05, + -1.990179081965411e-06, + 1.9739402520043877e-07, + 3.4476095031645395e-05, + -2.721378400437206e-05, + -8.039912016883005e-06, + -2.0496088606543056e-06, + -1.162376349764262e-06, + 1.892707952115927e-07, + -2.5443732835648376e-05, + 2.8659890143401324e-06, + 4.414236306306108e-06, + 9.809719782894142e-07, + 6.229590502240704e-08, + 1.5174642405773384e-07, + -0.17722652040871384, + -0.08266348132622668, + -0.003137090976513157, + 0.0002904418858519418, + 0.00021552561194636857, + 2.0983634307472577e-05, + 1.7700705524172996e-06, + 0.005216436328865215, + 0.006339348295410186, + 0.0020490282314116004, + -0.00020849177564251074, + -1.4128629067171795e-05, + -5.888275168429574e-07, + 7.087659475641016e-06, + -0.0009414722028068683, + -0.001215065840813873, + -0.0005286655507359955, + -6.99084407111075e-05, + 3.6482092682178346e-05, + 2.095340882814254e-06, + 2.440736303837456e-06, + 0.00020949928218742253, + 0.00027518354270059304, + 0.00013162191524120542, + 4.272482053945476e-06, + 8.95928598494168e-06, + -1.874108482198872e-06, + -6.248910459316296e-08, + -9.405161264368792e-06, + 2.2701290017591009e-07, + -3.201368681288977e-05, + -5.1652500141543875e-06, + -8.101107660844897e-08, + -8.929255607053415e-07, + 3.9885987698786534e-07, + 3.8069653635840842e-06, + -1.724827621333735e-05, + 2.9795078890529537e-06, + 3.278211575747721e-06, + 4.1134940610207483e-07, + -7.723987248853657e-08, + -4.341069637274573e-09 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier2": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157680672" + } + }, + "140417157808864": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157808864", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4588032230464922, + 0.0952449005429952, + -0.0002892533209557182, + -0.0005805373310813163, + -0.00010043768815365931, + -5.736010688788257e-05, + 3.991455463469891e-05, + 0.11470434174364824, + -0.04642649863694781, + 1.6421110393883644e-05, + 0.0004045679268297248, + 6.11095247086482e-05, + -0.00010601571885249395, + -2.1410611600373285e-05, + 0.020877683603483084, + 0.02324469892015515, + 0.005934765458900567, + -0.0004652376052506533, + 3.1147273231676486e-05, + -3.8918066541009386e-05, + 1.205005467489658e-05, + -0.00572618848229545, + -0.0033679995285998913, + -0.001301229619678629, + -0.0001344378384413684, + 0.00010983524715195772, + -4.8255053814843535e-06, + 2.537065603577757e-07, + 0.0007743659297881236, + 0.0013880255792681582, + 0.00049791437955053, + 5.9049493845482516e-05, + 7.672752019053522e-05, + -5.839382187570981e-07, + 1.3999341188120378e-06, + -0.0004245287804119195, + -0.00025859432514190896, + -0.00020552417311040574, + -3.434797743275874e-05, + -9.004025654617423e-07, + -8.72004423998448e-06, + 3.292518231397487e-06, + 0.00014763901236109923, + -9.61055984927059e-06, + 4.058755120061313e-05, + 3.470117104987461e-05, + 5.9229781739310605e-06, + 4.3830517260104867e-07, + 7.052522480064052e-07, + 0.10545015238485769, + 0.0014695228808345468, + 8.767800949865365e-05, + -2.4946841556485497e-05, + -1.011725583364496e-05, + -2.026894929589994e-05, + -0.019027967522938338, + -0.0047505814873046864, + 0.0006535571329724956, + -9.016291618914092e-05, + 7.106727732878779e-06, + -4.915504064224588e-06, + 0.0031865954233564636, + 0.0015416541958765213, + 0.0003628708982547685, + -4.6099077932211554e-05, + 6.9714288836387684e-06, + -3.932699328197218e-06, + -0.0006948370917988385, + -0.0004931868087123586, + -3.7757147599846466e-05, + -9.392397977993142e-05, + 8.759999250901843e-06, + 1.0372912280814657e-06, + 5.6541113197183356e-05, + 0.0001908445119487557, + 5.6710789653299533e-05, + 1.4462399085994872e-05, + 1.1207883769609374e-05, + -1.9883457716636065e-06, + 4.8620497563628684e-05, + -2.8976886904770533e-05, + -4.047944243384109e-05, + -8.761600647593877e-06, + -2.6350708199195113e-07, + -1.246038477219041e-06, + -0.03307910394121404, + 0.003674827479265381, + 0.0005635814961932857, + 9.314906698474624e-05, + -0.00013075201325885068, + -3.407366082145406e-05, + 0.02152073817401265, + -0.00016718788101606006, + -0.0005479932297966191, + 6.836317692821712e-05, + -7.96472952783821e-05, + 5.000206697690311e-05, + -0.012686800674605333, + -0.0008225785116131262, + 0.00047161784143939203, + 0.0001959011187695442, + -2.242514522564286e-06, + -1.2019954255910403e-05, + 0.0009340862848432946, + 0.0007101001540164369, + -0.00010647905737797506, + -3.6035154099579224e-05, + -2.7394961556972682e-05, + 6.776186130551342e-06, + -0.0002100503410149355, + -4.192900645025486e-05, + -6.3529724743734745e-06, + 5.903531370628411e-05, + 2.3883060116091265e-05, + 7.641736910784327e-06, + 4.4497447038393815e-05, + 3.1857251692647894e-05, + 6.024748973555642e-06, + -5.981218311153207e-08, + -7.526771447804692e-06, + -4.128970496291646e-06, + 2.2275509191971095e-05, + -3.3129385775599635e-06, + -5.03853666491255e-06, + 5.835791420236999e-06, + 3.7475588492357844e-06, + 2.8679340737831137e-06, + 0.021196641246415977, + 0.036771421869587734, + -0.0024469855478080767, + -0.00043221803625831753, + -2.026255575769309e-06, + 4.622607454035785e-05, + 6.106120183560405e-05, + 0.0019163703231549274, + -0.011901855982577147, + -0.0009838826174560613, + 1.4685902339289282e-05, + 8.034662112648005e-06, + 3.3135978208744374e-05, + 1.0614875727575105e-05, + -0.0008332208521584232, + 0.0005398009300201749, + 0.0005548001812926157, + -0.00034501640350258325, + -5.564920779159151e-05, + -1.936003912563045e-05, + -3.846449977602249e-06, + 0.0001999927955769751, + 0.00019303364336810977, + -0.00010492587514727198, + -7.881987992549604e-05, + 1.5782684896587238e-05, + 1.948138852653476e-05, + 7.118280717532992e-06, + -0.00010537173661356508, + -5.5374309285158847e-05, + 2.4130153048748257e-05, + 4.848365135092837e-06, + 3.6903211120764566e-06, + -9.821106751838014e-06, + -5.52466449818393e-06, + 2.82462243520467e-05, + 5.1286544675852405e-05, + 1.1793219479795907e-05, + -6.690712362717896e-06, + 1.4107479036470937e-06, + 2.1542644302895317e-06, + 2.386750801450856e-06, + 0.05206798209059509, + -0.0007838867917904709, + 0.0003654438849064358, + -7.495436185002031e-05, + -1.5660501654837187e-05, + 4.886672656277502e-06, + -0.059430310405205494, + -0.001150033114258247, + -0.00024407686655563695, + 0.00010668016576905913, + 2.596222561778563e-05, + -1.0513871395806607e-05, + 0.011267509397750614, + 0.004536297047506711, + -0.0009005064453325326, + 3.189820554896486e-05, + -5.835635944218518e-07, + -1.236122452259023e-05, + -0.0015539773717777128, + -0.0014829767738091279, + -0.00034946653951047047, + 9.380492455617809e-05, + 1.098530234077713e-05, + 3.7532383880110756e-06, + 0.0008069251899578422, + 0.0005548217917405047, + -8.435403030321942e-06, + 8.337955977542221e-05, + -1.4015797696915965e-05, + -1.6955781850043195e-06, + 6.731986088315019e-05, + -0.00018825018985940686, + -3.531638112480446e-05, + -4.167344281793307e-06, + -8.901509516410429e-06, + 2.6285148887375727e-06, + -0.00020878671585589589, + 3.7568516598608526e-05, + 3.700389638708153e-05, + 6.7350077631203585e-06, + -9.511336169151416e-07, + 1.3092219058153813e-06, + -0.26240891187490956, + -0.11867263814131969, + -0.0030476565543176896, + 0.00042795314155387573, + 0.0001930948773543505, + 7.863537970542018e-06, + 7.5566705987338595e-06, + 0.00979490766887265, + 0.012162328776049823, + 0.0044091669165908925, + -0.0005109420059433702, + -5.1040288538387105e-05, + 1.1230293560024158e-05, + 1.3257481136089576e-05, + -0.0030253675675600187, + -0.0034934477483750774, + -0.0014260002610345095, + -0.00022650134785978483, + 0.0001290571095816149, + 9.745359510532666e-06, + 7.959263360417985e-06, + 0.0009586594550704999, + 0.0013233702960423722, + 0.0005534296373489597, + -2.7858774628060792e-05, + 5.4927134640224274e-05, + -8.73896244962257e-06, + -1.5564273927489274e-06, + -0.00010171738216503757, + -0.00012689326398202376, + -0.00022033270262156635, + -2.1138647495143185e-05, + 3.8758275291932536e-06, + -8.587325677042901e-06, + 3.1396039847028387e-06, + 4.1279367920282154e-05, + -0.00013756120604455928, + 3.919153423406031e-05, + 2.8485486628990548e-05, + 3.388217787671204e-06, + -1.1960270292113933e-06, + 4.6385378895684324e-07 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier3": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157808864" + } + }, + "140417157878880": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157878880", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.449353562472657, + 0.08325149532803959, + -0.0011494982136018407, + -0.0004131910779822237, + -6.155934107753794e-05, + -5.3320733351370276e-05, + 4.2399620218302645e-05, + 0.1479893133561664, + -0.05683901809428105, + 0.00042952751898353873, + 0.00047737315129807076, + 2.7927830821655118e-05, + -0.0001325792218385408, + -2.4700619355005512e-05, + 0.03227002243903901, + 0.033072882832779024, + 0.008451923893097266, + -0.0009216099412705643, + -5.745307503584004e-05, + -5.0037050017235324e-05, + 1.8975978167397464e-05, + -0.009708697973380587, + -0.005154413372350114, + -0.0019409534833781628, + -0.0002684006434977681, + 0.00021506798500124804, + -1.1333890178342437e-05, + 4.0629515557171874e-07, + 0.0011931584557862368, + 0.0028335769899990883, + 0.0008666208184328352, + 2.5725887929301176e-05, + 0.00017847196322971746, + -3.685340279809209e-06, + -1.3081610623111182e-06, + -0.0009552831600557805, + -0.0007106595222096425, + -0.00047608874639180296, + -4.265163081819379e-05, + 1.3406192477010577e-05, + -2.6998148147345707e-05, + 1.1226354209046397e-05, + 0.00040099284295660716, + -4.668525955529228e-06, + 0.00012460767851851047, + 9.332750802509394e-05, + 1.6570424634916526e-05, + -1.498750592927409e-06, + 2.1504439805693727e-06, + 0.1295539494727766, + 0.0006486813305582171, + -0.0001548536652526091, + -9.700356918329337e-05, + -1.4623297222075096e-05, + -2.2004589711830455e-05, + -0.02823147301775725, + -0.007141637169851855, + 0.0011961208207800387, + -6.839708063537731e-05, + 1.390604374013891e-05, + -1.707462335896917e-05, + 0.005374335059411874, + 0.0025055773895271737, + 0.000671636185369257, + -0.00015266254994279058, + -2.625259211221867e-06, + -8.611849796582457e-06, + -0.0014885495399710295, + -0.0009076088314675535, + 2.2864315087097103e-05, + -0.0002202571270934336, + 2.399531097674718e-05, + 5.5616576648307515e-06, + 0.00028859879722104346, + 0.00047443786241085933, + 0.00010597563709678097, + 1.5374145654670066e-05, + 3.025283377607603e-05, + -1.0015833219633936e-05, + 7.631329037321877e-05, + -9.001126892813667e-05, + -0.00010653011221474558, + -2.1856041064709523e-05, + 3.439507567514341e-06, + -2.766946200518449e-06, + -0.02741908553696824, + 0.0034212331214372917, + 0.00045675099840714826, + 7.552843173449357e-05, + -0.00012888437734554964, + -2.913190789085847e-05, + 0.02636922820649055, + -0.00022527449262703557, + -0.0006630944181791828, + 9.928160491182824e-05, + -9.89506714207312e-05, + 5.8367000532609044e-05, + -0.018676059366484636, + -0.0010484404395864756, + 0.0006465686838904806, + 0.00015925088049540504, + -6.022064315244809e-05, + -1.674543259448831e-05, + 0.001450619214411126, + 0.0011728433961508415, + -0.00019680983539277163, + -6.963210859089923e-05, + -2.757532542109328e-05, + 2.0298162021826238e-05, + -0.00046787970387730896, + 1.981972474667696e-05, + -1.5987455601464604e-05, + 0.00010449794929531073, + 3.531315753148572e-05, + 1.1627069135862583e-05, + 0.0001356754256914059, + 7.51229189740251e-05, + 6.411862854058393e-06, + 1.216306656800339e-05, + -1.1773806108888156e-05, + -9.067682898226487e-06, + 3.1578227109665446e-05, + -1.663025523588651e-05, + -1.38638966368137e-05, + 1.6940260133721415e-05, + 8.295631385542134e-06, + 6.982722785658483e-06, + 0.0268856860114861, + 0.04639562633501526, + -0.0030305998962886845, + -0.00021989659869374722, + 0.00011257339567546495, + 4.298490024628845e-05, + 7.088876984550191e-05, + 0.0031123367930625118, + -0.0188199595706002, + -0.0013608671817120733, + 0.00015063137397058958, + 2.5956841533683687e-05, + 2.3454983064781803e-05, + 9.846742272594494e-06, + -0.001467270763065197, + 0.000819880677044522, + 0.000993025545532604, + -0.0006180871293229791, + -7.871212022538866e-05, + -1.202938067495425e-05, + 3.794660579546481e-06, + 0.0004082144800554224, + 0.0003840987142549437, + -0.0002120609884377741, + -0.000201835582979767, + 2.7137662081986656e-05, + 3.728197160337716e-05, + 1.2384338301928235e-05, + -0.0002520489941537786, + -7.313536763593551e-05, + 6.47715998150236e-05, + -4.861912220143433e-06, + 2.0179911357280476e-05, + -1.7552658072673422e-05, + -1.2736245512610714e-05, + 8.207008645949427e-05, + 0.00011683873274514934, + 2.9037551720974767e-05, + -2.2595047893131856e-05, + 3.766326046277675e-06, + 4.5194258682828e-06, + 6.362877695829594e-06, + 0.04701993417342413, + -0.0017961831400983065, + 0.000682187755526183, + -2.761677824488205e-05, + -3.5123503950374326e-05, + 1.4343882988246832e-05, + -0.074272919182563, + -0.00045048929408348206, + -0.00024336823590096949, + 0.00011385933360615115, + 1.1489842070944828e-05, + -1.2642846720606601e-05, + 0.015089974429355526, + 0.006883865507136067, + -0.001467073114520069, + -2.0452066084004747e-05, + 5.1042010254352775e-06, + -1.1117206287131298e-05, + -0.0025101457990908196, + -0.0024639934434394282, + -0.0006759478385390571, + 0.00020990893560528077, + 2.6982269852660637e-05, + 6.130112720800911e-06, + 0.0018771156881117962, + 0.0010938034385310823, + -0.00013600494736102901, + 0.0001969192346656639, + -3.431123537212033e-05, + -7.270246713306076e-06, + 5.683605949963731e-05, + -0.0004481289953407611, + -5.7809612127439335e-05, + 9.732058128417272e-06, + -2.783376665432055e-05, + 9.202508670930465e-06, + -0.0005080381250086497, + 0.00011569053219703031, + 9.681878241933758e-05, + 1.623958713857042e-05, + -6.9855512929035855e-06, + 4.035345782198591e-06, + -0.31984809335437897, + -0.14108527425628922, + -0.002308366358027635, + 0.0004498416265153567, + 9.314159631378085e-05, + -2.261436223746335e-05, + 1.9213192046799596e-05, + 0.011907315924426209, + 0.015465053665725292, + 0.0066203448976722345, + -0.0008053936340184955, + -0.00012255297187417334, + 3.4891933736151985e-05, + 1.9892459162704872e-05, + -0.0051682954873460115, + -0.005384841041407492, + -0.0021229275810148596, + -0.00044316604493732257, + 0.0002520020523623463, + 2.483090971909257e-05, + 1.391463683776655e-05, + 0.0018777890464237727, + 0.0026803721269009085, + 0.0010547914419786527, + -0.00015183833072661084, + 0.00014836900750396737, + -1.865579901686165e-05, + -7.044929849475516e-06, + -0.00022891072714778185, + -0.0003605534322108372, + -0.0005192542532481293, + -2.483844885481383e-05, + 2.257480467558889e-05, + -2.8018955832889998e-05, + 9.36953622525227e-06, + 0.00013910390138127782, + -0.000331771988738754, + 0.00011562767069215302, + 7.442842658348995e-05, + 1.0437639101902888e-05, + -5.592667067629941e-06, + 2.449608446860116e-06 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier4": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157878880" + } + }, + "140417157404992": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157404992", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4396785272810086, + 0.07232259782255138, + -0.001716877082355661, + -0.00017591864652534873, + -1.4713566581786495e-05, + -6.318448442846635e-05, + 3.929918618783405e-05, + 0.1765585888141424, + -0.06560363248173971, + 0.0007959447248443965, + 0.0005379379752244148, + -1.9843585243569887e-05, + -0.00014203386587838726, + -3.073878362603939e-05, + 0.044390562609612896, + 0.04146941089967757, + 0.010751287384977276, + -0.0014194492605506506, + -0.00019464340954926154, + -3.932164919973339e-05, + 3.058288119683918e-05, + -0.013580117964239476, + -0.006146942498103275, + -0.002338747591592585, + -0.0005012628500934515, + 0.0003323627037363039, + -2.2780805031453553e-05, + -2.8429148455379484e-06, + 0.0012985768258002774, + 0.004341994571117507, + 0.0011473633747591135, + -0.00011364448490099444, + 0.0003193470698960533, + -4.786879385020688e-06, + -8.446494330904227e-06, + -0.0015720108151202872, + -0.0012881627083143412, + -0.0007869904526803611, + -1.636126248943657e-05, + 5.5541555300057383e-05, + -5.883005234798295e-05, + 2.5355954781214584e-05, + 0.0007135278016035133, + 6.188274889414393e-06, + 0.000247949837411502, + 0.00017022731574267038, + 3.483510036551322e-05, + -1.0184235567033424e-05, + 4.641589445871997e-06, + 0.14921818621980026, + -0.00043447667890460554, + -0.00044777876716964787, + -0.00016863150360368556, + -4.95514922966127e-06, + -1.9824677629737975e-05, + -0.03641557571264138, + -0.009560206315363973, + 0.0018000071450035896, + 7.37494584495496e-06, + 2.2214168669584868e-05, + -4.281295934665719e-05, + 0.0070456203274294376, + 0.003291723799713466, + 0.001058958884522804, + -0.00030749420270383035, + -1.482578701148557e-05, + -8.783582401785555e-06, + -0.002246965444230648, + -0.0012551695944790396, + 0.0001851451365282122, + -0.00040514634694469265, + 4.249341114404218e-05, + 1.374888911126969e-05, + 0.0006632279899922685, + 0.0008489321963618589, + 0.00014768018262206306, + -1.1851244686687604e-05, + 6.184082528417076e-05, + -2.5746541841973755e-05, + 5.2120746409019725e-05, + -0.00017302328776492654, + -0.00019250810107699438, + -4.1735252179981534e-05, + 1.5088233301579687e-05, + -4.80927764653507e-06, + -0.02235094583095637, + 0.003043500715269245, + 0.0004060675824752359, + 0.00010550011240713157, + -0.00010660174368828663, + -3.198835156950231e-05, + 0.030351876817469776, + -0.00020091442486393438, + -0.0007412355796724131, + 0.0001273620444763015, + -0.00012484411486757662, + 5.6702739176763655e-05, + -0.024008806996233714, + -0.0012400152522780328, + 0.0007650920833478108, + 7.833176566524233e-05, + -0.00012921761156977084, + -1.7865073170019013e-05, + 0.0017345245254378086, + 0.0015692027132926671, + -0.0002900811935216707, + -0.0001294576280943915, + -1.002585398646121e-05, + 4.145547612112473e-05, + -0.000751539942405651, + 0.0002082600200504663, + -3.513823408558678e-05, + 0.00013764178234221367, + 3.841852979986892e-05, + 1.6369027449437277e-05, + 0.0002494904371595348, + 0.00013481072748072192, + -4.038854815352399e-06, + 3.748931863254805e-05, + -1.1361739762804896e-05, + -1.6882210100798472e-05, + -1.21708411236195e-05, + -3.639156032810526e-05, + -2.257668002287338e-05, + 3.310067502863901e-05, + 1.3045533959539969e-05, + 1.2362963689851534e-05, + 0.031735054692966634, + 0.055097907680240824, + -0.003486147005785112, + -2.2520107772313454e-05, + 0.00019991931601351688, + 5.553166575087067e-06, + 8.119962426312571e-05, + 0.004507772140269597, + -0.025752488389719212, + -0.0016382041128695842, + 0.0003882002505796961, + 6.96663506949788e-05, + -1.2136503803613512e-06, + 4.525851142494678e-06, + -0.0021512404361862802, + 0.0007792701954446234, + 0.0014381968062689762, + -0.0008792832791447058, + -9.755067568888562e-05, + 2.0323585999408347e-06, + 1.9345317064251338e-05, + 0.0006273036447012416, + 0.0006327823095286872, + -0.0003218199085788174, + -0.00037923131443229536, + 3.891474366079197e-05, + 5.546684297996969e-05, + 1.839512711136626e-05, + -0.000406465479092936, + -5.288134368724796e-05, + 0.00010848778097308978, + -4.1477274520769245e-05, + 5.538171758027478e-05, + -1.899193568127319e-05, + -2.3565272136072275e-05, + 0.00014990797658166397, + 0.00015863733205107158, + 5.065752640128493e-05, + -5.289700321683483e-05, + 6.851962540731712e-06, + 6.80129070437527e-06, + 1.2286719297797701e-05, + 0.04247240708052168, + -0.0027910169541710494, + 0.0010019712463770127, + 3.62440841571697e-05, + -6.391038315480473e-05, + 2.2718396870258494e-05, + -0.08677430817128039, + 0.0005225821027624161, + -0.00023044669681194322, + 0.00010408265115242435, + -1.0234736506432926e-05, + -1.306065517568207e-05, + 0.01720132930267876, + 0.009273384804768513, + -0.0020198963234316306, + -0.00010695118205127404, + 1.918125679073065e-05, + -1.039799083762995e-06, + -0.0031963439006423566, + -0.0033624609909444587, + -0.0010864654153437086, + 0.00036085819302429005, + 4.556942399758087e-05, + 7.163168123130582e-06, + 0.003129638696985347, + 0.0016539853619040815, + -0.00040722455937671837, + 0.0003614777497146861, + -5.607666961088033e-05, + -1.6056525722888617e-05, + 4.770084015747926e-05, + -0.0007507126490675455, + -7.524427328937358e-05, + 5.389858754730738e-05, + -6.185973756390653e-05, + 2.0661847184147756e-05, + -0.0007689116662512447, + 0.0002261375349805538, + 0.00017243328648649522, + 3.146438604759548e-05, + -2.2527969126257488e-05, + 9.100657197791617e-06, + -0.3644660538785914, + -0.15752128824578318, + -0.0014484714463788128, + 0.00035952975854413655, + -3.3060454405519904e-05, + -6.351739683570622e-05, + 3.640766657924377e-05, + 0.01187647575677203, + 0.016734336163578452, + 0.008892120323030607, + -0.0010795293489785588, + -0.0002388222940218479, + 6.756064733386461e-05, + 3.122508840060686e-05, + -0.007191911660041862, + -0.006750023288654312, + -0.0025516534020899, + -0.0007418045471584362, + 0.00039437769308825856, + 4.6926005598150034e-05, + 1.9802591671760165e-05, + 0.0027645568180608743, + 0.004083130950494844, + 0.0015740836072713341, + -0.00039875408064711667, + 0.00029561081907942817, + -2.9328136038541364e-05, + -1.806654746674718e-05, + -0.0003585920880660584, + -0.0006310189535478518, + -0.0008481800816133324, + -7.08500733938131e-06, + 6.790620240452498e-05, + -6.22859971506841e-05, + 1.9288027474788655e-05, + 0.0003074889404662223, + -0.0005030650308418431, + 0.00021409052248505517, + 0.00013027428497173723, + 2.592514929267383e-05, + -1.6398875690319805e-05, + 6.66653679827255e-06 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier5": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157404992" + } + }, + "140417157455200": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157455200", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4294335126335045, + 0.06211629775034391, + -0.0020992148657035755, + 0.00011399078847772118, + 2.321698248312133e-05, + -9.619693431262148e-05, + 2.9176618098044938e-05, + 0.20197055482315146, + -0.07380643632253155, + 0.001089084127448946, + 0.0006227192942520708, + -8.091767308571454e-05, + -0.00012895451678770483, + -4.019053117980342e-05, + 0.057466168532386216, + 0.04892903283644203, + 0.012975025362376292, + -0.001915743504683102, + -0.0003634615906257828, + 2.189609424867381e-06, + 4.762236923952311e-05, + -0.017100591981438734, + -0.006249504235095238, + -0.0024932345191940016, + -0.000877272671799718, + 0.00045420455138744725, + -4.251887863967736e-05, + -1.435151217262375e-05, + 0.0010571147003054348, + 0.005758314902258275, + 0.001347655587817384, + -0.0003927163902767438, + 0.0004969190902193025, + 2.6491110549059774e-06, + -2.173864496424013e-05, + -0.002194689643028869, + -0.0020211183960816984, + -0.0011231270569035138, + 3.8760512911198324e-05, + 0.00013921455670222048, + -0.00010456723543986284, + 4.640404405657761e-05, + 0.001064368840283022, + 2.8334882183169346e-05, + 0.00041649662004882037, + 0.00025499225870964296, + 6.66563220427637e-05, + -3.079744784227864e-05, + 8.337114132569328e-06, + 0.1666657920753732, + -0.0016743826665845264, + -0.0007597165628933741, + -0.0002407927079130038, + 4.242132346004548e-06, + -1.4909129751204097e-05, + -0.04381134820769756, + -0.01213143703408227, + 0.002439811481875762, + 0.00014866749263957194, + 3.225216454436948e-05, + -8.823342808614794e-05, + 0.008024757947453947, + 0.003847947443936621, + 0.0015316853683992916, + -0.0004936490748583194, + -2.4944643486751914e-05, + -7.960215157112024e-07, + -0.002819865541741039, + -0.0015192894140620336, + 0.0004621346264290538, + -0.0006509535908793567, + 5.957665852570618e-05, + 2.7774026278751936e-05, + 0.0012558625632511644, + 0.0013251691438106602, + 0.00018425175193839279, + -8.490722473538858e-05, + 0.00010888537908792301, + -5.070407704902816e-05, + -5.29566450473387e-05, + -0.00026975382345649463, + -0.00029065196023335854, + -7.55835529779206e-05, + 3.874831477836178e-05, + -7.594507550893869e-06, + -0.017748671212740794, + 0.002571804600815448, + 0.00041331313686923167, + 0.00015831309509604458, + -6.591564253274275e-05, + -4.0902410896236404e-05, + 0.03396501112835106, + -9.171304039586593e-05, + -0.0007858879681657149, + 0.00015506754735805227, + -0.00016375332937691687, + 4.262205702854868e-05, + -0.028854319504929577, + -0.0014525732680578587, + 0.0008317313008169483, + -1.6990308352746658e-05, + -0.00020189644799928976, + -2.3068506831624413e-05, + 0.0017622259798653905, + 0.0018500883774566611, + -0.00037874541505456585, + -0.00022191911765918044, + 3.398796104653549e-05, + 7.121738319549264e-05, + -0.0010224206417511132, + 0.0005223837519315849, + -7.147316153497916e-05, + 0.0001501004604246995, + 3.2933614895503626e-05, + 2.364916386053109e-05, + 0.0003755021007716358, + 0.0002324568723627655, + -3.2602931120628365e-05, + 6.917674369938985e-05, + -5.8484241237795966e-06, + -2.9649284350623333e-05, + -0.00015825421531094074, + -5.601804703451453e-05, + -2.4715526743597375e-05, + 4.985702003300943e-05, + 1.9006610244422232e-05, + 1.9592138810125332e-05, + 0.03610439408300147, + 0.06369899132655835, + -0.0038568059197482386, + 0.0001048949575422469, + 0.00023998058397023308, + -6.120614922147282e-05, + 0.00010173986621433008, + 0.006167317092001601, + -0.0326972280919035, + -0.0018315642538130107, + 0.0007194453270139676, + 0.00013784212409167875, + -3.4410162794432995e-05, + -8.60101195410899e-06, + -0.002883343308733856, + 0.00031276449757365815, + 0.0018712066460484442, + -0.001090199276960449, + -0.00012070262263737323, + 1.5299163581793734e-05, + 4.394632748863759e-05, + 0.000814041534380974, + 0.0009229426612535837, + -0.0004364004619980276, + -0.0005918983682188202, + 5.2535274227466436e-05, + 6.913047347068116e-05, + 2.6656624254003077e-05, + -0.0005039357781702139, + 8.115838831939849e-06, + 0.00014083032930764774, + -0.00011143719228452771, + 0.00011169062722969099, + -1.0552331935595148e-05, + -4.070564585688734e-05, + 0.00023820839618609376, + 0.00013183196440544738, + 6.593724236474397e-05, + -0.00010340969442030857, + 1.0037488337584135e-05, + 1.0280051488701726e-05, + 2.1008436389797504e-05, + 0.03830317909844821, + -0.0037995637862872854, + 0.0013253079544462258, + 0.00011203670197613503, + -0.00010258472086922471, + 3.0249906210017994e-05, + -0.09813744018067115, + 0.0016968668809861258, + -0.00022387468685592778, + 7.36362653782964e-05, + -3.006284915931284e-05, + -1.215281311969758e-05, + 0.017822969809126264, + 0.011830362294961063, + -0.002538855390022778, + -0.0002278468112261465, + 3.817955045156146e-05, + 1.6694447584552584e-05, + -0.0037605255551724052, + -0.004168840471721076, + -0.0015624721718396689, + 0.0005443550657178411, + 5.9238425285179277e-05, + 5.950579282926835e-06, + 0.004379928174644263, + 0.002216120898683936, + -0.0008465327218151173, + 0.0005789168880789173, + -7.182490717137088e-05, + -2.7229922124503633e-05, + -1.765653628310968e-05, + -0.0010663593396220456, + -0.00010937613542536349, + 0.00014116762744066297, + -0.00011214882319225226, + 3.77028831539751e-05, + -0.0008755067451700151, + 0.00036168897123111396, + 0.00025197825273942724, + 5.89690771758508e-05, + -5.199145670425248e-05, + 1.749447183502858e-05, + -0.4014031901592071, + -0.17057073020667657, + -0.0006231856719356804, + 0.00014551728112261586, + -0.0001454116560920461, + -0.00010640220796184924, + 5.566756871747811e-05, + 0.010055590044200067, + 0.016307169823801114, + 0.011334561026766287, + -0.0013255735319539364, + -0.00040460714526720015, + 0.00010579686623793194, + 4.9829013021501026e-05, + -0.009161191657989908, + -0.00779295908716965, + -0.002720840055899534, + -0.001143666451792963, + 0.0005464368709798406, + 7.359190745874238e-05, + 2.6488879044589958e-05, + 0.0035201619123485504, + 0.005409469667090723, + 0.002140533846666028, + -0.0008009267518015187, + 0.0004987171415234071, + -3.780572994115937e-05, + -3.4810697762302785e-05, + -0.0005605143138296675, + -0.0010041665023447803, + -0.001140896984914004, + 2.5582105115508647e-05, + 0.00014935981097123003, + -0.00011364511715082919, + 3.292661601417696e-05, + 0.0005189513503529959, + -0.0006054882316671231, + 0.00032941223014510193, + 0.00018709048022219559, + 5.735597061685559e-05, + -3.70486922056464e-05, + 1.3450797310511902e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier6": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157455200" + } + }, + "140417157523872": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157523872", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4183335760791702, + 0.05238767531092825, + -0.0023653481151183564, + 0.0004439256545885298, + 3.847069101145164e-05, + -0.0001647351750762852, + 1.1040481181399294e-05, + 0.22501216851550818, + -0.0819610725824564, + 0.0012937882959672782, + 0.0007614665547277484, + -0.0001598543741813728, + -8.684493394543753e-05, + -4.957496084256723e-05, + 0.07134622494284987, + 0.055872307271132494, + 0.015205915885320862, + -0.0023712642652789235, + -0.000549745174570513, + 8.50825044938455e-05, + 7.274889969699192e-05, + -0.020200486556430825, + -0.005478931405723488, + -0.0024315182410932666, + -0.0014283830588039462, + 0.0005807653370563901, + -7.816842682724078e-05, + -4.231204605577367e-05, + 0.0005614302838150921, + 0.0068373760751238325, + 0.0015077330746157602, + -0.0008421471738407598, + 0.0007039553149097383, + 2.628514891944769e-05, + -4.528204614802591e-05, + -0.0026830395900553313, + -0.003071456518373788, + -0.0014774707442427046, + 0.00010694477471643877, + 0.00027423441792381794, + -0.00015984579679609228, + 7.479450777064795e-05, + 0.001492160726940804, + 9.276699382654447e-05, + 0.000657455049684063, + 0.00033042077189309615, + 0.00012048541981543977, + -6.63336016446157e-05, + 1.2395888282061793e-05, + 0.18303910786764377, + -0.0030242973813347403, + -0.001069362828132958, + -0.00031235284158962287, + -9.439391623200827e-06, + -3.48444866799147e-06, + -0.050718706556685846, + -0.014922047517435892, + 0.0030886180078243046, + 0.00037330544791854974, + 4.094466957735507e-05, + -0.00016118207325654797, + 0.008251801422005314, + 0.004175904196815846, + 0.00208052031556999, + -0.0006890411961887493, + -3.278465208276237e-05, + 2.0013467692435323e-05, + -0.00301707481421269, + -0.0017244251644183473, + 0.000857128250543559, + -0.000946924431338119, + 6.799949795407306e-05, + 5.239160407959011e-05, + 0.0022469265198817464, + 0.0019204569207371355, + 0.00021627751436510142, + -0.00021423340933470047, + 0.0001732584998973238, + -8.772381711950556e-05, + -0.00026984809295949887, + -0.00038693996394996856, + -0.00039450839667563316, + -0.000132927711481976, + 7.711178824140981e-05, + -1.1050219119015098e-05, + -0.013503144966623934, + 0.002012581246385808, + 0.0004842213677954168, + 0.00021124016553673681, + -3.125369239783171e-06, + -4.902478665999254e-05, + 0.03746343647790523, + 0.00011533527706009826, + -0.0007962419839877554, + 0.00018020185035233345, + -0.00022548353334480743, + 1.490615291959624e-05, + -0.03338411650999193, + -0.001711076799759115, + 0.0008506142612317776, + -0.00010240891733563675, + -0.00027938500609574326, + -4.472816947167807e-05, + 0.001561060183244959, + 0.0019527178696698792, + -0.0004512571470311496, + -0.00034401830319236935, + 0.00011943079493827794, + 0.00010941114394115202, + -0.0012062892837043575, + 0.0009267049091809989, + -0.00013409112692240854, + 0.0001417729157272543, + 1.9691407593006728e-05, + 3.316559169262972e-05, + 0.0005650424596024298, + 0.00039661037102074243, + -8.916736948621468e-05, + 9.46853474616984e-05, + 3.912631275327041e-06, + -5.140027034101567e-05, + -0.00037567326504683884, + -7.195454237912693e-05, + -1.1270755857222765e-05, + 5.544319270089461e-05, + 2.950615908015089e-05, + 2.988193522638344e-05, + 0.040203003521353545, + 0.07267367255470666, + -0.004175756515012612, + 0.0001299323477447039, + 0.00021959186527318323, + -0.00015000707519786008, + 0.00014373406556970168, + 0.008130089166335409, + -0.039685869660470566, + -0.0019516327668239037, + 0.0011248055892072685, + 0.0002205359531293594, + -6.0164564496251414e-05, + -3.718689331407893e-05, + -0.003718687952058539, + -0.0005832177444856029, + 0.002282266601205091, + -0.001218326691683523, + -0.0001629309735681481, + 2.516923109407812e-05, + 7.915562233244327e-05, + 0.0009185193568109947, + 0.0012650426992152461, + -0.0005755845610483498, + -0.0008010870391866214, + 6.722402100187166e-05, + 6.934674040847834e-05, + 3.9993182099779207e-05, + -0.0004619564772036379, + 0.00013751934226420744, + 0.00014961354186557896, + -0.00020531750701095796, + 0.00018677025129711634, + 8.862969985135576e-06, + -6.879156371295797e-05, + 0.00038559645565117276, + 7.073310378466562e-05, + 5.0065000700014695e-05, + -0.00017550388656046824, + 1.0292111001339523e-05, + 1.6867612395367106e-05, + 3.412156778167874e-05, + 0.03439954805168213, + -0.004861396617841163, + 0.00165550663168515, + 0.00020109833557965077, + -0.00014902903368645793, + 3.733722006551746e-05, + -0.10898516849289712, + 0.003052690546084405, + -0.0002462179972732353, + 1.2246160522364616e-05, + -3.3182947983573776e-05, + -1.1246315301273386e-05, + 0.017222925954545575, + 0.014671405695684632, + -0.0030115043892088313, + -0.0003944888688655089, + 5.874627894535437e-05, + 3.9630698522500874e-05, + -0.004444590239649122, + -0.004904817516495074, + -0.002062002445341408, + 0.0007606812335908806, + 5.3882826417600975e-05, + 1.1131207891393616e-06, + 0.005284751778407964, + 0.00279436435258215, + -0.0014627960393174392, + 0.0008475860406009887, + -7.469732810792221e-05, + -4.000664515906809e-05, + -0.00037195082002872457, + -0.00136665571163142, + -0.00018774042287548112, + 0.0002795158924947815, + -0.00017595923507060466, + 6.127161699598977e-05, + -0.0008196938352647115, + 0.0005241146498510126, + 0.000320914392450926, + 0.00010651542187249076, + -9.903090356978326e-05, + 2.985517474064617e-05, + -0.43318082574093925, + -0.1814437185394511, + 0.0001221805263518937, + -0.00020391007161216717, + -0.00019925481400855425, + -0.0001412842112459687, + 6.911572442792863e-05, + 0.006866928629462353, + 0.014450061190012655, + 0.013997577022786619, + -0.0015263477201856194, + -0.0006206470836405659, + 0.00014568596095727938, + 7.52647028436706e-05, + -0.011112425453302982, + -0.0087686352547891, + -0.002690997963461075, + -0.001666259916593512, + 0.0007005570019120251, + 0.00010094268714903846, + 3.498322363456452e-05, + 0.0040227071732541145, + 0.006469698016759155, + 0.002814950548772093, + -0.0013966323538774578, + 0.0007560557429637891, + -3.9641596676987945e-05, + -5.657560486959177e-05, + -0.0010032966940024181, + -0.0017016959337063406, + -0.001319145957483696, + 6.173423118494977e-05, + 0.0002679683154694129, + -0.00018275708347956064, + 5.155294326065064e-05, + 0.0006913039035773403, + -0.0007064292549372856, + 0.00048314872975582324, + 0.00023666711051104273, + 0.00011085844206628947, + -7.050613732036777e-05, + 2.2923413589321113e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier7": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157523872" + } + }, + "140417157565888": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157565888", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.4062592044107944, + 0.04295115820779535, + -0.0025613071828677514, + 0.0007989157713025575, + 2.2544154122098276e-05, + -0.00028891977423147435, + -1.6683367941654266e-05, + 0.24626517095560382, + -0.090383290579983, + 0.0013962480871870546, + 0.0009726544657642074, + -0.0002633724366906887, + -7.438781179514239e-06, + -4.8638232957032995e-05, + 0.08560027025261839, + 0.0627671814616235, + 0.017511724227061473, + -0.0027494668483112766, + -0.0007401363259221489, + 0.00022355666294229253, + 0.00011592861905656182, + -0.02311466715908614, + -0.003858241905347159, + -0.0022063193034029256, + -0.002175812805508637, + 0.0007250938147764614, + -0.00014804835736533818, + -9.92519267298426e-05, + -2.065239396319389e-05, + 0.007170347281789151, + 0.001660077043519935, + -0.001475489508637546, + 0.0009266389399394051, + 7.212795749967741e-05, + -8.640379982752548e-05, + -0.002839219710809081, + -0.004611938369858883, + -0.0018145999054090427, + 0.00018086620261698454, + 0.00045983214951302704, + -0.00021483965256782948, + 0.00011203709281724724, + 0.0020590162082409157, + 0.00022761782505396647, + 0.001000662664018198, + 0.00037222307206920827, + 0.00020503726550989145, + -0.00011499640108397217, + 1.3630364654993921e-05, + 0.19897924981647067, + -0.004465970330885369, + -0.0013596812201264485, + -0.00037765164295157713, + -7.762055234364443e-05, + 2.6504067662027025e-05, + -0.057513335287214695, + -0.017951821476840255, + 0.0037113603105243345, + 0.0007023003973636655, + 4.39421470930027e-05, + -0.0002731864041971454, + 0.007653984314485275, + 0.004343371806838803, + 0.002679343064342669, + -0.0008722721472880858, + -4.279069339426126e-05, + 6.13520243097375e-05, + -0.0025551367589373877, + -0.0018938580239866087, + 0.0013568405224695446, + -0.0012663102762942788, + 5.4313514545559785e-05, + 9.657284520352038e-05, + 0.00378340136548174, + 0.002616295622841474, + 0.00022792540284961827, + -0.0003916291675885571, + 0.0002559314484000148, + -0.0001437042058056561, + -0.0006167138214940039, + -0.0005384763692836173, + -0.0005023454879276489, + -0.00021684802184480676, + 0.00012908446418425935, + -1.5270656577770903e-05, + -0.009513907550857445, + 0.0013521055283996707, + 0.0006254015221838468, + 0.00023932719455956508, + 9.212194584191252e-05, + -4.1486502683887824e-05, + 0.04102248040934179, + 0.00045093869810696385, + -0.0007768363771483528, + 0.00019749704051246037, + -0.00032691982798744613, + -2.4197995848393246e-05, + -0.03779923791487898, + -0.00201746195404202, + 0.0008272827498214525, + -0.0001520166737306754, + -0.00037323733443417106, + -0.00010086260084506215, + 0.0011703785842886426, + 0.0017978169948062817, + -0.0004822850601086963, + -0.00048585846560993747, + 0.0002674397419595382, + 0.00015623792606541913, + -0.001161235525741324, + 0.0013690056420783076, + -0.00023433951416170827, + 0.00012389687337934033, + -2.167430442355082e-06, + 4.225179448272123e-05, + 0.0009748741069887868, + 0.000644551758492814, + -0.00018516307831247398, + 9.981036377080392e-05, + 1.5744246138568336e-05, + -9.07085545317514e-05, + -0.0003968430208706175, + -8.758256574627854e-05, + 3.061035535151641e-05, + 2.9566957885952555e-05, + 5.1655897977690164e-05, + 4.443420922129025e-05, + 0.04420367875604233, + 0.08230913725241762, + -0.004480350855036414, + 3.0068800695570242e-05, + 0.0001325018861324418, + -0.0002539932609971037, + 0.0002237164765550652, + 0.010440440837962608, + -0.04680160541308303, + -0.0020088123320996577, + 0.001573893034891272, + 0.0003042693002925614, + -4.684851065733631e-05, + -9.774787562576998e-05, + -0.004809481129564832, + -0.0018315081956373728, + 0.0026625915601376873, + -0.0012386372358487103, + -0.00024742483961340495, + 3.5245932046914866e-05, + 0.00012611085038113915, + 0.0008893295974606727, + 0.0017536597685032325, + -0.000762324844835994, + -0.0009528798537188836, + 7.77407794119027e-05, + 4.111163818212142e-05, + 6.483744406640583e-05, + -0.00019225787562944437, + 0.00043240204094719217, + 0.0001224914565650312, + -0.00029338032731007936, + 0.0002711012859906241, + 4.099724969119662e-05, + -0.00011478326696400445, + 0.0006406024335532538, + 0.00023373235390852003, + -3.025086799736818e-05, + -0.0002605436410131233, + -3.103957631819007e-07, + 2.888977349102867e-05, + 5.421423645777528e-05, + 0.03062985217415293, + -0.006032478486087646, + 0.0019998302324583674, + 0.0003143522386526701, + -0.00019993441283747926, + 4.450207748328042e-05, + -0.11974418353114093, + 0.0045960816772004625, + -0.00032659606209464736, + -9.604922103727677e-05, + 4.2575282699423735e-06, + -1.321193538209468e-05, + 0.01573694995385652, + 0.01793181169349641, + -0.003434056597857045, + -0.0006350412952009564, + 7.953553964554636e-05, + 6.366606829798219e-05, + -0.005416915390827028, + -0.005623396431284213, + -0.002527632206091836, + 0.001011442669597309, + 5.748484926823439e-06, + -8.831225010768107e-06, + 0.0052901887506695364, + 0.0034131408953184572, + -0.002244039805832999, + 0.0011612480818731811, + -5.585643595899389e-05, + -5.368776254307262e-05, + -0.0013029015284022423, + -0.0015909317905115198, + -0.00032295038401685343, + 0.00046718634617024934, + -0.00024481011961982537, + 9.240018807162863e-05, + -0.0007335109699094864, + 0.0007065191881287794, + 0.0003660231701561969, + 0.00017798310188274233, + -0.0001668962862725471, + 4.4792860899338905e-05, + -0.46117962006515273, + -0.19076676656347144, + 0.0008039225945719443, + -0.0006873607918708188, + -0.00013682532854656016, + -0.0001557713688817877, + 6.243489811823601e-05, + 0.0027142564293934535, + 0.01137332697857817, + 0.016900068840552635, + -0.0016418263582321214, + -0.0008900904865979465, + 0.00018213378631113213, + 0.00010327743325407004, + -0.012924387580015217, + -0.009803415132128563, + -0.002593837727797574, + -0.00233060959893855, + 0.0008488193384370079, + 0.00012321001903716893, + 4.5012355868616776e-05, + 0.0041004823635926975, + 0.0069552782560680215, + 0.0036496200900370483, + -0.0022285518325998147, + 0.001065202358105546, + -2.5914039674143703e-05, + -8.319887321960806e-05, + -0.0018690202811795968, + -0.0029483031184775075, + -0.0012697423709477843, + 0.00010480181941106153, + 0.00041279967966962455, + -0.0002659898788606617, + 7.862484919993022e-05, + 0.000702913645790688, + -0.0010076667916443121, + 0.000705411783053086, + 0.0002722703363211643, + 0.00018597690285912, + -0.00011854678261367829, + 3.4535952750902566e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier8": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157565888" + } + }, + "140417157619040": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157619040", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.393583718338528, + 0.03367885421993595, + -0.002709998614647968, + 0.0011694514254717858, + -2.88624332855179e-05, + -0.0004970897712489901, + -5.69879534201257e-05, + 0.26614469835502436, + -0.09961685097984775, + 0.0014022950406926793, + 0.001279243290188481, + -0.00040461431611347966, + 0.00011756683164323594, + -1.767865781563048e-05, + 0.09975002474643134, + 0.0698056782126342, + 0.019973167482085902, + -0.0030229765447468927, + -0.0009236140250829982, + 0.0004330558306241105, + 0.0001991692740334958, + -0.02589246542592877, + -0.0012328794439043181, + -0.0018648615882999832, + -0.0031501189894626333, + 0.0009201530133807018, + -0.00028401003716387426, + -0.00020156665799647388, + -0.0004991890106444128, + 0.0067340534457814814, + 0.001863174581826019, + -0.0023031859531008735, + 0.001153875756059054, + 0.0001416446662945185, + -0.00015401629939003968, + -0.0026999755500392874, + -0.0065160607437034675, + -0.0020430134802479866, + 0.0002493980843571698, + 0.0006884814085439978, + -0.0002575537896375734, + 0.00016228288797569227, + 0.0027154499765193398, + 0.0002563458084775523, + 0.0013761984580754542, + 0.0003517647878942732, + 0.0003342037177499704, + -0.00017244210398592534, + 5.976577059929085e-06, + 0.21470734529515476, + -0.006033981546636973, + -0.0015928509791159182, + -0.0004187419704000829, + -0.00024107123898597758, + 9.998290856968321e-05, + -0.06423687407121884, + -0.021272215967967648, + 0.00427356670715642, + 0.001153778335121936, + 3.934402174230879e-05, + -0.0004417301751228458, + 0.006089597775714401, + 0.004398041534175817, + 0.003307001878911412, + -0.001027669151409459, + -6.56153834718196e-05, + 0.00013096732574466628, + -0.0014908710815278294, + -0.0020718242878724705, + 0.0019486542701113974, + -0.0015742252861540888, + -3.617679032582072e-06, + 0.00017440519875610577, + 0.005694881160094835, + 0.0033436678437203425, + 0.0001972648802432783, + -0.0005942139268109319, + 0.0003617561963493283, + -0.00022952066015780287, + -0.0009277713872868921, + -0.0006428068813680585, + -0.0006194710710702766, + -0.00032368717396360147, + 0.00018985537244616045, + -2.1403322014735343e-05, + -0.005707330548654794, + 0.0005654646719941351, + 0.0008453583854793189, + 0.0002116007797034281, + 0.00023451117763667812, + 7.87871165909281e-06, + 0.044881030841906394, + 0.0009267129339939445, + -0.0007312236952919185, + 0.00020449589855459218, + -0.0004939427867842724, + -6.81499829586003e-05, + -0.04219271061569738, + -0.002373788088283701, + 0.000778488971730423, + -0.00012830038017948813, + -0.0005066961135008313, + -0.00021769007803454365, + 0.0005644324843549477, + 0.0013216021109104862, + -0.0004355432498713514, + -0.0006375343261934125, + 0.0005012081892672629, + 0.00021547730272510675, + -0.0008056456086747485, + 0.00179687325013701, + -0.00039431768565154345, + 0.0001107647046591652, + -3.69243537378456e-05, + 4.875077523272141e-05, + 0.0018280669080760696, + 0.0009520663253442743, + -0.0003327669970308839, + 7.15113151673355e-05, + 2.6912316572639728e-05, + -0.00015959459624399682, + 0.00024020469311097383, + -6.304519228346189e-05, + 0.00011541364158983457, + -5.300077098156136e-05, + 9.712334582302374e-05, + 6.504427635364661e-05, + 0.04826396213467882, + 0.09255815809749457, + -0.004808038251205214, + -0.00019654769533002754, + -1.4109414396922513e-05, + -0.0003669567726434611, + 0.00037006400844361297, + 0.013227286811268956, + -0.054002601744870815, + -0.0020148825729943464, + 0.0020284699679692497, + 0.0003712617436809514, + 5.506587985864737e-05, + -0.000217139263299122, + -0.006262815673644359, + -0.0033555890621793294, + 0.003013398049423778, + -0.0011279521477842076, + -0.0004078137518248484, + 4.806782448314951e-05, + 0.00018374219626364333, + 0.0007268973385348266, + 0.002420741225807207, + -0.0010086839046096958, + -0.0009833794025894593, + 7.205361197333333e-05, + -4.043646424042271e-05, + 0.00011378425846545097, + 0.00028725496992968125, + 0.0010522165343971293, + 1.4715777307106299e-05, + -0.00033514430336861826, + 0.00034970632798300016, + 9.64622672942151e-05, + -0.00018641333633384307, + 0.001001890066728838, + 0.0010653533622068392, + -0.00016959347026342797, + -0.0003470169340431988, + -3.214604486159796e-05, + 5.227425222317542e-05, + 8.47841513499591e-05, + 0.026748994319387095, + -0.007334489839654365, + 0.0023674479664297495, + 0.000468643746419961, + -0.0002491814386345253, + 5.3860372781682675e-05, + -0.13102345660236256, + 0.006352372780008885, + -0.00048702955725549423, + -0.00027783592503159455, + 0.00011881660717654615, + -2.2978991882980538e-05, + 0.013474938175928387, + 0.02177535845044329, + -0.003812099985472231, + -0.0009957609009260623, + 9.916930755377468e-05, + 7.997271866510174e-05, + -0.006766641874805316, + -0.0063425323051330374, + -0.0029226531293049716, + 0.001298910330719487, + -0.00012055383831291007, + -2.5523857991575427e-05, + 0.003968705746115665, + 0.0041007891305666734, + -0.0031704430036712966, + 0.0015145095133369342, + 6.79103303590279e-07, + -6.662532367107328e-05, + -0.0026289770154703657, + -0.0016570773592452096, + -0.0005173853462697192, + 0.0007039512319864827, + -0.00030211593432943185, + 0.00013254061455280963, + -0.0007827989125369251, + 0.0008540330724544357, + 0.00037076573965726383, + 0.00027408500028507874, + -0.0002597312788937982, + 5.7202476026029466e-05, + -0.4860298547805427, + -0.19894831245469366, + 0.0015279310302936358, + -0.0012840401481046383, + 0.00012004948738234869, + -0.00013057464554152402, + 1.173533151080127e-05, + -0.002553844033981669, + 0.007031051301920848, + 0.020093307207953923, + -0.0016448437078037882, + -0.0012199497197423414, + 0.00020966435128898635, + 0.00012531827183728304, + -0.014536027652002086, + -0.010960415969818737, + -0.0025477556872509563, + -0.003201585337646098, + 0.0009745760786922522, + 0.00013226372780835607, + 5.4852461256165407e-05, + 0.0036376589532057706, + 0.006627751779983119, + 0.004715182739696097, + -0.003345286149857218, + 0.0014271547732205832, + 1.885622088231825e-05, + -0.00011536413644546272, + -0.0030955750347678858, + -0.004460989633826951, + -0.0008559482292422701, + 0.0001738154213441683, + 0.0005768224100618151, + -0.0003534042997056005, + 0.00011950382156223983, + 0.00048400504958908536, + -0.0017126482171718122, + 0.0009809506856877875, + 0.0002843097725919049, + 0.0002804973196927907, + -0.000181308096733385, + 4.5344883819439264e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier9": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157619040" + } + }, + "140417157156384": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157156384", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.3811334128634385, + 0.024483009191369087, + -0.0028304391927869246, + 0.0016098310941073145, + -0.00012692985996147775, + -0.0008080883479289641, + -0.00010116332984327492, + 0.2844590809229047, + -0.11064761694756009, + 0.0013289134100948866, + 0.0017698581512657244, + -0.0006233683124063209, + 0.00027389010496426693, + 8.022208570635379e-05, + 0.11353725028738965, + 0.07613450119026519, + 0.022645202632187923, + -0.003166829473845403, + -0.0011157080906915224, + 0.0007035119481349265, + 0.0003505303536308945, + -0.027153501658660453, + 0.0028997753832624385, + -0.0014029155829912397, + -0.004400834677564965, + 0.001211183925038036, + -0.0005038896942831631, + -0.0003575789007990083, + -0.0007355741460960024, + 0.007165916297520056, + 0.00237986092666339, + -0.0034018622237428934, + 0.001412338829407409, + 0.00023340889230339396, + -0.0002573921517685431, + -0.0028965910907676265, + -0.008322760562005628, + -0.0020489397995135192, + 0.00020856195308473254, + 0.0009714146077725963, + -0.00028177274101222495, + 0.0002150445622601258, + 0.0032306584529298104, + -0.0004231498094368158, + 0.0015224546214539763, + 0.00020909940691615883, + 0.0005262410034563968, + -0.00022933298762990752, + -1.8039043615444977e-05, + 0.2300476791871619, + -0.007859469248555925, + -0.0016990505730686317, + -0.0003784222783993831, + -0.0005389723745189357, + 0.0002532143407059284, + -0.06988940325071977, + -0.025102376101253092, + 0.0047568549536136226, + 0.001766513383557031, + -1.1355347451236758e-06, + -0.000671998768985371, + 0.0034582512018764473, + 0.00418313297690944, + 0.003966214577818064, + -0.0011128278459871346, + -0.00014720109082675388, + 0.0002261708459475465, + -0.0013006367189774912, + -0.002486343407781402, + 0.002653462961643531, + -0.0018170546515717254, + -0.00013772773017342154, + 0.00029829471634383706, + 0.007565389921647454, + 0.004047116003779448, + 0.00014021371233436349, + -0.0008051778289757152, + 0.0004970298236333775, + -0.00033671676602640695, + -0.0006309015614692695, + -0.00040336700161602645, + -0.0007461710754862154, + -0.0004525175454820162, + 0.0002526638900659019, + -3.0120026826033775e-05, + -0.0020418437800207656, + -0.00034947208861847815, + 0.0011663487432526903, + 9.279222758130473e-05, + 0.000417538191425991, + 0.0001354434736034919, + 0.049429037826806875, + 0.001431249171402949, + -0.0006030386184732318, + 0.00019495130202769667, + -0.0007583863617595266, + -9.252961696616553e-05, + -0.04624577880864696, + -0.002851069390481976, + 0.0007480971225113032, + 1.9213209685763904e-05, + -0.00070252330523998, + -0.0004126047255188151, + -0.00039971485453724794, + 0.0005791569409031755, + -0.0003044158975419143, + -0.0007826134143808358, + 0.0008247034962158138, + 0.0002814205819988534, + -0.00044492167000343525, + 0.0020866395272722367, + -0.0006415562513654505, + 0.00010395067136010663, + -7.947987658084456e-05, + 4.349679061843113e-05, + 0.0033561065695004283, + 0.0011918686504723862, + -0.0005607059571370266, + 1.9250472360198037e-06, + 4.4851998196095234e-05, + -0.00026252484789098245, + 0.0016351771415494018, + 0.00019263459598882756, + 0.00024038879624739776, + -0.00021134196071071178, + 0.00017232521324752316, + 9.105077499543685e-05, + 0.05250336879357907, + 0.10285134469522424, + -0.005173617944178487, + -0.0004991014465488033, + -0.0002128581549051208, + -0.0004573189539483194, + 0.0006166545995996976, + 0.01671523454908861, + -0.06070827828646488, + -0.0019912627309254453, + 0.0024527365558389435, + 0.00036863472992215213, + 0.0003089991207016342, + -0.00041064051736097875, + -0.00767381850066913, + -0.005158120013820192, + 0.00339919963150516, + -0.0008513332185327346, + -0.0007096939356473801, + 6.744239892737081e-05, + 0.00024150674367441806, + 0.0004909900798815068, + 0.002776404771409592, + -0.0013503011557287395, + -0.0007916471143681571, + 1.838696470263644e-05, + -0.0001934325873193003, + 0.00019250390279237074, + 0.00065328049604752, + 0.002233239071380342, + -0.00032526886837102117, + -0.0002844577518880141, + 0.00040466357821419927, + 0.00018947817231952278, + -0.00027990904584947526, + 0.001427636344792316, + 0.0026529714293174298, + -0.00026900020375036806, + -0.00042193247627268803, + -9.163426574336463e-05, + 9.310998879229918e-05, + 0.0001261642751522659, + 0.02236081082637783, + -0.008631686317701457, + 0.0027494941355957654, + 0.0006455504254995173, + -0.0002677935486024683, + 7.010416302388998e-05, + -0.14386719180805563, + 0.008342150324022935, + -0.0007037332056109594, + -0.0005850512889217438, + 0.00036682866743063103, + -4.852424510538555e-05, + 0.00967033273837679, + 0.026324660915371036, + -0.00413620913407302, + -0.001520440826095469, + 0.00011729747845764842, + 6.748876350375611e-05, + -0.008941196874330279, + -0.00684000803673269, + -0.0032635893728133266, + 0.0015999557516380312, + -0.0003600364612468727, + -5.609797811266989e-05, + 0.0016886860374860228, + 0.004908085157004131, + -0.004212619642250978, + 0.0019083190871314946, + 9.832148112445974e-05, + -7.448440703660924e-05, + -0.0035613048003935504, + -0.001606694311418712, + -0.000821183614805646, + 0.00102833563910202, + -0.00032895252740786427, + 0.0001826462632562384, + -0.0009201044648971961, + 0.0008970333935690489, + 0.00028099166783168125, + 0.00039566191388064814, + -0.00036700716496413944, + 6.256349971428364e-05, + -0.5080564657205616, + -0.20660962762698692, + 0.0024735962760815172, + -0.0019676266412375636, + 0.0006519086160376297, + -3.825307452664414e-05, + -0.00011886014582588981, + -0.010100265505480294, + 0.0009179109954770859, + 0.02371285589773008, + -0.0016482332227059104, + -0.0015725237976390385, + 0.00023755581858345593, + 0.00011478030049476868, + -0.01654433036674909, + -0.012803083175970748, + -0.0024051866602884, + -0.004418833459576754, + 0.0010544894290454886, + 0.00012676318871301053, + 5.369478791162263e-05, + 0.002778999482153676, + 0.005650864184542179, + 0.006206071875448565, + -0.004792084851727233, + 0.0018271264412703476, + 0.00010383776378114559, + -0.00015123013451702016, + -0.004253412514220201, + -0.00531603275629923, + -1.67490623467024e-05, + 0.00020210481217187493, + 0.0007899254241976414, + -0.0004287767418853105, + 0.00017825348871198051, + 0.00012934305193272312, + -0.002704857768385831, + 0.001279854086671024, + 0.00023839703416402388, + 0.00039740419183304166, + -0.00024463764071618255, + 5.3394612449432705e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier10": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157156384" + } + }, + "140417157197248": { + "@module": "simsopt._core.optimizable", + "@class": "DOFs", + "@name": "140417157197248", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "x": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 1.3701012089971591, + 0.015613305000905122, + -0.003017879223536023, + 0.002206229351292215, + -0.0002733977957382244, + -0.0012225800482793393, + -0.00012178502140903547, + 0.3021763256274362, + -0.12156267890413544, + 0.001214814940541514, + 0.002484490771844066, + -0.0009486537260452577, + 0.000446957265419057, + 0.0002991660379252491, + 0.12414108175049526, + 0.08220702614783057, + 0.025308746410114425, + -0.0031679621337667614, + -0.0013474058851264661, + 0.0009710251635154471, + 0.0005845130411516622, + -0.027370213321085697, + 0.007743222265571722, + -0.0013008752082906442, + -0.005854275126714613, + 0.0016322457138728383, + -0.0008184472626435737, + -0.0005601335218220676, + -0.0004171176279546769, + 0.009715104489023003, + 0.0034736949394638065, + -0.004628649870557085, + 0.001721780856705869, + 0.0003574408737791935, + -0.0003745563377797085, + -0.003736686922772983, + -0.010167804567632312, + -0.0017419887434899546, + 8.709073739244763e-05, + 0.001287597262189225, + -0.000303244549477581, + 0.00024387158261353313, + 0.003652453254227217, + -0.0022174451449413434, + 0.0013410647947289342, + -0.00016184364134911997, + 0.0007036150156616913, + -0.0002558833944896916, + -7.173819750966892e-05, + 0.24379890122870418, + -0.010071297661334726, + -0.001641352687074683, + -0.00020011599909603982, + -0.0009774731356784298, + 0.0005227302432740779, + -0.07532465741653381, + -0.02923420520079137, + 0.0051492033616217505, + 0.0025864742126149045, + -0.0001237757825259846, + -0.0009387553728722709, + 0.0008360966585232069, + 0.004131338379355047, + 0.004561163759052574, + -0.0011362919455635556, + -0.000367444167883667, + 0.0003632460295677845, + -0.0032607260187672606, + -0.003378257870009357, + 0.003345682134101993, + -0.0018953098092943867, + -0.00036440880626255725, + 0.00044683318352345565, + 0.009406860129133983, + 0.0046436401367027065, + -1.3602180652509405e-05, + -0.0009393181492202412, + 0.0006568242499185377, + -0.00043861820678578115, + 0.0006662873340447236, + 0.0001644769626812972, + -0.0008392876905081971, + -0.0005309831830683032, + 0.0002811831984455544, + -2.254750328616612e-05, + 0.0016000161966969772, + -0.0013166534982110474, + 0.0015837240378543576, + -0.00014547337994566135, + 0.0006088715774526265, + 0.0003808604860200651, + 0.05411936625529645, + 0.0019027701180833758, + -0.00031694516890310196, + 0.0001414134417896376, + -0.0011716630420799544, + -4.696651517564395e-05, + -0.05018489295107525, + -0.003535566899253414, + 0.0007677105951956605, + 0.0003301115967979192, + -0.0009513861974020987, + -0.0006549208158351278, + -0.0012673391727829587, + -0.0001315994182593443, + -0.00012984538549384481, + -0.0008681523504101734, + 0.0012237378453387319, + 0.00034501867501137145, + -0.00042648689969366935, + 0.0021218237446679737, + -0.0009779013863505741, + 0.00012862027873611042, + -0.00015420218892088302, + -1.1652272815152106e-05, + 0.005664547026446154, + 0.0011231773440115288, + -0.0008794438157686553, + -0.00010516075031418416, + 8.523033279514322e-05, + -0.00038162675177908905, + 0.003188367269448911, + 0.0008298325824112174, + 0.0003905959066021233, + -0.00041239749584679424, + 0.00026350898146958206, + 0.0001307441998187244, + 0.057048843046809024, + 0.11219881389669775, + -0.0056133233514019144, + -0.0008240196156928001, + -0.00046793933488296436, + -0.00045389866872223356, + 0.0009809588199606342, + 0.02030392711926581, + -0.06722519689183812, + -0.0018973493466823718, + 0.002785394555075877, + 0.00024728979101017255, + 0.0007812069849482415, + -0.0006754467176747344, + -0.008809113650642608, + -0.006379984529533822, + 0.004002461881668844, + -0.00047460776016644546, + -0.0012325837846908015, + 9.769378772418094e-05, + 0.0002952910498963549, + 0.00039141574383474314, + 0.0023687599469272673, + -0.0018830467191975509, + -0.00029875277880396837, + -8.61024591441645e-05, + -0.00039990656753060823, + 0.0002665502902250481, + 0.0005486471465149065, + 0.004124742933297369, + -0.0010304225874958257, + -0.00011088081804440355, + 0.0004221179610353484, + 0.0003212441196127185, + -0.00037188543561968396, + 0.0018727250607525744, + 0.0044150741145475205, + -0.00019893203402461995, + -0.000476364154343324, + -0.0001868613422686585, + 0.0001323901637455612, + 0.000194470809250016, + 0.017568246427586632, + -0.009875477106297357, + 0.0031091743415383355, + 0.0008064940034013407, + -0.0002101997510122944, + 9.766894450718412e-05, + -0.15699645115001779, + 0.010541788886641331, + -0.0009778259524607965, + -0.0010665042854914415, + 0.0008076226019957071, + -9.557453757788548e-05, + 0.005508386574633639, + 0.031164242707219736, + -0.004337110621380469, + -0.0021893771628031266, + 0.00012222600996901928, + 1.8834520444758353e-06, + -0.012155171680612233, + -0.007307548669227933, + -0.0034968141698534416, + 0.0018944765181612162, + -0.0007270711117346968, + -0.00011308179714661461, + -0.0008200326890818549, + 0.005901417526184971, + -0.005177849919247324, + 0.0022745191752856146, + 0.00021690282201418542, + -6.005846466012743e-05, + -0.0038755476286559186, + -0.0017365530211067143, + -0.0011128031430348195, + 0.0014168976256773013, + -0.0003293403863433222, + 0.00024168420479942298, + -0.0009920602856644666, + 0.0009188163331151903, + 5.241870928768018e-05, + 0.00046507987028547305, + -0.00042632287585026696, + 5.408338112961427e-05, + -0.5277368500447129, + -0.21374108806909228, + 0.0036879601158787494, + -0.002645929838236182, + 0.001492578513865297, + 0.00013568189372821802, + -0.00036468079730718266, + -0.017216948328187206, + -0.005423682258016433, + 0.027461499811351188, + -0.001715717816154662, + -0.001867392502164357, + 0.0002884101414932702, + 2.8234564033334308e-05, + -0.01869191386294494, + -0.015350913764912415, + -0.0024518511218323386, + -0.006007422516651784, + 0.001117709371142765, + 0.00012110983327339604, + 1.2353230110501526e-05, + 0.0019333001977087745, + 0.0044656856954844015, + 0.008182728824475245, + -0.006333104406496741, + 0.0021691626236338465, + 0.00020887131301440507, + -0.00018186634400751517, + -0.005205589094808717, + -0.00524643788263326, + 0.0009476552017381316, + 0.0002439318112836136, + 0.001013328540969557, + -0.0004789113816835727, + 0.000256896817181476, + -0.00019677583749504955, + -0.003623420042144951, + 0.0015990581972418947, + 7.016214223907722e-05, + 0.000485241346137829, + -0.00024397123101333167, + 5.6898049278668904e-05 + ] + }, + "names": [ + "x0", + "x1", + "x2", + "x3", + "x4", + "x5", + "x6", + "x7", + "x8", + "x9", + "x10", + "x11", + "x12", + "x13", + "x14", + "x15", + "x16", + "x17", + "x18", + "x19", + "x20", + "x21", + "x22", + "x23", + "x24", + "x25", + "x26", + "x27", + "x28", + "x29", + "x30", + "x31", + "x32", + "x33", + "x34", + "x35", + "x36", + "x37", + "x38", + "x39", + "x40", + "x41", + "x42", + "x43", + "x44", + "x45", + "x46", + "x47", + "x48", + "x49", + "x50", + "x51", + "x52", + "x53", + "x54", + "x55", + "x56", + "x57", + "x58", + "x59", + "x60", + "x61", + "x62", + "x63", + "x64", + "x65", + "x66", + "x67", + "x68", + "x69", + "x70", + "x71", + "x72", + "x73", + "x74", + "x75", + "x76", + "x77", + "x78", + "x79", + "x80", + "x81", + "x82", + "x83", + "x84", + "x85", + "x86", + "x87", + "x88", + "x89", + "x90", + "x91", + "x92", + "x93", + "x94", + "x95", + "x96", + "x97", + "x98", + "x99", + "x100", + "x101", + "x102", + "x103", + "x104", + "x105", + "x106", + "x107", + "x108", + "x109", + "x110", + "x111", + "x112", + "x113", + "x114", + "x115", + "x116", + "x117", + "x118", + "x119", + "x120", + "x121", + "x122", + "x123", + "x124", + "x125", + "x126", + "x127", + "x128", + "x129", + "x130", + "x131", + "x132", + "x133", + "x134", + "x135", + "x136", + "x137", + "x138", + "x139", + "x140", + "x141", + "x142", + "x143", + "x144", + "x145", + "x146", + "x147", + "x148", + "x149", + "x150", + "x151", + "x152", + "x153", + "x154", + "x155", + "x156", + "x157", + "x158", + "x159", + "x160", + "x161", + "x162", + "x163", + "x164", + "x165", + "x166", + "x167", + "x168", + "x169", + "x170", + "x171", + "x172", + "x173", + "x174", + "x175", + "x176", + "x177", + "x178", + "x179", + "x180", + "x181", + "x182", + "x183", + "x184", + "x185", + "x186", + "x187", + "x188", + "x189", + "x190", + "x191", + "x192", + "x193", + "x194", + "x195", + "x196", + "x197", + "x198", + "x199", + "x200", + "x201", + "x202", + "x203", + "x204", + "x205", + "x206", + "x207", + "x208", + "x209", + "x210", + "x211", + "x212", + "x213", + "x214", + "x215", + "x216", + "x217", + "x218", + "x219", + "x220", + "x221", + "x222", + "x223", + "x224", + "x225", + "x226", + "x227", + "x228", + "x229", + "x230", + "x231", + "x232", + "x233", + "x234", + "x235", + "x236", + "x237", + "x238", + "x239", + "x240", + "x241", + "x242", + "x243", + "x244", + "x245", + "x246", + "x247", + "x248", + "x249", + "x250", + "x251", + "x252" + ], + "free": { + "@module": "numpy", + "@class": "array", + "dtype": "bool", + "data": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "lower_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity, + -Infinity + ] + }, + "upper_bounds": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + } + }, + "SurfaceXYZTensorFourier11": { + "@module": "simsopt.geo.surfacexyztensorfourier", + "@class": "SurfaceXYZTensorFourier", + "@name": "SurfaceXYZTensorFourier11", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "nfp": 3, + "stellsym": true, + "mpol": 6, + "ntor": 6, + "clamped_dims": [ + false, + false, + false + ], + "quadpoints_phi": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.018518518518518517, + 0.037037037037037035, + 0.05555555555555555, + 0.07407407407407407, + 0.09259259259259259, + 0.1111111111111111, + 0.12962962962962962, + 0.14814814814814814, + 0.16666666666666666, + 0.18518518518518517, + 0.2037037037037037, + 0.2222222222222222, + 0.24074074074074073, + 0.25925925925925924, + 0.2777777777777778, + 0.2962962962962963, + 0.31481481481481477 + ] + }, + "quadpoints_theta": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + 0.0, + 0.05555555555555555, + 0.1111111111111111, + 0.16666666666666666, + 0.2222222222222222, + 0.2777777777777778, + 0.3333333333333333, + 0.38888888888888884, + 0.4444444444444444, + 0.5, + 0.5555555555555556, + 0.611111111111111, + 0.6666666666666666, + 0.7222222222222222, + 0.7777777777777777, + 0.8333333333333333, + 0.8888888888888888, + 0.9444444444444444 + ] + }, + "dofs": { + "$type": "ref", + "value": "140417157197248" + } + }, + "BiotSavart1": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.6385553761243192, + 0.0, + 0.0 + ], + [ + 1.6320045991723204, + 0.009143406007732422, + -0.08295820949910904 + ], + [ + 1.6140444785380075, + 0.01822262038326981, + -0.15765924888525512 + ], + [ + 1.5894200530901255, + 0.026733823610906392, + -0.2162381844256839 + ], + [ + 1.5648995467444202, + 0.033462124438865246, + -0.2520202715112128 + ], + [ + 1.5474434749825738, + 0.03672676825548832, + -0.2603599776720295 + ], + [ + 1.5418642379646308, + 0.03493457947998309, + -0.23834104304263132 + ], + [ + 1.5481699352900262, + 0.027369065075524945, + -0.18447099763376174 + ], + [ + 1.5595068992648322, + 0.014968223604942904, + -0.10139463857822346 + ], + [ + 1.5651095760780123, + 5.400186967064723e-18, + -3.6754341381458025e-17 + ], + [ + 1.5595068992648322, + -0.014968223604942897, + 0.10139463857822337 + ], + [ + 1.5481699352900262, + -0.027369065075524928, + 0.1844709976337616 + ], + [ + 1.5418642379646308, + -0.034934579479983074, + 0.23834104304263123 + ], + [ + 1.5474434749825738, + -0.03672676825548832, + 0.2603599776720295 + ], + [ + 1.56489954674442, + -0.03346212443886526, + 0.25202027151121287 + ], + [ + 1.5894200530901255, + -0.026733823610906416, + 0.21623818442568402 + ], + [ + 1.6140444785380075, + -0.018222620383269824, + 0.15765924888525523 + ], + [ + 1.6320045991723204, + -0.00914340600773244, + 0.08295820949910922 + ], + [ + 1.6226871048602867, + 0.18208586517231493, + 0.00814161596016816 + ], + [ + 1.6217913549690652, + 0.19125488818995368, + -0.0729964687456505 + ], + [ + 1.6095068333899927, + 0.19897938538469795, + -0.14518688765307078 + ], + [ + 1.5900373067342073, + 0.2049811971571231, + -0.20045864665354468 + ], + [ + 1.5695274662293757, + 0.2084627993347131, + -0.23209918906094468 + ], + [ + 1.554192844458525, + 0.20828801980937112, + -0.23556087494595018 + ], + [ + 1.547893821592478, + 0.2034197413600787, + -0.20816331904621974 + ], + [ + 1.5495951821280767, + 0.1935405080743071, + -0.14919036870192626 + ], + [ + 1.552192762292522, + 0.17958646597988576, + -0.06298102224277649 + ], + [ + 1.5467230166881696, + 0.16352348761619379, + 0.0378220314594589 + ], + [ + 1.5311231528411082, + 0.1479430230830467, + 0.13469444575964848 + ], + [ + 1.5134694264889528, + 0.1359382115382356, + 0.2109951401760333 + ], + [ + 1.5048788729005387, + 0.1301347141855819, + 0.2580241784187802 + ], + [ + 1.5111573877903037, + 0.13124151123975475, + 0.2744610072544728 + ], + [ + 1.5311494637328742, + 0.13800282274548745, + 0.2621420070088342 + ], + [ + 1.5592619667790688, + 0.14829306189982655, + 0.22395172711685876 + ], + [ + 1.5881317193034212, + 0.16000284817958144, + 0.16442145708310363 + ], + [ + 1.6108627111062308, + 0.17155677990062257, + 0.08996973926777074 + ], + [ + 1.5762847482121491, + 0.3575912786873289, + 0.015518634205027268 + ], + [ + 1.5802343907822411, + 0.3680056029220499, + -0.06093999605855151 + ], + [ + 1.5733257994726504, + 0.375613527986512, + -0.1280922441940863 + ], + [ + 1.5589443955233806, + 0.3799976086643971, + -0.1780776359926539 + ], + [ + 1.5421886968922647, + 0.380593244650415, + -0.20433060232659736 + ], + [ + 1.5281984029758529, + 0.3767813256272551, + -0.20261580895725706 + ], + [ + 1.519814275087251, + 0.3680687963279061, + -0.1708117183833988 + ], + [ + 1.515386345444688, + 0.3545212722200303, + -0.10944011044562171 + ], + [ + 1.508698983662044, + 0.337321234217518, + -0.024605164599792076 + ], + [ + 1.493631531485002, + 0.3187708463366468, + 0.07035240755080942 + ], + [ + 1.4711547873115955, + 0.3019732959463519, + 0.1583851111691167 + ], + [ + 1.4504500093915238, + 0.2903947010702036, + 0.22545935243341922 + ], + [ + 1.441849391287878, + 0.2865773062284415, + 0.26490408564874646 + ], + [ + 1.4498387636445984, + 0.29077103024946244, + 0.2762176530519684 + ], + [ + 1.472255533569267, + 0.3011564700201966, + 0.2612336293837575 + ], + [ + 1.5029978352701039, + 0.31513108679395113, + 0.22262093071002562 + ], + [ + 1.5346340381091597, + 0.3302718650277456, + 0.16464406624495392 + ], + [ + 1.5605245790868691, + 0.3447935452084193, + 0.09326900485558906 + ], + [ + 1.5029866100488527, + 0.5218554288868793, + 0.02122211472871181 + ], + [ + 1.5101898286667568, + 0.5336804203830053, + -0.048183145542731516 + ], + [ + 1.5072972535419626, + 0.5415147744913394, + -0.1083137930030947 + ], + [ + 1.4968985382170392, + 0.5445894899272944, + -0.15160859064673557 + ], + [ + 1.4829095657536369, + 0.542296771801208, + -0.17185574892873634 + ], + [ + 1.4692623032918348, + 0.5343722780845559, + -0.16539475101273182 + ], + [ + 1.4578921117083747, + 0.5209044082813374, + -0.1310012876310465 + ], + [ + 1.4471279779182586, + 0.502643549071076, + -0.0706744108380038 + ], + [ + 1.432501217775282, + 0.4815493494403509, + 0.008186650647558366 + ], + [ + 1.410903901977215, + 0.46061860258684284, + 0.09291782757678153 + ], + [ + 1.385332716890632, + 0.44328634505408876, + 0.16925406419061614 + ], + [ + 1.3647505451735191, + 0.4329207859949641, + 0.2260562818722774 + ], + [ + 1.3580238501373552, + 0.43167372509980284, + 0.2581904404919085 + ], + [ + 1.368288926948079, + 0.43927489508424383, + 0.2654284887533999 + ], + [ + 1.392643174515805, + 0.4533968627137893, + 0.24932424768854194 + ], + [ + 1.4248281880067166, + 0.4710329409731967, + 0.21225218100330878 + ], + [ + 1.4576609100807456, + 0.48948924410151373, + 0.15813644766572715 + ], + [ + 1.4849972002532268, + 0.5068339477651304, + 0.0923492546846214 + ], + [ + 1.4078578368455388, + 0.6737648979485305, + 0.024307799987002433 + ], + [ + 1.4166430864675483, + 0.6861058043470818, + -0.03668285145808172 + ], + [ + 1.41603830774706, + 0.6933635883513596, + -0.08870479214799099 + ], + [ + 1.407934711685648, + 0.6944607730918163, + -0.12469415677440433 + ], + [ + 1.3952180072109308, + 0.6886640580427281, + -0.1391079691468763 + ], + [ + 1.3808288585457713, + 0.6760485342494389, + -0.12915564094757429 + ], + [ + 1.366137481797418, + 0.657479928787776, + -0.09466231311127984 + ], + [ + 1.349955981820211, + 0.6347287127441976, + -0.03883777405319013 + ], + [ + 1.3298255171873574, + 0.6106772526400445, + 0.030581766400303648 + ], + [ + 1.3051366240762405, + 0.5887389162329286, + 0.10274220783739127 + ], + [ + 1.27986542441714, + 0.5722251764198817, + 0.16659716849066888 + ], + [ + 1.2619161102131333, + 0.5641209092059212, + 0.21358616435960542 + ], + [ + 1.2583628141602532, + 0.5660876528997245, + 0.2395621205617705 + ], + [ + 1.2710771237522462, + 0.5773573817274527, + 0.2441384072981382 + ], + [ + 1.2967305602465689, + 0.5952183647815411, + 0.2284191236389809 + ], + [ + 1.3292382636246765, + 0.616349785399, + 0.1944811771115359 + ], + [ + 1.3619028536220295, + 0.637763841793424, + 0.14586757882301013 + ], + [ + 1.3892080430488225, + 0.6573339446671739, + 0.08728295012216919 + ], + [ + 1.2954508727073326, + 0.8141778817904959, + 0.023991784442971523 + ], + [ + 1.3042647322298473, + 0.8258513636450419, + -0.028313140922080097 + ], + [ + 1.3042666339964661, + 0.8312588011836327, + -0.07208552616866552 + ], + [ + 1.2967607572243918, + 0.8291251382329794, + -0.10106275802606324 + ], + [ + 1.2839237718486194, + 0.8188006200587239, + -0.11073045908083662 + ], + [ + 1.2681297227649233, + 0.8009998204045403, + -0.0992771492806217 + ], + [ + 1.2505901267707638, + 0.7776405681679665, + -0.06732722564998059 + ], + [ + 1.2308647645035746, + 0.7515788418348359, + -0.018579052772385092 + ], + [ + 1.2082321647159724, + 0.7263502379653082, + 0.03991448464786215 + ], + [ + 1.1836708265537967, + 0.7053064328736894, + 0.09960906066002495 + ], + [ + 1.1612394649251787, + 0.6912180539890528, + 0.152263509863623 + ], + [ + 1.1474249351524881, + 0.6864506802927867, + 0.19117670625932282 + ], + [ + 1.1475567128722601, + 0.692120725159594, + 0.21269840993600286 + ], + [ + 1.1624608782921686, + 0.7070789703384011, + 0.2160541838982846 + ], + [ + 1.1886471628212711, + 0.7284139551070317, + 0.2018700541204612 + ], + [ + 1.2204015234437424, + 0.7526010296333899, + 0.17195325004116724 + ], + [ + 1.2516457075283742, + 0.7763670461377304, + 0.1294626396130852 + ], + [ + 1.2775744780213059, + 0.7973556123038712, + 0.07849657186687416 + ], + [ + 1.1694183556984297, + 0.9433538281095674, + 0.020264666659256608 + ], + [ + 1.1767602901454455, + 0.95311817588674, + -0.024007071410623942 + ], + [ + 1.1758307012441007, + 0.9552709252179495, + -0.06034920084281572 + ], + [ + 1.167584959327721, + 0.9485104898086514, + -0.08361730223720995 + ], + [ + 1.1538692076715864, + 0.9327054835743757, + -0.0904599809457505 + ], + [ + 1.1368273950009617, + 0.9096268469762451, + -0.0797836520197361 + ], + [ + 1.1177330455842804, + 0.882371477846553, + -0.05247644451984322 + ], + [ + 1.0968675391703848, + 0.8546942752532897, + -0.011969435967683588 + ], + [ + 1.0746663161375734, + 0.8303911644021971, + 0.03602594707542868 + ], + [ + 1.0527547441632106, + 0.8122951217486252, + 0.08516312924928715 + ], + [ + 1.0346837251910552, + 0.8022615535725468, + 0.1291603585480313 + ], + [ + 1.0255376035973756, + 0.8018381074112498, + 0.16237728180037217 + ], + [ + 1.0291973870804028, + 0.8115906612657585, + 0.18130871433625023 + ], + [ + 1.04573440385967, + 0.8301024135898846, + 0.18475324527997303 + ], + [ + 1.071665129822794, + 0.8543842422746172, + 0.1729125952400946 + ], + [ + 1.1016977108934727, + 0.8808121852272617, + 0.1473223094216234 + ], + [ + 1.1304000750382435, + 0.90593841614615, + 0.11077444588670407 + ], + [ + 1.153699297310224, + 0.9272701365077679, + 0.06692259732135376 + ], + [ + 1.0328310205208726, + 1.061711222850471, + 0.014248513401852117 + ], + [ + 1.0374040817680552, + 1.0680189933686204, + -0.023522319597664685 + ], + [ + 1.0343759313841534, + 1.0653257192191619, + -0.05439145076897722 + ], + [ + 1.024692354006266, + 1.0526833562865825, + -0.07432483444049055 + ], + [ + 1.0101100315617502, + 1.0309534091747672, + -0.0807926451534155 + ], + [ + 0.9926093639447587, + 1.0031737867612358, + -0.07289513547236304 + ], + [ + 0.9735006301698048, + 0.9734920297118108, + -0.051300479478311754 + ], + [ + 0.9535641766483731, + 0.9462193500012864, + -0.01873821968401169 + ], + [ + 0.9338353667243479, + 0.9249601359071177, + 0.02054662633708619 + ], + [ + 0.9159881581263377, + 0.9116234727863808, + 0.06187322218698056 + ], + [ + 0.9028460255447198, + 0.9069453609190249, + 0.10004985679510162 + ], + [ + 0.8982718161766483, + 0.9116385796935667, + 0.12992517370654777 + ], + [ + 0.9050182391601276, + 0.9257704606490734, + 0.14801453652900926 + ], + [ + 0.9226314478279649, + 0.9476933854413322, + 0.1527656289736588 + ], + [ + 0.9477058931363683, + 0.9743602180022848, + 0.14398856636642815 + ], + [ + 0.9753551155913708, + 1.0021048805460004, + 0.12288602542427439 + ], + [ + 1.0007405853118407, + 1.0274172732221698, + 0.0918721707402479 + ], + [ + 1.0204472094242092, + 1.047780024770874, + 0.05426615367208949 + ], + [ + 0.8870494798932235, + 1.1702679144122092, + 0.0072689827898950055 + ], + [ + 0.888075595474684, + 1.17135832300937, + -0.026434532115889708 + ], + [ + 0.8825789373641078, + 1.1623459441883182, + -0.05478354717612653 + ], + [ + 0.8716524453284441, + 1.1431163796889026, + -0.07436200469458915 + ], + [ + 0.8569064837489022, + 1.1157261452581637, + -0.08282483061490459 + ], + [ + 0.8400329143046488, + 1.0843419791716955, + -0.07901178496666583 + ], + [ + 0.8222703835093175, + 1.0538724519541678, + -0.0631223524083766 + ], + [ + 0.8046488428540334, + 1.0288236334118606, + -0.037082028480022816 + ], + [ + 0.7884146509195438, + 1.0122348803440628, + -0.003959935890813153 + ], + [ + 0.7750555315177233, + 1.0048799280603355, + 0.032500423335123 + ], + [ + 0.7667393935260769, + 1.0063775905074677, + 0.06752617224844334 + ], + [ + 0.7663448947147852, + 1.0166856634072825, + 0.09620694334548453 + ], + [ + 0.775698646047318, + 1.0354075169406685, + 0.11510713419302698 + ], + [ + 0.793891111296903, + 1.060640308905607, + 0.12236148911703917 + ], + [ + 0.81757666472581, + 1.0892612915628188, + 0.1173389821409664 + ], + [ + 0.8422488959579734, + 1.117587358089335, + 0.10083180064129518 + ], + [ + 0.8636249973174414, + 1.1420619162594607, + 0.0748551905780454 + ], + [ + 0.8789094056025474, + 1.160122077682951, + 0.042395489678381894 + ], + [ + 0.7321950612643542, + 1.268199047160868, + 2.609240811847397e-18 + ], + [ + 0.7298350454662053, + 1.2627403431817932, + -0.03279590822026747 + ], + [ + 0.7225232765530655, + 1.2467860569865443, + -0.061859942083016074 + ], + [ + 0.7113118542367236, + 1.2212301513436317, + -0.08374748865657809 + ], + [ + 0.6974534611834802, + 1.1891213659969952, + -0.09584506754094241 + ], + [ + 0.6822540545292516, + 1.1554175502713786, + -0.09656043971889886 + ], + [ + 0.6668186716725435, + 1.12551549212841, + -0.0855760490240645 + ], + [ + 0.6522346161774041, + 1.1039103847894158, + -0.06409473450865308 + ], + [ + 0.6397383692986283, + 1.0929537110837209, + -0.03442569883009744 + ], + [ + 0.6306356247268805, + 1.0922929430898967, + -8.405945187084813e-19 + ], + [ + 0.6266564943096663, + 1.100506535130103, + 0.034425698830097426 + ], + [ + 0.629897128640387, + 1.1168069392319324, + 0.06409473450865304 + ], + [ + 0.641315672699876, + 1.1402396554504224, + 0.0855760490240645 + ], + [ + 0.6594939232487721, + 1.1685581181929547, + 0.09656043971889888 + ], + [ + 0.681082580544511, + 1.198573098340775, + 0.09584506754094241 + ], + [ + 0.7019604078127382, + 1.226629211453832, + 0.08374748865657812 + ], + [ + 0.7184867601580477, + 1.249116540813796, + 0.06185994208301613 + ], + [ + 0.7286476928458107, + 1.2634258615368008, + 0.032795908220267546 + ], + [ + 0.569957003168195, + 1.3533413412074096, + -0.007268982789894978 + ], + [ + 0.5652404879633461, + 1.3412189117183624, + -0.042395489678381776 + ], + [ + 0.5572421335167088, + 1.318952145149902, + -0.07485519057804531 + ], + [ + 0.5467345950747139, + 1.2882026192536686, + -0.10083180064129507 + ], + [ + 0.5345396174895448, + 1.2526728069753137, + -0.11733898214096626 + ], + [ + 0.5215958961415789, + 1.2178500246745805, + -0.12236148911703908 + ], + [ + 0.5088398899163268, + 1.1894784916285053, + -0.11510713419302691 + ], + [ + 0.4973031648167494, + 1.1720169785871561, + -0.09620694334548448 + ], + [ + 0.48817886241580216, + 1.1672045881295903, + -0.06752617224844325 + ], + [ + 0.4827237796944683, + 1.1736577436681668, + -0.03250042333512294 + ], + [ + 0.4824137955148885, + 1.1889045565841967, + 0.003959935890813229 + ], + [ + 0.4886629811214635, + 1.2112581557432758, + 0.03708202848002282 + ], + [ + 0.501545123986246, + 1.2390432668757254, + 0.0631223524083766 + ], + [ + 0.5190512432002609, + 1.2696608333887498, + 0.0790117849666659 + ], + [ + 0.5377939435856055, + 1.2999658562232281, + 0.08282483061490466 + ], + [ + 0.5541416016284658, + 1.3264313507697105, + 0.07436200469458919 + ], + [ + 0.5653316469708393, + 1.345508752696551, + 0.05478354717612659 + ], + [ + 0.5703882669231111, + 1.354775187666754, + 0.026434532115889805 + ], + [ + 0.40305338021111303, + 1.4253135130129182, + -0.01424851340185211 + ], + [ + 0.3971805143173609, + 1.4076232189677413, + -0.05426615367208938 + ], + [ + 0.3893991662414163, + 1.3803754060892472, + -0.09187217074024782 + ], + [ + 0.38017072601352153, + 1.345734748086235, + -0.12288602542427432 + ], + [ + 0.36996775465873843, + 1.307917487773458, + -0.1439885663664281 + ], + [ + 0.3594108228766891, + 1.2728689648701006, + -0.15276562897365875 + ], + [ + 0.34923161741525605, + 1.246654016325468, + -0.14801453652900926 + ], + [ + 0.34036626099626927, + 1.2337455021593462, + -0.1299251737065478 + ], + [ + 0.3340147096279622, + 1.2353602742870542, + -0.10004985679510162 + ], + [ + 0.33149500705602897, + 1.2490807508963162, + -0.06187322218698056 + ], + [ + 0.3341212918212971, + 1.2712052184892018, + -0.02054662633708621 + ], + [ + 0.34266790632932687, + 1.2989204761169264, + 0.018738219684011632 + ], + [ + 0.35631851302720147, + 1.329822291183116, + 0.05130047947831173 + ], + [ + 0.3724693017734845, + 1.3612118185910924, + 0.07289513547236304 + ], + [ + 0.3877768266826463, + 1.3902576525373602, + 0.08079264515341551 + ], + [ + 0.3993043516821129, + 1.413751287776395, + 0.07432483444049058 + ], + [ + 0.4054111704566456, + 1.4284586932514474, + 0.05439145076897725 + ], + [ + 0.4062295390974817, + 1.432427785485115, + 0.023522319597664765 + ], + [ + 0.23225920205096942, + 1.4844229177414505, + -0.020264666659256598 + ], + [ + 0.22618984573127932, + 1.4627679680527939, + -0.06692259732135362 + ], + [ + 0.21936564512768286, + 1.4319243894960298, + -0.11077444588670397 + ], + [ + 0.2119568729229569, + 1.3945042975385427, + -0.14732230942162328 + ], + [ + 0.20408589349154022, + 1.3552813479137973, + -0.1729125952400945 + ], + [ + 0.19602257598178197, + 1.3206837661487927, + -0.18475324527997294 + ], + [ + 0.18825943659015681, + 1.2971064133530743, + -0.18130871433625012 + ], + [ + 0.18164336894189004, + 1.2890606709571675, + -0.1623772818003722 + ], + [ + 0.17743702327786853, + 1.297193167684044, + -0.12916035854803123 + ], + [ + 0.17709083872287773, + 1.3178599132742406, + -0.08516312924928715 + ], + [ + 0.18180668538165637, + 1.3458839125676758, + -0.0360259470754287 + ], + [ + 0.191753185253286, + 1.3772622911347208, + 0.011969435967683496 + ], + [ + 0.20528959259779272, + 1.4091709510486132, + 0.05247644451984313 + ], + [ + 0.21934625994528778, + 1.439334827277042, + 0.07978365201973608 + ], + [ + 0.23081203918866577, + 1.4656327882754037, + 0.09045998094575049 + ], + [ + 0.23764170026645273, + 1.4854134807587527, + 0.08361730223720996 + ], + [ + 0.23937353811335882, + 1.495934720436037, + 0.06034920084281575 + ], + [ + 0.23704440805387905, + 1.4956633933740726, + 0.024007071410624033 + ], + [ + 0.05737329247630701, + 1.5289823060145191, + -0.023991784442971516 + ], + [ + 0.051742977094595584, + 1.5050897593450303, + -0.07849657186687403 + ], + [ + 0.046530730852173074, + 1.4721405023261847, + -0.1294626396130851 + ], + [ + 0.041570848854969734, + 1.4331992369362063, + -0.17195325004116713 + ], + [ + 0.03650140818315172, + 1.3936056166930346, + -0.2018700541204611 + ], + [ + 0.03111791164871479, + 1.360260136675789, + -0.21605418389828454 + ], + [ + 0.025615774037785893, + 1.3398736282105392, + -0.21269840993600286 + ], + [ + 0.020771260002419217, + 1.3369244829241598, + -0.19117670625932284 + ], + [ + 0.01799266184637422, + 1.3512719034967795, + -0.152263509863623 + ], + [ + 0.01897787504430084, + 1.3777422219509565, + -0.099609060660025 + ], + [ + 0.024921675764842985, + 1.4095348672961505, + -0.039914484647862195 + ], + [ + 0.03545398772406736, + 1.4417495756006637, + 0.01857905277238497 + ], + [ + 0.04816142366144167, + 1.471863103589466, + 0.06732722564998048 + ], + [ + 0.05962133151464342, + 1.498732465410811, + 0.0992771492806217 + ], + [ + 0.0671402516809956, + 1.5213109129730018, + 0.1107304590808366 + ], + [ + 0.06966305401384885, + 1.537590327503558, + 0.10106275802606325 + ], + [ + 0.06775792194619107, + 1.5451574389411764, + 0.07208552616866555 + ], + [ + 0.06307589455170326, + 1.5424520731936768, + 0.0283131409220802 + ], + [ + -0.12043140062111198, + 1.5561231005995095, + -0.024307799987002436 + ], + [ + -0.12533612667280394, + 1.5317564287555332, + -0.08728295012216904 + ], + [ + -0.12863173820274953, + 1.4983243896199092, + -0.14586757882301002 + ], + [ + -0.130844560039717, + 1.4593289966807867, + -0.19448117711153573 + ], + [ + -0.13289105542343677, + 1.4206107894279267, + -0.2284191236389808 + ], + [ + -0.13553240223767946, + 1.3894637702024282, + -0.24413840729813818 + ], + [ + -0.13893511890025728, + 1.372817990690318, + -0.2395621205617705 + ], + [ + -0.14241501692826403, + 1.3749118634923774, + -0.21358616435960545 + ], + [ + -0.14437117274392017, + 1.3945085591805364, + -0.1665971684906689 + ], + [ + -0.14270545438388516, + 1.4246509299759493, + -0.10274220783739131 + ], + [ + -0.13605074429411235, + 1.4570013068050534, + -0.030581766400303714 + ], + [ + -0.12528680116223462, + 1.4864605306191652, + 0.03883777405318994 + ], + [ + -0.11367442009011121, + 1.5118497286925532, + 0.09466231311127966 + ], + [ + -0.10493922442163738, + 1.5338571369040266, + 0.12915564094757423 + ], + [ + -0.10120843466718146, + 1.55262626708353, + 0.1391079691468762 + ], + [ + -0.1025466844135301, + 1.5665376137355989, + 0.12469415677440433 + ], + [ + -0.10754867230211629, + 1.5730069414165604, + 0.08870479214799101 + ], + [ + -0.1141364869852454, + 1.569901803150033, + 0.03668285145808182 + ], + [ + -0.2995532465055652, + 1.5625523002936017, + -0.02122211472871181 + ], + [ + -0.30356752586165525, + 1.5394622738506267, + -0.09234925468462125 + ], + [ + -0.3049203347692196, + 1.5071160002842268, + -0.1581364476657271 + ], + [ + -0.30448760110127393, + 1.4694538773285655, + -0.2122521810033087 + ], + [ + -0.30366838615159525, + 1.4327627988945872, + -0.24932424768854183 + ], + [ + -0.30372124508634013, + 1.404610417996108, + -0.2654284887533999 + ], + [ + -0.3051715129859879, + 1.3919200157140021, + -0.2581904404919085 + ], + [ + -0.307454874088794, + 1.3983690349464113, + -0.22605628187227747 + ], + [ + -0.3087691224777207, + 1.4213764980480474, + -0.16925406419061617 + ], + [ + -0.3065445396927128, + 1.4521879227042789, + -0.09291782757678159 + ], + [ + -0.2992166390964273, + 1.481357120265714, + -0.008186650647558429 + ], + [ + -0.2882619064152073, + 1.5045713659399558, + 0.07067441083800366 + ], + [ + -0.2778296053392479, + 1.5230238088570616, + 0.1310012876310464 + ], + [ + -0.27185118374652933, + 1.5396046185158434, + 0.16539475101273182 + ], + [ + -0.27181200210667944, + 1.5553857413582035, + 0.17185574892873637 + ], + [ + -0.2768209361974729, + 1.5686469059473946, + 0.15160859064673565 + ], + [ + -0.2846830755368797, + 1.5761150998675233, + 0.10831379300309475 + ], + [ + -0.29291411277933704, + 1.5747029663537828, + 0.048183145542731655 + ], + [ + -0.4784592425910865, + 1.5438982748933434, + -0.01551863420502729 + ], + [ + -0.4816623203320447, + 1.5238507013234568, + -0.0932690048555889 + ], + [ + -0.48129319378528634, + 1.4941679950287015, + -0.16464406624495384 + ], + [ + -0.47858739094929104, + 1.4591998505739046, + -0.22262093071002545 + ], + [ + -0.4753186132330963, + 1.4255889279432974, + -0.2612336293837574 + ], + [ + -0.47310428294169093, + 1.400982715832376, + -0.2762176530519684 + ], + [ + -0.47274146830199576, + 1.3919668544006523, + -0.26490408564874646 + ], + [ + -0.4737358164445771, + 1.401323905587539, + -0.22545935243341936 + ], + [ + -0.4740608481017401, + 1.4250440666841104, + -0.1583851111691168 + ], + [ + -0.47075211482909873, + 1.4529082733277916, + -0.0703524075508096 + ], + [ + -0.4622207337627303, + 1.4752322636238528, + 0.02460516459979188 + ], + [ + -0.450668744797819, + 1.489623707813176, + 0.10944011044562141 + ], + [ + -0.441150209583298, + 1.5002321694237437, + 0.17081171838339856 + ], + [ + -0.4377970018231463, + 1.5118493018135248, + 0.2026158089572569 + ], + [ + -0.4414909300701266, + 1.5258712112631283, + 0.20433060232659722 + ], + [ + -0.4503846152809843, + 1.540084253942822, + 0.17807763599265392 + ], + [ + -0.46137204249490815, + 1.550346874766033, + 0.1280922441940863 + ], + [ + -0.47141499452561597, + 1.5525259278122718, + 0.060939996058551625 + ], + [ + -0.6536525675208498, + 1.4963311877885892, + -0.008141615960168198 + ], + [ + -0.6568588259677199, + 1.4808264197773804, + -0.08996973926777059 + ], + [ + -0.6554993284503277, + 1.4553638375624112, + -0.16442145708310357 + ], + [ + -0.6512054245793057, + 1.424507005335475, + -0.22395172711685868 + ], + [ + -0.6460607815748834, + 1.3950157439563333, + -0.26214200700883417 + ], + [ + -0.6419202111304627, + 1.374321442562813, + -0.27446100725447287 + ], + [ + -0.6397394680513276, + 1.3683306906431512, + -0.2580241784187804 + ], + [ + -0.6390087687073409, + 1.3786720769596161, + -0.21099514017603355 + ], + [ + -0.6374391601179673, + 1.3999630582244467, + -0.13469444575964867 + ], + [ + -0.6317460139530303, + 1.4212631688781543, + -0.03782203145945913 + ], + [ + -0.6205699394318094, + 1.4340315967056076, + 0.06298102224277624 + ], + [ + -0.6071865944103404, + 1.4387590473420422, + 0.14919036870192595 + ], + [ + -0.5977802471471501, + 1.4422252425401032, + 0.20816331904621949 + ], + [ + -0.5967137057703901, + 1.4501144955857652, + 0.23556087494595004 + ], + [ + -0.6042296531468077, + 1.4634820573594185, + 0.23209918906094462 + ], + [ + -0.6174997293308877, + 1.479503299175375, + 0.2004586466535447 + ], + [ + -0.6324322141224331, + 1.4933634979727308, + 0.14518688765307078 + ], + [ + -0.6452640857140796, + 1.5001399571361735, + 0.0729964687456506 + ] + ] + } + }, + "Volume2": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier2" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface1": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface1", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart1" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier2" + }, + "label": { + "$type": "ref", + "value": "Volume2" + }, + "targetlabel": -0.2960004452246598, + "constraint_weight": 100.0 + }, + "BiotSavart2": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.6629525220774217, + 0.0, + 0.0 + ], + [ + 1.650871367187684, + 0.011913578277132294, + -0.11918726757215806 + ], + [ + 1.6175954516771898, + 0.0246567940983892, + -0.2268580312355082 + ], + [ + 1.57136047723624, + 0.03826358624211174, + -0.3118076037921556 + ], + [ + 1.5249059376445542, + 0.05059180383875625, + -0.3640421713827443 + ], + [ + 1.4920693289124818, + 0.05821645494192853, + -0.3779984817578459 + ], + [ + 1.482808101041364, + 0.05758385071892515, + -0.3516043748499511 + ], + [ + 1.5002731893944021, + 0.046116062509334955, + -0.2797270370267953 + ], + [ + 1.5319862722348783, + 0.025277491521283266, + -0.1579651292101405 + ], + [ + 1.5483953218117728, + 9.09240846494157e-18, + -5.790567606389516e-17 + ], + [ + 1.5319862722348787, + -0.025277491521283252, + 0.1579651292101404 + ], + [ + 1.5002731893944024, + -0.04611606250933492, + 0.27972703702679513 + ], + [ + 1.4828081010413643, + -0.05758385071892515, + 0.35160437484995094 + ], + [ + 1.4920693289124818, + -0.05821645494192852, + 0.3779984817578459 + ], + [ + 1.524905937644554, + -0.050591803838756264, + 0.3640421713827443 + ], + [ + 1.5713604772362402, + -0.03826358624211177, + 0.31180760379215583 + ], + [ + 1.6175954516771898, + -0.024656794098389216, + 0.2268580312355083 + ], + [ + 1.6508713671876845, + -0.011913578277132318, + 0.11918726757215828 + ], + [ + 1.6474591221046033, + 0.18717945354281923, + 0.001254002418905813 + ], + [ + 1.6427357612988023, + 0.19896923571579042, + -0.11573858061425633 + ], + [ + 1.617158284135959, + 0.20935829206135445, + -0.22046273992532267 + ], + [ + 1.5782374699759425, + 0.2187723623477787, + -0.30128741360957645 + ], + [ + 1.538145010515642, + 0.22572373777802368, + -0.34798889072607386 + ], + [ + 1.5097369713575435, + 0.22770275570096293, + -0.35530285823560354 + ], + [ + 1.5015394551348091, + 0.22211196751589016, + -0.32094776736037733 + ], + [ + 1.5141542873074145, + 0.20734210596120295, + -0.2397806217313135 + ], + [ + 1.5322840024078301, + 0.18487398319943935, + -0.11071649210426555 + ], + [ + 1.5289027918899956, + 0.15828523305047296, + 0.047205068449010235 + ], + [ + 1.4952989337841265, + 0.1316961190182944, + 0.19663654110652182 + ], + [ + 1.4551076275362649, + 0.11124181915011537, + 0.3061167536294453 + ], + [ + 1.4366023652304034, + 0.1028576378830255, + 0.36723353479335846 + ], + [ + 1.448740496720207, + 0.10718037366896557, + 0.38602812646112444 + ], + [ + 1.4863024700493062, + 0.1204624152515731, + 0.3669551910222687 + ], + [ + 1.5381062694334167, + 0.13827476883708098, + 0.31170768860678066 + ], + [ + 1.589817766368202, + 0.1566458346346315, + 0.22585975165104213 + ], + [ + 1.6288857342112912, + 0.1731407864526811, + 0.11887496792044695 + ], + [ + 1.602103470549053, + 0.3681662846874252, + 0.0025509304885765168 + ], + [ + 1.6040197628679356, + 0.38181845022069794, + -0.10851076834594725 + ], + [ + 1.5864705312633784, + 0.3917877387068933, + -0.2070226786177452 + ], + [ + 1.5557128640741136, + 0.3981350085478271, + -0.2811040015084084 + ], + [ + 1.5223360221843019, + 0.4000095269066255, + -0.3203824115199184 + ], + [ + 1.4975200526928831, + 0.39607163454893335, + -0.3201751683780003 + ], + [ + 1.4881163031242364, + 0.38474285309480144, + -0.2782875870550132 + ], + [ + 1.492213591962154, + 0.3649460367632516, + -0.1907930760881064 + ], + [ + 1.494108446118359, + 0.33807773375231515, + -0.061394514974488314 + ], + [ + 1.4729497441443988, + 0.3078117688931816, + 0.08738802789981465 + ], + [ + 1.4281404830670694, + 0.2793423361716271, + 0.22152226619804638 + ], + [ + 1.3850732516957769, + 0.2598327972580892, + 0.3160518014721548 + ], + [ + 1.3686091096936877, + 0.2549976475412656, + 0.366300913924371 + ], + [ + 1.3846664832286373, + 0.2644757108289463, + 0.37855687425432627 + ], + [ + 1.4264036624773389, + 0.2834955860900609, + 0.35626453087687543 + ], + [ + 1.4818224785519774, + 0.30681135167244944, + 0.300701605445019 + ], + [ + 1.5366103439317318, + 0.33007792512845774, + 0.21734638240875664 + ], + [ + 1.5789201431912756, + 0.3507948733460942, + 0.11478253697860866 + ], + [ + 1.530429768474229, + 0.5383786677725234, + 0.0037239017480252346 + ], + [ + 1.5369518349083378, + 0.5544039469385529, + -0.09822814356936103 + ], + [ + 1.5260339632459212, + 0.5649673799338683, + -0.1879209912822583 + ], + [ + 1.502745877543178, + 0.5692512055236048, + -0.25323634877747986 + ], + [ + 1.4753383560798503, + 0.5663404430184884, + -0.2838340631799373 + ], + [ + 1.4527122326966908, + 0.5557864746169785, + -0.27602870301035076 + ], + [ + 1.439926967224492, + 0.537086385837107, + -0.22832953606032075 + ], + [ + 1.4335094308482248, + 0.5100391751557918, + -0.13933245815099748 + ], + [ + 1.420114056414024, + 0.4771402614372159, + -0.01751469295032818 + ], + [ + 1.3865163557968876, + 0.44331637618019404, + 0.11451036045755508 + ], + [ + 1.3374818268704016, + 0.41439749294771416, + 0.22947224195383345 + ], + [ + 1.2966170177134566, + 0.39725452986509563, + 0.3087690282320301 + ], + [ + 1.2845656205126577, + 0.3967537906375299, + 0.3494586904575899 + ], + [ + 1.3048053491999085, + 0.4116087256252715, + 0.3568919092420252 + ], + [ + 1.3494545069248782, + 0.4363069954794255, + 0.333331721165515 + ], + [ + 1.4063702332331778, + 0.46502604337301306, + 0.2799040270978261 + ], + [ + 1.461786526366416, + 0.4930144786398553, + 0.20203896516148392 + ], + [ + 1.5049032601730084, + 0.5176994184252259, + 0.107176565492356 + ], + [ + 1.4374573408318325, + 0.6965819622924351, + 0.004306299134435142 + ], + [ + 1.446417845208971, + 0.7138134490819191, + -0.08659200803343799 + ], + [ + 1.4399304344191066, + 0.7243344789440762, + -0.16566823102061307 + ], + [ + 1.4218992765813654, + 0.7262924205113924, + -0.22070096878950704 + ], + [ + 1.398232578397834, + 0.7179695645998937, + -0.2421807715375322 + ], + [ + 1.3757952842408758, + 0.69957021224733, + -0.22808403541660963 + ], + [ + 1.3582311038847392, + 0.672208209050587, + -0.17811283600711253 + ], + [ + 1.3417243516716617, + 0.6375644062646829, + -0.09362076581103934 + ], + [ + 1.3168126378953995, + 0.5999095278868761, + 0.014035364415682537 + ], + [ + 1.2771253657340913, + 0.5648828753482387, + 0.1253534251737994 + ], + [ + 1.22993347013875, + 0.5378377220005701, + 0.22075699632499682 + ], + [ + 1.1951532606915296, + 0.5247494496845495, + 0.2865439562455123 + ], + [ + 1.1890109925165253, + 0.5293772577613641, + 0.3199700629823863 + ], + [ + 1.2130329617378037, + 0.5495702394527759, + 0.32460408059563195 + ], + [ + 1.259095527949783, + 0.5796369543286924, + 0.3015463968219759 + ], + [ + 1.3155762179176949, + 0.6135063715076321, + 0.25222055983749014 + ], + [ + 1.3695885698514558, + 0.6458226493844696, + 0.18195910012857555 + ], + [ + 1.4115680921014302, + 0.6737289021504429, + 0.09688813744095534 + ], + [ + 1.3273045564175348, + 0.8436725335839695, + 0.003597786951192187 + ], + [ + 1.3368288023017216, + 0.8605665654246588, + -0.07543633423167356 + ], + [ + 1.3324491214610787, + 0.869380044021736, + -0.1427771650415995 + ], + [ + 1.3167807633956397, + 0.8670939525854221, + -0.1869150262452437 + ], + [ + 1.2941222344162702, + 0.8513762003023172, + -0.20047185943691098 + ], + [ + 1.2702784529936413, + 0.823827363554986, + -0.18324998209266657 + ], + [ + 1.2480456292064217, + 0.7879575345211425, + -0.1357210338573689 + ], + [ + 1.2241232657029564, + 0.7476084626644268, + -0.06100175754086546 + ], + [ + 1.1930216979811663, + 0.708324048720675, + 0.029241017344864152 + ], + [ + 1.153112222638013, + 0.6754256170505736, + 0.12026612534978708 + ], + [ + 1.111929812188224, + 0.6529169060721949, + 0.19882375166034064 + ], + [ + 1.0852692903932821, + 0.6454220798101751, + 0.2541659628123891 + ], + [ + 1.0853430341763413, + 0.6555324868144136, + 0.2829085352037569 + ], + [ + 1.1122770087692555, + 0.6806567906871633, + 0.286573059972573 + ], + [ + 1.1583463269555896, + 0.715477365683403, + 0.2654020342546571 + ], + [ + 1.2127235558734377, + 0.75387287745788, + 0.22137262923908646 + ], + [ + 1.2635607640206743, + 0.7898068205437084, + 0.15949179455619975 + ], + [ + 1.3027298147553485, + 0.819970231028271, + 0.08472018437174503 + ], + [ + 1.2029190946985435, + 0.9797155241294077, + 0.0015065920884238014 + ], + [ + 1.2110362300635582, + 0.9947462176846652, + -0.06580326418474244 + ], + [ + 1.2063401237825677, + 0.9995190293086711, + -0.12146551315926973 + ], + [ + 1.1904659757908602, + 0.9900288709514988, + -0.15604954465971013 + ], + [ + 1.1671566284968786, + 0.964695968910159, + -0.16493956418370115 + ], + [ + 1.1417894599172438, + 0.9277100809746234, + -0.14872207054352074 + ], + [ + 1.1165282484938588, + 0.8850054795578235, + -0.10769446805107447 + ], + [ + 1.0890625788449075, + 0.8419910354806267, + -0.045615239374987744 + ], + [ + 1.0571121921385587, + 0.8047723649359624, + 0.027522795113479444 + ], + [ + 1.0213985201554996, + 0.7774975642882651, + 0.10183985458413453 + ], + [ + 0.9883177352543393, + 0.762032015171531, + 0.16799608485320192 + ], + [ + 0.9700391292973402, + 0.7613409558506716, + 0.21638151607254927 + ], + [ + 0.9756596354014012, + 0.7771329319005649, + 0.24275763550171983 + ], + [ + 1.0045063107142969, + 0.8068106873759407, + 0.24699274444488245 + ], + [ + 1.049466230182463, + 0.8455656096694409, + 0.22887145670664127 + ], + [ + 1.1004083934176458, + 0.8872706977332459, + 0.1907180361631708 + ], + [ + 1.1465752986372444, + 0.9254214979647374, + 0.13692238103429322 + ], + [ + 1.181368588884501, + 0.9564643112087583, + 0.07173536740193828 + ], + [ + 1.0670704743923964, + 1.1046187118782531, + -0.0006371101041755739 + ], + [ + 1.0715899699982057, + 1.1155113873526876, + -0.05771918159729148 + ], + [ + 1.0643801240349178, + 1.1131848536981594, + -0.10416968315171275 + ], + [ + 1.0469709523379316, + 1.0937392503032788, + -0.13316022941396394 + ], + [ + 1.0230491689922734, + 1.0578853285947256, + -0.1418182373160597 + ], + [ + 0.99731444263158, + 1.0126670488254903, + -0.1300748064139683 + ], + [ + 0.9712925363466752, + 0.9657746306861202, + -0.09763489484716656 + ], + [ + 0.9437998181161906, + 0.9235672639032761, + -0.048202936131226205 + ], + [ + 0.9147264266049409, + 0.8919701839373493, + 0.010834519996672221 + ], + [ + 0.8855179579394207, + 0.8731064482470313, + 0.07336928468664493 + ], + [ + 0.8609763713868981, + 0.8663600261498385, + 0.13160396482709288 + ], + [ + 0.8504163711770124, + 0.8732809568923721, + 0.17603714477054982 + ], + [ + 0.8606959758485652, + 0.8950555506732198, + 0.20200801712573271 + ], + [ + 0.8906727595507633, + 0.9291489557593517, + 0.20837602289260063 + ], + [ + 0.933757973042233, + 0.9710943731504013, + 0.19456223496500877 + ], + [ + 0.9804617449163884, + 1.0147574125359151, + 0.1627689603749998 + ], + [ + 1.0210727465879403, + 1.0534192502589126, + 0.11658224237114956 + ], + [ + 1.0502777805693446, + 1.0835841852075738, + 0.059936794698196454 + ], + [ + 0.9205569938103462, + 1.2189690925731513, + -0.0011632083981231215 + ], + [ + 0.9197868964808874, + 1.2224488953129775, + -0.051500944946586885 + ], + [ + 0.9092703602375255, + 1.2100753364169516, + -0.09374345843766095 + ], + [ + 0.890825323854658, + 1.1795054755208405, + -0.12243612486054659 + ], + [ + 0.8675929424997189, + 1.1339971878656792, + -0.13476270866941298 + ], + [ + 0.8431137662619862, + 1.0826332710534639, + -0.12946443679061065 + ], + [ + 0.8184623336740463, + 1.034305134888908, + -0.10576411373229125 + ], + [ + 0.7934226358637694, + 0.9959097445959337, + -0.06676664222552241 + ], + [ + 0.7690277458268838, + 0.9724270343352711, + -0.017351193057682065 + ], + [ + 0.7467648681234117, + 0.9635081785343206, + 0.038293000421182645 + ], + [ + 0.7302211591756236, + 0.9663112199079055, + 0.09227913867217509 + ], + [ + 0.7266063189583118, + 0.9813875529292784, + 0.13527013856266776 + ], + [ + 0.740913377229851, + 1.0095075083267089, + 0.1628619929770391 + ], + [ + 0.771435177787056, + 1.0479989628191202, + 0.1731374357943347 + ], + [ + 0.8119589901799421, + 1.0926029146816758, + 0.16489269112153704 + ], + [ + 0.8536950256565877, + 1.1372933346981497, + 0.13987206233359634 + ], + [ + 0.8879091727226707, + 1.175197473008768, + 0.10089620508156458 + ], + [ + 0.9102630623699379, + 1.2027074865409324, + 0.051740857268630425 + ], + [ + 0.7625935662822613, + 1.3208508023260204, + -5.388152038399198e-19 + ], + [ + 0.7567152628142675, + 1.3141381733353878, + -0.04891039967767858 + ], + [ + 0.7441569157181952, + 1.2906633331728325, + -0.09257864798321835 + ], + [ + 0.7263985991354146, + 1.2499612901763975, + -0.12525818402464756 + ], + [ + 0.7054261203405441, + 1.196848801843495, + -0.143518470753907 + ], + [ + 0.6836317134032437, + 1.1415509298470827, + -0.14520985965485006 + ], + [ + 0.6619386759242765, + 1.0939005325351256, + -0.12911197537528732 + ], + [ + 0.6407351814744582, + 1.0611005314815243, + -0.09736350988051855 + ], + [ + 0.6214033603348975, + 1.0469191062447962, + -0.05301501650072282 + ], + [ + 0.6054412228530206, + 1.0486549589780627, + -5.702458806346956e-18 + ], + [ + 0.5959568615478447, + 1.0616106491694346, + 0.05301501650072283 + ], + [ + 0.5985724254949408, + 1.0854432099960754, + 0.09736350988051848 + ], + [ + 0.6163763124266065, + 1.1202059753654208, + 0.12911197537528726 + ], + [ + 0.6467962482596996, + 1.162817895563433, + 0.14520985965485006 + ], + [ + 0.6837884067151624, + 1.209341341629757, + 0.143518470753907 + ], + [ + 0.7192989314722252, + 1.2540602852128966, + 0.1252581840246476 + ], + [ + 0.7456687764016744, + 1.2897904600002486, + 0.09257864798321841 + ], + [ + 0.7597194107841905, + 1.3124037276962672, + 0.04891039967767866 + ], + [ + 0.5953797036912415, + 1.4067102885577698, + 0.001163208398123123 + ], + [ + 0.5864437054812096, + 1.389664679409451, + -0.05174085726863031 + ], + [ + 0.5737962797275353, + 1.3565506363354418, + -0.10089620508156448 + ], + [ + 0.5580774065750221, + 1.3079682466520874, + -0.13987206233359623 + ], + [ + 0.5402423852732824, + 1.2494785696678277, + -0.16489269112153687 + ], + [ + 0.5218761360475739, + 1.1920819427461153, + -0.1731374357943346 + ], + [ + 0.5038024589071355, + 1.1464035608481282, + -0.16286199297703893 + ], + [ + 0.48660339231544486, + 1.1199533072328356, + -0.13527013856266776 + ], + [ + 0.47173948481436573, + 1.1155456841809626, + -0.09227913867217498 + ], + [ + 0.46104012530308836, + 1.1284714357157706, + -0.038293000421182555 + ], + [ + 0.4576326421476658, + 1.1522110812687993, + 0.01735119305768214 + ], + [ + 0.46577182076466617, + 1.185079030893601, + 0.06676664222552242 + ], + [ + 0.48650335524146204, + 1.2259617404468734, + 0.10576411373229125 + ], + [ + 0.5160310325835508, + 1.271474575389987, + 0.12946443679061068 + ], + [ + 0.5482739012619334, + 1.3183561222816873, + 0.13476270866941303 + ], + [ + 0.5760690437765636, + 1.3612300985530539, + 0.12243612486054663 + ], + [ + 0.5933208017113184, + 1.3924888990824005, + 0.09374345843766098 + ], + [ + 0.598778349928819, + 1.407783266076985, + 0.051500944946586975 + ], + [ + 0.42309262878601267, + 1.4764194943912543, + 0.0006371101041755711 + ], + [ + 0.4132725412441491, + 1.4513593316071778, + -0.059936794698196336 + ], + [ + 0.40175145826580555, + 1.4109845627865631, + -0.11658224237114949 + ], + [ + 0.38857482547647415, + 1.3564834848043683, + -0.1627689603749997 + ], + [ + 0.37411341009925636, + 1.2942053122160397, + -0.1945622349650087 + ], + [ + 0.3593302198120006, + 1.235919714109426, + -0.20837602289260063 + ], + [ + 0.3447928567569959, + 1.192912355356505, + -0.20200801712573271 + ], + [ + 0.33107530772147137, + 1.1731226596796551, + -0.17603714477054988 + ], + [ + 0.3198016057756618, + 1.1788074227541183, + -0.13160396482709294 + ], + [ + 0.3133733854202222, + 1.2034342712063741, + -0.07336928468664494 + ], + [ + 0.3151056254055527, + 1.2381614149215152, + -0.010834519996672256 + ], + [ + 0.3279328035858289, + 1.279138250527392, + 0.048202936131226094 + ], + [ + 0.35073909633137695, + 1.3240513263255012, + 0.09763489484716648 + ], + [ + 0.37833816854250124, + 1.3700331672928117, + 0.1300748064139683 + ], + [ + 0.40463098435774425, + 1.4149292339652306, + 0.14181823731605966 + ], + [ + 0.4237204997098206, + 1.4535730669006748, + 0.13316022941396397 + ], + [ + 0.4318563003932112, + 1.4783726535465502, + 0.10416968315171281 + ], + [ + 0.43026621465914816, + 1.4857798301353946, + 0.057719181597291586 + ], + [ + 0.24699898502878165, + 1.5316162567710212, + -0.0015065920884238006 + ], + [ + 0.23763809687771958, + 1.5013273648113308, + -0.07173536740193812 + ], + [ + 0.2281508771270897, + 1.4556740849539513, + -0.13692238103429308 + ], + [ + 0.21819476756171202, + 1.3966169721039252, + -0.19071803616317057 + ], + [ + 0.20754818344898124, + 1.331647220586621, + -0.22887145670664116 + ], + [ + 0.19646539595520132, + 1.273333327028336, + -0.2469927444448824 + ], + [ + 0.18518704344267095, + 1.233512495654959, + -0.24275763550171986 + ], + [ + 0.1743210440595384, + 1.2207490065617699, + -0.21638151607254927 + ], + [ + 0.165780216008425, + 1.2369242733267263, + -0.16799608485320192 + ], + [ + 0.16263338197641258, + 1.2733058479866268, + -0.1018398545841345 + ], + [ + 0.16839721622894516, + 1.3178721955102297, + -0.027522795113479492 + ], + [ + 0.18465433706253367, + 1.3641513773309966, + 0.04561523937498757 + ], + [ + 0.20817310353857554, + 1.4094445670175375, + 0.10769446805107434 + ], + [ + 0.23252576751232074, + 1.4526737185489587, + 0.14872207054352068 + ], + [ + 0.25187290175620153, + 1.4931352749287727, + 0.16493956418370107 + ], + [ + 0.26215716482859375, + 1.5259882128516649, + 0.1560495446597101 + ], + [ + 0.26243880905598826, + 1.5444807074545033, + 0.12146551315926976 + ], + [ + 0.2559573798016263, + 1.5461612489807097, + 0.06580326418474254 + ], + [ + 0.06698956835013048, + 1.5713157312084054, + -0.003597786951192183 + ], + [ + 0.058750143039803915, + 1.538182229359663, + -0.08472018437174485 + ], + [ + 0.0522123886627318, + 1.4891791311390323, + -0.1594917945561996 + ], + [ + 0.04651128516587849, + 1.427185845883134, + -0.22137262923908632 + ], + [ + 0.040448411036801, + 1.3608960283656375, + -0.26540203425465697 + ], + [ + 0.03332756760884316, + 1.3035885409831236, + -0.2865730599725729 + ], + [ + 0.02503626949909929, + 1.2677008828244005, + -0.282908535203757 + ], + [ + 0.016317272082358107, + 1.2625818153327806, + -0.2541659628123891 + ], + [ + 0.009477721124747152, + 1.2894179176163587, + -0.19882375166034066 + ], + [ + 0.008379631413570288, + 1.3363372867441434, + -0.1202661253497871 + ], + [ + 0.016915771312967953, + 1.3873491220780736, + -0.029241017344864204 + ], + [ + 0.03538628790014561, + 1.433926076794542, + 0.06100175754086527 + ], + [ + 0.05836842739545246, + 1.4748179872354663, + 0.13572103385736878 + ], + [ + 0.07831619867455582, + 1.5120070919499833, + 0.18324998209266652 + ], + [ + 0.09025230043114045, + 1.5464308307579286, + 0.20047185943691095 + ], + [ + 0.0925350087090155, + 1.573912568608001, + 0.18691502624524373 + ], + [ + 0.08668064293551775, + 1.5886248104464191, + 0.14277716504159957 + ], + [ + 0.07685810615441711, + 1.5880109860163456, + 0.07543633423167373 + ], + [ + -0.11547099525265343, + 1.5931655551630108, + -0.004306299134435144 + ], + [ + -0.12231770152463099, + 1.559318278006592, + -0.09688813744095513 + ], + [ + -0.12549546421940633, + 1.5090098189163936, + -0.18195910012857544 + ], + [ + -0.12647600584962443, + 1.4460756110851924, + -0.2522205598374899 + ], + [ + -0.12756743655400327, + 1.3802271901602383, + -0.30154639682197576 + ], + [ + -0.13057469233890084, + 1.325302480219203, + -0.3246040805956318 + ], + [ + -0.13605134285117823, + 1.294402353778942, + -0.3199700629823863 + ], + [ + -0.14313027629704067, + 1.297407810016945, + -0.28654395624551227 + ], + [ + -0.14918560470332842, + 1.3340724911051915, + -0.22075699632499687 + ], + [ + -0.14935976265267237, + 1.3884644482173345, + -0.12535342517379947 + ], + [ + -0.13886942782533582, + 1.4403479603852531, + -0.014035364415682657 + ], + [ + -0.11871520346187285, + 1.4807495765562066, + 0.09362076581103906 + ], + [ + -0.09696616627212064, + 1.5123667446996587, + 0.17811283600711234 + ], + [ + -0.08205206658337831, + 1.5412587726830957, + 0.22808403541660954 + ], + [ + -0.07733640711135621, + 1.5698897155914875, + 0.24218077153753212 + ], + [ + -0.08196195155172663, + 1.5945471053978744, + 0.22070096878950704 + ], + [ + -0.09267315760701851, + 1.609183575361347, + 0.16566823102061315 + ], + [ + -0.10502834213655357, + 1.609541322979077, + 0.08659200803343817 + ], + [ + -0.2989652810904866, + 1.5945803920928807, + -0.0037239017480252355 + ], + [ + -0.3041107822058286, + 1.5621341627604601, + -0.10717656549235578 + ], + [ + -0.3039302002475527, + 1.512451506063055, + -0.2020389651614838 + ], + [ + -0.3004607496341953, + 1.4504653707926844, + -0.2799040270978259 + ], + [ + -0.29687431152839433, + 1.3868153819880613, + -0.3333317211655149 + ], + [ + -0.2959390617891302, + 1.335798942213582, + -0.3568919092420252 + ], + [ + -0.29868394851645513, + 1.310843355510847, + -0.34945869045759 + ], + [ + -0.30427599422511137, + 1.3215305412516185, + -0.30876902823203023 + ], + [ + -0.3098621572778975, + 1.3654919856436452, + -0.22947224195383356 + ], + [ + -0.30933493421273695, + 1.4224165749728248, + -0.11451036045755517 + ], + [ + -0.29684144063403445, + 1.4684249798445204, + 0.017514692950328096 + ], + [ + -0.27504783281393574, + 1.4964751712570306, + 0.13933245815099726 + ], + [ + -0.2548330294505405, + 1.5155565261292465, + 0.22832953606032064 + ], + [ + -0.24503091025024681, + 1.5359789352122342, + 0.27602870301035076 + ], + [ + -0.24720396719538068, + 1.5608507170519663, + 0.2838340631799373 + ], + [ + -0.25838693365323057, + 1.5860417081465337, + 0.25323634877747997 + ], + [ + -0.2737408782906958, + 1.6040678691757502, + 0.1879209912822584 + ], + [ + -0.288348015447022, + 1.6082413068930035, + 0.09822814356936121 + ], + [ + -0.4822103799182821, + 1.571545447330407, + -0.002550930488576519 + ], + [ + -0.48566279976057497, + 1.5427823912236551, + -0.11478253697860838 + ], + [ + -0.48244930357616317, + 1.4957825561270521, + -0.21734638240875648 + ], + [ + -0.47520481455820585, + 1.4367015861610586, + -0.3007016054450188 + ], + [ + -0.46768745182391785, + 1.37704960080157, + -0.3562645308768752 + ], + [ + -0.4632905573525035, + 1.3313942056593322, + -0.37855687425432616 + ], + [ + -0.46347011417083683, + 1.3127490806161695, + -0.36630091392437103 + ], + [ + -0.46751482268601113, + 1.3294250206999052, + -0.3160518014721549 + ], + [ + -0.4721526820564123, + 1.3764771065948749, + -0.2215222661980465 + ], + [ + -0.469902060626879, + 1.4295177813734294, + -0.08738802789981485 + ], + [ + -0.4542703171758026, + 1.46297473722355, + 0.06139451497448802 + ], + [ + -0.43005425713365114, + 1.474767896893278, + 0.19079307608810592 + ], + [ + -0.41086106685751556, + 1.481117948838774, + 0.2782875870550129 + ], + [ + -0.4057519291086387, + 1.494926225583115, + 0.3201751683780001 + ], + [ + -0.4147495990352179, + 1.5183864317610691, + 0.32038241151991836 + ], + [ + -0.43306140049870356, + 1.5463543655563436, + 0.28110400150840853 + ], + [ + -0.4539371310202594, + 1.5698176517829272, + 0.20702267861774526 + ], + [ + -0.47134540390923896, + 1.5800310879262731, + 0.10851076834594743 + ], + [ + -0.6616273992177305, + 1.520331178210406, + -0.00125400241890582 + ], + [ + -0.6644985476064064, + 1.4972268189153857, + -0.11887496792044668 + ], + [ + -0.6592496109934931, + 1.4551454903800125, + -0.22585975165104205 + ], + [ + -0.6493036722013747, + 1.4011764874679922, + -0.31170768860678044 + ], + [ + -0.6388277232155601, + 1.347406904396046, + -0.3669551910222687 + ], + [ + -0.63154932197567, + 1.3082362604854685, + -0.38602812646112444 + ], + [ + -0.6292238552352404, + 1.2955629623678526, + -0.3672335347933586 + ], + [ + -0.6312155724209374, + 1.3157810802619674, + -0.3061167536294455 + ], + [ + -0.6335972822424006, + 1.360814922417986, + -0.1966365411065221 + ], + [ + -0.6273723630793474, + 1.4032112742189256, + -0.04720506844901055 + ], + [ + -0.6060364352543826, + 1.4194338634973969, + 0.11071649210426522 + ], + [ + -0.5775136126171403, + 1.414967131037945, + 0.239780621731313 + ], + [ + -0.5584151212140992, + 1.4114272966893346, + 0.32094776736037695 + ], + [ + -0.5576721147300154, + 1.421321948078694, + 0.3553028582356034 + ], + [ + -0.5735900141048746, + 1.4449345226998407, + 0.3479888907260738 + ], + [ + -0.5996563115488599, + 1.476179923377536, + 0.3012874136095765 + ], + [ + -0.627269542649924, + 1.5051793020328714, + 0.22046273992532284 + ], + [ + -0.6490554679479519, + 1.5221355188478283, + 0.11573858061425653 + ] + ] + } + }, + "Volume3": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier3" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface2": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface2", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart2" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier3" + }, + "label": { + "$type": "ref", + "value": "Volume3" + }, + "targetlabel": -0.6985426179774754, + "constraint_weight": 100.0 + }, + "BiotSavart3": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.6823511055454943, + 0.0, + 0.0 + ], + [ + 1.6656243110337046, + 0.013249282033531694, + -0.1436838724944854 + ], + [ + 1.6194177670463048, + 0.02830612567714967, + -0.2736205425659214 + ], + [ + 1.554401459544129, + 0.04608885524996745, + -0.3758868523065437 + ], + [ + 1.4888819133786795, + 0.06345606685272134, + -0.43754656486224425 + ], + [ + 1.4434381360953947, + 0.07519219766233937, + -0.45303141088492965 + ], + [ + 1.4309240141180148, + 0.07607727222531602, + -0.42358020447257827 + ], + [ + 1.4575975069793123, + 0.06158074755269865, + -0.34266474801966995 + ], + [ + 1.508965248931313, + 0.03364461981254196, + -0.19726756337899656 + ], + [ + 1.536606165189033, + 1.2047887471193819e-17, + -7.292013477149787e-17 + ], + [ + 1.508965248931313, + -0.03364461981254194, + 0.19726756337899648 + ], + [ + 1.4575975069793126, + -0.061580747552698614, + 0.34266474801966973 + ], + [ + 1.4309240141180148, + -0.076077272225316, + 0.4235802044725781 + ], + [ + 1.4434381360953947, + -0.07519219766233937, + 0.45303141088492965 + ], + [ + 1.4888819133786793, + -0.06345606685272136, + 0.4375465648622443 + ], + [ + 1.554401459544129, + -0.046088855249967496, + 0.37588685230654395 + ], + [ + 1.6194177670463046, + -0.028306125677149692, + 0.27362054256592155 + ], + [ + 1.6656243110337043, + -0.013249282033531722, + 0.1436838724944857 + ], + [ + 1.6670743629139633, + 0.19099792813205713, + -0.0037708226643153766 + ], + [ + 1.6585704164645962, + 0.20392683320423732, + -0.14514809283330687 + ], + [ + 1.6211062002846068, + 0.21577686174566185, + -0.27193355266528685 + ], + [ + 1.5645274382920376, + 0.22801375456134595, + -0.36949754317146893 + ], + [ + 1.5070347303674625, + 0.2383263764008809, + -0.42458486049606214 + ], + [ + 1.467859063072474, + 0.24269443538612864, + -0.43245408760360843 + ], + [ + 1.4581253814061221, + 0.237067706480234, + -0.3938341578433285 + ], + [ + 1.4808653846291062, + 0.21851762702104208, + -0.30063376800897124 + ], + [ + 1.5156612777935363, + 0.18923077067618121, + -0.1440338078532333 + ], + [ + 1.5162209433687739, + 0.1543474349804098, + 0.05404585091974432 + ], + [ + 1.4655391992606446, + 0.11870501588892422, + 0.2393013585073099 + ], + [ + 1.4048847648356482, + 0.0910275083991308, + 0.3679645907153258 + ], + [ + 1.378829768357133, + 0.08073904264720057, + 0.4356346498106428 + ], + [ + 1.3960298942930218, + 0.08828136040512317, + 0.4566001779862529 + ], + [ + 1.44798869872841, + 0.10741098572875815, + 0.4353885148007529 + ], + [ + 1.520129374341155, + 0.13171390337703595, + 0.3702161520695645 + ], + [ + 1.5911869654961024, + 0.15533005501583677, + 0.2670503244197447 + ], + [ + 1.6434593053111688, + 0.17506188538128117, + 0.13812436594269228 + ], + [ + 1.6223343513234412, + 0.37606668648721964, + -0.006996105425620044 + ], + [ + 1.6215602291610327, + 0.39127917488734065, + -0.14187620462583725 + ], + [ + 1.593777820156543, + 0.40222042209501363, + -0.26192647201176184 + ], + [ + 1.5474053780624286, + 0.40984057050949546, + -0.35189587164931885 + ], + [ + 1.4988992871221014, + 0.41313072129070905, + -0.39806552538441514 + ], + [ + 1.4651231362700134, + 0.40981521667709253, + -0.3970391683316097 + ], + [ + 1.4554323146637014, + 0.3971246905758753, + -0.34913722855611923 + ], + [ + 1.4689153061493418, + 0.37289635673690197, + -0.246274622197321 + ], + [ + 1.4822870792967946, + 0.33884896514986507, + -0.08700319405641667 + ], + [ + 1.4579550660209413, + 0.29961998098809633, + 0.09974052492057764 + ], + [ + 1.3926603062362666, + 0.26153483159238355, + 0.26456364404689203 + ], + [ + 1.3299184922945801, + 0.23510985040206978, + 0.374184526086736 + ], + [ + 1.307781417004172, + 0.22954199704783543, + 0.4291634113705312 + ], + [ + 1.3306986300725836, + 0.24388706561853715, + 0.4430134681990041 + ], + [ + 1.388342548660953, + 0.2704829382992839, + 0.41821372427090714 + ], + [ + 1.464833600831493, + 0.3017106062643299, + 0.3525945202776104 + ], + [ + 1.538947139298057, + 0.3312621372827818, + 0.25251060475783027 + ], + [ + 1.5940524248996117, + 0.35605456773710265, + 0.12887568633198634 + ], + [ + 1.5516460343128327, + 0.5506602630826083, + -0.009310284662163004 + ], + [ + 1.556285320196279, + 0.5690052524733211, + -0.13408672834483895 + ], + [ + 1.5370816790667705, + 0.5806744069167278, + -0.24467858493807482 + ], + [ + 1.5011908686574789, + 0.5853035294959369, + -0.3247737204083292 + ], + [ + 1.461449124473392, + 0.5820412195091644, + -0.36020664807398267 + ], + [ + 1.4313655721851952, + 0.5701066049744502, + -0.34967803012656007 + ], + [ + 1.4185000216542047, + 0.5482548293781798, + -0.29373861662454875 + ], + [ + 1.4187921966692174, + 0.5152620731891749, + -0.18659863687116726 + ], + [ + 1.4106657732328618, + 0.4739347540308142, + -0.0351528158113363 + ], + [ + 1.3685761790341155, + 0.43043750452979085, + 0.1300037221374241 + ], + [ + 1.2983599714197818, + 0.3920440044272973, + 0.2701837651210276 + ], + [ + 1.2397930721500143, + 0.36888941104574835, + 0.36161890667381724 + ], + [ + 1.2240307451444152, + 0.3689320234895978, + 0.40612461118781434 + ], + [ + 1.252685375768204, + 0.39003059145360286, + 0.4148953236268026 + ], + [ + 1.3141494730248011, + 0.42373159879933897, + 0.3884352476090919 + ], + [ + 1.3921657115686836, + 0.4617229354295553, + 0.32492301665911977 + ], + [ + 1.4662569756010773, + 0.49704198780266157, + 0.23131659353971318 + ], + [ + 1.5212855017009483, + 0.5265571848448095, + 0.11666941400127354 + ], + [ + 1.4600717796103533, + 0.7134426106003348, + -0.010839592905797028 + ], + [ + 1.4676587387048388, + 0.7336265706364306, + -0.12327098641251115 + ], + [ + 1.4548128343943145, + 0.7460459067607486, + -0.22220186725058721 + ], + [ + 1.42722128379606, + 0.7483715927080348, + -0.2900174986028223 + ], + [ + 1.3935278020924948, + 0.7379707406107793, + -0.31355292407687585 + ], + [ + 1.3643546018127972, + 0.7153045223334804, + -0.29476168113518403 + ], + [ + 1.345913060238258, + 0.6819286935435771, + -0.23488538996624644 + ], + [ + 1.3325215849909922, + 0.639114305295826, + -0.1313526918476241 + ], + [ + 1.3073837378853284, + 0.5918660877802442, + 0.002964069512302646 + ], + [ + 1.2564166618529906, + 0.5472347893577263, + 0.14129971239422287 + ], + [ + 1.189631946549302, + 0.5117954253901614, + 0.2572233422169938 + ], + [ + 1.1400419851746442, + 0.494313983265941, + 0.33357361287715004 + ], + [ + 1.1321190415372617, + 0.5008352802795811, + 0.3708561957217292 + ], + [ + 1.165498684824921, + 0.5280776802856875, + 0.37679317050799904 + ], + [ + 1.2285057719893722, + 0.5680886634088126, + 0.35025377620471904 + ], + [ + 1.3054925876308259, + 0.612497808425733, + 0.29089879463361984 + ], + [ + 1.3770530563220715, + 0.6531906145757969, + 0.20615501978275533 + ], + [ + 1.4298129018306893, + 0.6866227706411782, + 0.10281019682414336 + ], + [ + 1.3515118101052155, + 0.8654321462911635, + -0.012210622560448225 + ], + [ + 1.3601657504407687, + 0.8858110908701414, + -0.1110017687878665 + ], + [ + 1.3510418426821593, + 0.8974672997281862, + -0.19596523394445334 + ], + [ + 1.3277175177591056, + 0.895276691535512, + -0.2496231328550224 + ], + [ + 1.2959951128976974, + 0.8746917435464131, + -0.26260858453934016 + ], + [ + 1.265472693988812, + 0.8389927449718837, + -0.23993955088152125 + ], + [ + 1.2412784812502173, + 0.7940219699831947, + -0.18241662572896977 + ], + [ + 1.2172484387780758, + 0.7437990511179348, + -0.08999688947513532 + ], + [ + 1.1822613105022806, + 0.6948017172789648, + 0.022240271026200582 + ], + [ + 1.1305829091705308, + 0.6535820328122001, + 0.13448019709210202 + ], + [ + 1.0727381726911163, + 0.6246881247430763, + 0.2302214915247291 + ], + [ + 1.0345418550091006, + 0.6147560784369132, + 0.29567304735385147 + ], + [ + 1.0344587588879308, + 0.627837709535714, + 0.32890177561764 + ], + [ + 1.0710135171509083, + 0.6603141305524829, + 0.3338115538253456 + ], + [ + 1.1336250820699545, + 0.7056885554183723, + 0.30852024236537695 + ], + [ + 1.2074775699380538, + 0.7557464037491817, + 0.2547990176228299 + ], + [ + 1.2743338954387777, + 0.8010707920032543, + 0.1798047401297626 + ], + [ + 1.3230242142899904, + 0.8374218344820875, + 0.08828497999591457 + ], + [ + 1.2284378315060827, + 1.0067099152668861, + -0.013529515915845723 + ], + [ + 1.23610291958329, + 1.0258295591938331, + -0.09799177345190115 + ], + [ + 1.2275359234584124, + 1.0335391488160302, + -0.16770509631510225 + ], + [ + 1.2045001449510253, + 1.0220215016480574, + -0.20843431501984314 + ], + [ + 1.1722675433199867, + 0.9876719220861424, + -0.2158796173153179 + ], + [ + 1.140340507931469, + 0.9387661195348999, + -0.19522411112804977 + ], + [ + 1.1122487461149624, + 0.8848297155689805, + -0.1454066134305435 + ], + [ + 1.0823704469195345, + 0.8313599281999657, + -0.06842880202039207 + ], + [ + 1.0448664198580848, + 0.7855861542136083, + 0.021744819121613843 + ], + [ + 0.9985032098251776, + 0.7524686331872451, + 0.11298078312626028 + ], + [ + 0.9520084616852932, + 0.7331825168399241, + 0.19453071059073815 + ], + [ + 0.9250943443696616, + 0.7318639772503247, + 0.2531383332634016 + ], + [ + 0.93171106201785, + 0.7514171603089755, + 0.2845788216892024 + ], + [ + 0.9701512914589202, + 0.7886761784380307, + 0.28991185459958396 + ], + [ + 1.0311010843269135, + 0.838501943652202, + 0.2674249593728854 + ], + [ + 1.1001992390599609, + 0.8927161773478606, + 0.2203855240735995 + ], + [ + 1.160550654999256, + 0.940985121226355, + 0.15478402070749794 + ], + [ + 1.2034656231877978, + 0.9787215231788837, + 0.07420499506246891 + ], + [ + 1.0933720560669926, + 1.1369037525536707, + -0.013112480648286087 + ], + [ + 1.0971055582649418, + 1.1520750588804507, + -0.0841241769001097 + ], + [ + 1.0858420422491446, + 1.1510580849556042, + -0.14120018099212425 + ], + [ + 1.0612110971392479, + 1.1257076559345873, + -0.17479856345423078 + ], + [ + 1.0288539062707853, + 1.0765718741847876, + -0.1832505464057977 + ], + [ + 0.9971284565703828, + 1.0166941139649894, + -0.16894113267766753 + ], + [ + 0.9677143210803828, + 0.9574642552924905, + -0.12939522303340673 + ], + [ + 0.9364739841232583, + 0.9052514065544012, + -0.0683055156485951 + ], + [ + 0.9016308001154619, + 0.8673712839971566, + 0.0037350785683254923 + ], + [ + 0.8636072889486738, + 0.8458142915953664, + 0.08082498294457695 + ], + [ + 0.8285714348440943, + 0.8378199170641161, + 0.15374962771156894 + ], + [ + 0.8116981454793025, + 0.8457056258326504, + 0.20841538847289914 + ], + [ + 0.823907087758997, + 0.8720679492689736, + 0.2397468561840718 + ], + [ + 0.8634417305674194, + 0.9141802296130882, + 0.24735592734658027 + ], + [ + 0.921831885420389, + 0.9677153915253867, + 0.22967894864061922 + ], + [ + 0.9852160503177256, + 1.024447854427726, + 0.19030092202522658 + ], + [ + 1.0381538724707389, + 1.073522336268519, + 0.13360450837361698 + ], + [ + 1.0739950948660324, + 1.1106186083074432, + 0.06282875628990787 + ], + [ + 0.946497598985401, + 1.256202454782939, + -0.008530101977151558 + ], + [ + 0.9434962421088489, + 1.2625778049292866, + -0.07025846318948344 + ], + [ + 0.9283310049277109, + 1.2482928071877444, + -0.12184823855974419 + ], + [ + 0.9032043472969383, + 1.2078283573011583, + -0.15593820850894616 + ], + [ + 0.8728010987142938, + 1.1458501396005574, + -0.17022732841192495 + ], + [ + 0.8431965577921909, + 1.0780069979387328, + -0.16422724831316438 + ], + [ + 0.8149834902639801, + 1.0169033366363502, + -0.1352530382534781 + ], + [ + 0.7857770746669827, + 0.9697892096123436, + -0.08743500198201995 + ], + [ + 0.7560880892049966, + 0.942900417783289, + -0.02740614820567785 + ], + [ + 0.7267246734396712, + 0.9344465103438512, + 0.04196384345939102 + ], + [ + 0.7021503973850728, + 0.9383409413633962, + 0.11018891170991174 + ], + [ + 0.6943729926307142, + 0.9559645365284384, + 0.16310915303294374 + ], + [ + 0.7116270113360273, + 0.9897401748720418, + 0.1964965073461734 + ], + [ + 0.7516314490915597, + 1.0368650781409552, + 0.2088131270393252 + ], + [ + 0.8065466668591279, + 1.0935490346419028, + 0.19790300242094852 + ], + [ + 0.8633850525905197, + 1.1517751842381985, + 0.16696097457709752 + ], + [ + 0.9081220560016693, + 1.200302163807356, + 0.11894218766135929 + ], + [ + 0.9353590240608551, + 1.2348277916426136, + 0.05727757761527271 + ], + [ + 0.7860552370174478, + 1.3614876080698153, + -3.393978401953338e-18 + ], + [ + 0.7764433480458509, + 1.354560378149878, + -0.05998147291217937 + ], + [ + 0.759364885808381, + 1.3257396363413925, + -0.11414033060978361 + ], + [ + 0.7362692814496885, + 1.2723479213668347, + -0.15408049138360957 + ], + [ + 0.7097174677826538, + 1.2007471034650836, + -0.17639382938921422 + ], + [ + 0.6837342572894813, + 1.1277522944624458, + -0.1791394560645105 + ], + [ + 0.6587498451120849, + 1.0673537008862195, + -0.1595648947761792 + ], + [ + 0.6336306526328672, + 1.027526455840277, + -0.12095474810749597 + ], + [ + 0.6095865368725197, + 1.0128778176373674, + -0.06680710863703121 + ], + [ + 0.5877654040951711, + 1.0180395428240883, + -9.67847252488996e-18 + ], + [ + 0.5723846525674425, + 1.0343563355552652, + 0.0668071086370312 + ], + [ + 0.5730486875018357, + 1.0625034697167144, + 0.12095474810749589 + ], + [ + 0.5949804972347607, + 1.104170951049239, + 0.15956489477617922 + ], + [ + 0.6347950075359263, + 1.1560073834815991, + 0.1791394560645105 + ], + [ + 0.6850187612300174, + 1.2150069083418835, + 0.17639382938921433 + ], + [ + 0.7337509816311599, + 1.2738018624449619, + 0.1540804913836096 + ], + [ + 0.7684417609713989, + 1.3204991000226232, + 0.11414033060978362 + ], + [ + 0.7848620244147249, + 1.349699853082088, + 0.0599814729121795 + ], + [ + 0.6146544386456975, + 1.4477921927338029, + 0.008530101977151533 + ], + [ + 0.6017127248311138, + 1.4274585723170272, + -0.057277577615272565 + ], + [ + 0.5854311380737668, + 1.3866078521380785, + -0.11894218766135922 + ], + [ + 0.5657740427035226, + 1.323600980910253, + -0.16696097457709735 + ], + [ + 0.5437679108542735, + 1.245264420158621, + -0.19790300242094835 + ], + [ + 0.5221357734212247, + 1.1693644682670783, + -0.2088131270393251 + ], + [ + 0.5013266289172277, + 1.1111571572722179, + -0.19649650734617324 + ], + [ + 0.48070307743528773, + 1.0793269195842423, + -0.16310915303294368 + ], + [ + 0.46155189393916946, + 1.07725055209451, + -0.1101889117099116 + ], + [ + 0.44589207971565803, + 1.096585283927631, + -0.04196384345939092 + ], + [ + 0.43853167043679087, + 1.1262417016420063, + 0.027406148205677924 + ], + [ + 0.4469735545068303, + 1.1653975131792003, + 0.08743500198201994 + ], + [ + 0.4731723775882481, + 1.2142480745516888, + 0.13525303825347815 + ], + [ + 0.5119831667762463, + 1.269233138400997, + 0.1642272483131644 + ], + [ + 0.5559347804668814, + 1.3287929937378264, + 0.17022732841192498 + ], + [ + 0.5944078671855618, + 1.3861120882182703, + 0.15593820850894616 + ], + [ + 0.6168877799221214, + 1.4281046369820063, + 0.12184823855974422 + ], + [ + 0.6216763322687315, + 1.4483806165060593, + 0.07025846318948353 + ], + [ + 0.43790150333584005, + 1.5153398526188748, + 0.013112480648286089 + ], + [ + 0.42482638127694883, + 1.4854163398475841, + -0.06282875628990771 + ], + [ + 0.4106206785031888, + 1.4358287947311097, + -0.1336045083736169 + ], + [ + 0.3945898416280107, + 1.3654460550051815, + -0.19030092202522644 + ], + [ + 0.3771501699839949, + 1.2821875265552567, + -0.22967894864061913 + ], + [ + 0.3599824371987161, + 1.2048525881655283, + -0.2473559273465802 + ], + [ + 0.343279454013632, + 1.1495584429918335, + -0.23974685618407174 + ], + [ + 0.3265534833548416, + 1.1258040271061183, + -0.2084153884728992 + ], + [ + 0.31128761455204906, + 1.1364738699571666, + -0.15374962771156894 + ], + [ + 0.3006930189311893, + 1.170812996920643, + -0.08082498294457698 + ], + [ + 0.30035016639693374, + 1.2145208197330577, + -0.00373507856832552 + ], + [ + 0.31573372282607726, + 1.2636359635111674, + 0.06830551564859494 + ], + [ + 0.3453312077586545, + 1.316797313307867, + 0.12939522303340664 + ], + [ + 0.3819187022866007, + 1.3718856312088146, + 0.1689411326776675 + ], + [ + 0.417911638908458, + 1.4292995567057474, + 0.18325054640579774 + ], + [ + 0.44428587870436126, + 1.4818895968678378, + 0.1747985634542308 + ], + [ + 0.4539245216784477, + 1.5158958355627372, + 0.1412001809921243 + ], + [ + 0.4491734889244526, + 1.5261588135307733, + 0.08412417690010984 + ], + [ + 0.2576174451097619, + 1.5672133266875785, + 0.013529515915845716 + ], + [ + 0.2458648907096149, + 1.5315925638513457, + -0.07420499506246869 + ], + [ + 0.23464169206557536, + 1.4755589102212032, + -0.15478402070749775 + ], + [ + 0.2230152684226012, + 1.3991585789241654, + -0.22038552407359926 + ], + [ + 0.21061344216197847, + 1.3122107047228888, + -0.26742495937288524 + ], + [ + 0.19793796015750367, + 1.2345137531367214, + -0.2899118545995839 + ], + [ + 0.18489081865821216, + 1.182594028848925, + -0.28457882168920245 + ], + [ + 0.17126562422866703, + 1.1670871917465993, + -0.2531383332634016 + ], + [ + 0.1589504543513399, + 1.1910547708571702, + -0.19453071059073815 + ], + [ + 0.15240534697851996, + 1.24096346206253, + -0.11298078312626028 + ], + [ + 0.15790435648126203, + 1.2976739402652024, + -0.021744819121613867 + ], + [ + 0.17879359404981007, + 1.353040267437816, + 0.06842880202039188 + ], + [ + 0.21016063864861506, + 1.4056505272474356, + 0.14540661343054337 + ], + [ + 0.24282505376362787, + 1.4569469086005522, + 0.1952241111280497 + ], + [ + 0.2692152034712108, + 1.5090494335901545, + 0.21587961731531785 + ], + [ + 0.28284651116562465, + 1.5541384752136553, + 0.2084343150198431 + ], + [ + 0.2813031969512215, + 1.5798468681809903, + 0.16770509631510225 + ], + [ + 0.2703429984232071, + 1.583411309648159, + 0.09799177345190127 + ], + [ + 0.07373031888723076, + 1.6031596342113883, + 0.012210622560448227 + ], + [ + 0.06371647520026022, + 1.5644834966381223, + -0.08828497999591432 + ], + [ + 0.056580708385149794, + 1.5041409223551916, + -0.17980474012976247 + ], + [ + 0.05075679949649582, + 1.4235794519408465, + -0.25479901762282975 + ], + [ + 0.044331675117276065, + 1.334592397148986, + -0.3085202423653768 + ], + [ + 0.03634205296083059, + 1.2576819789254485, + -0.3338115538253456 + ], + [ + 0.02649402646779872, + 1.2097864191321264, + -0.32890177561764006 + ], + [ + 0.015123453552715604, + 1.2033175669346148, + -0.29567304735385164 + ], + [ + 0.004626699124408426, + 1.241362571531343, + -0.23022149152472912 + ], + [ + 0.0007271892871745372, + 1.3059045368322941, + -0.13448019709210204 + ], + [ + 0.010585282505496785, + 1.371269187445939, + -0.02224027102620064 + ], + [ + 0.03552465418985398, + 1.4260675962577274, + 0.08999688947513508 + ], + [ + 0.0670039565433031, + 1.4719896829252515, + 0.1824166257289696 + ], + [ + 0.09385268374208441, + 1.5154278732757838, + 0.23993955088152114 + ], + [ + 0.10950771394284854, + 1.5597105627230936, + 0.2626085845393401 + ], + [ + 0.11147359940628558, + 1.5974754451967579, + 0.24962313285502252 + ], + [ + 0.10170855928935284, + 1.618770207202582, + 0.19596523394445345 + ], + [ + 0.08705203242716406, + 1.6208436386743013, + 0.11100176878786669 + ], + [ + -0.11217646488299757, + 1.621180557791487, + 0.01083959290579704 + ], + [ + -0.12027368872322818, + 1.5815656809647116, + -0.10281019682414305 + ], + [ + -0.12284686242482551, + 1.5191582364218161, + -0.20615501978275513 + ], + [ + -0.12230763195643364, + 1.4368386495534438, + -0.2908987946336196 + ], + [ + -0.12227367188070701, + 1.347961538943016, + -0.35025377620471887 + ], + [ + -0.12542065611349815, + 1.2733903092785779, + -0.37679317050799893 + ], + [ + -0.1323234449350139, + 1.2308614902191493, + -0.3708561957217292 + ], + [ + -0.14193252563314107, + 1.2344623121750542, + -0.33357361287715015 + ], + [ + -0.1515881333461077, + 1.2861491995603072, + -0.2572233422169938 + ], + [ + -0.15428910150807804, + 1.361706141581596, + -0.14129971239422295 + ], + [ + -0.14112080128646193, + 1.4281605733934717, + -0.0029640695123028062 + ], + [ + -0.11277156818726732, + 1.4735546963412167, + 0.13135269184762374 + ], + [ + -0.08238895794085783, + 1.506559248223375, + 0.23488538996624622 + ], + [ + -0.06270541312371117, + 1.5392180061068248, + 0.2947616811351839 + ], + [ + -0.0576624924276959, + 1.5758158477973834, + 0.31355292407687574 + ], + [ + -0.06550183114225062, + 1.6101956849432448, + 0.2900174986028222 + ], + [ + -0.08131170955295208, + 1.6329278257174937, + 0.22220186725058727 + ], + [ + -0.09849012229001129, + 1.6378430371228325, + 0.12327098641251136 + ], + [ + -0.2989372404722551, + 1.619095014937598, + 0.009310284662163004 + ], + [ + -0.3046308522296505, + 1.5807504833043806, + -0.11666941400127327 + ], + [ + -0.3026774996159185, + 1.518336783248004, + -0.23131659353971304 + ], + [ + -0.2962190641924248, + 1.4365123402108972, + -0.32492301665911955 + ], + [ + -0.29011240756597717, + 1.3499526274090803, + -0.3884352476090919 + ], + [ + -0.288566287432212, + 1.2798726540913214, + -0.4148953236268026 + ], + [ + -0.2925108679606186, + 1.2445077320530586, + -0.4061246111878144 + ], + [ + -0.300428934922309, + 1.2581370014407398, + -0.36161890667381735 + ], + [ + -0.3096599184744724, + 1.3204347207200173, + -0.2701837651210277 + ], + [ + -0.31151827585267944, + 1.4004404903226795, + -0.13000372213742414 + ], + [ + -0.2948933498894164, + 1.4586397728842837, + 0.03515281581133618 + ], + [ + -0.2631660533461464, + 1.486341121601257, + 0.18659863687116698 + ], + [ + -0.23444740083809548, + 1.5025844687104066, + 0.2937386166245486 + ], + [ + -0.2219559833194239, + 1.524652250102053, + 0.34967803012656007 + ], + [ + -0.22666208009208455, + 1.5566726778870654, + 0.3602066480739826 + ], + [ + -0.2437077088605635, + 1.592721192934574, + 0.32477372040832936 + ], + [ + -0.2656620518160365, + 1.6214889852218268, + 0.24467858493807498 + ], + [ + -0.2853696565694649, + 1.6322852490634372, + 0.13408672834483923 + ], + [ + -0.4854838716467498, + 1.5930161049218583, + 0.006996105425620062 + ], + [ + -0.4886739116559874, + 1.5585171787958016, + -0.128875686331986 + ], + [ + -0.48259214345021073, + 1.498398386354898, + -0.25251060475783005 + ], + [ + -0.471127750799632, + 1.4194384137692722, + -0.3525945202776101 + ], + [ + -0.4599261784730375, + 1.3375813854448608, + -0.4182137242709069 + ], + [ + -0.4541369205561958, + 1.2743623512332771, + -0.44301346819900395 + ], + [ + -0.4551015078232475, + 1.247342928246741, + -0.42916341137053127 + ], + [ + -0.4613481430191382, + 1.2692981244908403, + -0.37418452608673625 + ], + [ + -0.4698343449846438, + 1.3368466198390145, + -0.26456364404689214 + ], + [ + -0.4694990179933684, + 1.4124361152444018, + -0.09974052492057789 + ], + [ + -0.4476917277825459, + 1.4531227489473955, + 0.08700319405641631 + ], + [ + -0.4115199351618491, + 1.4585661495015774, + 0.2462746221973205 + ], + [ + -0.3837960868231078, + 1.4590037032754901, + 0.34913722855611895 + ], + [ + -0.3776511796352201, + 1.473741464020708, + 0.3970391683316094 + ], + [ + -0.3916679438395076, + 1.50465022100748, + 0.3980655253844151 + ], + [ + -0.4187703434684833, + 1.5450126526094747, + 0.351895871649319 + ], + [ + -0.4485558066230893, + 1.581362291291259, + 0.261926472011762 + ], + [ + -0.47192240915626466, + 1.5999519396636406, + 0.14187620462583753 + ], + [ + -0.6681281236244249, + 1.5392277123472795, + 0.0037708226643153936 + ], + [ + -0.6701216126809947, + 1.5108084511760393, + -0.1381243659426919 + ], + [ + -0.6610737091331015, + 1.4556733617982165, + -0.2670503244197445 + ], + [ + -0.6459971008144547, + 1.3823276069069033, + -0.37021615206956426 + ], + [ + -0.630973707077572, + 1.3077004903559546, + -0.43538851480075275 + ], + [ + -0.6215610463550237, + 1.253138033102823, + -0.4566001779862529 + ], + [ + -0.619492822168855, + 1.2344711282150906, + -0.4356346498106429 + ], + [ + -0.623610247700975, + 1.262179649936964, + -0.367964590715326 + ], + [ + -0.6299680403138778, + 1.3285466847460845, + -0.23930135850731013 + ], + [ + -0.6244416719823845, + 1.39025957219757, + -0.054045850919744676 + ], + [ + -0.5939519843134872, + 1.4072165554396763, + 0.14403380785323291 + ], + [ + -0.5511908761396372, + 1.3917258561843409, + 0.30063376800897074 + ], + [ + -0.523756034474265, + 1.3813074754406927, + 0.39383415784332815 + ], + [ + -0.523749985134728, + 1.3925504554890518, + 0.4324540876036083 + ], + [ + -0.5471206688286756, + 1.4242935490840951, + 0.4245848604960621 + ], + [ + -0.5847980152836227, + 1.468927383759369, + 0.36949754317146905 + ], + [ + -0.6236848563216768, + 1.5118075825517647, + 0.27193355266528707 + ], + [ + -0.6526793901641156, + 1.538327531225795, + 0.1451480928333072 + ] + ] + } + }, + "Volume4": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier4" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface3": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface3", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart3" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier4" + }, + "label": { + "$type": "ref", + "value": "Volume4" + }, + "targetlabel": -1.101084790730291, + "constraint_weight": 100.0 + }, + "BiotSavart4": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.6994001827295517, + 0.0, + 0.0 + ], + [ + 1.678301790573033, + 0.013989714114913022, + -0.16363153048133974 + ], + [ + 1.6198439767640258, + 0.03096473383297204, + -0.3117519327331046 + ], + [ + 1.536740213902783, + 0.05273828507371169, + -0.42721410166317114 + ], + [ + 1.4533794634041457, + 0.07505409290615077, + -0.49459585627920327 + ], + [ + 1.3977675588554117, + 0.09067966496226115, + -0.5090676042441162 + ], + [ + 1.3837647850455919, + 0.09273749220609544, + -0.4757325390836287 + ], + [ + 1.4189985656950335, + 0.07524286420253602, + -0.38858831417850587 + ], + [ + 1.4886254707158157, + 0.040915872587106855, + -0.22685343312555434 + ], + [ + 1.5270113165361865, + 1.4598828555402554e-17, + -8.440274420864562e-17 + ], + [ + 1.4886254707158155, + -0.04091587258710682, + 0.22685343312555423 + ], + [ + 1.4189985656950335, + -0.07524286420253597, + 0.38858831417850564 + ], + [ + 1.3837647850455916, + -0.09273749220609542, + 0.47573253908362856 + ], + [ + 1.3977675588554117, + -0.09067966496226115, + 0.5090676042441162 + ], + [ + 1.4533794634041457, + -0.07505409290615078, + 0.49459585627920327 + ], + [ + 1.536740213902783, + -0.05273828507371176, + 0.42721410166317136 + ], + [ + 1.6198439767640256, + -0.03096473383297206, + 0.31175193273310475 + ], + [ + 1.6783017905730329, + -0.013989714114913059, + 0.16363153048134005 + ], + [ + 1.6842771767262508, + 0.19420223216373922, + -0.00805538278823217 + ], + [ + 1.671924965574736, + 0.2076610223512241, + -0.16941305002307472 + ], + [ + 1.622786413732534, + 0.22060247121014387, + -0.3141383123305821 + ], + [ + 1.5487656753886856, + 0.23557706924893623, + -0.4242335131971579 + ], + [ + 1.474996613063414, + 0.24938191899251314, + -0.4841454645628118 + ], + [ + 1.4274151277488007, + 0.2561773718927529, + -0.4902808079676004 + ], + [ + 1.4175313622796955, + 0.2503661505832095, + -0.447090067568556 + ], + [ + 1.449857836975616, + 0.2282167234555655, + -0.345483757800273 + ], + [ + 1.500838435066431, + 0.19296871595087803, + -0.16912608978740168 + ], + [ + 1.505874639865043, + 0.15101839113095505, + 0.05948755698190134 + ], + [ + 1.4394474069945578, + 0.10744943996862752, + 0.27128987952330946 + ], + [ + 1.3602367682525132, + 0.07311265753499407, + 0.4125781271114454 + ], + [ + 1.3271493536173364, + 0.06069767069723319, + 0.4847012263929789 + ], + [ + 1.3473159890686832, + 0.07090049866859172, + 0.5090192053916736 + ], + [ + 1.4111661312558468, + 0.09551551475645212, + 0.488400921039947 + ], + [ + 1.5023350317482467, + 0.1260873068507021, + 0.4170358064007826 + ], + [ + 1.5917782209045892, + 0.15461353598921948, + 0.30049623033252004 + ], + [ + 1.65624507901833, + 0.17704660917829412, + 0.15362337335347498 + ], + [ + 1.6399616823925627, + 0.38269921380490257, + -0.015204115486406319 + ], + [ + 1.6361504845601031, + 0.3987930288405269, + -0.16979524048333894 + ], + [ + 1.597842515195174, + 0.4101130445093746, + -0.30734124314056954 + ], + [ + 1.5355880526183499, + 0.4187567268507547, + -0.40904380907101506 + ], + [ + 1.472975597023943, + 0.42381050534673903, + -0.4587087670579554 + ], + [ + 1.432400299562508, + 0.4214956838073687, + -0.4548576467686101 + ], + [ + 1.423487850385858, + 0.4075324801111893, + -0.4013185050503167 + ], + [ + 1.446279065751001, + 0.37936988878803896, + -0.28748924737313286 + ], + [ + 1.4717611128342074, + 0.3394105235844565, + -0.10618198207294727 + ], + [ + 1.4456510374225042, + 0.2927423722173017, + 0.10953449397471537 + ], + [ + 1.361654419425518, + 0.2461900988318117, + 0.2966302701293713 + ], + [ + 1.2812221638116992, + 0.21313104716656533, + 0.41566282809182004 + ], + [ + 1.2536344177337364, + 0.20625951398786996, + 0.47387537082664855 + ], + [ + 1.2811063314449231, + 0.22472501153147625, + 0.49073051399483864 + ], + [ + 1.3521897628376929, + 0.2584444733648798, + 0.466198725957252 + ], + [ + 1.4484458009139167, + 0.2972974038560018, + 0.3940934029921986 + ], + [ + 1.5408080484900935, + 0.3327083867548842, + 0.28096015710891065 + ], + [ + 1.6074721702337826, + 0.36085707723807386, + 0.14007461585651174 + ], + [ + 1.5699643559751764, + 0.5609430281953636, + -0.020618163299233643 + ], + [ + 1.5721346099557163, + 0.5808467885371803, + -0.16456780027607082 + ], + [ + 1.544094548302725, + 0.592705750695277, + -0.2923928995202963 + ], + [ + 1.495252465185582, + 0.5971539998351139, + -0.38334262429199184 + ], + [ + 1.4440768280453176, + 0.5940010852464607, + -0.42026703497399726 + ], + [ + 1.4082274107834245, + 0.5813420468955738, + -0.4052911216880625 + ], + [ + 1.3961625368276427, + 0.5567914963590175, + -0.3422395885110962 + ], + [ + 1.4037571832063631, + 0.5189502374883757, + -0.22183288593883235 + ], + [ + 1.40245264718177, + 0.47104987423223105, + -0.04814961631826949 + ], + [ + 1.3537855202243727, + 0.4196837038286111, + 0.142204757494782 + ], + [ + 1.2642249119127345, + 0.37295650314935025, + 0.3003549389822283 + ], + [ + 1.1895724568979507, + 0.34385165892134023, + 0.3991915673689831 + ], + [ + 1.1699126869610603, + 0.3435402917409981, + 0.44649531574634216 + ], + [ + 1.2046750506818855, + 0.36982465653139107, + 0.4581159594547934 + ], + [ + 1.2807027132800786, + 0.41184968163350194, + 0.43137170508821054 + ], + [ + 1.378614255661614, + 0.45874171343912523, + 0.3609678405075445 + ], + [ + 1.4702726425447952, + 0.5008920184271536, + 0.25494680742806347 + ], + [ + 1.5358449184343879, + 0.5343349242026412, + 0.12405577199080665 + ], + [ + 1.4794325839623053, + 0.7274982934209159, + -0.024153609461318042 + ], + [ + 1.484883585708127, + 0.7498608622595518, + -0.15508649980161002 + ], + [ + 1.4652570262715043, + 0.7633560888768618, + -0.27082260515045375 + ], + [ + 1.4281152726374335, + 0.7655858009517748, + -0.34769804976003515 + ], + [ + 1.3850829810570593, + 0.7534297380450977, + -0.36982078909862914 + ], + [ + 1.3502082821058377, + 0.7270636098506308, + -0.3449868818070452 + ], + [ + 1.3317468705891822, + 0.6885142415927364, + -0.27708406254335316 + ], + [ + 1.3227108533192578, + 0.6393422717696365, + -0.15942867115172002 + ], + [ + 1.299451323734253, + 0.5848614036451263, + -0.004984167532043738 + ], + [ + 1.2393329777340347, + 0.5325921068429116, + 0.15368038774639495 + ], + [ + 1.1546003231270516, + 0.48995498224104117, + 0.2842042211689031 + ], + [ + 1.0912464084998517, + 0.46809961955805207, + 0.36738236756757 + ], + [ + 1.080936777958417, + 0.4752850002105827, + 0.40788985073549267 + ], + [ + 1.1214156357282852, + 0.5079940726370153, + 0.41655528406952497 + ], + [ + 1.199365937293889, + 0.5568978663514406, + 0.3887263665893895 + ], + [ + 1.2958232053720409, + 0.6113394659164944, + 0.3219900440843357 + ], + [ + 1.3838570963067647, + 0.6598131634225921, + 0.22568601810630173 + ], + [ + 1.445994699195559, + 0.6977329680203284, + 0.1072332418668742 + ], + [ + 1.3721423263752794, + 0.8835201997625446, + -0.026387589406197693 + ], + [ + 1.3791552068721025, + 0.9067692522852124, + -0.14254732742407528 + ], + [ + 1.365191545106248, + 0.9210841825128651, + -0.24251149597254465 + ], + [ + 1.3345134435698456, + 0.918843396876026, + -0.30194781382667457 + ], + [ + 1.294057122620963, + 0.8932120951467203, + -0.3110021391049064 + ], + [ + 1.2574480491635762, + 0.8495905302855888, + -0.2822498522033485 + ], + [ + 1.232379123868194, + 0.7968666779779058, + -0.21713029517863972 + ], + [ + 1.2099790085735664, + 0.7392617124937482, + -0.1114690304428199 + ], + [ + 1.173423834483068, + 0.6831869678841761, + 0.017281755959969985 + ], + [ + 1.1120661130428002, + 0.6356586166509599, + 0.14525132028400145 + ], + [ + 1.0389204638808447, + 0.6015934851911869, + 0.2535689935563189 + ], + [ + 0.9897053685656262, + 0.589137309486623, + 0.3264237267657211 + ], + [ + 0.9884031370583111, + 0.6035741962286474, + 0.3637839886933541 + ], + [ + 1.0322620609213153, + 0.6413013611678472, + 0.3709622178179719 + ], + [ + 1.1096894575370153, + 0.6958390923346369, + 0.3430850847511419 + ], + [ + 1.202215605872664, + 0.7568904474467577, + 0.2817734280333021 + ], + [ + 1.2840782415559184, + 0.8109091804405626, + 0.1962006375613719 + ], + [ + 1.3409403959043429, + 0.8523334507864808, + 0.09069227185579018 + ], + [ + 1.2502538051141072, + 1.0292520747232061, + -0.027426551465671446 + ], + [ + 1.2569410375447752, + 1.0522295163559903, + -0.12699357191592972 + ], + [ + 1.2446279112014822, + 1.063295099440737, + -0.20809827367656122 + ], + [ + 1.2146225466677578, + 1.0496133911348986, + -0.2513667799753908 + ], + [ + 1.1735031797461362, + 1.0055439355435303, + -0.2548077581231548 + ], + [ + 1.1356590545210143, + 0.9450001607881703, + -0.22988397503743763 + ], + [ + 1.1061879324583836, + 0.8818951280827405, + -0.1735959322165667 + ], + [ + 1.075841076414378, + 0.8209230374302177, + -0.0853442601971027 + ], + [ + 1.0350138293617275, + 0.7692630004817629, + 0.017401861962420145 + ], + [ + 0.9798508432581188, + 0.7322324648944951, + 0.12116088287142573 + ], + [ + 0.9209149913846134, + 0.7101146384524862, + 0.21466221190755844 + ], + [ + 0.8853213118276082, + 0.7077133317831454, + 0.2815774984847348 + ], + [ + 0.8914293257287038, + 0.7290388891454825, + 0.3176863095560092 + ], + [ + 0.9372025496997841, + 0.7714677062180794, + 0.3245103872815258 + ], + [ + 1.0128045868779543, + 0.8307688581063744, + 0.29858288517471937 + ], + [ + 1.0994960083322318, + 0.8967100552832777, + 0.24436826475547993 + ], + [ + 1.1730830331286666, + 0.9543439778007552, + 0.1691693493849985 + ], + [ + 1.2228841667361063, + 0.9976259378888003, + 0.07554565623644653 + ], + [ + 1.116072082424208, + 1.1642691268189407, + -0.025127177848344916 + ], + [ + 1.1187826086307553, + 1.1839964217805365, + -0.1078286740418487 + ], + [ + 1.1035916965542183, + 1.184808093788954, + -0.1727374290128721 + ], + [ + 1.0717675605416115, + 1.1531745965142188, + -0.20806703941937713 + ], + [ + 1.0310662531227304, + 1.0900674819158211, + -0.21480855126033319 + ], + [ + 0.9942894362407418, + 1.0163490888535232, + -0.1983863332529159 + ], + [ + 0.963124330495871, + 0.947411614872989, + -0.15348383362573947 + ], + [ + 0.9299886423195904, + 0.8882619434867337, + -0.08352856932566946 + ], + [ + 0.8913414143390127, + 0.8466104470967689, + -0.0020869614159247907 + ], + [ + 0.8459883433030582, + 0.8240321355495562, + 0.08612593098106991 + ], + [ + 0.8009136255381645, + 0.8153023765993489, + 0.171144348887141 + ], + [ + 0.7771261894605168, + 0.8232025992568918, + 0.23438364960951716 + ], + [ + 0.7895304655357877, + 0.851900500390729, + 0.27031059348665876 + ], + [ + 0.8365904779495296, + 0.8994511548375417, + 0.27902891355529835 + ], + [ + 0.9092902900990908, + 0.9628632170765486, + 0.258038908078571 + ], + [ + 0.9889604365888548, + 1.0318698348207576, + 0.2125421036438426 + ], + [ + 1.0533632636773904, + 1.0905460433714935, + 0.1472660993948077 + ], + [ + 1.0947997267518135, + 1.1334411268318318, + 0.0642460149340475 + ], + [ + 0.9690692275090117, + 1.2883098110460938, + -0.01589768461627913 + ], + [ + 0.9635974239330641, + 1.298130911325082, + -0.08641683803602142 + ], + [ + 0.9439004044557848, + 1.2823399150609485, + -0.14488581231448902 + ], + [ + 0.9122846481998083, + 1.2317698604238203, + -0.18241619633893338 + ], + [ + 0.8750794507427492, + 1.1531463091183791, + -0.1976669324685828 + ], + [ + 0.8414811263289568, + 1.070116111691489, + -0.19117621024537362 + ], + [ + 0.8113275008687721, + 0.9990996915496143, + -0.15809795988067019 + ], + [ + 0.7795965275028378, + 0.9462491792946078, + -0.10361809457388163 + ], + [ + 0.7462326930975091, + 0.9181684443338275, + -0.03587747646769791 + ], + [ + 0.7107907165591424, + 0.9114147989447262, + 0.04450827777099648 + ], + [ + 0.6781579597392473, + 0.9163065205674589, + 0.12474050479903079 + ], + [ + 0.6653032293923691, + 0.9350422499805207, + 0.18570625958164852 + ], + [ + 0.6837353429993029, + 0.9720252120135701, + 0.2236766541732504 + ], + [ + 0.7313500177236079, + 1.0250589960396017, + 0.23757291859102023 + ], + [ + 0.7998355996341081, + 1.0920459952023478, + 0.22431058379273056 + ], + [ + 0.8715260052318407, + 1.1630544936702658, + 0.18872577641870603 + ], + [ + 0.9261623128822626, + 1.2213543658116013, + 0.13332699638184065 + ], + [ + 0.9575707970571226, + 1.2619596633337298, + 0.060742980230972396 + ], + [ + 0.8064582306701289, + 1.3968266297027643, + -6.347482646552981e-18 + ], + [ + 0.7927705901343222, + 1.3901405061077976, + -0.06854589100985617 + ], + [ + 0.7714532388170077, + 1.356576296100542, + -0.13135247644417145 + ], + [ + 0.7434590004197976, + 1.2909258435144937, + -0.17700625573859197 + ], + [ + 0.711857684654589, + 1.2011640655728744, + -0.20229885568169753 + ], + [ + 0.6828587067713848, + 1.1119740546753138, + -0.2060070107078271 + ], + [ + 0.6561254052770223, + 1.0417797439646395, + -0.18372227486257087 + ], + [ + 0.6285190211236054, + 0.9977878984737979, + -0.13990622683685433 + ], + [ + 0.6009548171457674, + 0.9845354129467108, + -0.07829333273006281 + ], + [ + 0.5737796604758981, + 0.9938155242938753, + -1.3256713914280262e-17 + ], + [ + 0.5521552699643707, + 1.0127098446482217, + 0.07829333273006282 + ], + [ + 0.5498501571051948, + 1.0432073882916693, + 0.13990622683685427 + ], + [ + 0.5741450207829148, + 1.0891111410205812, + 0.18372227486257092 + ], + [ + 0.6215684263123159, + 1.1473600145970648, + 0.20600701070782715 + ], + [ + 0.6843097525718123, + 1.217068871576483, + 0.20229885568169756 + ], + [ + 0.7462450746755077, + 1.2893173027929772, + 0.17700625573859205 + ], + [ + 0.7891029151863665, + 1.3463862506975826, + 0.1313524764441715 + ], + [ + 0.8075116980519486, + 1.3816297234834025, + 0.0685458910098563 + ], + [ + 0.6311744105561415, + 1.4833934745716126, + 0.015897684616279082 + ], + [ + 0.6141037284697066, + 1.4602604678404463, + -0.060742980230972236 + ], + [ + 0.594642751374748, + 1.4127572738895917, + -0.1333269963818406 + ], + [ + 0.5714717348881777, + 1.3362909074246765, + -0.18872577641870578 + ], + [ + 0.5458217741292387, + 1.2387009457354712, + -0.22431058379273047 + ], + [ + 0.5220521220862637, + 1.1458971924266448, + -0.23757291859102006 + ], + [ + 0.4999308552230556, + 1.0781447825094481, + -0.22367665417325028 + ], + [ + 0.4771187273987064, + 1.043690622863878, + -0.1857062595816485 + ], + [ + 0.45446574459512434, + 1.0454552811965423, + -0.12474050479903066 + ], + [ + 0.43391301099164864, + 1.0712702167867247, + -0.04450827777099635 + ], + [ + 0.42204085119757856, + 1.1053406915238326, + 0.035877476467698004 + ], + [ + 0.4296775638278876, + 1.1482749871668947, + 0.10361809457388159 + ], + [ + 0.4595819633607767, + 1.2021800723161045, + 0.15809795988067027 + ], + [ + 0.5060071745593769, + 1.2638020880517626, + 0.19117621024537368 + ], + [ + 0.5611142726054049, + 1.3344141892321435, + 0.1976669324685828 + ], + [ + 0.6106016666431365, + 1.4059466110354932, + 0.1824161963389334 + ], + [ + 0.6385887405016684, + 1.45861168643159, + 0.14488581231448897 + ], + [ + 0.6424156346788337, + 1.4835653038098175, + 0.08641683803602153 + ], + [ + 0.4502505994550251, + 1.5486813392434344, + 0.025127177848344923 + ], + [ + 0.43418894615451986, + 1.5148449388392484, + -0.06424601493404733 + ], + [ + 0.4177589457176245, + 1.4575123674436528, + -0.14726609939480764 + ], + [ + 0.3991452720592015, + 1.3723997788340767, + -0.21254210364384254 + ], + [ + 0.37921886130835647, + 1.2689000991786088, + -0.2580389080785709 + ], + [ + 0.36065231057779706, + 1.1742341838872286, + -0.27902891355529835 + ], + [ + 0.3430022420671528, + 1.109703690411111, + -0.27031059348665876 + ], + [ + 0.324351268687591, + 1.0846123216474526, + -0.23438364960951727 + ], + [ + 0.3056157571317816, + 1.1012627342528223, + -0.17114434888714103 + ], + [ + 0.29063859126912883, + 1.1446634643807374, + -0.08612593098106994 + ], + [ + 0.28751544712559707, + 1.1952295318111201, + 0.002086961415924753 + ], + [ + 0.30426308711465355, + 1.2495247612231317, + 0.0835285693256693 + ], + [ + 0.3389203610725119, + 1.3077959446487981, + 0.15348383362573945 + ], + [ + 0.3830394119399481, + 1.3692544549257522, + 0.19838633325291588 + ], + [ + 0.4284930046170703, + 1.4379633091470314, + 0.21480855126033319 + ], + [ + 0.4627947153093778, + 1.5047652326382215, + 0.20806703941937713 + ], + [ + 0.474278059553541, + 1.5481424915159978, + 0.17273742901287212 + ], + [ + 0.46597967493644243, + 1.560892371276726, + 0.10782867404184887 + ], + [ + 0.2662315410510824, + 1.5973775937685786, + 0.027426551465671436 + ], + [ + 0.2525273223179246, + 1.5578617232236336, + -0.07554565623644625 + ], + [ + 0.23994461215981322, + 1.4930916963383056, + -0.1691693493849984 + ], + [ + 0.2268256835381513, + 1.4005465022169385, + -0.24436826475547963 + ], + [ + 0.21306464235413303, + 1.2924989303588992, + -0.29858288517471915 + ], + [ + 0.19950935693427502, + 1.1973750696406007, + -0.3245103872815257 + ], + [ + 0.18565153548242347, + 1.1365198863322323, + -0.31768630955600907 + ], + [ + 0.170237068007325, + 1.120567412446046, + -0.2815774984847348 + ], + [ + 0.1545198208067486, + 1.1525930964912463, + -0.21466221190755838 + ], + [ + 0.14420649444527067, + 1.2146919546283825, + -0.12116088287142572 + ], + [ + 0.14869438592778395, + 1.2809797697363496, + -0.01740186196242019 + ], + [ + 0.17301966675926314, + 1.3421672213247553, + 0.0853442601971024 + ], + [ + 0.21064961816419273, + 1.3989344149101148, + 0.17359593221656652 + ], + [ + 0.25056461856242757, + 1.4560096716471, + 0.22988397503743752 + ], + [ + 0.2840750029290115, + 1.5190555328537358, + 0.25480775812315476 + ], + [ + 0.30168058754127586, + 1.5767006769910776, + 0.2513667799753908 + ], + [ + 0.29852661223443827, + 1.6095269390800144, + 0.20809827367656117 + ], + [ + 0.2827869730037135, + 1.61465762775094, + 0.12699357191592986 + ], + [ + 0.07907977456342602, + 1.6300702121301427, + 0.0263875894061977 + ], + [ + 0.0676722229241748, + 1.5874551732071638, + -0.09069227185578989 + ], + [ + 0.060228829645587525, + 1.5174989678545574, + -0.19620063756137182 + ], + [ + 0.05437855243433083, + 1.4195944792352067, + -0.28177342803330185 + ], + [ + 0.047769602139593796, + 1.308938806706147, + -0.34308508475114174 + ], + [ + 0.03925223979223758, + 1.2146158487046625, + -0.37096221781797184 + ], + [ + 0.028509018473627093, + 1.1577693239870535, + -0.3637839886933541 + ], + [ + 0.015355192049817598, + 1.1516786461829844, + -0.3264237267657212 + ], + [ + 0.0015350089863632316, + 1.2005282568279185, + -0.25356899355631884 + ], + [ + -0.005536546367194764, + 1.2809068129083623, + -0.14525132028400153 + ], + [ + 0.004945352480626039, + 1.3578083340105707, + -0.017281755959970075 + ], + [ + 0.03522991877799069, + 1.4175034157174915, + 0.11146903044281964 + ], + [ + 0.07391722462408316, + 1.4657049673524176, + 0.21713029517863955 + ], + [ + 0.10704295746022457, + 1.5137772196576351, + 0.2822498522033484 + ], + [ + 0.12651580405410157, + 1.5672923897113085, + 0.31100213910490637 + ], + [ + 0.12848500200930313, + 1.6151442422613507, + 0.3019478138266746 + ], + [ + 0.1150865285270397, + 1.6428326503501722, + 0.24251149597254468 + ], + [ + 0.09570760441356366, + 1.6477680710554294, + 0.14254732742407542 + ], + [ + -0.10968428866881372, + 1.6449753476082687, + 0.024153609461318053 + ], + [ + -0.1187428742342597, + 1.601134627251156, + -0.10723324186687386 + ], + [ + -0.120513586878044, + 1.528361982320323, + -0.22568601810630157 + ], + [ + -0.11847609486632527, + 1.4278855476238146, + -0.32199004408433535 + ], + [ + -0.11739526907324561, + 1.3171303033059623, + -0.3887263665893893 + ], + [ + -0.12077204598856976, + 1.225171465060279, + -0.41655528406952486 + ], + [ + -0.1288595047591513, + 1.1737612097021792, + -0.40788985073549267 + ], + [ + -0.1402370422108215, + 1.1790969213284286, + -0.36738236756757003 + ], + [ + -0.15298670023203043, + 1.2448907021662685, + -0.284204221168903 + ], + [ + -0.15842819448597972, + 1.3395898958869439, + -0.15368038774639506 + ], + [ + -0.14322082861742236, + 1.4177885591577426, + 0.004984167532043562 + ], + [ + -0.10766877759386904, + 1.465172336720688, + 0.15942867115171966 + ], + [ + -0.06960261120790485, + 1.497583742137027, + 0.2770840625433529 + ], + [ + -0.04544858475505468, + 1.532846477629117, + 0.34498688180704506 + ], + [ + -0.04005219741481994, + 1.5762319169674428, + 0.3698207890986291 + ], + [ + -0.051040883917822986, + 1.619577006112445, + 0.34769804976003527 + ], + [ + -0.0715427480348579, + 1.650627852263196, + 0.2708226051504538 + ], + [ + -0.09304323683358758, + 1.6608773380155413, + 0.1550864998016102 + ], + [ + -0.29919126549463254, + 1.6401005294082598, + 0.020618163299233647 + ], + [ + -0.3051748407284741, + 1.59724817773874, + -0.1240557719908063 + ], + [ + -0.3013511087616193, + 1.5237394681466467, + -0.2549468074280633 + ], + [ + -0.2920251502169233, + 1.4232858241418955, + -0.3609678405075442 + ], + [ + -0.283679069804893, + 1.315045925212957, + -0.43137170508821043 + ], + [ + -0.2820599778389033, + 1.2281915254615143, + -0.4581159594547934 + ], + [ + -0.2874417236093082, + 1.1849442529884884, + -0.44649531574634227 + ], + [ + -0.29700195668967244, + 1.2021257967765646, + -0.39919156736898315 + ], + [ + -0.3091226497224189, + 1.2813291413882477, + -0.30035493898222837 + ], + [ + -0.31343601104226454, + 1.382254503704144, + -0.14220475749478212 + ], + [ + -0.2932851660563079, + 1.4500845571802623, + 0.04814961631826935 + ], + [ + -0.25245450263828073, + 1.4751645001457845, + 0.221832885938832 + ], + [ + -0.21588568795576143, + 1.4875079728843743, + 0.3422395885110959 + ], + [ + -0.20065672449210076, + 1.5102317354918164, + 0.4052911216880625 + ], + [ + -0.2076183843236979, + 1.5476077607269283, + 0.42026703497399737 + ], + [ + -0.23047569876409374, + 1.593503619839578, + 0.383342624291992 + ], + [ + -0.25874903708012625, + 1.633577980022856, + 0.29239289952029646 + ], + [ + -0.2830392303980519, + 1.6519319046589798, + 0.16456780027607112 + ], + [ + -0.4885536000329029, + 1.6115980850874778, + 0.015204115486406346 + ], + [ + -0.49122468909331557, + 1.5725402739179968, + -0.14007461585651135 + ], + [ + -0.4822701092631786, + 1.5007331057253888, + -0.2809601571089105 + ], + [ + -0.4667557962384986, + 1.4030395615243503, + -0.39409340299219825 + ], + [ + -0.45227540201716926, + 1.300252922037137, + -0.4661987259572517 + ], + [ + -0.44593559687045176, + 1.2218331337461286, + -0.4907305139948385 + ], + [ + -0.44819122998114047, + 1.1888090098098636, + -0.47387537082664855 + ], + [ + -0.45603418072442414, + 1.2161364653358815, + -0.4156628280918201 + ], + [ + -0.467620329964208, + 1.3023223678137557, + -0.29663027012937154 + ], + [ + -0.4693031876069486, + 1.3983417095238677, + -0.10953449397471567 + ], + [ + -0.44194242068118667, + 1.4442877738087074, + 0.10618198207294689 + ], + [ + -0.3945955717541813, + 1.4421993562960111, + 0.28748924737313225 + ], + [ + -0.3588104445493622, + 1.4365428804682496, + 0.40131850505031624 + ], + [ + -0.35117418001857903, + 1.4512428897132563, + 0.4548576467686099 + ], + [ + -0.36945713449097456, + 1.487539538850655, + 0.4587087670579553 + ], + [ + -0.4051400628507998, + 1.539236626740744, + 0.4090438090710152 + ], + [ + -0.44375294262908993, + 1.588828731660531, + 0.3073412431405697 + ], + [ + -0.47271034845201443, + 1.616344398463532, + 0.1697952404833393 + ], + [ + -0.6739545218376831, + 1.5557279381411357, + 0.008055382788232205 + ], + [ + -0.6747956783068665, + 1.5228736179119864, + -0.1536233733534746 + ], + [ + -0.6619898605166903, + 1.4558271444887825, + -0.3004962303325198 + ], + [ + -0.6419727050466507, + 1.364103955914634, + -0.41703580640078236 + ], + [ + -0.6228642033932876, + 1.269863476005995, + -0.4884009210399468 + ], + [ + -0.6122563615463554, + 1.202260122792732, + -0.5090192053916734 + ], + [ + -0.6110089520343214, + 1.1796938901973275, + -0.484701226392979 + ], + [ + -0.6168009653627591, + 1.2145559252358191, + -0.4125781271114458 + ], + [ + -0.6266697588620359, + 1.3003227418532393, + -0.2712898795233098 + ], + [ + -0.6221515567744593, + 1.3796348886033478, + -0.05948755698190175 + ], + [ + -0.5833034073840911, + 1.39624856971905, + 0.1691260897874012 + ], + [ + -0.52728743840684, + 1.369722080424624, + 0.3454837578002725 + ], + [ + -0.4919422344870674, + 1.3528012456869833, + 0.44709006756855557 + ], + [ + -0.4918514519405423, + 1.3642664483230484, + 0.4902808079676003 + ], + [ + -0.5215272294396772, + 1.4020754969051799, + 0.48414546456281177 + ], + [ + -0.5703671111756774, + 1.459058954020434, + 0.4242335131971582 + ], + [ + -0.6203458626606565, + 1.515675494813691, + 0.31413831233058226 + ], + [ + -0.6561227620553589, + 1.5517600045847566, + 0.16941305002307502 + ] + ] + } + }, + "Volume5": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier5" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface4": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface4", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart4" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier5" + }, + "label": { + "$type": "ref", + "value": "Volume5" + }, + "targetlabel": -1.5036269634831068, + "constraint_weight": 100.0 + }, + "BiotSavart5": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.714801670269955, + 0.0, + 0.0 + ], + [ + 1.6893370779112724, + 0.014405407923664786, + -0.18174461149419285 + ], + [ + 1.6185722851592195, + 0.03329744637431512, + -0.34583691340241474 + ], + [ + 1.5171612928156566, + 0.05917878611400069, + -0.47164518925541604 + ], + [ + 1.4165315467678248, + 0.08656178984432601, + -0.5422754114502101 + ], + [ + 1.3531858497411244, + 0.10585932843418308, + -0.5540383688093061 + ], + [ + 1.3401080183382674, + 0.10837631529259806, + -0.5156867842205872 + ], + [ + 1.3838419345115103, + 0.08761621201435599, + -0.42349772328430796 + ], + [ + 1.4702308379777225, + 0.04748382535875896, + -0.25005204410825305 + ], + [ + 1.5186347367968922, + 1.6921181910508083e-17, + -9.356670886023081e-17 + ], + [ + 1.4702308379777225, + -0.04748382535875894, + 0.25005204410825294 + ], + [ + 1.3838419345115105, + -0.08761621201435592, + 0.4234977232843076 + ], + [ + 1.3401080183382674, + -0.10837631529259803, + 0.5156867842205871 + ], + [ + 1.3531858497411244, + -0.10585932843418308, + 0.5540383688093061 + ], + [ + 1.4165315467678248, + -0.08656178984432605, + 0.5422754114502101 + ], + [ + 1.5171612928156561, + -0.059178786114000764, + 0.4716451892554164 + ], + [ + 1.6185722851592192, + -0.03329744637431518, + 0.345836913402415 + ], + [ + 1.6893370779112726, + -0.014405407923664813, + 0.18174461149419321 + ], + [ + 1.699819629327124, + 0.19697798033189004, + -0.012071061047924254 + ], + [ + 1.6834456751570246, + 0.21066442191453943, + -0.19161838642606782 + ], + [ + 1.6221989018735579, + 0.22467577858779567, + -0.3518674991835682 + ], + [ + 1.5302240371806046, + 0.2425132291264229, + -0.47152959221517693 + ], + [ + 1.4409884527053394, + 0.2600858174947844, + -0.5340329360517672 + ], + [ + 1.3876112524943807, + 0.26927822635180776, + -0.5368097029808341 + ], + [ + 1.3795173701761785, + 0.2627191451654557, + -0.48802079591105413 + ], + [ + 1.421087448981454, + 0.23683715874752492, + -0.37978792897452823 + ], + [ + 1.4872862627652375, + 0.19628106345587906, + -0.1887402376728303 + ], + [ + 1.4968407655247042, + 0.1480178085575325, + 0.06408922551405033 + ], + [ + 1.4159951556027357, + 0.09727244431881785, + 0.2963354703953691 + ], + [ + 1.3199935803412572, + 0.05673948371694309, + 0.44614202501322664 + ], + [ + 1.2796737796989752, + 0.041673243861520284, + 0.5219776792984734 + ], + [ + 1.3000899326930073, + 0.05364430035146519, + 0.5508362336256027 + ], + [ + 1.3734979974751484, + 0.08346619848018176, + 0.532608298134052 + ], + [ + 1.4832262543895225, + 0.12042353985197472, + 0.4576426981351882 + ], + [ + 1.5910888943398898, + 0.15395509133234303, + 0.33038370191974775 + ], + [ + 1.6675474972022326, + 0.17898859441045747, + 0.16760804818903802 + ], + [ + 1.6558503112344465, + 0.38849182725831016, + -0.022953593860309898 + ], + [ + 1.6486766961897987, + 0.4051524443996302, + -0.19556332561201237 + ], + [ + 1.599002342840036, + 0.4165449285905521, + -0.3480140110886402 + ], + [ + 1.5201076710686898, + 0.4261960209208386, + -0.4584654098875226 + ], + [ + 1.4444854210368592, + 0.43358176611431165, + -0.5096207911237077 + ], + [ + 1.3997181398685778, + 0.43248076679509667, + -0.5013432449007444 + ], + [ + 1.3929242272851434, + 0.41677067050538985, + -0.4413969415087166 + ], + [ + 1.4246395134059981, + 0.38475000667318376, + -0.31908251886562516 + ], + [ + 1.4620558299864044, + 0.33976702727218255, + -0.12102230784652719 + ], + [ + 1.4348938977804995, + 0.2865799014999202, + 0.11779775691749482 + ], + [ + 1.333807263801115, + 0.23233244738472728, + 0.3215982591087934 + ], + [ + 1.2374380559250442, + 0.19282400393614538, + 0.4464692604718479 + ], + [ + 1.2039074619216708, + 0.18379451340744526, + 0.5075303633995679 + ], + [ + 1.2330628592370136, + 0.20538115368381957, + 0.5286237002322531 + ], + [ + 1.3154197816559545, + 0.2459564019294256, + 0.5061960083784938 + ], + [ + 1.4310799970723356, + 0.2926204935918953, + 0.4301380806036792 + ], + [ + 1.5416129039310522, + 0.33399705491284615, + 0.30634835826318135 + ], + [ + 1.6194487131447248, + 0.365251845874661, + 0.1500910447627646 + ], + [ + 1.5864014722687818, + 0.5699410330030683, + -0.03137161135377446 + ], + [ + 1.5856217772751757, + 0.5910489901093566, + -0.1930071358567463 + ], + [ + 1.5477578503414937, + 0.6023471789123003, + -0.33553309748637056 + ], + [ + 1.4852995977722752, + 0.6063476949790604, + -0.4343716926059199 + ], + [ + 1.4238510317962603, + 0.6041336828171938, + -0.4707659752595974 + ], + [ + 1.3843719712154867, + 0.5911623564888399, + -0.4497941964718542 + ], + [ + 1.373966878314491, + 0.5635904378160465, + -0.37938667168939216 + ], + [ + 1.3888179525266724, + 0.5214156714690824, + -0.24879077775280986 + ], + [ + 1.394925292326409, + 0.46824354784475075, + -0.05797471846788831 + ], + [ + 1.3408327752818825, + 0.41010120728127464, + 0.15245118492363838 + ], + [ + 1.2335036512683266, + 0.3558271914066857, + 0.32369141308873817 + ], + [ + 1.1441331536271837, + 0.3207774036678193, + 0.42686941584990545 + ], + [ + 1.1197164547522693, + 0.3190054192431019, + 0.4768544029630257 + ], + [ + 1.1578393768743067, + 0.3492815640368499, + 0.49260387082509927 + ], + [ + 1.2466549404687701, + 0.39922824441147287, + 0.4673629734068632 + ], + [ + 1.3642462215586382, + 0.45521769286159736, + 0.3923551858739166 + ], + [ + 1.4733006356407217, + 0.5042925656042992, + 0.27597868034123757 + ], + [ + 1.5489153810459033, + 0.541256720165039, + 0.13053954075761276 + ], + [ + 1.4967239377588264, + 0.7397875275714243, + -0.03695524219745473 + ], + [ + 1.4994297671270929, + 0.7639912643021876, + -0.18525757082192337 + ], + [ + 1.4723572143789485, + 0.7777429172361862, + -0.3155639398135355 + ], + [ + 1.4255007339998955, + 0.7795074934376122, + -0.3984347158345941 + ], + [ + 1.3739917748060493, + 0.7662639045223342, + -0.4168216365619031 + ], + [ + 1.334691321093252, + 0.7364737688520712, + -0.3846468094483353 + ], + [ + 1.3168276817064897, + 0.6927121231619465, + -0.3092394662933119 + ], + [ + 1.3125893131276383, + 0.6383369613003127, + -0.1808065971061213 + ], + [ + 1.2923019024936995, + 0.5783377912005182, + -0.010768615103111692 + ], + [ + 1.2243805953546065, + 0.519629993978714, + 0.16394428503477906 + ], + [ + 1.1230704760672972, + 0.4706964535618457, + 0.30497555841430524 + ], + [ + 1.0467990294573564, + 0.4445181440084895, + 0.39253021587001546 + ], + [ + 1.0329319969441855, + 0.45103241375753444, + 0.43639445505677366 + ], + [ + 1.0779862880174673, + 0.4876369662796255, + 0.4490074855203574 + ], + [ + 1.1695014209991041, + 0.5447613246361792, + 0.4214225593347295 + ], + [ + 1.2853369678172613, + 0.6093373606050346, + 0.34918670830873116 + ], + [ + 1.389600245702054, + 0.6656169911518023, + 0.24301640823242507 + ], + [ + 1.4605926348620877, + 0.7075194940357258, + 0.11093707954600776 + ], + [ + 1.3905059852520563, + 0.8992958485502118, + -0.040263480150448 + ], + [ + 1.3952744570905877, + 0.9252801384052035, + -0.17301868922806818 + ], + [ + 1.3763648351794018, + 0.9419860194942756, + -0.2859063706254985 + ], + [ + 1.3385992510543507, + 0.9393611228417257, + -0.3478455951387474 + ], + [ + 1.2897399837153758, + 0.9086051780806081, + -0.35061054327012287 + ], + [ + 1.2476120428083406, + 0.8569427204753228, + -0.3150925235875902 + ], + [ + 1.2223153920233762, + 0.7969562847090448, + -0.24352349649198882 + ], + [ + 1.20238347354218, + 0.7337815148489609, + -0.1277527735747826 + ], + [ + 1.165594553892596, + 0.6725604222415527, + 0.01375716420961701 + ], + [ + 1.0959318638206457, + 0.6199688174210196, + 0.15395253209874488 + ], + [ + 1.0086268384498727, + 0.5817280250157821, + 0.2716065272492961 + ], + [ + 0.9488109916355841, + 0.5667581785826935, + 0.35023050321811666 + ], + [ + 0.9448048613937945, + 0.5809360158673436, + 0.3920765656667869 + ], + [ + 0.9935475187200341, + 0.6220373303096907, + 0.40234866761439386 + ], + [ + 1.084768172944149, + 0.6848681112271581, + 0.37288986447701267 + ], + [ + 1.1960052086538762, + 0.7568479634361143, + 0.3054322379553357 + ], + [ + 1.2925758864878547, + 0.8194916713865041, + 0.21065007741712763 + ], + [ + 1.3571317020128792, + 0.8654497902517513, + 0.09242194912437961 + ], + [ + 1.269776834798967, + 1.0490064025500407, + -0.04139852385840673 + ], + [ + 1.2750860235226655, + 1.0760638391492992, + -0.1552960617831032 + ], + [ + 1.259201009998361, + 1.090733889063613, + -0.24549810315287765 + ], + [ + 1.2224205905539598, + 1.0743708498062672, + -0.2882042069194156 + ], + [ + 1.1723669179909877, + 1.019779511462274, + -0.2859823225848506 + ], + [ + 1.1290411653014474, + 0.9474513858857837, + -0.25676034708135775 + ], + [ + 1.0990449353443639, + 0.8763652756513436, + -0.195230650780756 + ], + [ + 1.0692672132502, + 0.8101089518884366, + -0.09827391541253044 + ], + [ + 1.0264690160034489, + 0.75449402875036, + 0.014065649638523713 + ], + [ + 0.963747369502951, + 0.7147772019408276, + 0.12753732382564775 + ], + [ + 0.8932001813488819, + 0.6906780625780301, + 0.23058918170130704 + ], + [ + 0.8488446040390073, + 0.6869021976783003, + 0.3049047586698863 + ], + [ + 0.8526338522093186, + 0.7081851485857893, + 0.3459680706124289 + ], + [ + 0.9035638686286803, + 0.7538403820251436, + 0.35448728690661013 + ], + [ + 0.9932515303896039, + 0.8216497861188506, + 0.3256254599540348 + ], + [ + 1.0976906170681835, + 0.8991028924754596, + 0.26536337251770314 + ], + [ + 1.1841727294026339, + 0.9659553430593243, + 0.1816924510746898 + ], + [ + 1.2404555556194674, + 1.0142297469701043, + 0.07607300188065326 + ], + [ + 1.1366444407565992, + 1.1887219688788104, + -0.037636725808364156 + ], + [ + 1.138127455993168, + 1.2135160972204018, + -0.13066703752243175 + ], + [ + 1.1190675868307571, + 1.216250923492058, + -0.20097339636313863 + ], + [ + 1.0800432633321153, + 1.1775364726575939, + -0.23586604327882982 + ], + [ + 1.0309927443004918, + 1.099634038063845, + -0.2401261902751735 + ], + [ + 0.989792010999818, + 1.0123258738393397, + -0.2217090899010718 + ], + [ + 0.9578626930577683, + 0.9353596652133943, + -0.17239511329377655 + ], + [ + 0.9238757473419772, + 0.8715962145058904, + -0.09557041786596952 + ], + [ + 0.882652453023452, + 0.8279863229568319, + -0.007042567386711928 + ], + [ + 0.8309643898166253, + 0.8054771576170189, + 0.09010578333226998 + ], + [ + 0.7762291726222363, + 0.796504510514006, + 0.1854585446551246 + ], + [ + 0.7449143815353024, + 0.8037816418650005, + 0.2565738470025928 + ], + [ + 0.7556123590336405, + 0.8329714300842785, + 0.29696958053938577 + ], + [ + 0.8084527075053972, + 0.8840051745285282, + 0.3065737529479581 + ], + [ + 0.8952587859244203, + 0.956232914364825, + 0.28255659772662395 + ], + [ + 0.9914020106690372, + 1.037256617003551, + 0.2318948485126982 + ], + [ + 1.066903036727067, + 1.1052766438261659, + 0.15898954248526997 + ], + [ + 1.1136513050829933, + 1.1534431681568922, + 0.06446462905202363 + ], + [ + 0.9897287313764538, + 1.3175879842425329, + -0.023802980352345942 + ], + [ + 0.9814564940385998, + 1.3312793092122355, + -0.10109985175296997 + ], + [ + 0.9571786795182662, + 1.3136841962647667, + -0.16453122575418233 + ], + [ + 0.9192048375034464, + 1.2524260116274808, + -0.20443520360552395 + ], + [ + 0.8754276190657372, + 1.1567830427955894, + -0.2201721359385845 + ], + [ + 0.838597531393537, + 1.0591037706108586, + -0.2130950570775513 + ], + [ + 0.8075046675210635, + 0.9800983739824537, + -0.17661574947192288 + ], + [ + 0.7742032207467787, + 0.9238382319161341, + -0.11699100562230737 + ], + [ + 0.7381911838609968, + 0.8961660800872393, + -0.04331292379562058 + ], + [ + 0.6973294649223166, + 0.8919298462811117, + 0.0463593439060319 + ], + [ + 0.6566008805772096, + 0.8978713921360914, + 0.13712840950686997 + ], + [ + 0.6378275204407048, + 0.9167834916601094, + 0.205192314864778 + ], + [ + 0.6556800035651419, + 0.9551391207481786, + 0.24713560156430395 + ], + [ + 0.7094412071781627, + 1.0120734961113351, + 0.26221397281383574 + ], + [ + 0.7914008768110271, + 1.0882628574337416, + 0.2468333345523467 + ], + [ + 0.878112943989877, + 1.1718039294680505, + 0.20744795381354783 + ], + [ + 0.9423833408206332, + 1.2394624170648356, + 0.14541434260291525 + ], + [ + 0.9779227629031048, + 1.2858173778681117, + 0.062484205573938356 + ], + [ + 0.8251993797224099, + 1.4292872520535362, + -9.596815203167484e-18 + ], + [ + 0.8068744134448731, + 1.4228395771154694, + -0.07520133707119786 + ], + [ + 0.7814034863389218, + 1.3843077597390872, + -0.14563338756290303 + ], + [ + 0.7488323379879495, + 1.3064473720276806, + -0.19638294703032083 + ], + [ + 0.7124989556092195, + 1.1984535999289707, + -0.22399628127764884 + ], + [ + 0.6813274277263364, + 1.093677807055321, + -0.22844823483594848 + ], + [ + 0.6538754886671235, + 1.0158128722747823, + -0.20399377705448538 + ], + [ + 0.6246175336649427, + 0.9700040138852116, + -0.15603062091548825 + ], + [ + 0.5942469444840426, + 0.9595194041278119, + -0.08828933523992248 + ], + [ + 0.5619781280874543, + 0.9733746705899209, + -1.6537622583433362e-17 + ], + [ + 0.5338447071567712, + 0.9943926521083676, + 0.08828933523992245 + ], + [ + 0.5277393509649957, + 1.025936658745628, + 0.1560306209154881 + ], + [ + 0.552782008547637, + 1.0741792202350835, + 0.2039937770544853 + ], + [ + 0.6064890506019958, + 1.1368857642337737, + 0.22844823483594848 + ], + [ + 0.6816417849907915, + 1.2162689956919503, + 0.22399628127764892 + ], + [ + 0.7570004438894163, + 1.301731513886699, + 0.19638294703032094 + ], + [ + 0.808143943420514, + 1.3688691496447758, + 0.14563338756290312 + ], + [ + 0.828778012569468, + 1.4101935282646625, + 0.07520133707119803 + ], + [ + 0.6462003003869375, + 1.5159242163486197, + 0.02380298035234587 + ], + [ + 0.6245891324097275, + 1.489814644547211, + -0.062484205573938134 + ], + [ + 0.6022142698038945, + 1.4358591217863355, + -0.14541434260291514 + ], + [ + 0.5757554991788222, + 1.3463700816212012, + -0.20744795381354775 + ], + [ + 0.5467628421271499, + 1.2295046926124993, + -0.24683333455234654 + ], + [ + 0.5217607545402665, + 1.1204308559634557, + -0.2622139728138356 + ], + [ + 0.49933474093368446, + 1.0454051002149736, + -0.24713560156430378 + ], + [ + 0.47504403332750167, + 1.0107665817645433, + -0.20519231486477804 + ], + [ + 0.44927899463255017, + 1.0175687387951413, + -0.13712840950686986 + ], + [ + 0.42376917281183407, + 1.0498699545706915, + -0.04635934390603181 + ], + [ + 0.40700699943497093, + 1.087375358116952, + 0.04331292379562067 + ], + [ + 0.4129657674532829, + 1.1323987728165092, + 0.11699100562230731 + ], + [ + 0.4450377563160946, + 1.1893687427389743, + 0.17661574947192285 + ], + [ + 0.497912004896122, + 1.2557986510431502, + 0.21309505707755136 + ], + [ + 0.5640896921951735, + 1.3365340786832496, + 0.22017213593858448 + ], + [ + 0.6250303236781001, + 1.4222677463732714, + 0.20443520360552386 + ], + [ + 0.6590945467562972, + 1.4857831505560448, + 0.16453122575418225 + ], + [ + 0.6621934542910952, + 1.5156059111527556, + 0.10109985175297002 + ], + [ + 0.4611412027074054, + 1.5787239452049766, + 0.037636725808364156 + ], + [ + 0.4420854329039784, + 1.541171905238013, + -0.06446462905202342 + ], + [ + 0.4237461333995312, + 1.4766034550934855, + -0.15898954248526995 + ], + [ + 0.40258957523406286, + 1.3772076351041331, + -0.23189484851269798 + ], + [ + 0.3804926028125581, + 1.2534333087541751, + -0.2825565977266239 + ], + [ + 0.3613445844659035, + 1.1421431697222486, + -0.3065737529479581 + ], + [ + 0.34356823956281857, + 1.0708652133787604, + -0.29696958053938577 + ], + [ + 0.32363813018300497, + 1.0470055989864457, + -0.2565738470025929 + ], + [ + 0.3016785540229008, + 1.0704864379064363, + -0.1854585446551246 + ], + [ + 0.28208148575610825, + 1.122374850029942, + -0.09010578333227004 + ], + [ + 0.2757309631549572, + 1.1783926085093765, + 0.007042567386711877 + ], + [ + 0.2928865899334636, + 1.2358979743914313, + 0.09557041786596934 + ], + [ + 0.3311138852212231, + 1.2972132581321008, + 0.1723951132937764 + ], + [ + 0.38180391815324, + 1.3633479629083987, + 0.22170908990107177 + ], + [ + 0.4368146396791083, + 1.4426829267135821, + 0.2401261902751735 + ], + [ + 0.47975486753813873, + 1.5241131395606549, + 0.23586604327882982 + ], + [ + 0.4937704037050276, + 1.5772664204932128, + 0.20097339636313866 + ], + [ + 0.48187204009763085, + 1.5924053382448404, + 0.13066703752243186 + ], + [ + 0.2735777759413771, + 1.6241621973479219, + 0.04139852385840671 + ], + [ + 0.25812094834024013, + 1.581380896917052, + -0.07607300188065297 + ], + [ + 0.24445550130937052, + 1.5085013376610992, + -0.18169245107468962 + ], + [ + 0.22980063696572514, + 1.4001794061145938, + -0.26536337251770276 + ], + [ + 0.21494382259817346, + 1.2710059507245937, + -0.3256254599540346 + ], + [ + 0.20106298691800054, + 1.159429455186754, + -0.35448728690661 + ], + [ + 0.18698940315349183, + 1.0924951504327514, + -0.3459680706124289 + ], + [ + 0.17045245108526483, + 1.078572089802273, + -0.30490475866988626 + ], + [ + 0.15154465735475153, + 1.1188730790020143, + -0.23058918170130702 + ], + [ + 0.13714153017524106, + 1.1920183057903975, + -0.12753732382564778 + ], + [ + 0.14017648789975407, + 1.2661952584317822, + -0.014065649638523796 + ], + [ + 0.16694132554347169, + 1.3310670460526843, + 0.09827391541253018 + ], + [ + 0.20943212403643371, + 1.3899834717345165, + 0.19523065078075572 + ], + [ + 0.2559963863771382, + 1.4515040240123311, + 0.25676034708135764 + ], + [ + 0.2969715041897199, + 1.5251892892678, + 0.2859823225848505 + ], + [ + 0.3192221537407232, + 1.5958327104320382, + 0.28820420691941556 + ], + [ + 0.3150027516985061, + 1.63586700766141, + 0.24549810315287762 + ], + [ + 0.2943556090357725, + 1.64228880795576, + 0.15529606178310335 + ], + [ + 0.08356005773633866, + 1.6538614316176965, + 0.040263480150448006 + ], + [ + 0.07093565305149122, + 1.6080354253502422, + -0.0924219491243793 + ], + [ + 0.0634126623665547, + 1.5291493897109254, + -0.2106500774171275 + ], + [ + 0.057446958811253, + 1.4141948754708222, + -0.30543223795533536 + ], + [ + 0.0507290960925111, + 1.281870850600043, + -0.3728898644770125 + ], + [ + 0.04192637079042723, + 1.1714560562333902, + -0.4023486676143938 + ], + [ + 0.030702917017542256, + 1.1086930195197335, + -0.3920765656667869 + ], + [ + 0.01642148463741821, + 1.1050735114376666, + -0.3502305032181168 + ], + [ + -0.0005221714679193995, + 1.1643604775442638, + -0.2716065272492961 + ], + [ + -0.011057186469523306, + 1.2590892435960168, + -0.153952532098745 + ], + [ + -0.00034286570512466474, + 1.3457147053045544, + -0.013757164209617142 + ], + [ + 0.03428169591553856, + 1.4081853906025825, + 0.1277527735747823 + ], + [ + 0.0790266922520086, + 1.4570343232835008, + 0.2435234964919885 + ], + [ + 0.11832814411560666, + 1.5089350833770825, + 0.3150925235875901 + ], + [ + 0.14200517437020277, + 1.5712501792143476, + 0.3506105432701228 + ], + [ + 0.14421097018123402, + 1.6289415183207534, + 0.34784559513874763 + ], + [ + 0.12760140530212538, + 1.6629599218880815, + 0.2859063706254986 + ], + [ + 0.10367887693079401, + 1.6709831942945912, + 0.17301868922806848 + ], + [ + -0.10768717659967873, + 1.6660947163371347, + 0.036955242197454746 + ], + [ + -0.11756646192339243, + 1.61867007338888, + -0.11093707954600736 + ], + [ + -0.11835889932300403, + 1.5362376094589778, + -0.24301640823242485 + ], + [ + -0.1149668501497112, + 1.4178031468555272, + -0.3491867083087308 + ], + [ + -0.11297356436535909, + 1.2851986026653133, + -0.42142255933472933 + ], + [ + -0.11668714338620209, + 1.1773819934942282, + -0.44900748552035735 + ], + [ + -0.12586047022785377, + 1.1200615566142222, + -0.4363944550567736 + ], + [ + -0.13843550957421666, + 1.12881362417121, + -0.3925302158700156 + ], + [ + -0.15390015177784772, + 1.2079557892954855, + -0.30497555841430524 + ], + [ + -0.1621775223233819, + 1.3201596964671614, + -0.16394428503477917 + ], + [ + -0.14529573209862046, + 1.4083351725187636, + 0.010768615103111475 + ], + [ + -0.10347863190318424, + 1.4559041705546583, + 0.18080659710612082 + ], + [ + -0.0585075446855442, + 1.4867622863453622, + 0.30923946629331145 + ], + [ + -0.02954066749986351, + 1.5241134747034046, + 0.3846468094483351 + ], + [ + -0.02339188008362944, + 1.5730437338340735, + 0.41682163656190296 + ], + [ + -0.037677075242643895, + 1.624273595476079, + 0.3984347158345943 + ], + [ + -0.06263348324951867, + 1.6639702097155533, + 0.31556393981353564 + ], + [ + -0.08807904040846043, + 1.6805399016737412, + 0.1852575708219237 + ], + [ + -0.2996173228945884, + 1.6588344920873337, + 0.03137161135377446 + ], + [ + -0.30571562089098264, + 1.6120284283807256, + -0.1305395407576124 + ], + [ + -0.29992014506740694, + 1.5280620606787758, + -0.27597868034123735 + ], + [ + -0.2878930245090337, + 1.4090807313175138, + -0.3923551858739162 + ], + [ + -0.2775856686657866, + 1.2792489704050682, + -0.4673629734068632 + ], + [ + -0.27643298090768004, + 1.1773590958935192, + -0.49260387082509927 + ], + [ + -0.2835914303667031, + 1.1292056044724652, + -0.47685440296302584 + ], + [ + -0.2942651962772445, + 1.151237078187054, + -0.42686941584990556 + ], + [ + -0.30859643851870555, + 1.2461590933625748, + -0.3236914130887383 + ], + [ + -0.31525832401268944, + 1.3662458492615388, + -0.1524511849236385 + ], + [ + -0.2919518385714961, + 1.44216251345848, + 0.05797471846788815 + ], + [ + -0.24284975883978988, + 1.46345946385453, + 0.24879077775280947 + ], + [ + -0.19889980267855512, + 1.4716854394867744, + 0.37938667168939194 + ], + [ + -0.18022436712733547, + 1.4944824736041709, + 0.44979419647185415 + ], + [ + -0.18873039929658975, + 1.5351580061488426, + 0.47076597525959735 + ], + [ + -0.2175372915081331, + 1.589481031391129, + 0.43437169260592023 + ], + [ + -0.25223096633480435, + 1.6415712067586767, + 0.3355330974863707 + ], + [ + -0.28094744832174745, + 1.6687132349688114, + 0.19300713585674667 + ], + [ + -0.49148136404889037, + 1.6282543480225553, + 0.02295359386030994 + ], + [ + -0.49340697926574717, + 1.5851096486466805, + -0.15009104476276414 + ], + [ + -0.4815565176218148, + 1.5020744650626139, + -0.30634835826318096 + ], + [ + -0.4621232174176447, + 1.3856618791083513, + -0.4301380806036787 + ], + [ + -0.44470539853367813, + 1.2621651485193486, + -0.5061960083784935 + ], + [ + -0.43866613306976265, + 1.1705543374042389, + -0.528623700232253 + ], + [ + -0.4427830132737879, + 1.1345117025335365, + -0.5075303633995678 + ], + [ + -0.4517285420943892, + 1.1680647940087896, + -0.446469260471848 + ], + [ + -0.46569783034197165, + 1.2712771978963409, + -0.3215982591087936 + ], + [ + -0.46926147397727647, + 1.3859445179631444, + -0.11779775691749511 + ], + [ + -0.4367810380071716, + 1.4360610041554596, + 0.12102230784652684 + ], + [ + -0.37911647681778937, + 1.4261490131812877, + 0.3190825188656246 + ], + [ + -0.33552812543263, + 1.4146931016284385, + 0.4413969415087162 + ], + [ + -0.3253197392415613, + 1.4284318506616371, + 0.5013432449007443 + ], + [ + -0.3467498864457125, + 1.467751953071337, + 0.5096207911237075 + ], + [ + -0.3909572544250539, + 1.5295498700935037, + 0.4584654098875228 + ], + [ + -0.4387626814430243, + 1.5930491139055816, + 0.34801401108864044 + ], + [ + -0.47346603883945687, + 1.6303721237275803, + 0.1955633256120127 + ], + [ + -0.6793218797099929, + 1.5705759710146827, + 0.012071061047924308 + ], + [ + -0.6787650788539898, + 1.5336327917995225, + -0.1676080481890376 + ], + [ + -0.6622154270341818, + 1.4549009478438113, + -0.3303837019197475 + ], + [ + -0.6373232824693027, + 1.3447233857873546, + -0.4576426981351877 + ], + [ + -0.6144651504964217, + 1.231217257100624, + -0.5326082981340519 + ], + [ + -0.6035876394738916, + 1.152733059092278, + -0.5508362336256026 + ], + [ + -0.6037468020073066, + 1.1290666237069242, + -0.5219776792984733 + ], + [ + -0.6108589558741415, + 1.171517715266375, + -0.4461420250132269 + ], + [ + -0.6237571699330637, + 1.2749239985470773, + -0.2963354703953695 + ], + [ + -0.6202332003390267, + 1.3703110326433066, + -0.06408922551405076 + ], + [ + -0.5736587441480016, + 1.3861682179822532, + 0.18874023767282982 + ], + [ + -0.5054367284552423, + 1.349116411190925, + 0.3797879289745276 + ], + [ + -0.4622372313142723, + 1.3260566601172, + 0.48802079591105374 + ], + [ + -0.4606038415405078, + 1.3363457084131805, + 0.536809702980834 + ], + [ + -0.4952533012381426, + 1.3779755153502475, + 0.534032936051767 + ], + [ + -0.555089401413023, + 1.4464695042431985, + 0.47152959221517726 + ], + [ + -0.6165245190646992, + 1.5172033483076188, + 0.35186749918356847 + ], + [ + -0.6592820965269571, + 1.5632389315342994, + 0.1916183864260682 + ] + ] + } + }, + "Volume6": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier6" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface5": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface5", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart5" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier6" + }, + "label": { + "$type": "ref", + "value": "Volume6" + }, + "targetlabel": -1.9061691362359223, + "constraint_weight": 100.0 + }, + "BiotSavart6": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.7285297800843646, + 0.0, + 0.0 + ], + [ + 1.6986128168659145, + 0.01476312352970133, + -0.19986247062347182 + ], + [ + 1.615383182371378, + 0.03555136064917244, + -0.3777425989685468 + ], + [ + 1.4951347989857011, + 0.06586520929311213, + -0.5112443240049126 + ], + [ + 1.3772010180894552, + 0.09875374810658112, + -0.5838228698639106 + ], + [ + 1.3084562936729638, + 0.1214055360202626, + -0.5918317180873742 + ], + [ + 1.2991024926242243, + 0.12344356224407582, + -0.547302089778767 + ], + [ + 1.3514071257711637, + 0.09909656009192883, + -0.45077376530013225 + ], + [ + 1.4531291390428436, + 0.05361874975400328, + -0.26887525819991204 + ], + [ + 1.51093937374868, + 1.9119180292579333e-17, + -1.0115319205559631e-16 + ], + [ + 1.4531291390428434, + -0.05361874975400325, + 0.26887525819991187 + ], + [ + 1.3514071257711637, + -0.09909656009192876, + 0.450773765300132 + ], + [ + 1.2991024926242245, + -0.12344356224407581, + 0.5473020897787668 + ], + [ + 1.3084562936729638, + -0.12140553602026262, + 0.5918317180873742 + ], + [ + 1.3772010180894554, + -0.09875374810658114, + 0.5838228698639105 + ], + [ + 1.4951347989857007, + -0.06586520929311224, + 0.5112443240049129 + ], + [ + 1.6153831823713778, + -0.035551360649172484, + 0.37774259896854684 + ], + [ + 1.6986128168659143, + -0.014763123529701359, + 0.1998624706234723 + ], + [ + 1.7137184427844125, + 0.19940134287445782, + -0.016219508427140757 + ], + [ + 1.6931537780171235, + 0.2132641200211316, + -0.21375589406787324 + ], + [ + 1.6192225213284799, + 0.22830424404435096, + -0.3869422850503025 + ], + [ + 1.508485844895889, + 0.2493621610762705, + -0.5136091269138299 + ], + [ + 1.4042769655259115, + 0.2712330194209837, + -0.5778434949806077 + ], + [ + 1.3478859159148873, + 0.2826365914522784, + -0.5761322434516225 + ], + [ + 1.343820087736821, + 0.27453662264989914, + -0.5204066352447385 + ], + [ + 1.3942124362659667, + 0.24467823699525879, + -0.40666980193995234 + ], + [ + 1.4745656085000056, + 0.1992874081276498, + -0.20452210858890477 + ], + [ + 1.488535756117367, + 0.14516939826211284, + 0.06823088215573912 + ], + [ + 1.394282296078401, + 0.08770886323824875, + 0.3166855501971528 + ], + [ + 1.2831594785659441, + 0.041383187312924084, + 0.4720887976884469 + ], + [ + 1.2352371929283679, + 0.023146194149809143, + 0.5512361941240438 + ], + [ + 1.2528200826417597, + 0.035737822427451084, + 0.585683022839136 + ], + [ + 1.3337364591037224, + 0.070443992598277, + 0.5709032756857831 + ], + [ + 1.4622541801478577, + 0.1143304707604991, + 0.49392122816622086 + ], + [ + 1.5888079330255431, + 0.15315129782549805, + 0.35852936416609477 + ], + [ + 1.6771600344448763, + 0.18065099662124887, + 0.1816634874051159 + ], + [ + 1.6701065340561967, + 0.39365395572274764, + -0.03100221384340172 + ], + [ + 1.6593179173023298, + 0.4107778466780184, + -0.2212081234991509 + ], + [ + 1.5972352531210445, + 0.421896352655301, + -0.3856166426687252 + ], + [ + 1.5007404212620492, + 0.43291266824436286, + -0.5024700496409646 + ], + [ + 1.4132762854233631, + 0.4434786704311875, + -0.5546754788152599 + ], + [ + 1.3672937806005252, + 0.4435068741825825, + -0.5406451939865673 + ], + [ + 1.364025296328963, + 0.4252571020645323, + -0.4728691591302775 + ], + [ + 1.4039464341420724, + 0.3892938952243228, + -0.34374974945262526 + ], + [ + 1.4528465861502076, + 0.3399060333877754, + -0.1327422723286118 + ], + [ + 1.4249781059941655, + 0.28074920864954933, + 0.12522379627717292 + ], + [ + 1.3080054087590187, + 0.21927836202568446, + 0.3417731939669569 + ], + [ + 1.1974232142619998, + 0.1734867587960142, + 0.4698744319202242 + ], + [ + 1.1572889216104063, + 0.16146562551448, + 0.5336452220399762 + ], + [ + 1.1849349498337136, + 0.18493221056439235, + 0.5599756633519519 + ], + [ + 1.276818528199246, + 0.2321810130719337, + 0.5407286396071234 + ], + [ + 1.4122293702363575, + 0.2873684949134195, + 0.462413308743427 + ], + [ + 1.5410034658925957, + 0.3349430579750617, + 0.33036540873267956 + ], + [ + 1.629742085907829, + 0.3690322155960419, + 0.16019261384699204 + ], + [ + 1.601178945812859, + 0.5780257824012842, + -0.04260702618772916 + ], + [ + 1.5970834169690407, + 0.6001302253757416, + -0.22137580118601677 + ], + [ + 1.548141263121134, + 0.6100126687935321, + -0.37550753398146847 + ], + [ + 1.4712543832949398, + 0.6138365640493363, + -0.47998938440960454 + ], + [ + 1.4010187173255255, + 0.6137983620023284, + -0.5154881227531681 + ], + [ + 1.3604681236439573, + 0.6005330081949991, + -0.4871089734842854 + ], + [ + 1.3524464736780666, + 0.5691473927650247, + -0.4082353350969675 + ], + [ + 1.3740545077038544, + 0.522871397451576, + -0.2696680829485515 + ], + [ + 1.3877705434981058, + 0.46533996438681147, + -0.06543494518426543 + ], + [ + 1.3288492497313615, + 0.4010754647216709, + 0.1616323800397917 + ], + [ + 1.2049290837435664, + 0.33976158237989795, + 0.3423593638198923 + ], + [ + 1.1022256102061099, + 0.29881747305507067, + 0.44752994538262086 + ], + [ + 1.0719710146230592, + 0.2945428324166802, + 0.5002552938501581 + ], + [ + 1.1104968389632799, + 0.3274393589016589, + 0.5211761353081162 + ], + [ + 1.210931701434511, + 0.3851198211164598, + 0.49856184136575943 + ], + [ + 1.348663667760856, + 0.4509627299858369, + 0.4205834837120983 + ], + [ + 1.4749860182316885, + 0.5070808682910005, + 0.2959177298268596 + ], + [ + 1.560277963195119, + 0.5471630528171303, + 0.13704156324490183 + ], + [ + 1.5122863183005124, + 0.7508707619255429, + -0.05045608109708478 + ], + [ + 1.5117850387198617, + 0.7766725957443624, + -0.21562082654294137 + ], + [ + 1.4763585434605744, + 0.7895814885293196, + -0.35751493359807246 + ], + [ + 1.4195149801760303, + 0.7909838749687625, + -0.443952673424169 + ], + [ + 1.3607475499266257, + 0.7778674585196778, + -0.4579027691825831 + ], + [ + 1.3186314398197212, + 0.7446187099021144, + -0.41721356546257765 + ], + [ + 1.3017329244836753, + 0.6950055531297532, + -0.3339183961791984 + ], + [ + 1.3022491903907791, + 0.636164422395683, + -0.1972059900295898 + ], + [ + 1.2855449451423944, + 0.571919334756425, + -0.014865673709369847 + ], + [ + 1.210533671390451, + 0.50749617516328, + 0.17303219489007937 + ], + [ + 1.0937112172425991, + 0.4529498628260872, + 0.3214131353767199 + ], + [ + 1.005436352845626, + 0.4226659027678233, + 0.4114045274719897 + ], + [ + 0.9865948040489904, + 0.42729147109764015, + 0.4589347319722244 + ], + [ + 1.0336411819411933, + 0.46613486800917325, + 0.4765232088393492 + ], + [ + 1.1380839250295944, + 0.5311379462278374, + 0.4501618903562431 + ], + [ + 1.2737671949620342, + 0.606451225612679, + 0.3738140777365016 + ], + [ + 1.3939506807274462, + 0.6704736600601909, + 0.2594384103660683 + ], + [ + 1.4734518581167189, + 0.7159097625085983, + 0.11450936082630549 + ], + [ + 1.4070264572768454, + 0.913499908541895, + -0.05510807651856675 + ], + [ + 1.4091259707511863, + 0.9421950021563283, + -0.20402673456769713 + ], + [ + 1.3850662761098802, + 0.9605908558745871, + -0.3269962164597003 + ], + [ + 1.3404789116115428, + 0.9574810229534588, + -0.38877115878957097 + ], + [ + 1.283822693835199, + 0.9221004436945225, + -0.3843554910676658 + ], + [ + 1.2368731069648575, + 0.8621008411916647, + -0.34144077702033454 + ], + [ + 1.211615501390321, + 0.7946603179181331, + -0.26369290963402375 + ], + [ + 1.1944721986147717, + 0.7272168437257605, + -0.14017497556075378 + ], + [ + 1.1582556792264413, + 0.6623285781737973, + 0.011403774919005278 + ], + [ + 1.0810569606106064, + 0.6054378414007263, + 0.16144780408541676 + ], + [ + 0.9805678972295496, + 0.5638811134181979, + 0.28587597818449917 + ], + [ + 0.9106859904450849, + 0.5466267361917683, + 0.3691234055536458 + ], + [ + 0.9022582468366037, + 0.5590431161666685, + 0.41609234082246516 + ], + [ + 0.9535461026333628, + 0.6017386679324569, + 0.4300764327693395 + ], + [ + 1.058325839434515, + 0.6724888382422705, + 0.39949294067590524 + ], + [ + 1.1887151989225833, + 0.755718070474829, + 0.3269615874288557 + ], + [ + 1.299545398535909, + 0.826736009582068, + 0.2242512072793778 + ], + [ + 1.3715295493212705, + 0.8768141555851483, + 0.09376796430239462 + ], + [ + 1.287527934346374, + 1.066879156866874, + -0.0566306642017952 + ], + [ + 1.2911690561389273, + 1.0983140876713, + -0.18413886555960518 + ], + [ + 1.271809397160045, + 1.1163532679487622, + -0.2805856173786186 + ], + [ + 1.2285802515819213, + 1.0969439143933994, + -0.32036242695712414 + ], + [ + 1.169815779746592, + 1.0315852449315643, + -0.3119863336248666 + ], + [ + 1.1213702306117002, + 0.9471325645197586, + -0.2782842498212286 + ], + [ + 1.0912120024493563, + 0.8684605734562999, + -0.21197482454196798 + ], + [ + 1.0625422968627218, + 0.7985409091138045, + -0.10827103935950476 + ], + [ + 1.0185989166112246, + 0.740454199592788, + 0.01156578111991156 + ], + [ + 0.9490468847765251, + 0.6988446761694888, + 0.13281278124910642 + ], + [ + 0.8676699231291111, + 0.6735421083013571, + 0.2435427084013032 + ], + [ + 0.8145210740808836, + 0.6683184088070996, + 0.3249075017302795 + ], + [ + 0.813938372402055, + 0.6878979227203592, + 0.3715928025423017 + ], + [ + 0.8681295041580911, + 0.735170282770637, + 0.3817614847628399 + ], + [ + 0.9721846522312346, + 0.8111583051658452, + 0.3499231405927339 + ], + [ + 1.0947773934803011, + 0.9001475755834122, + 0.28447291617117915 + ], + [ + 1.1935973543804979, + 0.9757996884512993, + 0.19329075900154175 + ], + [ + 1.2562176407654198, + 1.0287180484062501, + 0.0758396496946018 + ], + [ + 1.1557113114290416, + 1.2113853555698053, + -0.05155648995644228 + ], + [ + 1.1557225142621184, + 1.2415286467823683, + -0.1533382619396557 + ], + [ + 1.132622637676685, + 1.245700775013293, + -0.2264238625414588 + ], + [ + 1.086632230804833, + 1.1994635553457496, + -0.2595997641232872 + ], + [ + 1.0295687837600624, + 1.1065249060865912, + -0.2613612750836041 + ], + [ + 0.9843541575997643, + 1.0054923715981066, + -0.24077316123565198 + ], + [ + 0.9521347351577489, + 0.9212565635179238, + -0.18748217658943694 + ], + [ + 0.9179230043307737, + 0.8545875928631056, + -0.10534762809455067 + ], + [ + 0.8748489983822614, + 0.8104407427680502, + -0.011319933240005704 + ], + [ + 0.817424254657446, + 0.7887495936938593, + 0.09325267012497586 + ], + [ + 0.7534177824858931, + 0.7800226280944441, + 0.1976330937144935 + ], + [ + 0.7138884950693158, + 0.7863495561858284, + 0.27647131107476597 + ], + [ + 0.7207931078554579, + 0.8144868768711618, + 0.3215853184054043 + ], + [ + 0.7781749841155351, + 0.8675167156353131, + 0.3316534983071278 + ], + [ + 0.8797377764066905, + 0.9481517549066781, + 0.30447166438158174 + ], + [ + 0.9926470988855208, + 1.0410170550558373, + 0.249433776126806 + ], + [ + 1.0785974698356375, + 1.1177604435602544, + 0.16958009329630608 + ], + [ + 1.1306658632641717, + 1.1710249592280344, + 0.06337399214630807 + ], + [ + 1.0091545249179512, + 1.3453277664539933, + -0.032734700605615404 + ], + [ + 0.9976312071940862, + 1.3626771243339513, + -0.11446480281545847 + ], + [ + 0.9683922643761665, + 1.3423210415082203, + -0.1812200030271544 + ], + [ + 0.9244804760454515, + 1.2704122511818614, + -0.2233334808013622 + ], + [ + 0.8746631480020368, + 1.1579121230224563, + -0.23944253023450002 + ], + [ + 0.8350427583825696, + 1.0454957302878436, + -0.2314499848346395 + ], + [ + 0.8035570039614319, + 0.9594858836083495, + -0.19205004087987126 + ], + [ + 0.7692907102489333, + 0.9016117363862577, + -0.1284526989255141 + ], + [ + 0.7312036462082965, + 0.8756273165645846, + -0.05000682520882882 + ], + [ + 0.6853099908350975, + 0.8744829028624123, + 0.04776268139705449 + ], + [ + 0.6364807708233099, + 0.8816252913869033, + 0.14802941015580198 + ], + [ + 0.6108735111037136, + 0.9002144328202996, + 0.22273204147950643 + ], + [ + 0.6263891928245663, + 0.9385355152151499, + 0.2683717171459117 + ], + [ + 0.685437513213887, + 0.9979048229405129, + 0.2841589421096632 + ], + [ + 0.7814936592622815, + 1.0828397581875873, + 0.2666921290763339 + ], + [ + 0.883355579399294, + 1.1785893223904533, + 0.22425870209968427 + ], + [ + 0.9566134882494186, + 1.2547374974819265, + 0.15588160741082707 + ], + [ + 0.9965259522024305, + 1.307023870225584, + 0.0623093641239711 + ], + [ + 0.8430298219205994, + 1.4601704838622205, + -1.3306197255407271e-17 + ], + [ + 0.819326090341885, + 1.4531350844058386, + -0.07980237867253494 + ], + [ + 0.7894370519462668, + 1.4088212262357818, + -0.1575076885506657 + ], + [ + 0.7528634791836329, + 1.3194798868154802, + -0.21345244990905113 + ], + [ + 0.7122686632672892, + 1.1935043497971345, + -0.24285767535947897 + ], + [ + 0.6794568259284036, + 1.0729508386058173, + -0.24779976684057728 + ], + [ + 0.6520067600284649, + 0.9886770824510513, + -0.22167278044325803 + ], + [ + 0.6215963129255806, + 0.9429952667631818, + -0.17029779742607734 + ], + [ + 0.5887068720811179, + 0.9363927474017031, + -0.0972554982173848 + ], + [ + 0.551442035965792, + 0.9551256237219756, + -1.9590356062133588e-17 + ], + [ + 0.516586471128821, + 0.9780314803055753, + 0.0972554982173848 + ], + [ + 0.5058597002026087, + 1.0098158312738845, + 0.17029779742607726 + ], + [ + 0.53021608952786, + 1.0589929588493603, + 0.221672780443258 + ], + [ + 0.5894742702802535, + 1.1249022913316473, + 0.24779976684057742 + ], + [ + 0.6774707548179028, + 1.2135949316076233, + 0.24285767535947902 + ], + [ + 0.7662713621730053, + 1.3117388419623026, + 0.21345244990905124 + ], + [ + 0.8253564453377981, + 1.3880831547920534, + 0.15750768855066574 + ], + [ + 0.8487888530549585, + 1.4361247504223753, + 0.07980237867253516 + ], + [ + 0.6605107597067612, + 1.5466173381499586, + 0.03273470060561533 + ], + [ + 0.6336528988667964, + 1.5165287252505744, + -0.062309364123970895 + ], + [ + 0.6083278037755525, + 1.4558203311678064, + -0.155881607410827 + ], + [ + 0.5790105041195739, + 1.3543030335297377, + -0.22425870209968402 + ], + [ + 0.5470199091871087, + 1.2182132409113895, + -0.26669212907633366 + ], + [ + 0.5214921706185532, + 1.0925587106203147, + -0.284158942109663 + ], + [ + 0.4996010021179535, + 1.0117367112496785, + -0.26837171714591146 + ], + [ + 0.4741718121239231, + 0.9791391955249615, + -0.22273204147950637 + ], + [ + 0.4452695135482617, + 0.9920211622467394, + -0.1480294101558019 + ], + [ + 0.41466941363646026, + 1.0307373129616813, + -0.047762681397054425 + ], + [ + 0.39271367728838064, + 1.0710545912384855, + 0.05000682520882891 + ], + [ + 0.39617331293623115, + 1.1170311661640782, + 0.1284526989255141 + ], + [ + 0.4291606477966739, + 1.1756437206236872, + 0.1920500408798712 + ], + [ + 0.4879044827861517, + 1.245916107149458, + 0.23144998483463947 + ], + [ + 0.565449739886401, + 1.3364365674350602, + 0.23944253023449996 + ], + [ + 0.6379690447797435, + 1.4358297031490221, + 0.22333348080136223 + ], + [ + 0.6782879897924217, + 1.5098128225322063, + 0.18122000302715427 + ], + [ + 0.681297403232085, + 1.5453125312051907, + 0.11446480281545857 + ], + [ + 0.47123483598137583, + 1.6065680329234815, + 0.05155648995644226 + ], + [ + 0.4488044315250288, + 1.5646978403926528, + -0.06337399214630779 + ], + [ + 0.4287102045507242, + 1.4929730311154092, + -0.169580093296306 + ], + [ + 0.4052236660084585, + 1.3801661321557037, + -0.24943377612680578 + ], + [ + 0.381254618188635, + 1.2359511404903676, + -0.30447166438158163 + ], + [ + 0.36220402189005474, + 1.107677662651262, + -0.3316534983071277 + ], + [ + 0.34496977249174554, + 1.0314685807111446, + -0.32158531840540433 + ], + [ + 0.3240544443768884, + 1.0114203502923835, + -0.2764713110747661 + ], + [ + 0.2988105202135436, + 1.042490253342944, + -0.1976330937144935 + ], + [ + 0.2743650580348136, + 1.1022849670498382, + -0.09325267012497591 + ], + [ + 0.2644377723079304, + 1.1628618284584344, + 0.011319933240005645 + ], + [ + 0.28113306301305563, + 1.2222384369001356, + 0.10534762809455046 + ], + [ + 0.3217642198307999, + 1.285201150231141, + 0.18748217658943675 + ], + [ + 0.37860485831554114, + 1.3552218926012802, + 0.240773161235652 + ], + [ + 0.44349428671114705, + 1.444895174722957, + 0.2613612750836042 + ], + [ + 0.49544979444060466, + 1.540782894120816, + 0.2595997641232872 + ], + [ + 0.5124971978371328, + 1.6037303646359935, + 0.22642386254145877 + ], + [ + 0.49733409050858934, + 1.6216493804678016, + 0.15333826193965586 + ], + [ + 0.28018048544164925, + 1.6484714776594998, + 0.05663066420179518 + ], + [ + 0.26278714286865273, + 1.6022754137881323, + -0.07583964969460147 + ], + [ + 0.2482686420135171, + 1.521585475009058, + -0.19329075900154158 + ], + [ + 0.23216197087005772, + 1.3981788220345595, + -0.2844729161711788 + ], + [ + 0.2163913726487348, + 1.2475157585845116, + -0.34992314059273366 + ], + [ + 0.20261138890771543, + 1.1194073457610136, + -0.3817614847628397 + ], + [ + 0.18876789008534842, + 1.048840268975318, + -0.3715928025423017 + ], + [ + 0.17152018280330028, + 1.0395551464753816, + -0.32490750173027955 + ], + [ + 0.1494696147429496, + 1.0881952496801799, + -0.2435427084013032 + ], + [ + 0.13069380047402426, + 1.1713210496836977, + -0.13281278124910645 + ], + [ + 0.13195268888061523, + 1.2523596378490207, + -0.011565781119911581 + ], + [ + 0.16028556482231435, + 1.3194590762354854, + 0.10827103935950447 + ], + [ + 0.206502917573679, + 1.3792476017637791, + 0.21197482454196767 + ], + [ + 0.25955574631976464, + 1.4447013890172258, + 0.2782842498212284 + ], + [ + 0.3084711384066311, + 1.5288828054742323, + 0.3119863336248665 + ], + [ + 0.3356911706004659, + 1.6124536656545199, + 0.3203624269571241 + ], + [ + 0.33088559106138205, + 1.6595958806867523, + 0.2805856173786184 + ], + [ + 0.3055833731882115, + 1.667342247032337, + 0.18413886555960535 + ], + [ + 0.08760089851361999, + 1.6752706100695156, + 0.05510807651856676 + ], + [ + 0.07357855847390474, + 1.6261865095458166, + -0.09376796430239427 + ], + [ + 0.06620168725349178, + 1.5388073332943035, + -0.22425120727937775 + ], + [ + 0.06011344766886915, + 1.4073165953690447, + -0.3269615874288556 + ], + [ + 0.053229497962033016, + 1.2527814815529161, + -0.3994929406759051 + ], + [ + 0.04434792155223489, + 1.126664482526364, + -0.43007643276933943 + ], + [ + 0.03301641699284821, + 1.0609001206178432, + -0.4160923408224652 + ], + [ + 0.018049644707303705, + 1.0619905706919206, + -0.369123405553646 + ], + [ + -0.0019485796803609678, + 1.1311372658453775, + -0.2858759781844992 + ], + [ + -0.016203929239860068, + 1.2389417115271415, + -0.1614478040854169 + ], + [ + -0.005534465262284696, + 1.3342431313745964, + -0.011403774919005447 + ], + [ + 0.03255216141906082, + 1.3980516899775237, + 0.14017497556075353 + ], + [ + 0.08238827200136113, + 1.446619962782104, + 0.2636929096340235 + ], + [ + 0.12816467561348707, + 1.5022139524851859, + 0.34144077702033443 + ], + [ + 0.15665106216275937, + 1.572873288663515, + 0.38435549106766576 + ], + [ + 0.1589634337134355, + 1.6396293021696402, + 0.38877115878957086 + ], + [ + 0.13936294577548902, + 1.6797980089735611, + 0.3269962164597003 + ], + [ + 0.11140182181052129, + 1.691436388881099, + 0.20402673456769746 + ], + [ + -0.10587000436375857, + 1.685113750406655, + 0.05045608109708479 + ], + [ + -0.11672988790862875, + 1.634001621636762, + -0.11450936082630506 + ], + [ + -0.11632811818326554, + 1.5424335311626751, + -0.25943841036606813 + ], + [ + -0.11168142994422892, + 1.4063403621507076, + -0.3738140777365013 + ], + [ + -0.10906300816759665, + 1.2511785638282522, + -0.4501618903562429 + ], + [ + -0.11313595368494607, + 1.1282269559634326, + -0.47652320883934907 + ], + [ + -0.1232521332335143, + 1.0680618990969757, + -0.45893473197222445 + ], + [ + -0.13667876731239442, + 1.0820663748365982, + -0.41140452747198986 + ], + [ + -0.15458952077323113, + 1.1736566299491353, + -0.32141313537672 + ], + [ + -0.16576225568038752, + 1.302100999142214, + -0.17303219489007948 + ], + [ + -0.14747579975663652, + 1.399274247578198, + 0.014865673709369644 + ], + [ + -0.10019004441687399, + 1.4458630921339741, + 0.19720599002958938 + ], + [ + -0.04897399746021591, + 1.4748365581103493, + 0.333918396179198 + ], + [ + -0.014457001001434072, + 1.5142776800637867, + 0.41721356546257754 + ], + [ + -0.00672079510803375, + 1.5673756756337307, + 0.457902769182583 + ], + [ + -0.02474536038121232, + 1.624827971369387, + 0.44395267342416894 + ], + [ + -0.05438164430596479, + 1.6733547479957092, + 0.35751493359807246 + ], + [ + -0.08327432102211106, + 1.6975805464648226, + 0.2156208265429418 + ], + [ + -0.3000044613045411, + 1.6756745342793649, + 0.04260702618772916 + ], + [ + -0.306281877845678, + 1.6248218795005795, + -0.13704156324490138 + ], + [ + -0.29834809540276663, + 1.5309157961609996, + -0.2959177298268593 + ], + [ + -0.2837866535527108, + 1.3934583624349166, + -0.42058348371209797 + ], + [ + -0.2719423021294825, + 1.2412575262484296, + -0.49856184136575926 + ], + [ + -0.27167761647391303, + 1.1254381528153465, + -0.5211761353081162 + ], + [ + -0.2809039319360617, + 1.0756255469924891, + -0.5002552938501581 + ], + [ + -0.29232928234269173, + 1.103964115667831, + -0.4475299453826212 + ], + [ + -0.3082223803007922, + 1.213379987470585, + -0.34235936381989235 + ], + [ + -0.3170830835820642, + 1.351354940428086, + -0.1616323800397918 + ], + [ + -0.290889041193928, + 1.434514527486502, + 0.06543494518426529 + ], + [ + -0.23420734074659233, + 1.4514018085818463, + 0.269668082948551 + ], + [ + -0.18332713620684227, + 1.4558266998464002, + 0.4082353350969673 + ], + [ + -0.16015722091402085, + 1.4784664602121151, + 0.4871089734842854 + ], + [ + -0.1689443843674691, + 1.520216981382559, + 0.5154881227531681 + ], + [ + -0.20402913340899087, + 1.5810619533872934, + 0.4799893844096047 + ], + [ + -0.24578416375502526, + 1.6457359969065972, + 0.37550753398146874 + ], + [ + -0.2788136877302474, + 1.6831799237459153, + 0.22137580118601718 + ], + [ + -0.4941389410719639, + 1.643181663380421, + 0.03100221384340177 + ], + [ + -0.49527976943288593, + 1.5959141558108423, + -0.1601926138469915 + ], + [ + -0.4804325359186499, + 1.5020196777703856, + -0.33036540873267933 + ], + [ + -0.45724626827585796, + 1.3667107580518956, + -0.4624133087434265 + ], + [ + -0.43733460850292116, + 1.2218477879791716, + -0.540728639607123 + ], + [ + -0.4323114825900797, + 1.1186498736702315, + -0.5599756633519517 + ], + [ + -0.4388111272717182, + 1.0829744183901495, + -0.5336452220399761 + ], + [ + -0.44846766679342775, + 1.1237423020301158, + -0.4698744319202245 + ], + [ + -0.4641020723650252, + 1.2424050932856012, + -0.3417731939669571 + ], + [ + -0.46935310621419485, + 1.3744418439523565, + -0.12522379627717325 + ], + [ + -0.43205603326168834, + 1.4281550681014643, + 0.13274227232861135 + ], + [ + -0.3648348142685748, + 1.4105002251317722, + 0.34374974945262476 + ], + [ + -0.31372919463684446, + 1.3939091090577453, + 0.472869159130277 + ], + [ + -0.299558670505117, + 1.4058645855278131, + 0.5406451939865671 + ], + [ + -0.322574348081726, + 1.4456725009583338, + 0.5546754788152598 + ], + [ + -0.3754568423113007, + 1.5161356634212755, + 0.5024700496409649 + ], + [ + -0.43324466739703277, + 1.5941944813505433, + 0.38561664266872536 + ], + [ + -0.4739149081161312, + 1.6424003926775133, + 0.22120812349915125 + ], + [ + -0.6841725929141936, + 1.5838243778224392, + 0.01621950842714083 + ], + [ + -0.6821316649294593, + 1.5427886943518723, + -0.18166348740511531 + ], + [ + -0.6617710519733331, + 1.452523680647115, + -0.35852936416609454 + ], + [ + -0.6321139979687019, + 1.323514502178282, + -0.4939212281662204 + ], + [ + -0.6058619424177497, + 1.1902716518364675, + -0.5709032756857829 + ], + [ + -0.5954601792227692, + 1.1028429291528092, + -0.5856830228391359 + ], + [ + -0.5975734043295217, + 1.0813198858502506, + -0.5512361941240439 + ], + [ + -0.6057408477804092, + 1.131940299201363, + -0.47208879768844714 + ], + [ + -0.6211830443378215, + 1.251338320069916, + -0.31668555019715305 + ], + [ + -0.6185474913115927, + 1.3616944783701739, + -0.06823088215573961 + ], + [ + -0.5646948461571002, + 1.3766549805716888, + 0.20452210858890416 + ], + [ + -0.48520864914189943, + 1.3297625065761496, + 0.4066698019399516 + ], + [ + -0.43415435438441524, + 1.3010506454208706, + 0.5204066352447381 + ], + [ + -0.42917248972072647, + 1.3086217403116882, + 0.5761322434516223 + ], + [ + -0.4672437975992252, + 1.351756035805256, + 0.5778434949806076 + ], + [ + -0.5382889562133063, + 1.4310681434672077, + 0.5136091269138301 + ], + [ + -0.6118939855300292, + 1.5164399598725293, + 0.3869422850503028 + ], + [ + -0.6618847433545273, + 1.572946244286993, + 0.21375589406787368 + ] + ] + } + }, + "Volume7": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier7" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface6": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface6", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart6" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier7" + }, + "label": { + "$type": "ref", + "value": "Volume7" + }, + "targetlabel": -2.308711308988738, + "constraint_weight": 100.0 + }, + "BiotSavart7": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.7402300304282095, + 0.0, + 0.0 + ], + [ + 1.7058568845421331, + 0.015574926976404262, + -0.21937941341352046 + ], + [ + 1.6104141610867193, + 0.03756546203696718, + -0.40800614175800914 + ], + [ + 1.4709192347174302, + 0.07287630013860072, + -0.5464576381931622 + ], + [ + 1.3348625004012638, + 0.11240500158117578, + -0.6209207653349728 + ], + [ + 1.2625081369163427, + 0.13774054258966456, + -0.6246539981819123 + ], + [ + 1.259961268148055, + 0.13825755568105, + -0.5729722673842705 + ], + [ + 1.3211690572367547, + 0.1101189359469378, + -0.4724616495167582 + ], + [ + 1.4368891601352376, + 0.05933048740732929, + -0.2841281610986327 + ], + [ + 1.5035775831454423, + 2.1115020043934473e-17, + -1.073541420787652e-16 + ], + [ + 1.4368891601352378, + -0.05933048740732926, + 0.2841281610986325 + ], + [ + 1.3211690572367547, + -0.11011893594693768, + 0.47246164951675773 + ], + [ + 1.2599612681480552, + -0.13825755568105, + 0.5729722673842703 + ], + [ + 1.2625081369163427, + -0.1377405425896646, + 0.6246539981819123 + ], + [ + 1.3348625004012635, + -0.11240500158117582, + 0.6209207653349728 + ], + [ + 1.4709192347174298, + -0.0728763001386008, + 0.5464576381931626 + ], + [ + 1.610414161086719, + -0.03756546203696721, + 0.4080061417580093 + ], + [ + 1.7058568845421331, + -0.015574926976404307, + 0.21937941341352088 + ], + [ + 1.7256374577094615, + 0.20160118837323748, + -0.020900177347878832 + ], + [ + 1.700825363780218, + 0.21591737982590908, + -0.23726730770627713 + ], + [ + 1.614037643408256, + 0.2313235377477537, + -0.41975223940611306 + ], + [ + 1.4837644575439504, + 0.25641412307941214, + -0.5511227462006448 + ], + [ + 1.364496343414569, + 0.28362817725123524, + -0.6176986082983233 + ], + [ + 1.307706575182218, + 0.29661700362493415, + -0.610787039380413 + ], + [ + 1.3101625909035741, + 0.2861719974907998, + -0.5466798397896716 + ], + [ + 1.3689733451657937, + 0.2520591227937939, + -0.42791085903260156 + ], + [ + 1.462381841368074, + 0.20184421043647421, + -0.2170058989510353 + ], + [ + 1.4805745919905382, + 0.14239023195862283, + 0.07209274275781054 + ], + [ + 1.373709212930024, + 0.07856008800672244, + 0.3333716962451342 + ], + [ + 1.2490264544278433, + 0.026522498190116928, + 0.49256717413589035 + ], + [ + 1.1928342130920568, + 0.004848208995765448, + 0.5747478009591609 + ], + [ + 1.204352179215419, + 0.01668395258509269, + 0.6155571973885021 + ], + [ + 1.2914979389603491, + 0.05572622943753765, + 0.6046913826416043 + ], + [ + 1.439745259167641, + 0.10793032412144778, + 0.526171273827883 + ], + [ + 1.585001758921101, + 0.1523298861652069, + 0.3855598094691249 + ], + [ + 1.6847907742338446, + 0.18149888772540357, + 0.19703348973185314 + ], + [ + 1.682428834394126, + 0.3984811187071644, + -0.04010735491792871 + ], + [ + 1.6679480476818505, + 0.4160384545188595, + -0.24812387596480692 + ], + [ + 1.5927657468388838, + 0.42603066509882115, + -0.42036328518105526 + ], + [ + 1.4777076051793239, + 0.43955130143638876, + -0.5419779481951648 + ], + [ + 1.3793500242892194, + 0.4544822059058503, + -0.5965559655163458 + ], + [ + 1.3352541139795697, + 0.45491377830217344, + -0.5756420230240433 + ], + [ + 1.336953057545673, + 0.4333283219717417, + -0.4980429969627482 + ], + [ + 1.3841191764572212, + 0.39320304856665383, + -0.3628990368440255 + ], + [ + 1.443900896576815, + 0.3395544210736956, + -0.14161352815298114 + ], + [ + 1.4154146475297522, + 0.2750545817031407, + 0.132147110246261 + ], + [ + 1.283498246075365, + 0.2066212359041375, + 0.35830565672845155 + ], + [ + 1.160363362277708, + 0.1544486568200258, + 0.48796099452633285 + ], + [ + 1.1126892351086002, + 0.13886239157981572, + 0.5542906302212544 + ], + [ + 1.1356545747315838, + 0.1626919116790391, + 0.5865689415815862 + ], + [ + 1.2362068265155082, + 0.21649432310643402, + 0.5709430605230902 + ], + [ + 1.392284502443004, + 0.2818494438695094, + 0.4911147270929478 + ], + [ + 1.5390251345898736, + 0.33557619983827097, + 0.3536960464309077 + ], + [ + 1.6380719716540488, + 0.3716797062901405, + 0.1714033737535577 + ], + [ + 1.614042539093473, + 0.5856469785278933, + -0.05539353095410376 + ], + [ + 1.606524497065043, + 0.6083585565388426, + -0.2509515382602565 + ], + [ + 1.5454638829195797, + 0.6156341254503372, + -0.41226063177812966 + ], + [ + 1.4532368061688292, + 0.6206652760814854, + -0.5211452984239919 + ], + [ + 1.375796740045351, + 0.6242985555916454, + -0.557353087078249 + ], + [ + 1.337026423269299, + 0.6100065722910166, + -0.5201876177894609 + ], + [ + 1.331937067072559, + 0.5739042072352432, + -0.4308192616307073 + ], + [ + 1.3594512229376359, + 0.5234024280867225, + -0.28548252504923066 + ], + [ + 1.3807473918437587, + 0.4619258182325997, + -0.07059231754690616 + ], + [ + 1.3172023219184994, + 0.3922776524269034, + 0.17017148500417179 + ], + [ + 1.1776333625366933, + 0.32415016575026956, + 0.3574959096381134 + ], + [ + 1.0628961976386488, + 0.27720051623640124, + 0.4629942929768116 + ], + [ + 1.0253916521168394, + 0.26967395924562026, + 0.5183961350441751 + ], + [ + 1.0616085530640083, + 0.3035654280454978, + 0.5453019802392234 + ], + [ + 1.1735439576524176, + 0.3691307643127444, + 0.5258719199924315 + ], + [ + 1.3323298189998212, + 0.4464862663143607, + 0.4458097791830205 + ], + [ + 1.4753871500442017, + 0.5092079810163674, + 0.31548061994135146 + ], + [ + 1.5696679022630842, + 0.5516098593414887, + 0.14431519774768836 + ], + [ + 1.525920239638506, + 0.7613434612810613, + -0.0659575710257303 + ], + [ + 1.522118418203522, + 0.7881062735555429, + -0.24727878690051286 + ], + [ + 1.4774739267255366, + 0.798716585605786, + -0.3962821083544329 + ], + [ + 1.4101832087648958, + 0.8010254514716739, + -0.4849187051199111 + ], + [ + 1.3457398291216143, + 0.7896631949431484, + -0.49575648892968754 + ], + [ + 1.3027604032557472, + 0.7523605310583674, + -0.4454026443523042 + ], + [ + 1.2868254786883997, + 0.6959103014110071, + -0.35279592657853304 + ], + [ + 1.2916688029457577, + 0.6326935580226857, + -0.2093087880399454 + ], + [ + 1.2788719737740744, + 0.5650522396872419, + -0.017222596223210377 + ], + [ + 1.197022111672369, + 0.49571807128596357, + 0.18137324319867348 + ], + [ + 1.0656133536697348, + 0.4359512385714325, + 0.3345402060585243 + ], + [ + 0.9661560802222111, + 0.4018291542278868, + 0.42549546713196557 + ], + [ + 0.9405975465618563, + 0.4036791042741076, + 0.47687461933020525 + ], + [ + 0.9875188739071271, + 0.4428900020534417, + 0.5003258956950396 + ], + [ + 1.1053383443923626, + 0.515975194739906, + 0.4756419872764374 + ], + [ + 1.2616329998499989, + 0.6033620782085535, + 0.39600480715947456 + ], + [ + 1.3969794684813739, + 0.6742623830128974, + 0.2756539906100178 + ], + [ + 1.484299262231829, + 0.7225685836424718, + 0.11840562339111117 + ], + [ + 1.421553028453825, + 0.926856338576775, + -0.07233120707913508 + ], + [ + 1.4210635479008247, + 0.9577638279406014, + -0.2364548022177308 + ], + [ + 1.3916320685613355, + 0.9766371489448482, + -0.3652662775368748 + ], + [ + 1.3403624649361268, + 0.9739114563479451, + -0.4252858279682645 + ], + [ + 1.2770539676722859, + 0.9350800095894346, + -0.4146140041466805 + ], + [ + 1.2261242755699668, + 0.8661633950438345, + -0.3636091905465985 + ], + [ + 1.200553530652511, + 0.7904291603835747, + -0.278929489884924 + ], + [ + 1.1861535998773647, + 0.7191863090357804, + -0.14918153970200176 + ], + [ + 1.1509997600057391, + 0.6518231754041879, + 0.010291700959570651 + ], + [ + 1.066588975256739, + 0.5914451072606778, + 0.16810653815888701 + ], + [ + 0.953902234794495, + 0.5471879233737528, + 0.2972588411117573 + ], + [ + 0.8743970198414651, + 0.5280193199332481, + 0.38443921464198105 + ], + [ + 0.8595579128546461, + 0.5373861012328863, + 0.437232777501655 + ], + [ + 0.9116909963973259, + 0.5798619548837725, + 0.45536515718052023 + ], + [ + 1.0308000844514846, + 0.6589815231710522, + 0.4234387738110701 + ], + [ + 1.1809262922760244, + 0.7542915453053355, + 0.34651632504483426 + ], + [ + 1.305106455119973, + 0.8324713992842117, + 0.23769651454303078 + ], + [ + 1.3838518705104537, + 0.886209864209526, + 0.09488175468784257 + ], + [ + 1.3034454571293408, + 1.0836756534178191, + -0.07444544001402678 + ], + [ + 1.3055809955480917, + 1.119255133940462, + -0.2140804040875214 + ], + [ + 1.2827294394942117, + 1.1399517019482692, + -0.3129908562899573 + ], + [ + 1.233484754187985, + 1.1180560954039678, + -0.3486131902220379 + ], + [ + 1.1668931001170986, + 1.0424764277301444, + -0.3348841409629904 + ], + [ + 1.1135139944303762, + 0.945304480278454, + -0.2962472904705743 + ], + [ + 1.0828079924300444, + 0.8584873973904766, + -0.2247609950530974 + ], + [ + 1.0555280315040034, + 0.785602505880668, + -0.11566002172509234 + ], + [ + 1.0109088289188304, + 0.7263690769873632, + 0.009908678165170333 + ], + [ + 0.9348935897101518, + 0.6836895941166163, + 0.13726030696030558 + ], + [ + 0.8435907762621918, + 0.6577513563876007, + 0.2542917351827848 + ], + [ + 0.7813344396964952, + 0.651132520122119, + 0.34287778334094143 + ], + [ + 0.7740308856624109, + 0.6674704008046379, + 0.39609815857663516 + ], + [ + 0.830478904469753, + 0.71501478821565, + 0.4075788920312178 + ], + [ + 0.9502124211669843, + 0.7999294742602867, + 0.371914569084958 + ], + [ + 1.0913812354194137, + 0.9007230707187482, + 0.3019459595384516 + ], + [ + 1.201475507137673, + 0.9836897407528536, + 0.20463134647910367 + ], + [ + 1.269898463352517, + 1.0410230410027665, + 0.07470101980289001 + ], + [ + 1.1733414616356852, + 1.2331373663139673, + -0.0678503293801498 + ], + [ + 1.171892434240965, + 1.2680415543493249, + -0.1759370000846314 + ], + [ + 1.1442186907113965, + 1.2728591292846083, + -0.24889496185031015 + ], + [ + 1.091859536182101, + 1.219882941942807, + -0.28018369926163617 + ], + [ + 1.0279034972019883, + 1.1124498925755997, + -0.28010243525178113 + ], + [ + 0.9786564850974806, + 0.9970724722401354, + -0.25682531737697495 + ], + [ + 0.945920931066596, + 0.9051220315673422, + -0.19944500635945017 + ], + [ + 0.9119901055389041, + 0.836343736049206, + -0.11318236906932733 + ], + [ + 0.8673741804122668, + 0.7930941337289031, + -0.015044101221056807 + ], + [ + 0.8045725055570628, + 0.7730102430561746, + 0.09573801446337363 + ], + [ + 0.7318121789205331, + 0.7648281915835158, + 0.20833625636908715 + ], + [ + 0.6828329128868995, + 0.7701260212102311, + 0.2951542081787141 + ], + [ + 0.6836492121736082, + 0.7958784763078706, + 0.3454658440519043 + ], + [ + 0.7455006877756372, + 0.8498650220760917, + 0.3553116713763591 + ], + [ + 0.8634803298767626, + 0.9396134442186086, + 0.32416620481745256 + ], + [ + 0.9933644861637736, + 1.0440553662568326, + 0.26554721305288165 + ], + [ + 1.0885369549017472, + 1.1277797448948876, + 0.1796142128648145 + ], + [ + 1.1455682834577594, + 1.1863650532944987, + 0.06062296276175224 + ], + [ + 1.027574094579221, + 1.3724246390875166, + -0.0431509405045577 + ], + [ + 1.0125820797460319, + 1.3920013715839163, + -0.12621208908332482 + ], + [ + 0.977396445964293, + 1.3677826713239836, + -0.1949473069019226 + ], + [ + 0.9284278714069835, + 1.2867498425627422, + -0.239995965032498 + ], + [ + 0.8738438259725634, + 1.1582569350783434, + -0.2565576434206832 + ], + [ + 0.8312498466138899, + 1.0302751083071429, + -0.247127288036111 + ], + [ + 0.7993609311619084, + 0.9369280371891441, + -0.20504399122921324 + ], + [ + 0.764709631493534, + 0.8784602672578291, + -0.13840975359350374 + ], + [ + 0.7246769531662913, + 0.8555935785392619, + -0.05623777576604462 + ], + [ + 0.6740320063986266, + 0.8581470500585351, + 0.048800098946502043 + ], + [ + 0.6171700285802548, + 0.8665213457010392, + 0.15798932415244976 + ], + [ + 0.5832403246667429, + 0.8846701979744296, + 0.2390744097396612 + ], + [ + 0.5947879494923448, + 0.9218499449507936, + 0.2882876815579233 + ], + [ + 0.6594665312303101, + 0.9827826465327181, + 0.30420122063563304 + ], + [ + 0.7709874199758947, + 1.077074316294244, + 0.28434959354160294 + ], + [ + 0.8879864080104782, + 1.1843085540041167, + 0.23974745007945752 + ], + [ + 0.9688700016951967, + 1.2669808625179664, + 0.16517573164486254 + ], + [ + 1.0129729510213692, + 1.3260172924008602, + 0.05978658941860109 + ], + [ + 0.8604068492897224, + 1.4902683781500565, + -1.7598861003399382e-17 + ], + [ + 0.8307971496386486, + 1.480721708599857, + -0.0819071226178143 + ], + [ + 0.7954544935780036, + 1.4298069507991846, + -0.16722154626051927 + ], + [ + 0.7559380222772557, + 1.331099825392184, + -0.22899422766994895 + ], + [ + 0.7120665375181631, + 1.1879134295223783, + -0.2595877985531746 + ], + [ + 0.6774670658837286, + 1.0504631148243138, + -0.2648030227303695 + ], + [ + 0.6504867875081664, + 0.9597112853599127, + -0.23745111167223168 + ], + [ + 0.6193776742697882, + 0.9155351437024627, + -0.18323572167166768 + ], + [ + 0.5837339602596815, + 0.9141386293950683, + -0.10560698507438904 + ], + [ + 0.5415884460814804, + 0.9380587054054011, + -2.2575462675432095e-17 + ], + [ + 0.4998002955069767, + 0.9625977533341139, + 0.10560698507438901 + ], + [ + 0.4831878553688755, + 0.994164372305791, + 0.18323572167166757 + ], + [ + 0.5058909596662179, + 1.043193725488158, + 0.2374511116722316 + ], + [ + 0.5709942102345215, + 1.1119352466947718, + 0.2648030227303695 + ], + [ + 0.6727299387039934, + 1.210624425436743, + 0.2595877985531747 + ], + [ + 0.7747972526240341, + 1.3202114436747618, + 0.22899422766994906 + ], + [ + 0.8405218951106593, + 1.4037872743926287, + 0.16722154626051933 + ], + [ + 0.8669440407632514, + 1.4598522912787, + 0.08190712261781448 + ], + [ + 0.6747675549398687, + 1.5761175897201567, + 0.04315094050455758 + ], + [ + 0.6418781855659187, + 1.5402689551314255, + -0.0597865894186009 + ], + [ + 0.6128026122016801, + 1.4725564656916954, + -0.1651757316448625 + ], + [ + 0.5816480896815411, + 1.3611730645544264, + -0.2397474500794573 + ], + [ + 0.5472800096866239, + 1.2062318498444693, + -0.2843495935416027 + ], + [ + 0.5213814726806816, + 1.0625060922574112, + -0.3042012206356329 + ], + [ + 0.5009514960585014, + 0.9760264466006231, + -0.2882876815579232 + ], + [ + 0.47452670308349354, + 0.9474360366600977, + -0.2390744097396612 + ], + [ + 0.4418444840084505, + 0.9677455960553881, + -0.1579893241524496 + ], + [ + 0.4061611423340547, + 1.012802365534273, + -0.04880009894650197 + ], + [ + 0.3786272977466916, + 1.055385440248745, + 0.056237775766044704 + ], + [ + 0.3784140919137805, + 1.1014881010209514, + 0.13840975359350366 + ], + [ + 0.4117230161427358, + 1.1607308917735681, + 0.2050439912292132 + ], + [ + 0.47661949337380466, + 1.2350210382131175, + 0.24712728803611098 + ], + [ + 0.566158016901067, + 1.335899419771599, + 0.2565576434206832 + ], + [ + 0.6501441162714698, + 1.4474170435013303, + 0.23999596503249804 + ], + [ + 0.6958363172405647, + 1.5303414874356938, + 0.1949473069019224 + ], + [ + 0.6992175100214378, + 1.5729224902689016, + 0.12621208908332482 + ], + [ + 0.48125755476589027, + 1.6327121962470514, + 0.0678503293801498 + ], + [ + 0.45463813258623587, + 1.5852737618914017, + -0.06062296276175196 + ], + [ + 0.4324174315016329, + 1.506590528350513, + -0.17961421286481447 + ], + [ + 0.4074962270539969, + 1.38230656336352, + -0.2655472130528816 + ], + [ + 0.3819889474923266, + 1.2176026234507482, + -0.32416620481745256 + ], + [ + 0.36325435501789977, + 1.0705550451905188, + -0.3553116713763591 + ], + [ + 0.3474263727210636, + 0.9899968231734981, + -0.3454658440519044 + ], + [ + 0.32553224204004405, + 0.9764136597052974, + -0.29515420817871424 + ], + [ + 0.29645455398156983, + 1.0161820335357825, + -0.20833625636908712 + ], + [ + 0.2671602550936994, + 1.0832853505270001, + -0.0957380144633737 + ], + [ + 0.2531525771955097, + 1.1477151416881815, + 0.015044101221056748 + ], + [ + 0.26829986894514757, + 1.207978467421345, + 0.11318236906932716 + ], + [ + 0.31089820732900086, + 1.2717525720587717, + 0.19944500635945006 + ], + [ + 0.37416184782537165, + 1.346077613792873, + 0.25682531737697495 + ], + [ + 0.449458118806745, + 1.4464154875035882, + 0.280102435251781 + ], + [ + 0.5105198492747179, + 1.5555195666693973, + 0.28018369926163605 + ], + [ + 0.5302189960437138, + 1.627352018283343, + 0.24889496185031013 + ], + [ + 0.5122099820003392, + 1.648909395730123, + 0.1759370000846315 + ], + [ + 0.286767916757862, + 1.6706547050303397, + 0.07444544001402678 + ], + [ + 0.2666031677570669, + 1.6202758499914849, + -0.07470101980288964 + ], + [ + 0.2511625513652636, + 1.5323531815824436, + -0.20463134647910344 + ], + [ + 0.23435844330745684, + 1.3955254104462318, + -0.3019459595384514 + ], + [ + 0.21765303536184658, + 1.2228728328522702, + -0.37191456908495785 + ], + [ + 0.20398151844142692, + 1.076723222685701, + -0.4075788920312176 + ], + [ + 0.1910308805397925, + 1.0040656106997352, + -0.3960981585766351 + ], + [ + 0.17323008380768987, + 1.0022217336899046, + -0.3428777833409415 + ], + [ + 0.14783399587423848, + 1.059446720835093, + -0.2542917351827847 + ], + [ + 0.12464576195298586, + 1.1514863955825259, + -0.13726030696030558 + ], + [ + 0.12359965873509599, + 1.2386572652473653, + -0.009908678165170338 + ], + [ + 0.15258771161737067, + 1.3069153426293816, + 0.115660021725092 + ], + [ + 0.20206789875391704, + 1.3669829275604846, + 0.22476099505309713 + ], + [ + 0.2619006970171991, + 1.4369836467854167, + 0.29624729047057413 + ], + [ + 0.3193645192022082, + 1.5317972820672576, + 0.3348841409629902 + ], + [ + 0.35152260438188165, + 1.6272571800095825, + 0.34861319022203785 + ], + [ + 0.34586241322740235, + 1.680852131758296, + 0.3129908562899573 + ], + [ + 0.3165128815345491, + 1.690293875813057, + 0.21408040408752155 + ], + [ + 0.09190462063920565, + 1.6945292047561022, + 0.07233120707913511 + ], + [ + 0.07555432023458059, + 1.6415558070414291, + -0.09488175468784217 + ], + [ + 0.06838815214411983, + 1.5464910444190576, + -0.23769651454303067 + ], + [ + 0.06277249395622937, + 1.3998579417606718, + -0.346516325044834 + ], + [ + 0.0552946974649528, + 1.2221898209436561, + -0.4234387738110699 + ], + [ + 0.046329685418790165, + 1.0794785407235172, + -0.45536515718052023 + ], + [ + 0.03561105888103276, + 1.0130920391724973, + -0.43723277750165507 + ], + [ + 0.02007963483044352, + 1.0212596921427382, + -0.3844392146419813 + ], + [ + -0.0030724751115246, + 1.099697529745657, + -0.29725884111175743 + ], + [ + -0.021087999796610288, + 1.2194157015990863, + -0.16810653815888713 + ], + [ + -0.011004451327402659, + 1.3227066196168558, + -0.010291700959570759 + ], + [ + 0.02975681374026949, + 1.3868323048020497, + 0.1491815397020015 + ], + [ + 0.08425496745792463, + 1.4349244363399614, + 0.2789294898849236 + ], + [ + 0.13705736615115371, + 1.4949364683622999, + 0.3636091905465985 + ], + [ + 0.1712760590393041, + 1.5735011828026277, + 0.4146140041466804 + ], + [ + 0.17325082976595663, + 1.6477436730877868, + 0.4252858279682644 + ], + [ + 0.14997654698517765, + 1.6935072985676276, + 0.36526627753687485 + ], + [ + 0.11891603187197684, + 1.7095590468444595, + 0.2364548022177311 + ], + [ + -0.10361734134467956, + 1.7021574223163147, + 0.0659575710257303 + ], + [ + -0.11638688170499267, + 1.6467251597324999, + -0.11840562339111076 + ], + [ + -0.11456138173528453, + 1.546950899776601, + -0.2756539906100175 + ], + [ + -0.10828961251621859, + 1.3942872672271447, + -0.3960048071594742 + ], + [ + -0.10582154582879963, + 1.2152386833907718, + -0.47564198727643714 + ], + [ + -0.11020544409314056, + 1.0766614325468944, + -0.5003258956950395 + ], + [ + -0.12070241400260345, + 1.016420922196938, + -0.47687461933020514 + ], + [ + -0.13508378456854014, + 1.0376302866071736, + -0.4254954671319658 + ], + [ + -0.15526182942071626, + 1.1408238541756377, + -0.3345402060585244 + ], + [ + -0.16920661298751452, + 1.284510593242946, + -0.18137324319867365 + ], + [ + -0.15008639285259195, + 1.3900617373199153, + 0.01722259622321011 + ], + [ + -0.09790570741446933, + 1.4349647756382047, + 0.20930878803994496 + ], + [ + -0.040736739566982004, + 1.462378705486728, + 0.35279592657853254 + ], + [ + 0.0001831310734239644, + 1.50440386979312, + 0.44540264435230403 + ], + [ + 0.01099847269354308, + 1.560276476375421, + 0.4957564889296875 + ], + [ + -0.011383214330079008, + 1.621767208516491, + 0.48491870511991114 + ], + [ + -0.047028109804189165, + 1.6788882467763555, + 0.396282108354433 + ], + [ + -0.0785391553207724, + 1.7122463545102078, + 0.2472787869005132 + ], + [ + -0.2998361084919811, + 1.6906253309076322, + 0.05539353095410376 + ], + [ + -0.3071257999638517, + 1.635177208535604, + -0.14431519774768792 + ], + [ + -0.2967065276521422, + 1.5323267428635856, + -0.31548061994135124 + ], + [ + -0.2794964604308098, + 1.3770746026305487, + -0.4458097791830202 + ], + [ + -0.26709535961300573, + 1.2008842619410953, + -0.5258719199924314 + ], + [ + -0.2679089041339059, + 1.0711626898510203, + -0.5453019802392234 + ], + [ + -0.279151326612583, + 1.0228521991844886, + -0.518396135044175 + ], + [ + -0.2913854098164401, + 1.0590953668591556, + -0.4629942929768118 + ], + [ + -0.3080944030876766, + 1.1819354911760005, + -0.35749590963811345 + ], + [ + -0.31887874862062887, + 1.3368694989187202, + -0.1701714850041719 + ], + [ + -0.29033420266853494, + 1.4267252266621013, + 0.07059231754690598 + ], + [ + -0.22644581234325847, + 1.4390205083131762, + 0.2854825250492303 + ], + [ + -0.1689529107317898, + 1.440443439944595, + 0.430819261630707 + ], + [ + -0.1402320235551603, + 1.4629021342277666, + 0.5201876177894609 + ], + [ + -0.14723996133437878, + 1.5036242051189117, + 0.557353087078249 + ], + [ + -0.18910650675096585, + 1.5688726298975109, + 0.5211452984239922 + ], + [ + -0.23957714938318164, + 1.6462280459648635, + 0.4122606317781298 + ], + [ + -0.27640828396025197, + 1.6954703045297672, + 0.2509515382602569 + ], + [ + -0.49611964546821574, + 1.656266669998338, + 0.0401073549179288 + ], + [ + -0.49715191810862325, + 1.6044517938247391, + -0.17140337375355713 + ], + [ + -0.4788950533295503, + 1.5006229635367312, + -0.3536960464309075 + ], + [ + -0.4520534727879902, + 1.3466784703457737, + -0.49111472709294735 + ], + [ + -0.43061382967246536, + 1.1788336776473896, + -0.5709430605230897 + ], + [ + -0.42693195886148927, + 1.0648516674810842, + -0.5865689415815862 + ], + [ + -0.4360862588159168, + 1.0330483399114312, + -0.5542906302212544 + ], + [ + -0.4464252207523265, + 1.0821284777632336, + -0.4879609945263332 + ], + [ + -0.4628098837833616, + 1.2148527047661053, + -0.35830565672845177 + ], + [ + -0.46950306858265345, + 1.3633123325009329, + -0.13214711024626138 + ], + [ + -0.4278876936712687, + 1.420232067519497, + 0.14161352815298064 + ], + [ + -0.3515357593244017, + 1.3952838929604765, + 0.362899036844025 + ], + [ + -0.29320319376602544, + 1.3744994724877024, + 0.49804299696274773 + ], + [ + -0.27366016844854013, + 1.3838208723650767, + 0.5756420230240433 + ], + [ + -0.29608187626215277, + 1.4217932646980718, + 0.5965559655163457 + ], + [ + -0.35819120927923725, + 1.4995079761689543, + 0.541977948195165 + ], + [ + -0.42742949465268176, + 1.592390931589578, + 0.4203632851810554 + ], + [ + -0.47367415327637563, + 1.6525046087445707, + 0.24812387596480745 + ], + [ + -0.6882269782903742, + 1.5952464702850073, + 0.02090017734787892 + ], + [ + -0.6852127395881024, + 1.5498210544108642, + -0.1970334897318526 + ], + [ + -0.660579328285889, + 1.448816731351296, + -0.3855598094691246 + ], + [ + -0.6264022270559577, + 1.3008211314781122, + -0.5261712738278825 + ], + [ + -0.5974886391301462, + 1.146333138793676, + -0.604691382641604 + ], + [ + -0.5877273628334835, + 1.051341558596248, + -0.615557197388502 + ], + [ + -0.5922184343928387, + 1.0354488355388245, + -0.574747800959161 + ], + [ + -0.601544070009453, + 1.094949888628377, + -0.49256717413589074 + ], + [ + -0.6188195745276486, + 1.228947119813489, + -0.3333716962451346 + ], + [ + -0.6169737378683424, + 1.3534103248408977, + -0.07209274275781107 + ], + [ + -0.5563887068392378, + 1.3673819298760546, + 0.21700589895103484 + ], + [ + -0.46619706898784985, + 1.3115952554142374, + 0.42791085903260084 + ], + [ + -0.4072490757730176, + 1.277720085555935, + 0.5466798397896712 + ], + [ + -0.3969754272574946, + 1.2808156166162132, + 0.6107870393804129 + ], + [ + -0.43661896497863856, + 1.3235025853936102, + 0.6176986082983233 + ], + [ + -0.5198210842960936, + 1.4131847750052045, + 0.5511227462006452 + ], + [ + -0.6066867615212839, + 1.5134593707297956, + 0.41975223940611345 + ], + [ + -0.6634227458422974, + 1.5809166623475335, + 0.23726730770627766 + ] + ] + } + }, + "Volume8": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier8" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface7": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface7", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart7" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier8" + }, + "label": { + "$type": "ref", + "value": "Volume8" + }, + "targetlabel": -2.7112534817415535, + "constraint_weight": 100.0 + }, + "BiotSavart8": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.7499399138475737, + 0.0, + 0.0 + ], + [ + 1.7112327928234818, + 0.017506864033699197, + -0.24092856551364292 + ], + [ + 1.6035527057357706, + 0.03908277977599346, + -0.4375074131969386 + ], + [ + 1.4443810096716074, + 0.08025822708819676, + -0.5782993243266441 + ], + [ + 1.290237902281933, + 0.12814239130737196, + -0.6539912591107727 + ], + [ + 1.215831094257398, + 0.1546869764725872, + -0.6527130424022795 + ], + [ + 1.2224812930318356, + 0.15275064300145805, + -0.5940172515106485 + ], + [ + 1.2934934990263711, + 0.12093325801886945, + -0.48947459650213543 + ], + [ + 1.421884025477673, + 0.06421029095681399, + -0.29511525580020403 + ], + [ + 1.4963749753442832, + 2.2587573546838608e-17, + -1.116261091736005e-16 + ], + [ + 1.4218840254776732, + -0.06421029095681395, + 0.29511525580020387 + ], + [ + 1.2934934990263713, + -0.12093325801886935, + 0.4894745965021352 + ], + [ + 1.2224812930318354, + -0.15275064300145805, + 0.5940172515106483 + ], + [ + 1.215831094257398, + -0.15468697647258722, + 0.6527130424022796 + ], + [ + 1.2902379022819328, + -0.12814239130737207, + 0.6539912591107728 + ], + [ + 1.444381009671607, + -0.08025822708819687, + 0.5782993243266444 + ], + [ + 1.6035527057357704, + -0.03908277977599354, + 0.43750741319693875 + ], + [ + 1.7112327928234816, + -0.017506864033699242, + 0.24092856551364333 + ], + [ + 1.7355906625493982, + 0.2038498707757356, + -0.026427698317147315 + ], + [ + 1.7064558171601236, + 0.2192187656241199, + -0.26297097068974407 + ], + [ + 1.60647207629564, + 0.23344243847414323, + -0.4512926773584909 + ], + [ + 1.4560822282558812, + 0.26396884878020543, + -0.5852423374469826 + ], + [ + 1.32251998990133, + 0.2978920937960577, + -0.6542607347031474 + ], + [ + 1.2677533117746083, + 0.3110060326269923, + -0.6414375366479481 + ], + [ + 1.278744336047737, + 0.2977305065871559, + -0.5683278658746427 + ], + [ + 1.3459714217251455, + 0.2591643213371251, + -0.4439849626854962 + ], + [ + 1.4510101090485066, + 0.2034324978830956, + -0.22526355817176902 + ], + [ + 1.4727740111735448, + 0.13971701521880608, + 0.07559941359460234 + ], + [ + 1.3546597332232937, + 0.07010516094085882, + 0.34601844705320467 + ], + [ + 1.2177536996679283, + 0.0119102580551212, + 0.5087646454584472 + ], + [ + 1.1522381138569737, + -0.012920236476771017, + 0.5936432953425443 + ], + [ + 1.1554080077227837, + -0.0032956098899661573, + 0.6406247036164997 + ], + [ + 1.247539489156416, + 0.03881131073236905, + 0.6344822529968209 + ], + [ + 1.4154784786777022, + 0.10141599872589238, + 0.5552344783628214 + ], + [ + 1.5796564196997858, + 0.15167882589919093, + 0.4121535045695006 + ], + [ + 1.6907539536213603, + 0.18091683813353934, + 0.21413753197467392 + ], + [ + 1.6927784745754246, + 0.40351593937095315, + -0.05086940260919832 + ], + [ + 1.674482372249018, + 0.42135412148958323, + -0.27729179885422084 + ], + [ + 1.5855082160692535, + 0.4286754188240815, + -0.45333326215870523 + ], + [ + 1.4512627633995892, + 0.44684693558449523, + -0.5784357234063192 + ], + [ + 1.3437441707539237, + 0.46731935527974033, + -0.6365757468196482 + ], + [ + 1.3044707945901233, + 0.4664030152840993, + -0.6076805760551359 + ], + [ + 1.312216449655091, + 0.4411238825054894, + -0.5183847839979441 + ], + [ + 1.365812132922621, + 0.39654711587545205, + -0.37651307592933997 + ], + [ + 1.4353034826504345, + 0.3381016147989073, + -0.1466140211329326 + ], + [ + 1.4059929905771227, + 0.2695367279820211, + 0.13845390867870205 + ], + [ + 1.2606215526073792, + 0.19448254789291844, + 0.3711090603127386 + ], + [ + 1.1262457448245837, + 0.13535755800480406, + 0.5020092657356882 + ], + [ + 1.0700199739548208, + 0.11622769144032266, + 0.5704326461067066 + ], + [ + 1.086236094067088, + 0.1387383408719318, + 0.6086256014423818 + ], + [ + 1.1943501582356102, + 0.19852607322260338, + 0.5973834600123756 + ], + [ + 1.3710206955199662, + 0.27642295252169957, + 0.516875418742801 + ], + [ + 1.5358749349653702, + 0.335945027545272, + 0.3768320139648721 + ], + [ + 1.6448938253171974, + 0.37271078326620216, + 0.18393694332370858 + ], + [ + 1.6248766365042067, + 0.5935561019532886, + -0.07061083376075952 + ], + [ + 1.6138668886832774, + 0.6159538635629889, + -0.282855805529043 + ], + [ + 1.5397947325705073, + 0.6191261108921903, + -0.44682756668781853 + ], + [ + 1.4315653240942443, + 0.6282072758879927, + -0.5592885871107037 + ], + [ + 1.349075605189643, + 0.6367343532044218, + -0.5980200584193167 + ], + [ + 1.3148578781638842, + 0.6195519953955134, + -0.5507483850289323 + ], + [ + 1.3130277130140833, + 0.5782169141600607, + -0.448381622975396 + ], + [ + 1.345535721216105, + 0.5229626236115934, + -0.2958037808995323 + ], + [ + 1.3737244690612669, + 0.45729719477388525, + -0.07246721180841648 + ], + [ + 1.3056447827048234, + 0.3837278185697447, + 0.17791678024835236 + ], + [ + 1.1518267426481705, + 0.3089208808667748, + 0.36921542055009393 + ], + [ + 1.0258819011420897, + 0.25551058930666065, + 0.47440808740615326 + ], + [ + 0.979841383039496, + 0.24467936695566952, + 0.5318903253344412 + ], + [ + 1.012195571144148, + 0.2777136619815411, + 0.565105678608988 + ], + [ + 1.1351589989052713, + 0.3510946355961817, + 0.5497856791092974 + ], + [ + 1.3151041200808624, + 0.44231330861972934, + 0.468509862578238 + ], + [ + 1.4749553615012625, + 0.5106603146108274, + 0.3350264159864543 + ], + [ + 1.5776294552044707, + 0.5543447360775351, + 0.15236669705506015 + ], + [ + 1.5374315427945513, + 0.7720855062144011, + -0.0845859018408523 + ], + [ + 1.5305004339392343, + 0.7983434603545468, + -0.28147529048362224 + ], + [ + 1.475954898258967, + 0.8051709669216045, + -0.4326767326576064 + ], + [ + 1.3977759826031124, + 0.8112020666267745, + -0.5223029705305589 + ], + [ + 1.3297116379894824, + 0.8029020222958164, + -0.5318159650450547 + ], + [ + 1.287899285168342, + 0.7601070371201168, + -0.470886276531197 + ], + [ + 1.2726992374666473, + 0.6960133860740192, + -0.3667607859323997 + ], + [ + 1.2811556295294917, + 0.6276637624894801, + -0.21641761556810324 + ], + [ + 1.271970115030991, + 0.5569635874079838, + -0.017040763841720888 + ], + [ + 1.183563187104379, + 0.4842710128242112, + 0.18877330025823733 + ], + [ + 1.0388279907934324, + 0.4194535493847129, + 0.3445926704327631 + ], + [ + 0.9285757492699452, + 0.38171206520513695, + 0.43568495420764847 + ], + [ + 0.8949539865313977, + 0.38069236713762017, + 0.49046369728969497 + ], + [ + 0.9407059216646501, + 0.4180886193724604, + 0.5204447262212245 + ], + [ + 1.0718372715448063, + 0.4993974455691225, + 0.4982607233151665 + ], + [ + 1.248932441129265, + 0.6007223362113017, + 0.416065929517511 + ], + [ + 1.3993751365710512, + 0.676944231649244, + 0.29188440891982015 + ], + [ + 1.493653186572907, + 0.7275127024504963, + 0.12243459354867141 + ], + [ + 1.4338582396013595, + 0.9403448594883798, + -0.09324822765053185 + ], + [ + 1.4314941783828656, + 0.9721351503661959, + -0.27166081973168316 + ], + [ + 1.3966881770087216, + 0.9903150495294737, + -0.4014121797720497 + ], + [ + 1.3387240670799332, + 0.9899990256146322, + -0.4580233822429471 + ], + [ + 1.270345245775569, + 0.948678349605896, + -0.4425866189506135 + ], + [ + 1.2162623063846965, + 0.8699028318754771, + -0.3830419064997633 + ], + [ + 1.1895548904871296, + 0.7849290009741683, + -0.28971857191848205 + ], + [ + 1.1774682114113533, + 0.7092228804603582, + -0.15398889301054278 + ], + [ + 1.1433997270806209, + 0.6402667919563263, + 0.01095467796308304 + ], + [ + 1.0522195041685736, + 0.5778822597942366, + 0.17371323659862414 + ], + [ + 0.928587722804188, + 0.5312769127149423, + 0.30606702459974566 + ], + [ + 0.8396065574368231, + 0.5106211743453016, + 0.3969656214424963 + ], + [ + 0.8169950099041929, + 0.516228099631244, + 0.4558277006279105 + ], + [ + 0.8691953110612981, + 0.5564688881554865, + 0.4784064838059188 + ], + [ + 1.00272596206341, + 0.644700856883438, + 0.4450365120666858 + ], + [ + 1.1728518869168392, + 0.753288692402164, + 0.36427467742213154 + ], + [ + 1.3102161884788135, + 0.8367007787010647, + 0.25113750342974184 + ], + [ + 1.3945491403616224, + 0.8939197964710807, + 0.09541280261125577 + ], + [ + 1.3173040106099114, + 1.100419703557282, + -0.09617928279494879 + ], + [ + 1.3188916347364943, + 1.1392696067507475, + -0.24635740632676242 + ], + [ + 1.2927276668929417, + 1.162194495281393, + -0.3433902351336922 + ], + [ + 1.2377729361384622, + 1.139151844543784, + -0.37360644984296953 + ], + [ + 1.1646516688537256, + 1.0536609216150892, + -0.35573559768821317 + ], + [ + 1.106263587694868, + 0.9430612041839905, + -0.31171364752230935 + ], + [ + 1.074003513445556, + 0.8471206441975153, + -0.23369579583798325 + ], + [ + 1.0481082233314862, + 0.7706819719582183, + -0.11972187203723714 + ], + [ + 1.002935605084633, + 0.7114848093429473, + 0.00934009142083555 + ], + [ + 0.9209834159354211, + 0.6691111510348406, + 0.1406664711648829 + ], + [ + 0.820865633914493, + 0.6428136341156081, + 0.2632284823686833 + ], + [ + 0.7487692506850939, + 0.6348715412958709, + 0.35959799240330426 + ], + [ + 0.732956110229055, + 0.6467651870535418, + 0.42001182080421373 + ], + [ + 0.7916125226959068, + 0.6933148142500511, + 0.43232584075746766 + ], + [ + 0.9278548742997933, + 0.7885686808581638, + 0.3918394943574123 + ], + [ + 1.0879317292017323, + 0.9016290001902119, + 0.31790470663645126 + ], + [ + 1.2088931761266242, + 0.9897653732047562, + 0.2158303842962236 + ], + [ + 1.2818589590372653, + 1.0517023150185796, + 0.07215372655970334 + ], + [ + 1.189403294308341, + 1.2549582395650312, + -0.0875088785011702 + ], + [ + 1.1872115537800667, + 1.2932941103426303, + -0.19918078582091217 + ], + [ + 1.1543173938310245, + 1.298635041305503, + -0.26885287462783897 + ], + [ + 1.0961769578489473, + 1.2404979706449302, + -0.2981735479957864 + ], + [ + 1.0269998816325194, + 1.1187556793663092, + -0.2970994039878328 + ], + [ + 0.9732742537244592, + 0.9882804979750046, + -0.2704979008443506 + ], + [ + 0.9391908382563696, + 0.8874889681865655, + -0.2081498509067685 + ], + [ + 0.905925308384484, + 0.816059170428529, + -0.11853602106933131 + ], + [ + 0.859778068794831, + 0.7752148070207072, + -0.01825600587553838 + ], + [ + 0.7921330596192646, + 0.7579912233485852, + 0.09739444487462853 + ], + [ + 0.7112173718729822, + 0.7503142497677693, + 0.21801853130225368 + ], + [ + 0.6509111314714889, + 0.7546975741671434, + 0.3131324424007514 + ], + [ + 0.6438695903761579, + 0.7771142982530547, + 0.368861046733934 + ], + [ + 0.7112022012345496, + 0.8312311125923715, + 0.3778154473719353 + ], + [ + 0.8470332921567887, + 0.9315115149383042, + 0.3418029917656366 + ], + [ + 0.9942135951980517, + 1.0471950642405257, + 0.28033875879170533 + ], + [ + 1.0978511519682161, + 1.1355963939376779, + 0.18913399132405073 + ], + [ + 1.158612821935919, + 1.2003424686012028, + 0.05565670951808687 + ], + [ + 1.0451276684817317, + 1.399805855630095, + -0.05548797602371151 + ], + [ + 1.02719743097053, + 1.419277281712042, + -0.13649099541611054 + ], + [ + 0.9844516677687085, + 1.3909430057721313, + -0.20591869755545925 + ], + [ + 0.9313171068738922, + 1.3030880370836309, + -0.25477886636753405 + ], + [ + 0.8739049613518142, + 1.1590984973887513, + -0.27197031362962787 + ], + [ + 0.8275181189256863, + 1.0146173559174396, + -0.26047669290497516 + ], + [ + 0.7946675001804756, + 0.9127949163545556, + -0.2153765838290464 + ], + [ + 0.7602828330082269, + 0.8534815754987634, + -0.14654790978408272 + ], + [ + 0.7181862956825182, + 0.8353763942894927, + -0.06226211450410367 + ], + [ + 0.6632444843379076, + 0.8425947618249524, + 0.04939023189493394 + ], + [ + 0.5983734770765147, + 0.8518989430054755, + 0.16743955291708315 + ], + [ + 0.554077864351667, + 0.8698314807254186, + 0.25431633601623965 + ], + [ + 0.5608373974949044, + 0.9052145508104409, + 0.30669883638439377 + ], + [ + 0.6324415542519832, + 0.9671676322566793, + 0.3224254435198857 + ], + [ + 0.7604786431695896, + 1.0720765192693884, + 0.299985143052067 + ], + [ + 0.8929341114294591, + 1.1898028676036614, + 0.25408879206345214 + ], + [ + 0.980277753057681, + 1.2766682224034875, + 0.17333143215940394 + ], + [ + 1.027291860114585, + 1.34401591230123, + 0.054512939949190556 + ], + [ + 0.8778060686772869, + 1.5204047101413558, + -2.2548506708506994e-17 + ], + [ + 0.8425014376303949, + 1.5058925988704872, + -0.08134013704517401 + ], + [ + 0.7995954060206643, + 1.4483308072528465, + -0.17486786628677686 + ], + [ + 0.7582949037726598, + 1.3427531040013905, + -0.24327254948292448 + ], + [ + 0.7127121166430788, + 1.182845234174397, + -0.27448345103098604 + ], + [ + 0.6753922917259745, + 1.0273911776491766, + -0.2796138049325193 + ], + [ + 0.6491025050923054, + 0.9292271306679223, + -0.25104192197891106 + ], + [ + 0.6179052161263211, + 0.8867760000950828, + -0.19469916381102786 + ], + [ + 0.5789160545064431, + 0.8921172896889219, + -0.1137103084914553 + ], + [ + 0.53220106787058, + 0.9217992893942566, + -2.5761290354604733e-17 + ], + [ + 0.4831382087727064, + 0.9474146547056975, + 0.11371030849145526 + ], + [ + 0.4590179354855331, + 0.9785096143438491, + 0.19469916381102775 + ], + [ + 0.48018304849799015, + 1.0267528244040154, + 0.251041921978911 + ], + [ + 0.5520507136052111, + 1.0986024709794726, + 0.2796138049325193 + ], + [ + 0.6680179632188417, + 1.2086494156850824, + 0.2744834510309861 + ], + [ + 0.7837108471892827, + 1.3280792022280945, + 0.24327254948292462 + ], + [ + 0.8544935691542564, + 1.4166353379896506, + 0.17486786628677692 + ], + [ + 0.8828905271776142, + 1.4825739471480759, + 0.08134013704517419 + ], + [ + 0.6897035971010093, + 1.6050100389182278, + 0.055487976023711354 + ], + [ + 0.6503059930860913, + 1.5616688041108155, + -0.054512939949190375 + ], + [ + 0.615488236276902, + 1.4872795481144245, + -0.17333143215940383 + ], + [ + 0.5839324531256145, + 1.3682050582054268, + -0.2540887920634519 + ], + [ + 0.5482061789032934, + 1.1946320836550806, + -0.2999851430520668 + ], + [ + 0.5213709621263388, + 1.0312942685194715, + -0.32242544351988556 + ], + [ + 0.5035200981297097, + 0.9383067090281596, + -0.30669883638439366 + ], + [ + 0.4762572271438137, + 0.9147612465658811, + -0.2543163360162396 + ], + [ + 0.4385793875615963, + 0.9441561036018246, + -0.16743955291708307 + ], + [ + 0.39808622666715393, + 0.9956839532690143, + -0.04939023189493387 + ], + [ + 0.3643640313352875, + 1.0396557738556493, + 0.06226211450410378 + ], + [ + 0.358995309539782, + 1.0851650351957078, + 0.1465479097840827 + ], + [ + 0.3931698359180987, + 1.1445997008954434, + 0.21537658382904634 + ], + [ + 0.4649253458822571, + 1.2239603910402759, + 0.2604766929049752 + ], + [ + 0.5668562635511222, + 1.336373145718304, + 0.2719703136296279 + ], + [ + 0.662848790045077, + 1.4580882920736329, + 0.25477886636753405 + ], + [ + 0.7123661443305965, + 1.548031655971725, + 0.20591869755545913 + ], + [ + 0.7155314654914868, + 1.5992177107786119, + 0.1364909954161105 + ], + [ + 0.4921240689977442, + 1.6575325879984384, + 0.08750887850117019 + ], + [ + 0.46022066008200735, + 1.603559371247484, + -0.055656709518086565 + ], + [ + 0.43452974961192203, + 1.5185651841473247, + -0.1891339913240506 + ], + [ + 0.40979073075094696, + 1.3846117623496346, + -0.2803387587917051 + ], + [ + 0.3831959897759049, + 1.1993081063280977, + -0.34180299176563655 + ], + [ + 0.3642661593037221, + 1.0315347297927182, + -0.3778154473719353 + ], + [ + 0.3510659287431837, + 0.9461645711165607, + -0.36886104673393394 + ], + [ + 0.3281317056674925, + 0.9410543625439538, + -0.3131324424007515 + ], + [ + 0.29418251518385957, + 0.9910894365386909, + -0.21801853130225374 + ], + [ + 0.26037312545588687, + 1.0650029644820689, + -0.09739444487462856 + ], + [ + 0.2414666818723683, + 1.132197052703402, + 0.018256005875538335 + ], + [ + 0.2537653183901189, + 1.1925839162064793, + 0.1185360210693311 + ], + [ + 0.2989925728998205, + 1.2571076090249005, + 0.20814985090676827 + ], + [ + 0.36923889044886005, + 1.3370204775622254, + 0.27049790084435066 + ], + [ + 0.4553708981430822, + 1.448785826860528, + 0.2970994039878328 + ], + [ + 0.5262142769970787, + 1.5695660778627967, + 0.29817354799578644 + ], + [ + 0.5474922390997073, + 1.648985707740665, + 0.26885287462783886 + ], + [ + 0.5264197772314795, + 1.6748024204112477, + 0.1991807858209124 + ], + [ + 0.294339412800592, + 1.69102858947395, + 0.09617928279494878 + ], + [ + 0.26987144250636197, + 1.6359735801042383, + -0.07215372655970298 + ], + [ + 0.25271536891819274, + 1.5418148875896907, + -0.21583038429622337 + ], + [ + 0.23686775435262214, + 1.3929910151669394, + -0.3179047066364509 + ], + [ + 0.2189930731020571, + 1.1978302325979209, + -0.39183949435741205 + ], + [ + 0.2046219806126805, + 1.0322139617335668, + -0.43232584075746755 + ], + [ + 0.19363702715723427, + 0.95814120484416, + -0.42001182080421373 + ], + [ + 0.1754302575594588, + 0.9658889633138659, + -0.3595979924033042 + ], + [ + 0.14626012008586559, + 1.0322973091213714, + -0.2632284823686833 + ], + [ + 0.118975546783908, + 1.132150610181665, + -0.1406664711648829 + ], + [ + 0.11469611675540387, + 1.2243101170346833, + -0.009340091420835556 + ], + [ + 0.1433760542887602, + 1.2930293332995497, + 0.11972187203723683 + ], + [ + 0.19662624122250894, + 1.3536746484963507, + 0.23369579583798294 + ], + [ + 0.26358316629944534, + 1.429582972317465, + 0.31171364752230923 + ], + [ + 0.3301712906667287, + 1.5354483925948124, + 0.355735597688213 + ], + [ + 0.3676479680735876, + 1.6415187290846536, + 0.37360644984296937 + ], + [ + 0.3601261236056497, + 1.7006322473449713, + 0.3433902351336922 + ], + [ + 0.32719060383740795, + 1.7118284638959644, + 0.24635740632676265 + ], + [ + 0.09743341683436574, + 1.7119300906646013, + 0.09324822765053183 + ], + [ + 0.07688268250895988, + 1.6546748806144567, + -0.09541280261125536 + ], + [ + 0.06949603548193725, + 1.5530308930228052, + -0.25113750342974167 + ], + [ + 0.06594120054541647, + 1.392363875147579, + -0.36427467742213127 + ], + [ + 0.05696433887094824, + 1.1907365846228235, + -0.4450365120666856 + ], + [ + 0.047318538027683876, + 1.0309796643071445, + -0.47840648380591877 + ], + [ + 0.03856914347592527, + 0.9656524831577723, + -0.45582770062791056 + ], + [ + 0.02240762997486273, + 0.9824311950969378, + -0.3969656214424964 + ], + [ + -0.00419455854678602, + 1.0698190139482402, + -0.3060670245997457 + ], + [ + -0.025649034706119067, + 1.2001899508645686, + -0.1737132365986242 + ], + [ + -0.01721255650656567, + 1.3103466063101745, + -0.010954677963083116 + ], + [ + 0.02547092571816774, + 1.374328823461037, + 0.15398889301054244 + ], + [ + 0.08499100976720529, + 1.4226492548449536, + 0.2897185719184817 + ], + [ + 0.14522679803583866, + 1.4882654709323377, + 0.3830419064997632 + ], + [ + 0.18640692789121655, + 1.5744904292213768, + 0.44258661895061346 + ], + [ + 0.18800227236414638, + 1.6543685635561605, + 0.45802338224294703 + ], + [ + 0.15929390213820824, + 1.704724967219666, + 0.4014121797720497 + ], + [ + 0.1261466469374983, + 1.725777899032192, + 0.27166081973168343 + ], + [ + -0.10007010912183603, + 1.717497525746784, + 0.08458590184085231 + ], + [ + -0.1167821113884542, + 1.6572979552409643, + -0.12243459354867094 + ], + [ + -0.11343666673194228, + 1.5503665335194707, + -0.29188440891981987 + ], + [ + -0.1042254167849084, + 1.3819683897341073, + -0.4160659295175107 + ], + [ + -0.10342776132448642, + 1.1779370286653634, + -0.49826072331516635 + ], + [ + -0.10827759542261142, + 1.0237195353382715, + -0.5204447262212243 + ], + [ + -0.11778773229768733, + 0.965399071123157, + -0.49046369728969513 + ], + [ + -0.13371552923630164, + 0.99502622080851, + -0.4356849542076486 + ], + [ + -0.156156565922004, + 1.1093782048818155, + -0.34459267043276315 + ], + [ + -0.17239059413000274, + 1.2671312934285723, + -0.1887733002582374 + ], + [ + -0.15364044183726677, + 1.3800402261754443, + 0.017040763841720603 + ], + [ + -0.09700505141393388, + 1.4233452026187245, + 0.21641761556810266 + ], + [ + -0.033584345019196826, + 1.4501965640602097, + 0.3667607859323993 + ], + [ + 0.014322361157171698, + 1.4954070170316613, + 0.47088627653119686 + ], + [ + 0.030477729063335776, + 1.553015069354617, + 0.5318159650450546 + ], + [ + 0.003633605999667555, + 1.6161105430474385, + 0.522302970530559 + ], + [ + -0.0406789373856938, + 1.680799920193144, + 0.4326767326576065 + ], + [ + -0.07386449935740452, + 1.7246239864717574, + 0.2814752904836225 + ], + [ + -0.298403655389289, + 1.7039624962051003, + 0.07061083376075954 + ], + [ + -0.3087381037049099, + 1.6434395540044435, + -0.1523666970550596 + ], + [ + -0.2952328755931009, + 1.5326789698135677, + -0.33502641598645416 + ], + [ + -0.27449749834379905, + 1.360070230921473, + -0.4685098625782377 + ], + [ + -0.263522625893902, + 1.158623848184568, + -0.5497856791092972 + ], + [ + -0.26559069931805457, + 1.0154439091997018, + -0.5651056786089879 + ], + [ + -0.2780221439542433, + 0.970907212869317, + -0.5318903253344414 + ], + [ + -0.291662289295544, + 1.0161950823250556, + -0.4744080874061534 + ], + [ + -0.30838004073399206, + 1.1519716603249839, + -0.3692154205500941 + ], + [ + -0.3205043523322265, + 1.3225854594258626, + -0.17791678024835247 + ], + [ + -0.2908312467770883, + 1.41832888539429, + 0.07246721180841638 + ], + [ + -0.21986894333065302, + 1.4267494280783604, + 0.2958037808995319 + ], + [ + -0.15576331994658282, + 1.4262238124232092, + 0.4483816229753958 + ], + [ + -0.12088117210408786, + 1.448476322553785, + 0.5507483850289324 + ], + [ + -0.12310967725753863, + 1.4867009223223078, + 0.5980200584193168 + ], + [ + -0.17173920228590078, + 1.5538755757865148, + 0.5592885871107038 + ], + [ + -0.23371842610635515, + 1.64306441046562, + 0.44682756668781864 + ], + [ + -0.27350175093691614, + 1.7056266557077657, + 0.2828558055290433 + ], + [ + -0.4969341829605251, + 1.6677471316472652, + 0.050869402609198415 + ], + [ + -0.49966990608567113, + 1.6108752308859575, + -0.18393694332370794 + ], + [ + -0.477000539353416, + 1.4980792244884193, + -0.3768320139648718 + ], + [ + -0.446121048687091, + 1.3255502276953508, + -0.5168754187428002 + ], + [ + -0.4252464563934606, + 1.1336006146573048, + -0.5973834600123752 + ], + [ + -0.4229671193595459, + 1.0100772224056476, + -0.6086256014423813 + ], + [ + -0.4343538535668715, + 0.9847783257217998, + -0.5704326461067069 + ], + [ + -0.4458997885859056, + 1.0430362049246182, + -0.5020092657356884 + ], + [ + -0.461883949235698, + 1.1889715630626303, + -0.3711090603127387 + ], + [ + -0.46957084160319473, + 1.3523940113736537, + -0.1384539086787024 + ], + [ + -0.4248471538488226, + 1.4120600855150074, + 0.1466140211329322 + ], + [ + -0.3394861903157175, + 1.3811015618457245, + 0.37651307592933936 + ], + [ + -0.2740837363617695, + 1.3569747219178774, + 0.5183847839979437 + ], + [ + -0.2483185376573697, + 1.3629063542519695, + 0.6076805760551358 + ], + [ + -0.2671616520245408, + 1.397376265700023, + 0.636575746819648 + ], + [ + -0.33865058388039243, + 1.4802538884626972, + 0.5784357234063194 + ], + [ + -0.42151030535503764, + 1.5874281024369612, + 0.4533332621587055 + ], + [ + -0.4723378129252547, + 1.6608213333016721, + 0.27729179885422145 + ], + [ + -0.6912561646247362, + 1.604990539726712, + 0.026427698317147447 + ], + [ + -0.6886983990146771, + 1.554694294451845, + -0.21413753197467328 + ], + [ + -0.6584704934049959, + 1.4438620016607837, + -0.41215350456950034 + ], + [ + -0.6199104080920574, + 1.276548320407987, + -0.5552344783628206 + ], + [ + -0.590158163529804, + 1.0998065451999024, + -0.6344822529968206 + ], + [ + -0.580558085747065, + 0.9989648814789144, + -0.6406247036164995 + ], + [ + -0.587308309940272, + 0.9914073595704197, + -0.5936432953425446 + ], + [ + -0.5985622637926001, + 1.0605607684924718, + -0.5087646454584476 + ], + [ + -0.6166170163004658, + 1.208222322925652, + -0.34601844705320495 + ], + [ + -0.6153885210663487, + 1.3453182153191994, + -0.07559941359460284 + ], + [ + -0.549327343402168, + 1.3583278645255834, + 0.22526355817176844 + ], + [ + -0.44854282483006874, + 1.295227604650397, + 0.4439849626854954 + ], + [ + -0.381529985837781, + 1.256290333256384, + 0.5683278658746427 + ], + [ + -0.3645375309021164, + 1.2534095900421611, + 0.6414375366479482 + ], + [ + -0.4032778741367417, + 1.2942819551653206, + 0.6542607347031475 + ], + [ + -0.49943738527654874, + 1.3929886240587472, + 0.5852423374469831 + ], + [ + -0.6010689561078252, + 1.5079668477794288, + 0.45129267735849105 + ], + [ + -0.6633788885633062, + 1.5874434709084602, + 0.2629709706897446 + ] + ] + } + }, + "Volume9": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier9" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface8": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface8", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart8" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier9" + }, + "label": { + "$type": "ref", + "value": "Volume9" + }, + "targetlabel": -3.113795654494369, + "constraint_weight": 100.0 + }, + "BiotSavart9": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.7588408944726162, + 0.0, + 0.0 + ], + [ + 1.715546997924943, + 0.020835982611155875, + -0.2648479582670617 + ], + [ + 1.592462416560029, + 0.040777343578816884, + -0.46976857015490897 + ], + [ + 1.412185715805181, + 0.08888015644337686, + -0.6103592419131282 + ], + [ + 1.2458943178335835, + 0.1457881633994608, + -0.6824724253574744 + ], + [ + 1.1734623946737308, + 0.17075999848635212, + -0.6740326130526627 + ], + [ + 1.1882842570483967, + 0.16579617053461584, + -0.6104259184655834 + ], + [ + 1.2692809653813977, + 0.13130229994787476, + -0.5021635376201022 + ], + [ + 1.409056907204457, + 0.06811259855510793, + -0.30126028007278954 + ], + [ + 1.489284544195037, + 2.3437632403097106e-17, + -1.1357498218028052e-16 + ], + [ + 1.409056907204457, + -0.06811259855510789, + 0.3012602800727893 + ], + [ + 1.2692809653813981, + -0.13130229994787465, + 0.502163537620102 + ], + [ + 1.1882842570483971, + -0.16579617053461582, + 0.6104259184655831 + ], + [ + 1.1734623946737308, + -0.17075999848635215, + 0.6740326130526628 + ], + [ + 1.2458943178335833, + -0.14578816339946093, + 0.6824724253574745 + ], + [ + 1.4121857158051803, + -0.08888015644337699, + 0.6103592419131285 + ], + [ + 1.5924624165600287, + -0.040777343578816905, + 0.46976857015490925 + ], + [ + 1.7155469979249425, + -0.020835982611155896, + 0.2648479582670623 + ], + [ + 1.744721073702628, + 0.20642008221871702, + -0.03311322329782537 + ], + [ + 1.7103336343820563, + 0.22355416287921684, + -0.2917682900247321 + ], + [ + 1.5937346779805701, + 0.23528273045005585, + -0.4856409090641082 + ], + [ + 1.4229616567316965, + 0.2727455872834841, + -0.6194953544792747 + ], + [ + 1.2815939375299632, + 0.3137237401476022, + -0.6865896840303117 + ], + [ + 1.2323033961746162, + 0.3244436989437964, + -0.6661796328795172 + ], + [ + 1.250852167719797, + 0.30839490174277867, + -0.5855350569456287 + ], + [ + 1.3264274669035605, + 0.26592531670934216, + -0.45498316749329126 + ], + [ + 1.4412203570937192, + 0.20391040341371372, + -0.2284954368720816 + ], + [ + 1.46508965921159, + 0.13714310347965972, + 0.07875328514158274 + ], + [ + 1.3381175695015468, + 0.06249903400754715, + 0.3543047933078579 + ], + [ + 1.1900007789020937, + -0.0020249627814287485, + 0.5212085580816724 + ], + [ + 1.1156613050662978, + -0.02855454764381497, + 0.607825569267902 + ], + [ + 1.111458072055213, + -0.022312633386052355, + 0.6593376828860333 + ], + [ + 1.2034760512861655, + 0.01991018728217449, + 0.6604291022828616 + ], + [ + 1.3856203657891952, + 0.09380481924292235, + 0.584570918167341 + ], + [ + 1.5710173260199434, + 0.15058144951399094, + 0.44103516062904824 + ], + [ + 1.6961994357506034, + 0.1788888887618237, + 0.23277631587790065 + ], + [ + 1.7022324139000349, + 0.40929515604098243, + -0.06387913703713664 + ], + [ + 1.6787490243299943, + 0.4270575321883906, + -0.3102161746262287 + ], + [ + 1.5727509651906801, + 0.4303374165696642, + -0.4891075161835418 + ], + [ + 1.420049382102636, + 0.45561797127056247, + -0.6154136701335945 + ], + [ + 1.309702750973548, + 0.48175917376498834, + -0.673926385641919 + ], + [ + 1.2779632522863995, + 0.47663180645391495, + -0.6353136749786825 + ], + [ + 1.2908428296406735, + 0.4480044248366233, + -0.5342057722786732 + ], + [ + 1.35040848649288, + 0.39941103922029325, + -0.3843852339324516 + ], + [ + 1.427488096118713, + 0.3354036624923479, + -0.14682078662621323 + ], + [ + 1.396700414657886, + 0.26416198737117375, + 0.14416284169036547 + ], + [ + 1.2402906617274343, + 0.18297851422946348, + 0.3800644917740163 + ], + [ + 1.0956001217938565, + 0.11675432938330192, + 0.5126402422754289 + ], + [ + 1.032254987051428, + 0.09555060488231845, + 0.5820549878688741 + ], + [ + 1.042315107137804, + 0.11520096651513263, + 0.6251336744044202 + ], + [ + 1.1518848296320918, + 0.17832671153877022, + 0.6206767197578463 + ], + [ + 1.3445241875355693, + 0.2698750379550331, + 0.5427656813432358 + ], + [ + 1.5305414233694252, + 0.3354487285857997, + 0.4016929195556184 + ], + [ + 1.6516789812669954, + 0.3723937225831537, + 0.19717583514637854 + ], + [ + 1.6345746943658048, + 0.6025224156504069, + -0.08912043636247836 + ], + [ + 1.6186237350721588, + 0.6231725554006039, + -0.31927155688572556 + ], + [ + 1.5289925726676448, + 0.6211073661489619, + -0.48407440843846417 + ], + [ + 1.4058541022145754, + 0.6378560954456499, + -0.5974959492155127 + ], + [ + 1.3234252232591923, + 0.6513883821385945, + -0.6364993782374168 + ], + [ + 1.2957062634692553, + 0.6281121114896906, + -0.5777014632823013 + ], + [ + 1.2966255082992988, + 0.5817765683287259, + -0.4612246574527818 + ], + [ + 1.3335691178448434, + 0.5218635306809475, + -0.3001482364788255 + ], + [ + 1.3667706096219405, + 0.45130664496966616, + -0.07013090965455152 + ], + [ + 1.29423961712278, + 0.37531603871715646, + 0.1848819045553608 + ], + [ + 1.1281902464483833, + 0.2941202838778977, + 0.37750316521699573 + ], + [ + 0.9917063437621911, + 0.2344154065700913, + 0.4823339588070109 + ], + [ + 0.9389932379457662, + 0.22185490239501024, + 0.5406763989470401 + ], + [ + 0.9675361253238496, + 0.2520219443346167, + 0.5798329547949636 + ], + [ + 1.0953903632918602, + 0.3307461155563225, + 0.5711505306624156 + ], + [ + 1.2933482920567172, + 0.43708105763973265, + 0.49138970554850836 + ], + [ + 1.4734880603037028, + 0.5110269313306303, + 0.35578330721871665 + ], + [ + 1.5858669193372177, + 0.556010870117725, + 0.16024229405599735 + ], + [ + 1.5474179938137296, + 0.783949593277365, + -0.10747090313846912 + ], + [ + 1.5364823385131108, + 0.807590040951811, + -0.32118824180668537 + ], + [ + 1.4707502622155084, + 0.809747979904231, + -0.47142236600498877 + ], + [ + 1.3826820884110573, + 0.8231461683158537, + -0.5579601653601534 + ], + [ + 1.3143255777965606, + 0.8179513689612881, + -0.5645909571909542 + ], + [ + 1.2749526788897554, + 0.7670364047361484, + -0.49283684305974074 + ], + [ + 1.2602959355044723, + 0.6954351719807439, + -0.3759936420920398 + ], + [ + 1.2716325482963078, + 0.621630557646508, + -0.21782445527816358 + ], + [ + 1.264647868193539, + 0.5474782742119594, + -0.013499727756291309 + ], + [ + 1.1703007273212918, + 0.4729371447531907, + 0.19520061016122062 + ], + [ + 1.0137177779158844, + 0.40347815153446687, + 0.35159027141662563 + ], + [ + 0.8934615037906635, + 0.36309764439098025, + 0.44229499546483847 + ], + [ + 0.8540147973010961, + 0.3606924241955011, + 0.49923192120726456 + ], + [ + 0.8978519723019502, + 0.39369811720909315, + 0.5360246419973802 + ], + [ + 1.0363421601186351, + 0.480893819513558, + 0.5189824286489684 + ], + [ + 1.2325287965375453, + 0.5971297323669387, + 0.43628815244417757 + ], + [ + 1.4016454718381963, + 0.678377293577325, + 0.3086254246198436 + ], + [ + 1.503265190635934, + 0.7317382667859116, + 0.12545375514708612 + ], + [ + 1.444324893092892, + 0.9549148133242987, + -0.11936189733444849 + ], + [ + 1.4406337854092544, + 0.9861492274148734, + -0.3134773220744062 + ], + [ + 1.4009159826087827, + 1.0032722639428027, + -0.43991675881605286 + ], + [ + 1.336734950206817, + 1.0072765700337811, + -0.4879873639153537 + ], + [ + 1.2645472578246992, + 0.9627045292327089, + -0.46684919423832405 + ], + [ + 1.2076845174770046, + 0.872580235444294, + -0.3992557296124679 + ], + [ + 1.1794944820824667, + 0.7787483493504253, + -0.2960228542062259 + ], + [ + 1.1688768240153455, + 0.6981275737857787, + -0.15375468496549125 + ], + [ + 1.135144921139875, + 0.6274582569961129, + 0.014014125557426593 + ], + [ + 1.038148203113031, + 0.5644282303669924, + 0.1781833858909937 + ], + [ + 0.9047176630697649, + 0.5161692916613833, + 0.312362201185177 + ], + [ + 0.807436263265727, + 0.4950891796261074, + 0.4067022964536751 + ], + [ + 0.779345870440622, + 0.49744137887345546, + 0.47084948629374196 + ], + [ + 0.8299998828337968, + 0.5330127515062957, + 0.49825289078866164 + ], + [ + 0.9723763373536234, + 0.6288476202932726, + 0.465405800853038 + ], + [ + 1.162068320182313, + 0.7513044571943835, + 0.38203271960889823 + ], + [ + 1.3161085028915342, + 0.8396580611986489, + 0.2644876479823173 + ], + [ + 1.4053931640009676, + 0.9012463395006, + 0.09427236510214032 + ], + [ + 1.3292626155907545, + 1.1182178638298728, + -0.12362498496144483 + ], + [ + 1.3317400971749016, + 1.1603763903424322, + -0.28491823991626203 + ], + [ + 1.3034987598554881, + 1.1862930852184357, + -0.3755822109712995 + ], + [ + 1.2428034981873524, + 1.16205560801495, + -0.395993448736385 + ], + [ + 1.1632696564524332, + 1.0645208595187756, + -0.3735888019872797 + ], + [ + 1.0997478171024069, + 0.9398680557925294, + -0.3244033588491569 + ], + [ + 1.0654788614203787, + 0.8354903655852781, + -0.23844363420773648 + ], + [ + 1.0403233120570075, + 0.754815995642789, + -0.11957483718992609 + ], + [ + 0.9944177862542805, + 0.6955836469170568, + 0.010249234748222948 + ], + [ + 0.907534864942786, + 0.6547173163382266, + 0.14293718578392206 + ], + [ + 0.7993460446083954, + 0.6287227678528149, + 0.2704592932244533 + ], + [ + 0.718139945570258, + 0.6199841425856872, + 0.37466695189101845 + ], + [ + 0.695256430863853, + 0.6270867689179108, + 0.4418559961378076 + ], + [ + 0.754382985663181, + 0.6709563503355078, + 0.455217319577887 + ], + [ + 0.9030934410241989, + 0.7760222565988266, + 0.410930409178222 + ], + [ + 1.0827627284094337, + 0.9016422669382852, + 0.3335773191046684 + ], + [ + 1.2175522309206375, + 0.9947990770276388, + 0.2264261192761502 + ], + [ + 1.2937405778830866, + 1.0623205654761974, + 0.06717252877132995 + ], + [ + 1.2039806358678509, + 1.2779387391466734, + -0.11197782054100543 + ], + [ + 1.2022016339362578, + 1.3195284701611087, + -0.22578818303530912 + ], + [ + 1.1642825016577518, + 1.3267737140560598, + -0.2884789510668292 + ], + [ + 1.100325719143234, + 1.2632125562360972, + -0.31365538878016486 + ], + [ + 1.0266004350584423, + 1.1245145292555556, + -0.3117285841165481 + ], + [ + 0.9682810883159437, + 0.978771703205322, + -0.28154412063214374 + ], + [ + 0.9323389612838219, + 0.869996057898716, + -0.2129893569875031 + ], + [ + 0.8994822781572369, + 0.7949182735344156, + -0.12056903968057445 + ], + [ + 0.8519641616559424, + 0.756536590357203, + -0.020758126963536867 + ], + [ + 0.7802616768238281, + 0.7432956929220526, + 0.09817733749745214 + ], + [ + 0.6912779464085007, + 0.7364409041650513, + 0.2267415971200991 + ], + [ + 0.6195568248127324, + 0.7404945620049705, + 0.32956324294131034 + ], + [ + 0.6054316088977707, + 0.7593962015922823, + 0.39003456237032824 + ], + [ + 0.6769667490793156, + 0.8122519573701528, + 0.3985393057842471 + ], + [ + 0.8283216570199696, + 0.9227163021201483, + 0.35841054550192536 + ], + [ + 0.9943159583626352, + 1.0494889895568942, + 0.2944066875642303 + ], + [ + 1.1084848985107159, + 1.1424069411909947, + 0.19742415806894986 + ], + [ + 1.1712908777295785, + 1.2147577747916667, + 0.04754818172683194 + ], + [ + 1.06222080040459, + 1.4285874393478297, + -0.07037934837744889 + ], + [ + 1.0423472970531251, + 1.4462953289804847, + -0.14639545180021296 + ], + [ + 0.990554111564844, + 1.4149321105056607, + -0.21467359861237215 + ], + [ + 0.9332430322189442, + 1.3206662201770736, + -0.2673599682276751 + ], + [ + 0.8744631492432517, + 1.159011929584039, + -0.28544600913637674 + ], + [ + 0.8238566448769894, + 0.9984041606368168, + -0.27127298409699535 + ], + [ + 0.7893742369413137, + 0.8893149055561982, + -0.222198696679965 + ], + [ + 0.755535098393247, + 0.8280110689848074, + -0.15206359883923778 + ], + [ + 0.7117774436830424, + 0.814645585005291, + -0.0679699452994697 + ], + [ + 0.6529565550468134, + 0.8274831872106513, + 0.04953741905651009 + ], + [ + 0.5796632579622232, + 0.8376978741102387, + 0.1763320033971724 + ], + [ + 0.5249989645709308, + 0.8561149647631905, + 0.26742003373805795 + ], + [ + 0.5280613207011565, + 0.8898246506334487, + 0.32196167833748757 + ], + [ + 0.6053258740593196, + 0.951514805092106, + 0.3383034050673634 + ], + [ + 0.7481620741600773, + 1.0666865374070278, + 0.31424253197204516 + ], + [ + 0.8981222900854576, + 1.1944751864960415, + 0.26742247191693913 + ], + [ + 0.9929640866363734, + 1.285465380920653, + 0.17968564705811396 + ], + [ + 1.0408547249920423, + 1.3632014907292114, + 0.04596293584443753 + ], + [ + 0.8959152210881249, + 1.5517706821989357, + -2.819737188997071e-17 + ], + [ + 0.8558157632186495, + 1.5306302608976492, + -0.07818661254263959 + ], + [ + 0.8026748007653218, + 1.4672153140935704, + -0.18014307115235106 + ], + [ + 0.7596365060151615, + 1.3548601568385283, + -0.2561060319006732 + ], + [ + 0.713902701625018, + 1.176453133136627, + -0.28779384894824334 + ], + [ + 0.6731552379205223, + 1.004159691153839, + -0.29189473442395286 + ], + [ + 0.6472982154507619, + 0.9002404703001337, + -0.26121430480427993 + ], + [ + 0.6166138258640678, + 0.8582677074671077, + -0.20377070132737388 + ], + [ + 0.5743753947890919, + 0.8699509811950932, + -0.1214654600559357 + ], + [ + 0.5231274678896378, + 0.9060833532197089, + -2.91871928999028e-17 + ], + [ + 0.46621195236760343, + 0.9323991737936161, + 0.12146546005593568 + ], + [ + 0.4349747249823125, + 0.9631370912565501, + 0.2037707013273737 + ], + [ + 0.45598200906938524, + 1.010696933554759, + 0.26121430480427993 + ], + [ + 0.5330501830352998, + 1.0850493823066498, + 0.29189473442395286 + ], + [ + 0.6618869488456065, + 1.206484442005921, + 0.28779384894824345 + ], + [ + 0.7935250613899536, + 1.3352945902704438, + 0.2561060319006733 + ], + [ + 0.8693083344439356, + 1.4287444254871664, + 0.18014307115235115 + ], + [ + 0.897656808129243, + 1.5064733223553428, + 0.07818661254263971 + ], + [ + 0.7060826138002868, + 1.6342039172525293, + 0.0703793483774487 + ], + [ + 0.6601397589522933, + 1.5830073788567804, + -0.045962935844437273 + ], + [ + 0.6167636322445395, + 1.5026648145330381, + -0.17968564705811388 + ], + [ + 0.5853847106529986, + 1.3750343121670847, + -0.26742247191693885 + ], + [ + 0.5496966021893075, + 1.181270631074198, + -0.31424253197204516 + ], + [ + 0.5213730562571031, + 0.9999849870494438, + -0.3383034050673633 + ], + [ + 0.5065800920116016, + 0.9022268437998875, + -0.32196167833748734 + ], + [ + 0.47891782575947756, + 0.882719922660548, + -0.26742003373805784 + ], + [ + 0.43563601069457425, + 0.9208520440908572, + -0.17633200339717228 + ], + [ + 0.3901431838055322, + 0.979218557843438, + -0.04953741905651003 + ], + [ + 0.34961504985389635, + 1.0237401405729076, + 0.0679699452994698 + ], + [ + 0.33931107115892883, + 1.0683181231517298, + 0.15206359883923767 + ], + [ + 0.37548218170516967, + 1.1282755950622332, + 0.22219869667996503 + ], + [ + 0.4527150439170681, + 1.2126828638584954, + 0.27127298409699546 + ], + [ + 0.566502199687373, + 1.336813266710018, + 0.2854460091363768 + ], + [ + 0.6771089804838463, + 1.468545283894961, + 0.26735996822767516 + ], + [ + 0.730090096545811, + 1.56531107969111, + 0.21467359861237215 + ], + [ + 0.7313548477453095, + 1.6258469033042928, + 0.14639545180021282 + ], + [ + 0.5047370946473491, + 1.6816471858994377, + 0.1119778205410054 + ], + [ + 0.4663656535494502, + 1.621746542730621, + -0.04754818172683156 + ], + [ + 0.43511098327571907, + 1.531179552417193, + -0.1974241580689497 + ], + [ + 0.41172614676701463, + 1.38584737410876, + -0.29440668756423005 + ], + [ + 0.3849349296121009, + 1.178705748544189, + -0.35841054550192536 + ], + [ + 0.36494745481652957, + 0.9923963809051295, + -0.3985393057842472 + ], + [ + 0.35494059766744007, + 0.9040172543556954, + -0.3900345623703281 + ], + [ + 0.33150868965416963, + 0.9067992303783365, + -0.32956324294131045 + ], + [ + 0.2921375581886655, + 0.966884714748225, + -0.22674159712009906 + ], + [ + 0.2535821141821409, + 1.047374280189905, + -0.0981773374974522 + ], + [ + 0.2291978253138281, + 1.1160909022865595, + 0.02075812696353684 + ], + [ + 0.2386782797346529, + 1.176433639905276, + 0.12056903968057427 + ], + [ + 0.28726920669069445, + 1.242427254359144, + 0.21298935698750282 + ], + [ + 0.36350061532320005, + 1.327941872088312, + 0.28154412063214385 + ], + [ + 0.4605579317307894, + 1.4513193209245454, + 0.31172858411654797 + ], + [ + 0.5438113045083217, + 1.58451630333347, + 0.31365538878016475 + ], + [ + 0.5668784906171028, + 1.6716850806453407, + 0.28847895106682925 + ], + [ + 0.5416443592082081, + 1.7009013905405137, + 0.2257881830353092 + ], + [ + 0.30377376924686095, + 1.7102841253174785, + 0.1236249849614448 + ], + [ + 0.27312630772349406, + 1.6515724890916117, + -0.06717252877132947 + ], + [ + 0.25274515690692934, + 1.5518307009255088, + -0.22642611927615 + ], + [ + 0.2394637440896284, + 1.3885211625426637, + -0.3335773191046681 + ], + [ + 0.22050826760461095, + 1.1701129902174738, + -0.41093040917822177 + ], + [ + 0.20387375138945105, + 0.9887930049348201, + -0.4552173195778869 + ], + [ + 0.19544485682808632, + 0.9156531157315513, + -0.4418559961378076 + ], + [ + 0.17785204463759013, + 0.9319195076290612, + -0.3746669518910187 + ], + [ + 0.14481686659400647, + 1.006615364971887, + -0.2704592932244534 + ], + [ + 0.11323439577508389, + 1.1133069060296452, + -0.14293718578392214 + ], + [ + 0.1051842155600564, + 1.2089828883298193, + -0.010249234748223009 + ], + [ + 0.1335281713809957, + 1.2783544142119287, + 0.11957483718992581 + ], + [ + 0.19081645050380938, + 1.3404769439780067, + 0.23844363420773623 + ], + [ + 0.2640757039706171, + 1.4223435752634312, + 0.3244033588491566 + ], + [ + 0.34026727897548875, + 1.539681503698791, + 0.37358880198727945 + ], + [ + 0.38496792805744245, + 1.6573272053498893, + 0.3959934487363847 + ], + [ + 0.37561056820523936, + 1.7220095824455819, + 0.3755822109712994 + ], + [ + 0.33904538340078355, + 1.7335089505630374, + 0.28491823991626214 + ], + [ + 0.10481804024247175, + 1.7282794553988372, + 0.11936189733444846 + ], + [ + 0.07780564307477088, + 1.6677293520801275, + -0.0942723651021399 + ], + [ + 0.06911096004465189, + 1.5596124282400983, + -0.2644876479823171 + ], + [ + 0.06961458581565817, + 1.382032914808184, + -0.3820327196088981 + ], + [ + 0.0584098456065532, + 1.1565264203337413, + -0.46540580085303795 + ], + [ + 0.04660264192859613, + 0.9853073594253234, + -0.49825289078866175 + ], + [ + 0.04112393577766141, + 0.9236540115728024, + -0.4708494862937421 + ], + [ + 0.025041675062142804, + 0.9468049057379534, + -0.40670229645367517 + ], + [ + -0.005343112302705115, + 1.0415931253015984, + -0.3123622011851771 + ], + [ + -0.030264915445604557, + 1.181276831972548, + -0.17818338589099383 + ], + [ + -0.024177670196998707, + 1.2967934671820713, + -0.014014125557426706 + ], + [ + 0.020157801973206733, + 1.3613408103850508, + 0.15375468496549086 + ], + [ + 0.08466861265143379, + 1.4108463597821972, + 0.2960228542062256 + ], + [ + 0.15183439199646306, + 1.4821755896143847, + 0.3992557296124678 + ], + [ + 0.20145294974151517, + 1.5764823141784943, + 0.46684919423832383 + ], + [ + 0.2039596231827014, + 1.6612847100225208, + 0.48798736391535363 + ], + [ + 0.16840127618240244, + 1.7148649614782459, + 0.43991675881605297 + ], + [ + 0.13371339015905104, + 1.74070006942199, + 0.3134773220744068 + ], + [ + -0.0947887338421881, + 1.7320780895545234, + 0.10747090313846913 + ], + [ + -0.1179286673601724, + 1.6677349771085312, + -0.12545375514708557 + ], + [ + -0.11333076633060042, + 1.5530492324999667, + -0.3086254246198434 + ], + [ + -0.09913488068400075, + 1.365966114880846, + -0.43628815244417724 + ], + [ + -0.10170481583764737, + 1.1379455474323577, + -0.518982428648968 + ], + [ + -0.10797341522579677, + 0.9744116754559982, + -0.53602464199738 + ], + [ + -0.1146385963446509, + 0.9199447217683178, + -0.4992319212072646 + ], + [ + -0.13227896779845433, + 0.9553091817816507, + -0.4422949954648386 + ], + [ + -0.15743655985710647, + 1.079644423710301, + -0.35159027141662574 + ], + [ + -0.17557478191110426, + 1.249978732304239, + -0.19520061016122073 + ], + [ + -0.1581938406091496, + 1.368956317803419, + 0.013499727756291097 + ], + [ + -0.09746841945759105, + 1.412081369926998, + 0.21782445527816305 + ], + [ + -0.027883442131711976, + 1.439165882423519, + 0.3759936420920391 + ], + [ + 0.026796672684109457, + 1.4876596109096265, + 0.49283684305974046 + ], + [ + 0.0512038756824536, + 1.5472150236961264, + 0.5645909571909539 + ], + [ + 0.021524448583822284, + 1.609010898079624, + 0.5579601653601532 + ], + [ + -0.03411280984755877, + 1.6785810796533698, + 0.47142236600498894 + ], + [ + -0.06884767794897176, + 1.7344277580943808, + 0.32118824180668587 + ], + [ + -0.29548762888008323, + 1.7168444175291748, + 0.08912043636247836 + ], + [ + -0.3114139213663688, + 1.6514064742262604, + -0.16024229405599688 + ], + [ + -0.2941817256015197, + 1.531591558061379, + -0.3557833072187165 + ], + [ + -0.2681508465993796, + 1.3386130056821994, + -0.491389705548508 + ], + [ + -0.26126064337113114, + 1.1140089394495774, + -0.5711505306624155 + ], + [ + -0.2655106565569989, + 0.9639218357769264, + -0.5798329547949636 + ], + [ + -0.277364637544687, + 0.9241194492403446, + -0.5406763989470402 + ], + [ + -0.29284347475293876, + 0.9760505900772862, + -0.48233395880701113 + ], + [ + -0.3093794856176414, + 1.124101555665075, + -0.37750316521699584 + ], + [ + -0.3220865845845884, + 1.3085024063711508, + -0.1848819045553609 + ], + [ + -0.29254228537051474, + 1.4093113915633773, + 0.07013090965455135 + ], + [ + -0.21483748404408134, + 1.4158364990965115, + 0.30014823647882505 + ], + [ + -0.14447946665043948, + 1.4137989135464661, + 0.4612246574527815 + ], + [ + -0.1038920867598718, + 1.4361705957518331, + 0.5777014632823013 + ], + [ + -0.0975937249675275, + 1.4718140544208502, + 0.6364993782374168 + ], + [ + -0.1505274684926031, + 1.5364334142552118, + 0.597495949215513 + ], + [ + -0.22660152877117815, + 1.6347000932023852, + 0.4840744084384643 + ], + [ + -0.26962860361789076, + 1.713355551441244, + 0.3192715568857261 + ], + [ + -0.49665620417261014, + 1.6788240916032284, + 0.06387913703713677 + ], + [ + -0.5033370666666312, + 1.6165928179655968, + -0.1971758351463779 + ], + [ + -0.47476359106221855, + 1.4932121184752163, + -0.401692919555618 + ], + [ + -0.4385434550514361, + 1.299329621385953, + -0.5427656813432352 + ], + [ + -0.4215069524501309, + 1.086724880464687, + -0.620676719757846 + ], + [ + -0.4213905900262762, + 0.9602718447872035, + -0.62513367440442 + ], + [ + -0.43337824235065603, + 0.9417343444108718, + -0.582054987868874 + ], + [ + -0.4466878456491725, + 1.0071947025544556, + -0.5126402422754291 + ], + [ + -0.461681289194269, + 1.1656124782473014, + -0.38006449177401647 + ], + [ + -0.4695792155513221, + 1.3416590342555752, + -0.14416284169036575 + ], + [ + -0.4232759558186412, + 1.4039427860848621, + 0.14682078662621284 + ], + [ + -0.3293041367297234, + 1.3691935743990762, + 0.38438523393245094 + ], + [ + -0.2574382019039847, + 1.3419048951801233, + 0.5342057722786727 + ], + [ + -0.22620637350244144, + 1.3450645448099612, + 0.6353136749786825 + ], + [ + -0.23763569250009187, + 1.375115440631951, + 0.6739263856419188 + ], + [ + -0.31544795351028176, + 1.4576078251645594, + 0.6154136701335949 + ], + [ + -0.41369234764704377, + 1.5772109979664564, + 0.489107516183542 + ], + [ + -0.4695318404123596, + 1.6673680677423108, + 0.3102161746262293 + ], + [ + -0.6935955017986316, + 1.6141828134538962, + 0.033113223297825546 + ], + [ + -0.6931773957527932, + 1.558396245625766, + -0.2327763158778999 + ], + [ + -0.655101302392171, + 1.4358316388757666, + -0.44103516062904785 + ], + [ + -0.6115728264328187, + 1.246884846395991, + -0.5845709181673405 + ], + [ + -0.5844952976626132, + 1.0521959269010912, + -0.6604291022828613 + ], + [ + -0.5750523433652559, + 0.9513946089480634, + -0.6593376828860331 + ], + [ + -0.5825596161862651, + 0.9519137583848067, + -0.6078255692679023 + ], + [ + -0.5967540586614812, + 1.029558423661767, + -0.5212085580816729 + ], + [ + -0.6149330335882494, + 1.1900933254424022, + -0.3543047933078581 + ], + [ + -0.6137754180385712, + 1.337376415438953, + -0.07875328514158325 + ], + [ + -0.5440185890946501, + 1.3500886434012984, + 0.2284954368720811 + ], + [ + -0.4329156536720673, + 1.2816825409705976, + 0.45498316749329054 + ], + [ + -0.3583482645530459, + 1.237467204495567, + 0.5855350569456284 + ], + [ + -0.33517521270418965, + 1.229427895728956, + 0.6661796328795171 + ], + [ + -0.36910424002688946, + 1.2667547773108765, + 0.6865896840303117 + ], + [ + -0.4752762210082442, + 1.3686937369825833, + 0.6194953544792751 + ], + [ + -0.5931065173487693, + 1.4978560832484136, + 0.48564090906410845 + ], + [ + -0.6615632330158613, + 1.5929694577614353, + 0.2917682900247328 + ] + ] + } + }, + "Volume10": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier10" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface9": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface9", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart9" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier10" + }, + "label": { + "$type": "ref", + "value": "Volume10" + }, + "targetlabel": -3.5163378272471846, + "constraint_weight": 100.0 + }, + "BiotSavart10": { + "@module": "simsopt.field.biotsavart", + "@class": "BiotSavart", + "@name": "BiotSavart10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "coils": [ + { + "$type": "ref", + "value": "Coil1" + }, + { + "$type": "ref", + "value": "Coil2" + }, + { + "$type": "ref", + "value": "Coil3" + }, + { + "$type": "ref", + "value": "Coil4" + }, + { + "$type": "ref", + "value": "Coil5" + }, + { + "$type": "ref", + "value": "Coil6" + }, + { + "$type": "ref", + "value": "Coil7" + }, + { + "$type": "ref", + "value": "Coil8" + }, + { + "$type": "ref", + "value": "Coil9" + }, + { + "$type": "ref", + "value": "Coil10" + }, + { + "$type": "ref", + "value": "Coil11" + }, + { + "$type": "ref", + "value": "Coil12" + }, + { + "$type": "ref", + "value": "Coil13" + }, + { + "$type": "ref", + "value": "Coil14" + }, + { + "$type": "ref", + "value": "Coil15" + }, + { + "$type": "ref", + "value": "Coil16" + }, + { + "$type": "ref", + "value": "Coil17" + }, + { + "$type": "ref", + "value": "Coil18" + } + ], + "points": { + "@module": "numpy", + "@class": "array", + "dtype": "float64", + "data": [ + [ + 1.7680708261143123, + 0.0, + 0.0 + ], + [ + 1.7209236568490203, + 0.02469546715590574, + -0.28719596748949594 + ], + [ + 1.580016897073348, + 0.04268406336906129, + -0.50125086320041 + ], + [ + 1.3784210679052904, + 0.09779745982431617, + -0.6405068257502342 + ], + [ + 1.2086852254526979, + 0.16285785773636716, + -0.7054488513327408 + ], + [ + 1.1401724893790612, + 0.18460272598283775, + -0.6898754218688642 + ], + [ + 1.155584858171259, + 0.17753950623719272, + -0.6251082457791262 + ], + [ + 1.2444811088319387, + 0.14237455619853306, + -0.5146662460407058 + ], + [ + 1.396460561917312, + 0.07275021132553137, + -0.3065573102593263 + ], + [ + 1.4815692654129209, + 2.4528987852160773e-17, + -1.1499945582057454e-16 + ], + [ + 1.3964605619173123, + -0.07275021132553133, + 0.3065573102593261 + ], + [ + 1.2444811088319392, + -0.14237455619853295, + 0.5146662460407055 + ], + [ + 1.1555848581712589, + -0.17753950623719267, + 0.6251082457791257 + ], + [ + 1.1401724893790612, + -0.18460272598283778, + 0.6898754218688642 + ], + [ + 1.2086852254526976, + -0.16285785773636727, + 0.7054488513327408 + ], + [ + 1.3784210679052897, + -0.09779745982431637, + 0.6405068257502344 + ], + [ + 1.5800168970733477, + -0.042684063369061324, + 0.5012508632004102 + ], + [ + 1.7209236568490198, + -0.02469546715590576, + 0.2871959674894966 + ], + [ + 1.754050437046057, + 0.20918884208039454, + -0.04009748280029329 + ], + [ + 1.7141599651634623, + 0.2283076936703538, + -0.3191791524710559 + ], + [ + 1.5781920603808057, + 0.23721652552246672, + -0.519108598953458 + ], + [ + 1.3887242658323855, + 0.28182310202353095, + -0.6515904099082372 + ], + [ + 1.2481167202200953, + 0.3289483430024467, + -0.7135561639531965 + ], + [ + 1.204492253382305, + 0.3361134456978013, + -0.6863909475103968 + ], + [ + 1.2242120796063958, + 0.31862790767404303, + -0.6019164917910883 + ], + [ + 1.3072046603609635, + 0.2736446713870549, + -0.46575940603336574 + ], + [ + 1.4317123411317272, + 0.2048096239094228, + -0.23058196140391962 + ], + [ + 1.4567707684390134, + 0.13423129154562521, + 0.08202370058960287 + ], + [ + 1.3215259456255595, + 0.05384139982510803, + 0.3619534499503948 + ], + [ + 1.1614375499358502, + -0.016353009084421232, + 0.5332157729830256 + ], + [ + 1.0823462317849393, + -0.04170425980521984, + 0.6197416644827352 + ], + [ + 1.0779881099532143, + -0.03806357759984546, + 0.673075843640267 + ], + [ + 1.1656225268280918, + 0.002050470761501395, + 0.6819785723151598 + ], + [ + 1.3540528548511348, + 0.08618610058591615, + 0.6122810413263644 + ], + [ + 1.5621787042605912, + 0.14946970345254804, + 0.46881473728142425 + ], + [ + 1.7031266189659369, + 0.17655883819669585, + 0.24955128251155495 + ], + [ + 1.7116661940010713, + 0.41537193359962576, + -0.07742631230042414 + ], + [ + 1.6818020459671748, + 0.4326163589408834, + -0.3420245781998358 + ], + [ + 1.5564883150881186, + 0.431603515191831, + -0.5241656572146115 + ], + [ + 1.3883749140651336, + 0.46515786218871136, + -0.6507580565454635 + ], + [ + 1.2820881492720944, + 0.49624320888791373, + -0.7075616546733643 + ], + [ + 1.2569732113550574, + 0.48536168022081794, + -0.6603959644211524 + ], + [ + 1.270794840091285, + 0.45466408114946116, + -0.5498966102047096 + ], + [ + 1.3359096726705253, + 0.4032256305833638, + -0.3917157610295312 + ], + [ + 1.4196619395892547, + 0.33283245992666133, + -0.14568820213807784 + ], + [ + 1.386771738094189, + 0.2580937773075845, + 0.15009244091509363 + ], + [ + 1.2193987559305446, + 0.16991692269770636, + 0.38835417014834955 + ], + [ + 1.0642388704922912, + 0.0975219351319087, + 0.5224120313196458 + ], + [ + 0.9999760019579107, + 0.07784272208083919, + 0.5914731734016474 + ], + [ + 1.0098156499368325, + 0.0955107297009764, + 0.6376748789250835 + ], + [ + 1.1145380128480045, + 0.1593680527551462, + 0.6404296903437093 + ], + [ + 1.316647875301337, + 0.2633151702658047, + 0.5670768691257226 + ], + [ + 1.5261845035532142, + 0.3348669017200971, + 0.42518817430443945 + ], + [ + 1.660262734448959, + 0.37190665366923137, + 0.20834491157739682 + ], + [ + 1.6436817374518595, + 0.6118120020811432, + -0.10843620719583731 + ], + [ + 1.6211907149682743, + 0.6295552505002899, + -0.3550510235691738 + ], + [ + 1.5145327969366698, + 0.6224613647081931, + -0.5204804019753574 + ], + [ + 1.3798550864398422, + 0.6495293020288601, + -0.6334060704044577 + ], + [ + 1.3022214709049085, + 0.6677105186159163, + -0.6718095555318433 + ], + [ + 1.2798346939788605, + 0.6361624712964523, + -0.6034592445927738 + ], + [ + 1.281448882079649, + 0.5856864664693529, + -0.47422860901959996 + ], + [ + 1.3225617999365369, + 0.5219133291002139, + -0.3036424256316776 + ], + [ + 1.359521661390222, + 0.44520553636941274, + -0.06642234435342217 + ], + [ + 1.2821700852620836, + 0.3657590138017861, + 0.19211888645434155 + ], + [ + 1.1031043412034607, + 0.27749883430302685, + 0.3847895417101275 + ], + [ + 0.9565998555804587, + 0.21310259702314563, + 0.48867322567220695 + ], + [ + 0.9049099227313004, + 0.2026948138285223, + 0.5472123733158152 + ], + [ + 0.9339397695079498, + 0.2303236611494711, + 0.5912254581035953 + ], + [ + 1.0593540297746857, + 0.3115508236817885, + 0.5895877400173861 + ], + [ + 1.2707782594822032, + 0.4320094681676617, + 0.5130320189796623 + ], + [ + 1.4740529046930215, + 0.5115290880790667, + 0.3750990122156459 + ], + [ + 1.5958974820095633, + 0.55779435506854, + 0.1658207241711924 + ], + [ + 1.5559397113335196, + 0.7957364866134505, + -0.1315463772507298 + ], + [ + 1.5398793739784367, + 0.8149896888033217, + -0.3611083877203144 + ], + [ + 1.462539656792774, + 0.8127788710565385, + -0.5085273212595038 + ], + [ + 1.3677061391583127, + 0.8367570745095064, + -0.5892095998306242 + ], + [ + 1.302045630172738, + 0.8350470143212892, + -0.5934885865018397 + ], + [ + 1.2641309321456817, + 0.774374032527711, + -0.5139996086169488 + ], + [ + 1.2492282061046707, + 0.6959423978114031, + -0.38530887854179174 + ], + [ + 1.2629380316923642, + 0.616923366683301, + -0.21818566537154238 + ], + [ + 1.256858236305871, + 0.5375409839090773, + -0.00868163906110284 + ], + [ + 1.1562930133900455, + 0.46003428103193933, + 0.2016969866015724 + ], + [ + 0.9866055394504394, + 0.38625975377785754, + 0.3572240798496662 + ], + [ + 0.8580040610477406, + 0.34574100369895083, + 0.4469508283147416 + ], + [ + 0.8210464823882706, + 0.34513363632462724, + 0.5054653436368578 + ], + [ + 0.8650922969746411, + 0.3732396003177503, + 0.548311144191698 + ], + [ + 1.0031661344269913, + 0.4637165934178267, + 0.5373691575661262 + ], + [ + 1.2159121602347256, + 0.5940146487586296, + 0.45546991883617816 + ], + [ + 1.4065928784308601, + 0.6800869238098044, + 0.3234537953722068 + ], + [ + 1.514066466784189, + 0.7361689647107652, + 0.12603395740512952 + ], + [ + 1.4527681006194, + 0.9690592657555818, + -0.14738772090408472 + ], + [ + 1.4481739290284776, + 0.9986984682898682, + -0.3569888444865945 + ], + [ + 1.4046882269553589, + 1.0148706253942108, + -0.47715561210590896 + ], + [ + 1.3365562344393225, + 1.0253603086124992, + -0.513423921662172 + ], + [ + 1.2615560470290572, + 0.9782442603115716, + -0.48769505606064023 + ], + [ + 1.2008384095377784, + 0.8761023060212426, + -0.41493040426154787 + ], + [ + 1.1707515227800669, + 0.7742349583025998, + -0.3021727053823744 + ], + [ + 1.1606859695709344, + 0.6885828849946156, + -0.15231991869169753 + ], + [ + 1.126252571560055, + 0.6138364043581175, + 0.018088015070298225 + ], + [ + 1.0234093219755918, + 0.549231822205963, + 0.1822471134832227 + ], + [ + 0.8790747499944712, + 0.5007174573179359, + 0.31758411631020317 + ], + [ + 0.7762580617152172, + 0.4813485618362234, + 0.4153627035535686 + ], + [ + 0.7505752579205001, + 0.48224051734889234, + 0.48355628741906326 + ], + [ + 0.7996601907750865, + 0.5127508076160693, + 0.5150100808570647 + ], + [ + 0.9433918780484968, + 0.6143446144680335, + 0.4841763199598306 + ], + [ + 1.151977852824692, + 0.7499436191376592, + 0.39873980805483134 + ], + [ + 1.3253461176711883, + 0.8430482832192198, + 0.2755717173992344 + ], + [ + 1.4168445027114962, + 0.9085776077620243, + 0.0908687448589462 + ], + [ + 1.3385375265617097, + 1.1354490129533874, + -0.15347836323139935 + ], + [ + 1.3431055041420443, + 1.1816252535454754, + -0.32573544464120363 + ], + [ + 1.3150060959054586, + 1.2115957875534475, + -0.4073813998085472 + ], + [ + 1.2504152221734923, + 1.1873245343562586, + -0.4154075312459262 + ], + [ + 1.1642391830849597, + 1.0773383756247719, + -0.389159167511089 + ], + [ + 1.0946331897597208, + 0.9380241397516565, + -0.3366557787286164 + ], + [ + 1.0581156491669974, + 0.8263859048956623, + -0.24269532152642362 + ], + [ + 1.032527057245912, + 0.7408488726414116, + -0.11808810395770218 + ], + [ + 0.9854025714648841, + 0.6785321933985753, + 0.01166164273000788 + ], + [ + 0.8937511043898662, + 0.638656673847839, + 0.14448841375240248 + ], + [ + 0.7761329240769381, + 0.6147136060291333, + 0.2775498938144287 + ], + [ + 0.6886765809815903, + 0.6062796531759582, + 0.38965898324313286 + ], + [ + 0.6653976739413769, + 0.6096245010991042, + 0.4616838335698009 + ], + [ + 0.723759951590206, + 0.6510416251919677, + 0.47571217089493356 + ], + [ + 0.8790062639213928, + 0.7648049548196324, + 0.429121537784839 + ], + [ + 1.0790628881608824, + 0.9026162387962474, + 0.34799629329215037 + ], + [ + 1.2294635273815442, + 1.0005760922559284, + 0.23452434354412682 + ], + [ + 1.3053699170615436, + 1.0726034373228255, + 0.05985799675657363 + ], + [ + 1.2154514156235587, + 1.2995302817382524, + -0.13798444455658473 + ], + [ + 1.2144574420184635, + 1.344772156484905, + -0.25285980780996425 + ], + [ + 1.1733736889151027, + 1.3567003144330156, + -0.30663776785566416 + ], + [ + 1.105808621052633, + 1.2899044434204883, + -0.32632400960823166 + ], + [ + 1.0277868184443306, + 1.1327374640703187, + -0.32449083984039767 + ], + [ + 0.9645397076691073, + 0.9710412832203348, + -0.29206200855771897 + ], + [ + 0.9264349705269467, + 0.8559415143236407, + -0.2168298621812381 + ], + [ + 0.8928169267395069, + 0.7756212001387441, + -0.12131475490685126 + ], + [ + 0.8441724252784258, + 0.7362829752487265, + -0.023405848216810184 + ], + [ + 0.7682855331150132, + 0.7271128862232312, + 0.09839079545369915 + ], + [ + 0.6691562328533258, + 0.7227153409929746, + 0.2359445157857881 + ], + [ + 0.5887994976546371, + 0.7274373696830648, + 0.3455919999660838 + ], + [ + 0.5730927928315327, + 0.7440190084422388, + 0.4087710948748604 + ], + [ + 0.6469617379944584, + 0.7957679348098952, + 0.41721913473515077 + ], + [ + 0.809989320797638, + 0.9155414009058394, + 0.37419759763970567 + ], + [ + 0.9966079979204305, + 1.0529536519754603, + 0.3067432079424108 + ], + [ + 1.1217790880445415, + 1.1496535151209741, + 0.20275780022332054 + ], + [ + 1.1829592891511518, + 1.228510889319856, + 0.03693768865840185 + ], + [ + 1.0769430320301, + 1.455144283720214, + -0.08547213123197088 + ], + [ + 1.0555182478469964, + 1.4698359644291608, + -0.1547520698254049 + ], + [ + 0.9953059757772456, + 1.4390547593533807, + -0.22038410953883025 + ], + [ + 0.9353925158628164, + 1.3419355993496698, + -0.2768213592786741 + ], + [ + 0.8761922249772237, + 1.1611205273754452, + -0.2974761347623309 + ], + [ + 0.821335853467108, + 0.984463192993241, + -0.28133163638028574 + ], + [ + 0.7842936404890521, + 0.870246369702793, + -0.22740876151112968 + ], + [ + 0.7502905079615827, + 0.804270881741057, + -0.1564879952244377 + ], + [ + 0.7059112262684759, + 0.7920259876109245, + -0.07419344066754559 + ], + [ + 0.6424107698723299, + 0.8110744943086278, + 0.04945730411189964 + ], + [ + 0.5585192189197862, + 0.8235970980258135, + 0.18571027114588495 + ], + [ + 0.49697107717503086, + 0.8436969155863625, + 0.2793903708457196 + ], + [ + 0.5008587836414702, + 0.8772247461038695, + 0.3344265327058053 + ], + [ + 0.5812632308900292, + 0.9385187870828289, + 0.3522282957296443 + ], + [ + 0.7365979725791101, + 1.0631610601282786, + 0.32755995287449924 + ], + [ + 0.9062582592053408, + 1.2003723349796307, + 0.2787430777921246 + ], + [ + 1.0076695393863253, + 1.2944103196102468, + 0.18290770792004724 + ], + [ + 1.0528511517875556, + 1.3818169811603889, + 0.03524389916384418 + ], + [ + 0.9125643356345703, + 1.580607794494413, + -3.338604343112236e-17 + ], + [ + 0.8691122854804775, + 1.5523126546538375, + -0.07303994424231493 + ], + [ + 0.8050919188641511, + 1.4865550685124183, + -0.1821577241527098 + ], + [ + 0.7607443941679978, + 1.3703240979513414, + -0.26644904381073037 + ], + [ + 0.7161934015278487, + 1.171984712774362, + -0.300122888032379 + ], + [ + 0.6718532941750172, + 0.9841122045156306, + -0.30281177749871246 + ], + [ + 0.6450975502158758, + 0.8768914989898793, + -0.2690376124105168 + ], + [ + 0.615085122027027, + 0.831667057624119, + -0.21167577790868186 + ], + [ + 0.5708237524792339, + 0.8457828309699039, + -0.12970360169400713 + ], + [ + 0.5134241765431221, + 0.8892767596069002, + -3.300767386142545e-17 + ], + [ + 0.4470575414650399, + 0.9172392862155286, + 0.12970360169400708 + ], + [ + 0.4127022383796302, + 0.9485128699773158, + 0.2116757779086817 + ], + [ + 0.43686153937991423, + 0.9971166159009958, + 0.2690376124105167 + ], + [ + 0.5163395221973347, + 1.0738981226296396, + 0.30281177749871246 + ], + [ + 0.6568718333456818, + 1.2062340361330863, + 0.300122888032379 + ], + [ + 0.8063632831598583, + 1.3439860201117586, + 0.2664490438107304 + ], + [ + 0.8848484940241956, + 1.4405075883741236, + 0.18215772415270984 + ], + [ + 0.9097860508060455, + 1.5288296452941657, + 0.0730399442423151 + ], + [ + 0.7217203998583663, + 1.6602321660268118, + 0.08547213123197064 + ], + [ + 0.6702630331718424, + 1.6027043344319236, + -0.03524389916384393 + ], + [ + 0.6171574500100461, + 1.5198725795334453, + -0.18290770792004707 + ], + [ + 0.5864238064897342, + 1.3850288423511037, + -0.27874307779212454 + ], + [ + 0.5524255000959298, + 1.1694930866937627, + -0.32755995287449907 + ], + [ + 0.5221494960976742, + 0.9726481177779995, + -0.3522282957296443 + ], + [ + 0.5092695231335704, + 0.872368803394022, + -0.33442653270580514 + ], + [ + 0.4821774234048499, + 0.8522380355728749, + -0.27939037084571955 + ], + [ + 0.4339963999136043, + 0.8954903810992838, + -0.18571027114588495 + ], + [ + 0.38120573149672415, + 0.9618812935284704, + -0.04945730411189952 + ], + [ + 0.33295901259428184, + 1.0073500485705866, + 0.07419344066754567 + ], + [ + 0.32137376113107413, + 1.0519060809835892, + 0.15648799522443768 + ], + [ + 0.3615086434692772, + 1.114341401541495, + 0.2274087615111296 + ], + [ + 0.4419022074893355, + 1.2035293106381095, + 0.281331636380286 + ], + [ + 0.5674637610741086, + 1.3393649891164083, + 0.29747613476233087 + ], + [ + 0.6944540613481021, + 1.4810414809218715, + 0.27682135927867396 + ], + [ + 0.7486049911483071, + 1.581487639238244, + 0.2203841095388302 + ], + [ + 0.7451561606681558, + 1.6490235990081188, + 0.15475206982540476 + ], + [ + 0.5177005291606962, + 1.7023769438648864, + 0.1379844445565847 + ], + [ + 0.47244199440123247, + 1.638728240707607, + -0.036937688658401434 + ], + [ + 0.43473960562257025, + 1.5463159452412005, + -0.20275780022332043 + ], + [ + 0.41358061265813234, + 1.3895646698015724, + -0.30674320794241045 + ], + [ + 0.3878874510020314, + 1.1592420290577778, + -0.37419759763970556 + ], + [ + 0.3656743780652193, + 0.9581692677846808, + -0.41721913473515077 + ], + [ + 0.35779296579372133, + 0.8683224215389992, + -0.4087710948748603 + ], + [ + 0.33557949298034784, + 0.8736340075459641, + -0.34559199996608386 + ], + [ + 0.2913117285779863, + 0.9408639672481626, + -0.23594451578578818 + ], + [ + 0.245555464330836, + 1.0289112321492877, + -0.09839079545369922 + ], + [ + 0.21555354830017365, + 1.099216253089801, + 0.023405848216810188 + ], + [ + 0.22529919966417356, + 1.1610127395545353, + 0.12131475490685105 + ], + [ + 0.27804961029452163, + 1.230286976592444, + 0.2168298621812378 + ], + [ + 0.35867656555769645, + 1.320836531410431, + 0.29206200855771897 + ], + [ + 0.4670860104810936, + 1.4564582264827342, + 0.3244908398403975 + ], + [ + 0.5641857059302536, + 1.6026105792656637, + 0.32632400960823177 + ], + [ + 0.5882500931637762, + 1.6945215799492461, + 0.3066377678556642 + ], + [ + 0.5573781288086788, + 1.724137074845509, + 0.2528598078099643 + ], + [ + 0.31405892663874496, + 1.726932008397922, + 0.15347836323139932 + ], + [ + 0.2762168663773052, + 1.6667852281726956, + -0.059857996756573106 + ], + [ + 0.2517925506222243, + 1.5650346938668067, + -0.23452434354412655 + ], + [ + 0.24215714858547036, + 1.385803992826455, + -0.34799629329215004 + ], + [ + 0.22283738785331533, + 1.1436442320513918, + -0.4291215377848387 + ], + [ + 0.20193861054224826, + 0.9523153169148979, + -0.4757121708949334 + ], + [ + 0.1952514677505504, + 0.8810635398018596, + -0.46168383356980086 + ], + [ + 0.1807152909572037, + 0.8995512407094475, + -0.389658983243133 + ], + [ + 0.1442911368346996, + 0.979507631978694, + -0.2775498938144288 + ], + [ + 0.10621735165376835, + 1.0933394979859412, + -0.14448841375240254 + ], + [ + 0.09492483103630009, + 1.1926497565423881, + -0.011661642730007873 + ], + [ + 0.1253304154495686, + 1.2646190979904552, + 0.11808810395770179 + ], + [ + 0.18661336238553583, + 1.3295479847683134, + 0.24269532152642326 + ], + [ + 0.26503613950811866, + 1.4169922200333385, + 0.33665577872861635 + ], + [ + 0.3508828102204344, + 1.546929896445203, + 0.38915916751108864 + ], + [ + 0.40304559820230323, + 1.6765536148591362, + 0.415407531245926 + ], + [ + 0.3917696831867703, + 1.7446265789622464, + 0.4073813998085471 + ], + [ + 0.35176473525258806, + 1.7539761133224536, + 0.3257354446412038 + ], + [ + 0.11284589160732948, + 1.7426637138218586, + 0.1473877209040847 + ], + [ + 0.0784290382758586, + 1.6813121364414978, + -0.09086874485894561 + ], + [ + 0.06742817104910864, + 1.569307548319939, + -0.27557171739923425 + ], + [ + 0.0734812991669086, + 1.3726138947120645, + -0.3987398080548311 + ], + [ + 0.06034210378322577, + 1.1241736393479262, + -0.48417631995983057 + ], + [ + 0.04422512981896028, + 0.9489014434143703, + -0.5150100808570646 + ], + [ + 0.04234490979804125, + 0.8911374994856562, + -0.4835562874190634 + ], + [ + 0.028731051767665806, + 0.9129334822559584, + -0.4153627035535686 + ], + [ + -0.005903336841552545, + 1.0116597939796341, + -0.3175841163102033 + ], + [ + -0.03605595039061367, + 1.1609143824036519, + -0.1822471134832228 + ], + [ + -0.031528365838200706, + 1.282281540227618, + -0.018088015070298377 + ], + [ + 0.015987286231048364, + 1.3494749779619089, + 0.15231991869169711 + ], + [ + 0.08513138099800349, + 1.4010180393981537, + 0.302172705382374 + ], + [ + 0.15830764855963547, + 1.478007721510439, + 0.41493040426154776 + ], + [ + 0.21640635702160987, + 1.581661715180825, + 0.48769505606063995 + ], + [ + 0.2197099580710151, + 1.6701718069171723, + 0.513423921662172 + ], + [ + 0.1765596296683079, + 1.7239310016373668, + 0.477155612105909 + ], + [ + 0.14081127974539495, + 1.7535046457819181, + 0.35698884448659496 + ], + [ + -0.08884184354133545, + 1.7453515600785792, + 0.13154637725072987 + ], + [ + -0.11949220847488162, + 1.6793045056086386, + -0.12603395740512888 + ], + [ + -0.11432388641452726, + 1.5581886274083037, + -0.32345379537220653 + ], + [ + -0.0935243040722989, + 1.3500181439130028, + -0.4554699188361778 + ], + [ + -0.09999271715727778, + 1.1006256533389236, + -0.537369157566126 + ], + [ + -0.10931117291379819, + 0.935811705957146, + -0.5483111441916979 + ], + [ + -0.1116287444365081, + 0.8836139295984083, + -0.5054653436368579 + ], + [ + -0.1295815381906491, + 0.9159238152670333, + -0.4469508283147416 + ], + [ + -0.15879201049407257, + 1.047555337567459, + -0.3572240798496664 + ], + [ + -0.17974513270965342, + 1.2313962643302088, + -0.2016969866015725 + ], + [ + -0.16290497051239222, + 1.3572416535511278, + 0.008681639061102562 + ], + [ + -0.09719770811022112, + 1.4021981021927543, + 0.21818566537154185 + ], + [ + -0.02191030697700455, + 1.429834560516409, + 0.38530887854179124 + ], + [ + 0.03856211812715428, + 1.481956517211718, + 0.5139996086169487 + ], + [ + 0.07214911267021556, + 1.5451280997767531, + 0.5934885865018393 + ], + [ + 0.040799813742424945, + 1.6028467986777863, + 0.5892095998306244 + ], + [ + -0.02738267840218779, + 1.6729859323529854, + 0.508527321259504 + ], + [ + -0.0641379126631674, + 1.741069501030665, + 0.3611083877203149 + ], + [ + -0.29199613258344176, + 1.7293761414104258, + 0.10843620719583733 + ], + [ + -0.31488465942786853, + 1.6609849387901707, + -0.16582072417119176 + ], + [ + -0.29402926729535117, + 1.532331806025932, + -0.3750990122156456 + ], + [ + -0.26125795563250165, + 1.3165309893723927, + -0.5130320189796621 + ], + [ + -0.25986608700894737, + 1.0732029132271887, + -0.5895877400173859 + ], + [ + -0.26750374310589387, + 0.9239773965732032, + -0.5912254581035952 + ], + [ + -0.2769161033747924, + 0.8850223881361804, + -0.5472123733158156 + ], + [ + -0.29374766515574713, + 0.9349910747007754, + -0.4886732256722071 + ], + [ + -0.3112311305747404, + 1.0940657996586076, + -0.3847895417101277 + ], + [ + -0.32432844501555186, + 1.293271372710317, + -0.19211888645434166 + ], + [ + -0.2942015262937226, + 1.399983063943864, + 0.06642234435342205 + ], + [ + -0.20929069839377507, + 1.40632878137002, + 0.30364242563167715 + ], + [ + -0.13350508242462217, + 1.402610518766822, + 0.4742286090195996 + ], + [ + -0.08898448591241356, + 1.426450593278602, + 0.6034592445927739 + ], + [ + -0.07285646395698825, + 1.4616121344651467, + 0.6718095555318434 + ], + [ + -0.12741866716055272, + 1.5197542094125058, + 0.633406070404458 + ], + [ + -0.21819904375670884, + 1.6228545593659507, + 0.5204804019753575 + ], + [ + -0.26538451746501, + 1.7187699687921276, + 0.35505102356917423 + ], + [ + -0.4961104504841963, + 1.6900323736037641, + 0.07742631230042431 + ], + [ + -0.5080507573104636, + 1.6237830318240318, + -0.20834491157739604 + ], + [ + -0.47308900800041565, + 1.489148001799274, + -0.42518817430443906 + ], + [ + -0.43028631099865644, + 1.2719080929826667, + -0.5670768691257223 + ], + [ + -0.4192522241863865, + 1.0449022589873722, + -0.640429690343709 + ], + [ + -0.4221931067133814, + 0.9222813708348793, + -0.6376748789250831 + ], + [ + -0.4325742261572163, + 0.9049259819107677, + -0.5914731734016474 + ], + [ + -0.4476629619956941, + 0.9704188651071356, + -0.5224120313196459 + ], + [ + -0.4625470063761814, + 1.1409887613278447, + -0.3883541701483497 + ], + [ + -0.46987010134004237, + 1.33002644309366, + -0.150092440915094 + ], + [ + -0.421589604294072, + 1.3958795344335135, + 0.14568820213807734 + ], + [ + -0.3187511967930702, + 1.3585445289857114, + 0.39171576102953054 + ], + [ + -0.24164677558189948, + 1.3278726550919673, + 0.549896610204709 + ], + [ + -0.2081510605828011, + 1.331251573020396, + 0.6603959644211523 + ], + [ + -0.21128484928360577, + 1.3584425116045664, + 0.7075616546733643 + ], + [ + -0.291348931607081, + 1.4349468766517979, + 0.6507580565454636 + ], + [ + -0.40446454902526996, + 1.5637601791558635, + 0.5241656572146117 + ], + [ + -0.4662442660480544, + 1.672791475414659, + 0.3420245781998364 + ], + [ + -0.6958623670931547, + 1.6236466590412801, + 0.040097482800293474 + ], + [ + -0.6986588703419628, + 1.5632303369843497, + -0.24955128251155406 + ], + [ + -0.6516447918442618, + 1.4276212948670044, + -0.4688147372814239 + ], + [ + -0.6023870748650424, + 1.2157372206608845, + -0.612281041326364 + ], + [ + -0.581035503644868, + 1.0104839548372873, + -0.6819785723151596 + ], + [ + -0.5719580801369931, + 0.9145332993971339, + -0.6730758436402666 + ], + [ + -0.5772900643298156, + 0.9164872025135076, + -0.6197416644827353 + ], + [ + -0.594880896263351, + 0.9976579186113927, + -0.5332157729830258 + ], + [ + -0.6141349527889208, + 1.1713957405845414, + -0.36195344995039513 + ], + [ + -0.6121376757581996, + 1.3287161387315765, + -0.08202370058960351 + ], + [ + -0.5384858333207663, + 1.3423040702864797, + 0.230581961403919 + ], + [ + -0.41661909314904755, + 1.2688947795115317, + 0.465759406033365 + ], + [ + -0.3361661774027937, + 1.2195127143959383, + 0.6019164917910877 + ], + [ + -0.3111633441633346, + 1.2111776129395402, + 0.6863909475103968 + ], + [ + -0.3391807385371312, + 1.2453749580999414, + 0.7135561639531968 + ], + [ + -0.4502961671904803, + 1.3435820440745054, + 0.6515904099082374 + ], + [ + -0.5836604928904658, + 1.4853626791019157, + 0.5191085989534583 + ], + [ + -0.659359719983768, + 1.598659922816983, + 0.31917915247105666 + ] + ] + } + }, + "Volume11": { + "@module": "simsopt.geo.surfaceobjectives", + "@class": "Volume", + "@name": "Volume11", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier11" + }, + "range": null, + "nphi": null, + "ntheta": null + }, + "BoozerSurface10": { + "@module": "simsopt.geo.boozersurface", + "@class": "BoozerSurface", + "@name": "BoozerSurface10", + "@version": "0.13.0.post3+g0f8c1278.d20230501.dirty", + "biotsavart": { + "$type": "ref", + "value": "BiotSavart10" + }, + "surface": { + "$type": "ref", + "value": "SurfaceXYZTensorFourier11" + }, + "label": { + "$type": "ref", + "value": "Volume11" + }, + "targetlabel": -3.91888, + "constraint_weight": 100.0 + } + } +} diff --git a/pyproject.toml b/pyproject.toml index f34cda10d..b89247f2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,9 @@ [build-system] requires = [ - "scikit-build-core>=0.3.3", + "scikit-build-core", "pybind11", - "oldest-supported-numpy", + "numpy >= 2.0.0; python_version > '3.8'", + "oldest-supported-numpy; python_version <= '3.8'", "setuptools_scm>=8.0", 'tomli; python_version < "3.11"',] build-backend = "scikit_build_core.build" @@ -52,12 +53,11 @@ keywords = [ "magnetostatics" ] dependencies = [ - "numpy>=1.21", + "numpy>=1.21,<2.0.0", "jax>=0.2.5", "jaxlib>=0.1.56", "scipy>=1.5.4", "Deprecated>=1.2.10", - "nptyping>=1.3.0", "monty>=2021.6.10", "ruamel.yaml", "sympy", diff --git a/src/simsopt/_core/derivative.py b/src/simsopt/_core/derivative.py index c3acfce6e..6b62d848a 100644 --- a/src/simsopt/_core/derivative.py +++ b/src/simsopt/_core/derivative.py @@ -173,22 +173,38 @@ def __call__(self, optim, as_derivative=False): Args: optim: An Optimizable object + as_derivative: if True return as a Derivative object. The keys + of the returned Derivative dictionary can include `optim`, the ancestors of `optim` + or Optimizables that share DOFs with ancestors of `optim`. The values are numpy arrays + corresponding to the derivatives with respect to all degrees of freedom, both free and fixed. + If False, return as a numpy array. The entries of the array correspond only to free + DOFs, and fixed ones are removed out. """ from .optimizable import Optimizable # Import here to avoid circular import assert isinstance(optim, Optimizable) derivs = [] - keys = [] - for k in optim.unique_dof_lineage: - if np.any(k.dofs_free_status): - local_derivs = np.zeros(k.local_dof_size) - for opt in k.dofs.dep_opts(): - local_derivs += self.data[opt][opt.local_dofs_free_status] - keys.append(opt) - derivs.append(local_derivs) if as_derivative: + keys = [] + + for k in optim.unique_dof_lineage: + for opt in k.dofs.dep_opts(): + # the next if-statament is there to avoid the dictionary from accumulating + # empty values e.g. if there are no local DOFs to opt, then self.data[opt] + # returns np.array([]). + if opt.local_full_dof_size > 0: + derivs.append(self.data[opt]) + keys.append(opt) + return Derivative({k: d for k, d in zip(keys, derivs)}) + else: + for k in optim.unique_dof_lineage: + if np.any(k.dofs_free_status): + local_derivs = np.zeros(k.local_dof_size) + for opt in k.dofs.dep_opts(): + local_derivs += self.data[opt][opt.local_dofs_free_status] + derivs.append(local_derivs) return np.concatenate(derivs) # https://stackoverflow.com/questions/11624955/avoiding-python-sum-default-start-arg-behavior diff --git a/src/simsopt/_core/types.py b/src/simsopt/_core/types.py index ac473e5b3..ad634f2a4 100644 --- a/src/simsopt/_core/types.py +++ b/src/simsopt/_core/types.py @@ -6,14 +6,15 @@ This module contains small utility functions and classes. """ -from typing import Union, Sequence, Any +from typing import Union, Sequence # , Any from numbers import Integral, Real -from nptyping import NDArray, Float, Int, Bool +import numpy as np +from numpy.typing import NDArray -RealArray = Union[Sequence[Real], NDArray[Any, Float]] -IntArray = Union[Sequence[Integral], NDArray[Any, Int]] +RealArray = Union[Sequence[Real], NDArray[np.double]] +IntArray = Union[Sequence[Integral], NDArray[np.int_]] StrArray = Sequence[str] -BoolArray = Union[Sequence[bool], NDArray[Any, Bool]] +BoolArray = Union[Sequence[bool], NDArray[bool]] Key = Union[Integral, str] diff --git a/src/simsopt/field/normal_field.py b/src/simsopt/field/normal_field.py index 8c14d3398..68f09cd3e 100644 --- a/src/simsopt/field/normal_field.py +++ b/src/simsopt/field/normal_field.py @@ -3,6 +3,7 @@ import numpy as np from .._core.optimizable import DOFs, Optimizable +from simsopt.geo import SurfaceRZFourier logger = logging.getLogger(__name__) @@ -20,6 +21,15 @@ class NormalField(Optimizable): ``NormalField`` represents the magnetic field normal to a toroidal surface, for example the computational boundary of SPEC free-boundary. + It consists a surface (the computational boundary), and a set of Fourier harmonics that describe + the normal component of an externally provided field. + + The Fourier harmonics are the degees of freedom, the computational boundary is kept fixed. + The Fourier harmonics are stored in the SPEC convention, + i.e. it is the + fourier components of B.(\partial\vec{r}/ \partial\theta \times \partial\vec{r}/ \partial\zeta) on the surface with a 1/(2\pi)^2 + Fourier normalization factor. + Args: nfp: The number of field period stellsym: Whether (=True) or not (=False) stellarator symmetry is enforced. @@ -37,7 +47,7 @@ class NormalField(Optimizable): """ def __init__(self, nfp=1, stellsym=True, mpol=1, ntor=0, - vns=None, vnc=None): + vns=None, vnc=None, surface=None): self.nfp = nfp self.stellsym = stellsym @@ -47,39 +57,44 @@ def __init__(self, nfp=1, stellsym=True, mpol=1, ntor=0, if vns is None: vns = np.zeros((self.mpol + 1, 2 * self.ntor + 1)) - if vnc is None and not stellsym: + if not self.stellsym and vnc is None: vnc = np.zeros((self.mpol + 1, 2 * self.ntor + 1)) + + if surface is None: + surface = SurfaceRZFourier(nfp=nfp, stellsym=stellsym, mpol=mpol, ntor=ntor) + surface.fix_all() + self.surface = surface if self.stellsym: self.ndof = self.ntor + self.mpol * (2 * self.ntor + 1) else: self.ndof = 2 * (self.ntor + self.mpol * (2 * self.ntor + 1)) + 1 - - # Pack in a single array - dofs = np.zeros((self.ndof,)) - - # Populate dofs array - vns_shape = vns.shape - input_mpol = int(vns_shape[0]-1) - input_ntor = int((vns_shape[1]-1)/2) - for mm in range(0, self.mpol+1): - for nn in range(-self.ntor, self.ntor+1): - if mm == 0 and nn < 0: continue - if mm > input_mpol: continue - if nn > input_ntor: continue - - if not (mm == 0 and nn == 0): - ii = self.get_index_in_dofs(mm, nn, even=False) - dofs[ii] = vns[mm, input_ntor+nn] - - if not self.stellsym: - ii = self.get_index_in_dofs(mm, nn, even=True) - dofs[ii] = vnc[mm, input_ntor+nn] + + self._vns = vns + self._vnc = vnc + + dofs = self.get_dofs() Optimizable.__init__( self, x0=dofs, names=self._make_names()) + + @property + def vns(self): + return self._vns + + @vns.setter + def vns(self, value): + raise AttributeError('Change Vns using set_vns() or set_vns_asarray()') + + @property + def vnc(self): + return self._vnc + + @vnc.setter + def vnc(self, value): + raise AttributeError('Change Vnc using set_vnc() or set_vnc_asarray()') @classmethod def from_spec(cls, filename): @@ -102,6 +117,15 @@ def from_spec(cls, filename): vnc = None else: vnc = np.asarray(ph['vnc']) + mpol = ph['Mpol'] + ntor = ph['Ntor'] + surface = SurfaceRZFourier(nfp=ph['nfp'], stellsym=bool(ph['istellsym']), mpol=mpol, ntor=ntor) + old_ntor = np.array(ph['rbc']).shape[1]//2 + surface.rc[:] = np.array(ph['rbc'])[:mpol+1, old_ntor-ntor:old_ntor+ntor+1] + surface.zs[:] = np.array(ph['zbs'])[:mpol+1, old_ntor-ntor:old_ntor+ntor+1] + if not ph['istellsym']: + surface.zc[:] = np.array(ph['zbc'])[:mpol+1, old_ntor-ntor:old_ntor+ntor+1] + surface.rs[:] = np.array(ph['rbs'])[:mpol+1, old_ntor-ntor:old_ntor+ntor+1] normal_field = cls( nfp=ph['nfp'], @@ -109,11 +133,91 @@ def from_spec(cls, filename): mpol=ph['Mpol'], ntor=ph['Ntor'], vns=vns, - vnc=vnc + vnc=vnc, + surface=surface ) return normal_field + @classmethod + def from_spec_object(cls, spec): + """ + Initialize using the simsopt SPEC object's attributes + """ + if not spec.freebound: + raise ValueError('The given SPEC object is not free-boundary') + + surface = spec.computational_boundary + + # Grab all the attributes from the SPEC object into an input dictionary + input_dict = {'nfp': spec.nfp, + 'stellsym': spec.stellsym, + 'mpol': spec.mpol, + 'ntor': spec.ntor, + 'vns': spec.array_translator(spec.inputlist.vns).as_simsopt, + 'surface': surface} + if not spec.stellsym: + input_dict.append({'vnc': spec.array_translator(spec.inputlist.vnc).as_simsopt}) + + normal_field = cls(**input_dict) + + return normal_field + + def get_dofs(self): + """ + get DOFs from vns and vnc + """ + # Pack in a single array + dofs = np.zeros((self.ndof,)) + + # Populate dofs array + vns_shape = self.vns.shape + input_mpol = int(vns_shape[0]-1) + input_ntor = int((vns_shape[1]-1)/2) + for mm in range(0, self.mpol+1): + for nn in range(-self.ntor, self.ntor+1): + if mm == 0 and nn < 0: continue + if mm > input_mpol: continue + if nn > input_ntor: continue + + if not (mm == 0 and nn == 0): + ii = self.get_index_in_dofs(mm, nn, even=False) + dofs[ii] = self.vns[mm, input_ntor+nn] + + if not self.stellsym: + ii = self.get_index_in_dofs(mm, nn, even=True) + dofs[ii] = self.vnc[mm, input_ntor+nn] + return dofs + + def get_index_in_array(self, m, n, mpol=None, ntor=None, even=False): + """ + Returns position of mode (m,n) in vns or vnc array + + Args: + - m: poloidal mode number + - n: toroidal mode number (normalized by Nfp) + - mpol: resolution of dofs array. If None (by default), use self.mpol + - ntor: resolution of dofs array. If None (by default), use self.ntor + - even: set to True to get vnc. Default is False + """ + + if mpol is None: + mpol = self.mpol + if ntor is None: + ntor = self.ntor + + if m < 0 or m > mpol: + raise ValueError('m out of bound') + if abs(n) > ntor: + raise ValueError('n out of bound') + if m == 0 and n < 0: + raise ValueError('n has to be positive if m==0') + if not even and m == 0 and n == 0: + raise ValueError('m=n=0 not supported for odd series') + + return [m, n+ntor] + + def get_index_in_dofs(self, m, n, mpol=None, ntor=None, even=False): """ Returns position of mode (m,n) in dofs array @@ -161,8 +265,10 @@ def get_vns(self, m, n): def set_vns(self, m, n, value): self.check_mn(m, n) - ii = self.get_index_in_dofs(m, n) - self.local_full_x[ii] = value + i,j = self.get_index_in_array(m, n) + self._vns[i,j] = value + dofs = self.get_dofs() + self.local_full_x = dofs def get_vnc(self, m, n): self.check_mn(m, n) @@ -174,11 +280,13 @@ def get_vnc(self, m, n): def set_vnc(self, m, n, value): self.check_mn(m, n) - ii = self.get_index_in_dofs(m, n, even=True) + i,j = self.get_index_in_array(m, n) if self.stellsym: raise ValueError('Stellarator symmetric has no vnc') else: - self.local_full_x[ii] = value + self._vnc[i,j] = value + dofs = self.get_dofs() + self.local_full_x = dofs def check_mn(self, m, n): if m < 0 or m > self.mpol: @@ -193,10 +301,10 @@ def _make_names(self): Form a list of names of the ``vns``, ``vnc`` """ if self.stellsym: - names = self._make_names_helper(False) + names = self._make_names_helper(even=False) else: - names = np.append(self._make_names_helper(False), - self._make_names_helper(True)) + names = np.append(self._make_names_helper(even=False), + self._make_names_helper(even=True)) return names @@ -287,3 +395,122 @@ def fixed_range(self, mmin, mmax, nmin, nmax, fixed=True): fn(f'vns({m},{n})') if not self.stellsym: fn(f'vnc({m},{n})') + + def get_vns_asarray(self, mpol=None, ntor=None): + """ + Return the vns as a single array + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + vns = self.vns + + return vns[0:mpol, self.ntor-ntor:self.ntor+ntor+1] + + def get_vnc_asarray(self, mpol=None, ntor=None): + """ + Return the vnc as a single array + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + vnc = self.vns + + return vnc[0:mpol, self.ntor-ntor:self.ntor+ntor+1] + + def get_vns_vnc_asarray(self, mpol=None, ntor=None): + """ + Return the vns and vnc as two arrays single array + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + vns = self.get_vns_asarray(mpol, ntor) + vnc = self.get_vnc_asarray(mpol, ntor) + return vns, vnc + + def set_vns_asarray(self, vns, mpol=None, ntor=None): + """ + Set the vns from a single array + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + self._vns = vns[0:mpol, self.ntor-ntor:self.ntor+ntor+1] + dofs = self.get_dofs() + self.local_full_x = dofs + + def set_vnc_asarray(self, vnc, mpol=None, ntor=None): + """ + Set the vnc from a single array + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + self._vnc = vnc[0:mpol, self.ntor-ntor:self.ntor+ntor+1] + dofs = self.get_dofs() + self.local_full_x = dofs + + def set_vns_vnc_asarray(self, vns, vnc, mpol=None, ntor=None): + """ + Set the vns and vnc from two single arrays + """ + if mpol is None: + mpol = self.mpol + elif mpol > self.mpol: + raise ValueError('mpol out of bound') + + if ntor is None: + ntor = self.ntor + elif ntor > self.ntor: + raise ValueError('ntor out of bound') + + self.set_vns_asarray(vns, mpol, ntor) + self.set_vnc_asarray(vnc, mpol, ntor) + + def get_real_space_field(self): + """ + Fourier transform the field and get the real-space values of the normal component of the externally + provided field on the computational boundary. + The returned array will be of size specified by the surfaces' quadpoints and located on the quadpoints. + """ + vns, vnc = self.get_vns_vnc_asarray(mpol=self.mpol, ntor=self.ntor) + BdotN_unnormalized = self.surface.inverse_fourier_transform_scalar(vns, vnc, normalization=(2*np.pi)**2, stellsym=self.stellsym) + normal_field_real_space = -1 * BdotN_unnormalized / np.linalg.norm(self.surface.normal(), axis=-1) + return normal_field_real_space + diff --git a/src/simsopt/geo/__init__.py b/src/simsopt/geo/__init__.py index 2270653fb..25cf7ea42 100644 --- a/src/simsopt/geo/__init__.py +++ b/src/simsopt/geo/__init__.py @@ -6,6 +6,7 @@ from .curvehelical import * from .curverzfourier import * from .curvexyzfourier import * +from .curvexyzfouriersymmetries import * from .curveperturbed import * from .curveobjectives import * from .curveplanarfourier import * @@ -28,6 +29,7 @@ __all__ = (curve.__all__ + curvehelical.__all__ + curverzfourier.__all__ + curvexyzfourier.__all__ + + curvexyzfouriersymmetries.__all__ + curveperturbed.__all__ + curveobjectives.__all__ + curveplanarfourier.__all__ + finitebuild.__all__ + plotting.__all__ + diff --git a/src/simsopt/geo/boozersurface.py b/src/simsopt/geo/boozersurface.py index e8d564e40..ba0fc3a87 100644 --- a/src/simsopt/geo/boozersurface.py +++ b/src/simsopt/geo/boozersurface.py @@ -1,9 +1,11 @@ import numpy as np from scipy.linalg import lu from scipy.optimize import minimize, least_squares +import simsoptpp as sopp -from .surfaceobjectives import boozer_surface_residual +from .surfaceobjectives import boozer_surface_residual, boozer_surface_dexactresidual_dcoils_dcurrents_vjp, boozer_surface_dlsqgrad_dcoils_vjp from .._core.optimizable import Optimizable +from functools import partial __all__ = ['BoozerSurface'] @@ -22,10 +24,13 @@ class BoozerSurface(Optimizable): to a magnetic surface of the field and :math:`(\phi,\theta)` that parametrize the surface correspond to Boozer angles, and the constraints are satisfied. - The surface label can be area, volume, or toroidal flux. The label on the computed surface will be equal or close - to the user-provided ``targetlabel``, depending on how the label constraint is imposed. This - constrained least squares problem can be solved by scalarizing and adding the constraint as - an additional penalty term to the objective. This is done in + There are two approaches for computing these surfaces, called BoozerLS or BoozerExact surfaces. + + For BoozerLS surfaces, the objective mentioned above is minimized :math:`J(x)`, subject to + the surface label constraint. The surface label can be area, volume, or toroidal flux. The label + on the computed surface will be equal or close to the user-provided ``targetlabel``, depending on + how the label constraint is imposed. This constrained least squares problem can be solved by + scalarizing and adding the constraint as an additional penalty term to the objective. This is done in #. :mod:`minimize_boozer_penalty_constraints_LBFGS` #. :mod:`minimize_boozer_penalty_constraints_newton` @@ -38,20 +43,124 @@ class BoozerSurface(Optimizable): #. :mod:`minimize_boozer_exact_constraints_newton` where Newton is used to solve the first order necessary conditions for optimality. + + For BoozerExact surfaces, we try to find surfaces such that the residual :math:`\mathbf r(x)` + is exactly equal to zero at a specific set of colocation points on the surface. The colocation + points are chosen such that the number of colocation points is equal to the number of unknowns + in on the surface, so that the resulting nonlinear system of equations can be solved using + Newton's method. This is done in: + + #. :mod:`solve_residual_equation_exactly_newton` + + Note that there are specific requirements on the set of colocation points, i.e. + :mod:`surface.quadpoints_phi` and :mod:`surface.quadpoints_theta`, for stellarator + symmetric BoozerExact surfaces, see `solve_residual_equation_exactly_newton` + and `SurfaceXYZTensorFourier.get_stellsym_mask()` for more information. + + Alternatively, the user can use the default solvers in + + #. :mod:`run_code(iota_guess, G=G_guess)` + + for BoozerExact or BoozerLS surfaces. """ - - def __init__(self, biotsavart, surface, label, targetlabel): + + def __init__(self, biotsavart, surface, label, targetlabel, constraint_weight=None, options=None): super().__init__(depends_on=[biotsavart]) + + from simsopt.geo import SurfaceXYZFourier, SurfaceXYZTensorFourier + if not isinstance(surface, SurfaceXYZTensorFourier) and not isinstance(surface, SurfaceXYZFourier): + raise Exception("The input surface must be a SurfaceXYZTensorFourier or SurfaceXYZFourier.") + self.biotsavart = biotsavart self.surface = surface self.label = label self.targetlabel = targetlabel + self.constraint_weight = constraint_weight + self.boozer_type = 'ls' if constraint_weight else 'exact' self.need_to_run_code = True + + if options is None: + options={} + + # set the default options now + if 'verbose' not in options: + options['verbose'] = True + + # default solver options for the BoozerExact and BoozerLS solvers + if self.boozer_type == 'exact': + if 'newton_tol' not in options: + options['newton_tol'] = 1e-13 + if 'newton_maxiter' not in options: + options['newton_maxiter'] = 40 + elif self.boozer_type == 'ls': + if 'bfgs_tol' not in options: + options['bfgs_tol'] = 1e-10 + if 'newton_tol' not in options: + options['newton_tol'] = 1e-11 + if 'newton_maxiter' not in options: + options['newton_maxiter'] = 40 + if 'bfgs_maxiter' not in options: + options['bfgs_maxiter'] = 1500 + if 'limited_memory' not in options: + options['limited_memory'] = False + if 'weight_inv_modB' not in options: + options['weight_inv_modB'] = True + self.options = options def recompute_bell(self, parent=None): self.need_to_run_code = True + + def run_code(self, iota, G=None): + """ + Run the default solvers, i.e., run Newton's method directly if you are computing a BoozerExact surface, + and run BFGS followed by Newton if you are computing a BoozerLS surface. + + Args: + boozer_type: either 'exact' or 'ls', to indicate whether a BoozerExact or a BoozerLS surface is to be computed. + iota: guess for value of rotational transform on the surface, + G: guess for value of G on surface, defaults to None. Note that if None is used, then the coil currents must be fixed. + options: dictionary of solver options. If keyword is not specified, then a default + value is used. Possible keywords are: + `verbose`: display convergence information + `newton_tol`: tolerance for newton solver + `bfgs_tol`: tolerance for bfgs solver + `newton_maxiter`: maximum number of iterations for Newton solver + `bfgs_maxiter`: maximum number of iterations for BFGS solver + `limited_memory`: True if L-BFGS solver is desired, False if the BFGS solver otherwise. + `weight_inv_modB`: for BoozerLS surfaces, weight the residual by modB so that it does not scale with coil currents. Defaults to True. + """ + if not self.need_to_run_code: + return + + # for coil optimizations, the gradient calculations of the objective assume that the coil currents are fixed when G is None. + if G is None: + assert np.all([c.current.dofs.all_fixed() for c in self.biotsavart.coils]) - def boozer_penalty_constraints(self, x, derivatives=0, constraint_weight=1., scalarize=True, optimize_G=False): + # BoozerExact default solver + if self.boozer_type == 'exact': + res = self.solve_residual_equation_exactly_newton(iota=iota, G=G, tol=self.options['newton_tol'], maxiter=self.options['newton_maxiter'], verbose=self.options['verbose']) + return res + + # BoozerLS default solver + elif self.boozer_type == 'ls': + # you need a label constraint for a BoozerLS surface + assert self.constraint_weight is not None + + # first try BFGS. You could also try L-BFGS by setting limited_memory=True in the options dictionary, which might be faster. However, BFGS appears + # to generally result in solutions closer to optimality. + res = self.minimize_boozer_penalty_constraints_LBFGS(constraint_weight=self.constraint_weight, iota=iota, G=G, \ + tol=self.options['bfgs_tol'], maxiter=self.options['bfgs_maxiter'], verbose=self.options['verbose'], limited_memory=self.options['limited_memory'],\ + weight_inv_modB=self.options['weight_inv_modB']) + iota, G = res['iota'], res['G'] + + ## polish off using Newton's method + self.need_to_run_code = True + res = self.minimize_boozer_penalty_constraints_newton(constraint_weight=self.constraint_weight, iota=iota, G=G, \ + verbose=self.options['verbose'], tol=self.options['newton_tol'], maxiter=self.options['newton_maxiter'],\ + weight_inv_modB=self.options['weight_inv_modB']) + return res + + def boozer_penalty_constraints(self, x, derivatives=0, constraint_weight=1., scalarize=True, optimize_G=False, weight_inv_modB=True): r""" Define the residual @@ -71,6 +180,10 @@ def boozer_penalty_constraints(self, x, derivatives=0, constraint_weight=1., sca J(x) = \frac{1}{2}\mathbf r(x)^T \mathbf r(x), i.e. the least squares residual and optionally the gradient and the Hessian of :math:`J(x)`. + + If ``weight_inv_modB=True``, the Boozer residuals are weighted by the inverse of the field strength + (i.e. multiplied by :math:`1/\|\mathbf B \|`), otherwise, they are unweighted (multiplied by 1). Setting + this to True is useful to prevent the least squares residual from scaling with the coil currents. """ assert derivatives in [0, 1, 2] @@ -82,17 +195,18 @@ def boozer_penalty_constraints(self, x, derivatives=0, constraint_weight=1., sca sdofs = x[:-1] iota = x[-1] G = None - nsurfdofs = sdofs.size s = self.surface + num_res = 3 * s.quadpoints_phi.size * s.quadpoints_theta.size biotsavart = self.biotsavart s.set_dofs(sdofs) - boozer = boozer_surface_residual(s, iota, G, biotsavart, derivatives=derivatives) + boozer = boozer_surface_residual(s, iota, G, biotsavart, derivatives=derivatives, weight_inv_modB=weight_inv_modB) + # normalizing the residuals here + boozer = tuple([b/np.sqrt(num_res) for b in boozer]) r = boozer[0] - l = self.label.J() rl = (l-self.targetlabel) rz = (s.gamma()[0, 0, 2] - 0.) @@ -141,6 +255,102 @@ def boozer_penalty_constraints(self, x, derivatives=0, constraint_weight=1., sca d2val = J.T @ J + np.sum(r[:, None, None] * H, axis=0) return val, dval, d2val + def boozer_penalty_constraints_vectorized(self, dofs, derivatives=0, constraint_weight=1., optimize_G=False, weight_inv_modB=True): + """ + This function returns the same thing as `boozer_penalty_constraints` when `scalarized=True`. It + is much faster and uses less memory since it calls a vectorized implementation in cpp. This is + especially true when `derivatives=2`, i.e., when the Hessian is requested. + """ + + assert derivatives in [0, 1, 2] + if optimize_G: + sdofs = dofs[:-2] + iota = dofs[-2] + G = dofs[-1] + else: + sdofs = dofs[:-1] + iota = dofs[-1] + G = 2. * np.pi * np.sum(np.abs([coil.current.get_value() for coil in self.biotsavart._coils])) * (4 * np.pi * 10**(-7) / (2 * np.pi)) + + s = self.surface + nphi = s.quadpoints_phi.size + ntheta = s.quadpoints_theta.size + nsurfdofs = sdofs.size + + s.set_dofs(sdofs) + + surface = self.surface + biotsavart = self.biotsavart + x = surface.gamma() + xphi = surface.gammadash1() + xtheta = surface.gammadash2() + nphi = x.shape[0] + ntheta = x.shape[1] + + xsemiflat = x.reshape((x.size//3, 3)).copy() + biotsavart.set_points(xsemiflat) + biotsavart.compute(derivatives) + B = biotsavart.B().reshape((nphi, ntheta, 3)) + + if derivatives >= 1: + dx_dc = surface.dgamma_by_dcoeff() + dxphi_dc = surface.dgammadash1_by_dcoeff() + dxtheta_dc = surface.dgammadash2_by_dcoeff() + dB_dx = biotsavart.dB_by_dX().reshape((nphi, ntheta, 3, 3)) + + if derivatives == 2: + d2B_by_dXdX = biotsavart.d2B_by_dXdX().reshape((nphi, ntheta, 3, 3, 3)) + + num_res = 3 * s.quadpoints_phi.size * s.quadpoints_theta.size + if derivatives == 0: + val = sopp.boozer_residual(G, iota, xphi, xtheta, B, weight_inv_modB) + boozer = val, + elif derivatives == 1: + val, dval = sopp.boozer_residual_ds(G, iota, B, dB_dx, xphi, xtheta, dx_dc, dxphi_dc, dxtheta_dc, weight_inv_modB) + boozer = val, dval + elif derivatives == 2: + val, dval, d2val = sopp.boozer_residual_ds2(G, iota, B, dB_dx, d2B_by_dXdX, xphi, xtheta, dx_dc, dxphi_dc, dxtheta_dc, weight_inv_modB) + boozer = val, dval, d2val + + # normalizing the residuals here + boozer = tuple([b/num_res for b in boozer]) + + lab = self.label.J() + + rnl = boozer[0] + rl = np.sqrt(constraint_weight) * (lab-self.targetlabel) + rz = np.sqrt(constraint_weight) * (s.gamma()[0, 0, 2] - 0.) + r = rnl + 0.5*rl**2 + 0.5*rz**2 + + if derivatives == 0: + return r + + dl = np.zeros(dofs.shape) + drz = np.zeros(dofs.shape) + dl[:nsurfdofs] = self.label.dJ(partials=True)(s) + drz[:nsurfdofs] = s.dgamma_by_dcoeff()[0, 0, 2, :] + + Jnl = boozer[1] + if not optimize_G: + Jnl = Jnl[:-1] + + drl = np.sqrt(constraint_weight) * dl + drz = np.sqrt(constraint_weight) * drz + J = Jnl + rl * drl + rz * drz + + if derivatives == 1: + return r, J + + Hnl = boozer[2] + if not optimize_G: + Hnl = Hnl[:-1, :-1] + + d2rl = np.zeros((dofs.shape[0], dofs.shape[0])) + d2rl[:nsurfdofs, :nsurfdofs] = np.sqrt(constraint_weight)*self.label.d2J_by_dsurfacecoefficientsdsurfacecoefficients() + H = Hnl + drl[:, None] @ drl[None, :] + drz[:, None] @ drz[None, :] + rl * d2rl + + return r, J, H + def boozer_exact_constraints(self, xl, derivatives=0, optimize_G=True): r""" This function returns the optimality conditions corresponding to the minimization problem @@ -207,7 +417,7 @@ def boozer_exact_constraints(self, xl, derivatives=0, optimize_G=True): dres[-1, :-2] = drz return res, dres - def minimize_boozer_penalty_constraints_LBFGS(self, tol=1e-3, maxiter=1000, constraint_weight=1., iota=0., G=None): + def minimize_boozer_penalty_constraints_LBFGS(self, tol=1e-3, maxiter=1000, constraint_weight=1., iota=0., G=None, vectorize=True, limited_memory=True, weight_inv_modB=True, verbose=False): r""" This function tries to find the surface that approximately solves @@ -228,14 +438,22 @@ def minimize_boozer_penalty_constraints_LBFGS(self, tol=1e-3, maxiter=1000, cons x = np.concatenate((s.get_dofs(), [iota])) else: x = np.concatenate((s.get_dofs(), [iota, G])) - fun = lambda x: self.boozer_penalty_constraints( - x, derivatives=1, constraint_weight=constraint_weight, optimize_G=G is not None) + + fun_name = self.boozer_penalty_constraints_vectorized if vectorize else self.boozer_penalty_constraints + fun = lambda x: fun_name(x, derivatives=1, constraint_weight=constraint_weight, optimize_G=G is not None, weight_inv_modB=weight_inv_modB) + + method = 'L-BFGS-B' if limited_memory else 'BFGS' + options = {'maxiter': maxiter, 'gtol': tol} + if limited_memory: + options['maxcor'] = 200 + options['ftol'] = tol + res = minimize( - fun, x, jac=True, method='L-BFGS-B', - options={'maxiter': maxiter, 'ftol': tol, 'gtol': tol, 'maxcor': 200}) + fun, x, jac=True, method=method, + options=options) resdict = { - "fun": res.fun, "gradient": res.jac, "iter": res.nit, "info": res, "success": res.success, "G": None, + "fun": res.fun, "gradient": res.jac, "iter": res.nit, "info": res, "success": res.success, "G": None, 'weight_inv_modB':weight_inv_modB, 'type':'ls' } if G is None: s.set_dofs(res.x[:-1]) @@ -250,9 +468,13 @@ def minimize_boozer_penalty_constraints_LBFGS(self, tol=1e-3, maxiter=1000, cons self.res = resdict self.need_to_run_code = False + + if verbose: + print(f"{method} solve - {resdict['success']} iter={resdict['iter']}, iota={resdict['iota']:.16f}, ||grad||_inf = {np.linalg.norm(resdict['gradient'], ord=np.inf):.3e}", flush=True) + return resdict - def minimize_boozer_penalty_constraints_newton(self, tol=1e-12, maxiter=10, constraint_weight=1., iota=0., G=None, stab=0.): + def minimize_boozer_penalty_constraints_newton(self, tol=1e-12, maxiter=10, constraint_weight=1., iota=0., G=None, stab=0., vectorize=True, weight_inv_modB=True, verbose=False): """ This function does the same as :mod:`minimize_boozer_penalty_constraints_LBFGS`, but instead of LBFGS it uses Newton's method. @@ -266,9 +488,10 @@ def minimize_boozer_penalty_constraints_newton(self, tol=1e-12, maxiter=10, cons else: x = np.concatenate((s.get_dofs(), [iota, G])) i = 0 - - val, dval, d2val = self.boozer_penalty_constraints( - x, derivatives=2, constraint_weight=constraint_weight, optimize_G=G is not None) + + fun_name = self.boozer_penalty_constraints_vectorized if vectorize else self.boozer_penalty_constraints + val, dval, d2val = fun_name(x, derivatives=2, constraint_weight=constraint_weight, optimize_G=G is not None, weight_inv_modB=weight_inv_modB) + norm = np.linalg.norm(dval) while i < maxiter and norm > tol: d2val += stab*np.identity(d2val.shape[0]) @@ -276,15 +499,18 @@ def minimize_boozer_penalty_constraints_newton(self, tol=1e-12, maxiter=10, cons if norm < 1e-9: dx += np.linalg.solve(d2val, dval - d2val@dx) x = x - dx - val, dval, d2val = self.boozer_penalty_constraints( - x, derivatives=2, constraint_weight=constraint_weight, optimize_G=G is not None) + val, dval, d2val = fun_name(x, derivatives=2, constraint_weight=constraint_weight, optimize_G=G is not None, weight_inv_modB=weight_inv_modB) norm = np.linalg.norm(dval) i = i+1 - + r = self.boozer_penalty_constraints( - x, derivatives=0, constraint_weight=constraint_weight, scalarize=False, optimize_G=G is not None) + x, derivatives=0, constraint_weight=constraint_weight, scalarize=False, optimize_G=G is not None, weight_inv_modB=weight_inv_modB) + + P, L, U = lu(d2val) res = { - "residual": r, "jacobian": dval, "hessian": d2val, "iter": i, "success": norm <= tol, "G": None, + "residual": r, "jacobian": dval, "hessian": d2val, "iter": i, "success": norm <= tol, "G": None, + "PLU" : (P, L, U), "vjp": partial(boozer_surface_dlsqgrad_dcoils_vjp, weight_inv_modB=weight_inv_modB),\ + "type": "ls", "weight_inv_modB": weight_inv_modB } if G is None: s.set_dofs(x[:-1]) @@ -294,11 +520,14 @@ def minimize_boozer_penalty_constraints_newton(self, tol=1e-12, maxiter=10, cons iota = x[-2] G = x[-1] res['G'] = G - res['s'] = s res['iota'] = iota self.res = res self.need_to_run_code = False + + if verbose: + print(f"NEWTON solve - {res['success']} iter={res['iter']}, iota={res['iota']:.16f}, ||grad||_inf = {np.linalg.norm(res['jacobian'], ord=np.inf):.3e}", flush=True) + return res def minimize_boozer_penalty_constraints_ls(self, tol=1e-12, maxiter=10, constraint_weight=1., iota=0., G=None, method='lm'): @@ -445,7 +674,7 @@ def minimize_boozer_exact_constraints_newton(self, tol=1e-12, maxiter=10, iota=0 self.need_to_run_code = False return res - def solve_residual_equation_exactly_newton(self, tol=1e-10, maxiter=10, iota=0., G=None): + def solve_residual_equation_exactly_newton(self, tol=1e-10, maxiter=10, iota=0., G=None, verbose=False): """ This function solves the Boozer Surface residual equation exactly. For this to work, we need the right balance of quadrature points, degrees @@ -535,7 +764,7 @@ def solve_residual_equation_exactly_newton(self, tol=1e-10, maxiter=10, iota=0., label = self.label if G is None: - G = 2. * np.pi * np.sum(np.abs(self.biotsavart.coil_currents)) * (4 * np.pi * 10**(-7) / (2 * np.pi)) + G = 2. * np.pi * np.sum(np.abs([c.current.get_value() for c in self.biotsavart.coils])) * (4 * np.pi * 10**(-7) / (2 * np.pi)) x = np.concatenate((s.get_dofs(), [iota, G])) i = 0 r, J = boozer_surface_residual(s, iota, G, self.biotsavart, derivatives=1) @@ -582,10 +811,13 @@ def solve_residual_equation_exactly_newton(self, tol=1e-10, maxiter=10, iota=0., P, L, U = lu(J) res = { - "residual": r, "jacobian": J, "iter": i, "success": norm <= tol, "G": G, "s": s, "iota": iota, "PLU": (P, L, U), - "mask": mask, 'type': 'exact' + "residual": r, "jacobian": J, "iter": i, "success": norm <= tol, "G": G, "s": s, "iota": iota, "PLU": (P, L, U), + "mask": mask, 'type': 'exact', "vjp": boozer_surface_dexactresidual_dcoils_dcurrents_vjp } + + if verbose: + print(f"NEWTON solve - {res['success']} iter={res['iter']}, iota={res['iota']:.16f}, ||residual||_inf = {np.linalg.norm(res['residual'], ord=np.inf):.3e}", flush=True) + self.res = res self.need_to_run_code = False return res - diff --git a/src/simsopt/geo/curvexyzfouriersymmetries.py b/src/simsopt/geo/curvexyzfouriersymmetries.py new file mode 100644 index 000000000..b537e94f3 --- /dev/null +++ b/src/simsopt/geo/curvexyzfouriersymmetries.py @@ -0,0 +1,142 @@ +import jax.numpy as jnp +import numpy as np +from .curve import JaxCurve +from math import gcd + +__all__ = ['CurveXYZFourierSymmetries'] + + +def jaxXYZFourierSymmetriescurve_pure(dofs, quadpoints, order, nfp, stellsym, ntor): + + theta, m = jnp.meshgrid(quadpoints, jnp.arange(order + 1), indexing='ij') + + if stellsym: + xc = dofs[:order+1] + ys = dofs[order+1:2*order+1] + zs = dofs[2*order+1:] + + xhat = np.sum(xc[None, :] * jnp.cos(2 * jnp.pi * nfp*m*theta), axis=1) + yhat = np.sum(ys[None, :] * jnp.sin(2 * jnp.pi * nfp*m[:, 1:]*theta[:, 1:]), axis=1) + + z = jnp.sum(zs[None, :] * jnp.sin(2*jnp.pi*nfp * m[:, 1:]*theta[:, 1:]), axis=1) + else: + xc = dofs[0 : order+1] + xs = dofs[order+1 : 2*order+1] + yc = dofs[2*order+1: 3*order+2] + ys = dofs[3*order+2: 4*order+2] + zc = dofs[4*order+2: 5*order+3] + zs = dofs[5*order+3: ] + + xhat = np.sum(xc[None, :] * jnp.cos(2*jnp.pi*nfp*m*theta), axis=1) + np.sum(xs[None, :] * jnp.sin(2*jnp.pi*nfp*m[:, 1:]*theta[:, 1:]), axis=1) + yhat = np.sum(yc[None, :] * jnp.cos(2*jnp.pi*nfp*m*theta), axis=1) + np.sum(ys[None, :] * jnp.sin(2*jnp.pi*nfp*m[:, 1:]*theta[:, 1:]), axis=1) + + z = np.sum(zc[None, :] * jnp.cos(2*jnp.pi*nfp*m*theta), axis=1) + np.sum(zs[None, :] * jnp.sin(2*jnp.pi*nfp*m[:, 1:]*theta[:, 1:]), axis=1) + + angle = 2 * jnp.pi * quadpoints * ntor + x = jnp.cos(angle) * xhat - jnp.sin(angle) * yhat + y = jnp.sin(angle) * xhat + jnp.cos(angle) * yhat + + gamma = jnp.zeros((len(quadpoints),3)) + gamma = gamma.at[:, 0].add(x) + gamma = gamma.at[:, 1].add(y) + gamma = gamma.at[:, 2].add(z) + return gamma + + +class CurveXYZFourierSymmetries(JaxCurve): + r'''A curve representation that allows for stellarator and discrete rotational symmetries. This class can be used to + represent a helical coil that does not lie on a torus. The coordinates of the curve are given by: + + .. math:: + x(\theta) &= \hat x(\theta) \cos(2 \pi \theta n_{\text{tor}}) - \hat y(\theta) \sin(2 \pi \theta n_{\text{tor}})\\ + y(\theta) &= \hat x(\theta) \sin(2 \pi \theta n_{\text{tor}}) + \hat y(\theta) \cos(2 \pi \theta n_{\text{tor}})\\ + z(\theta) &= \sum_{m=1}^{\text{order}} z_{s,m} \sin(2 \pi n_{\text{fp}} m \theta) + + where + + .. math:: + \hat x(\theta) &= x_{c, 0} + \sum_{m=1}^{\text{order}} x_{c,m} \cos(2 \pi n_{\text{fp}} m \theta)\\ + \hat y(\theta) &= \sum_{m=1}^{\text{order}} y_{s,m} \sin(2 \pi n_{\text{fp}} m \theta)\\ + + + if the coil is stellarator symmetric. When the coil is not stellarator symmetric, the formulas above + become + + .. math:: + x(\theta) &= \hat x(\theta) \cos(2 \pi \theta n_{\text{tor}}) - \hat y(\theta) \sin(2 \pi \theta n_{\text{tor}})\\ + y(\theta) &= \hat x(\theta) \sin(2 \pi \theta n_{\text{tor}}) + \hat y(\theta) \cos(2 \pi \theta n_{\text{tor}})\\ + z(\theta) &= z_{c, 0} + \sum_{m=1}^{\text{order}} \left[ z_{c, m} \cos(2 \pi n_{\text{fp}} m \theta) + z_{s, m} \sin(2 \pi n_{\text{fp}} m \theta) \right] + + where + + .. math:: + \hat x(\theta) &= x_{c, 0} + \sum_{m=1}^{\text{order}} \left[ x_{c, m} \cos(2 \pi n_{\text{fp}} m \theta) + x_{s, m} \sin(2 \pi n_{\text{fp}} m \theta) \right] \\ + \hat y(\theta) &= y_{c, 0} + \sum_{m=1}^{\text{order}} \left[ y_{c, m} \cos(2 \pi n_{\text{fp}} m \theta) + y_{s, m} \sin(2 \pi n_{\text{fp}} m \theta) \right] \\ + + Args: + quadpoints: number of grid points/resolution along the curve, + order: how many Fourier harmonics to include in the Fourier representation, + nfp: discrete rotational symmetry number, + stellsym: stellaratory symmetry if True, not stellarator symmetric otherwise, + ntor: the number of times the curve wraps toroidally before biting its tail. Note, + it is assumed that nfp and ntor are coprime. If they are not coprime, + then then the curve actually has nfp_new:=nfp // gcd(nfp, ntor), + and ntor_new:=ntor // gcd(nfp, ntor). The operator `//` is integer division. + To avoid confusion, we assert that ntor and nfp are coprime at instantiation. + ''' + + def __init__(self, quadpoints, order, nfp, stellsym, ntor=1, **kwargs): + if isinstance(quadpoints, int): + quadpoints = np.linspace(0, 1, quadpoints, endpoint=False) + pure = lambda dofs, points: jaxXYZFourierSymmetriescurve_pure( + dofs, points, order, nfp, stellsym, ntor) + + if gcd(ntor, nfp) != 1: + raise Exception('nfp and ntor must be coprime') + + self.order = order + self.nfp = nfp + self.stellsym = stellsym + self.ntor = ntor + self.coefficients = np.zeros(self.num_dofs()) + if "dofs" not in kwargs: + if "x0" not in kwargs: + kwargs["x0"] = self.coefficients + else: + self.set_dofs_impl(kwargs["x0"]) + + super().__init__(quadpoints, pure, names=self._make_names(order), **kwargs) + + def _make_names(self, order): + if self.stellsym: + x_cos_names = [f'xc({i})' for i in range(0, order + 1)] + x_names = x_cos_names + y_sin_names = [f'ys({i})' for i in range(1, order + 1)] + y_names = y_sin_names + z_sin_names = [f'zs({i})' for i in range(1, order + 1)] + z_names = z_sin_names + else: + x_names = ['xc(0)'] + x_cos_names = [f'xc({i})' for i in range(1, order + 1)] + x_sin_names = [f'xs({i})' for i in range(1, order + 1)] + x_names += x_cos_names + x_sin_names + y_names = ['yc(0)'] + y_cos_names = [f'yc({i})' for i in range(1, order + 1)] + y_sin_names = [f'ys({i})' for i in range(1, order + 1)] + y_names += y_cos_names + y_sin_names + z_names = ['zc(0)'] + z_cos_names = [f'zc({i})' for i in range(1, order + 1)] + z_sin_names = [f'zs({i})' for i in range(1, order + 1)] + z_names += z_cos_names + z_sin_names + + return x_names + y_names + z_names + + def num_dofs(self): + return (self.order+1) + self.order + self.order if self.stellsym else 3*(2*self.order+1) + + def get_dofs(self): + return self.coefficients + + def set_dofs_impl(self, dofs): + self.coefficients[:] = dofs[:] + diff --git a/src/simsopt/geo/surface.py b/src/simsopt/geo/surface.py index ef12cb80d..081aa5633 100644 --- a/src/simsopt/geo/surface.py +++ b/src/simsopt/geo/surface.py @@ -75,7 +75,8 @@ def from_nphi_ntheta(cls, nphi=61, ntheta=62, range="full torus", nfp=1, nphi, ntheta, nfp=nfp, range=range) return cls(quadpoints_phi=quadpoints_phi, quadpoints_theta=quadpoints_theta, nfp=nfp, **kwargs) - + + @staticmethod def get_quadpoints(nphi=None, ntheta=None, range=None, @@ -109,7 +110,8 @@ def get_quadpoints(nphi=None, """ return (Surface.get_phi_quadpoints(nphi=nphi, range=range, nfp=nfp), Surface.get_theta_quadpoints(ntheta=ntheta)) - + + @staticmethod def get_theta_quadpoints(ntheta=None): r""" Sets the theta grid points for Surface subclasses. @@ -124,7 +126,8 @@ def get_theta_quadpoints(ntheta=None): if ntheta is None: ntheta = 62 return list(np.linspace(0.0, 1.0, ntheta, endpoint=False)) - + + @staticmethod def get_phi_quadpoints(nphi=None, range=None, nfp=1): r""" Sets the phi grid points for Surface subclasses. @@ -518,7 +521,7 @@ def minor_radius(self): Return the minor radius of the surface using the formula .. math:: - R_{\text{minor}} &= \sqrt{ \overline{A} / \pi } + R_{\text{minor}} = \sqrt{ \overline{A} / \pi } where :math:`\overline{A}` is the average cross sectional area. @@ -840,6 +843,7 @@ def interpolate_on_arclength_grid(self, function, theta_evaluate): return function_interpolated + def signed_distance_from_surface(xyz, surface): """ Compute the signed distances from points ``xyz`` to a surface. The sign is diff --git a/src/simsopt/geo/surfaceobjectives.py b/src/simsopt/geo/surfaceobjectives.py index bfe3ebf21..d5db86f4b 100644 --- a/src/simsopt/geo/surfaceobjectives.py +++ b/src/simsopt/geo/surfaceobjectives.py @@ -1,18 +1,68 @@ -from typing import Any - import numpy as np -from nptyping import NDArray, Float import simsoptpp as sopp from .._core.optimizable import Optimizable from .._core.derivative import Derivative, derivative_dec +from .._core.types import RealArray from .surface import Surface from .surfacexyztensorfourier import SurfaceXYZTensorFourier from ..objectives.utilities import forward_backward __all__ = ['Area', 'Volume', 'ToroidalFlux', 'PrincipalCurvature', 'QfmResidual', 'boozer_surface_residual', 'Iotas', - 'MajorRadius', 'NonQuasiSymmetricRatio'] + 'MajorRadius', 'NonQuasiSymmetricRatio', 'BoozerResidual', + 'AspectRatio'] + + +class AspectRatio(Optimizable): + """ + Wrapper class for surface aspect ratio. + """ + + def __init__(self, surface, range=None, nphi=None, ntheta=None): + + if range is not None or nphi is not None or ntheta is not None: + if range is None: + if surface.stellsym: + range = Surface.RANGE_HALF_PERIOD + else: + range = Surface.RANGE_FIELD_PERIOD + if nphi is None: + nphi = len(surface.quadpoints_phi) + if ntheta is None: + ntheta = len(surface.quadpoints_theta) + self.surface = surface.__class__.from_nphi_ntheta(nphi=nphi, ntheta=ntheta, range=range, nfp=surface.nfp, stellsym=surface.stellsym, \ + mpol=surface.mpol, ntor=surface.ntor, dofs=surface.dofs) + else: + self.surface = surface + + self.range = range + self.nphi = nphi + self.ntheta = ntheta + + super().__init__(depends_on=[self.surface]) + + def J(self): + """ + Compute the aspect ratio of a surface. + """ + return self.surface.aspect_ratio() + + @derivative_dec + def dJ(self): + return Derivative({self.surface: self.dJ_by_dsurfacecoefficients()}) + + def dJ_by_dsurfacecoefficients(self): + """ + Calculate the partial derivatives with respect to the surface coefficients. + """ + return self.surface.daspect_ratio_by_dcoeff() + + def d2J_by_dsurfacecoefficientsdsurfacecoefficients(self): + """ + Calculate the second partial derivatives with respect to the surface coefficients. + """ + return self.surface.d2aspect_ratio_by_dcoeff_dcoeff() class Area(Optimizable): @@ -287,21 +337,40 @@ def dJ(self): return Derivative({self.surface: deriv}) -def boozer_surface_residual(surface, iota, G, biotsavart, derivatives=0): +def boozer_surface_residual(surface, iota, G, biotsavart, derivatives=0, weight_inv_modB=False): r""" For a given surface, this function computes the residual .. math:: - G\mathbf B(\mathbf x) - \|\mathbf B(\mathbf x)\|^2 (\mathbf x_\varphi + \iota \mathbf x_\theta) + G\mathbf B_\text{BS}(\mathbf x) - \|\mathbf B_\text{BS}(\mathbf x)\|^2 (\mathbf x_\varphi + \iota \mathbf x_\theta) as well as the derivatives of this residual with respect to surface dofs, iota, and G. In the above, :math:`\mathbf x` are points on the surface, :math:`\iota` is the - rotational transform on that surface, and :math:`\mathbf B` is the magnetic field. + rotational transform on that surface, and :math:`\mathbf B_{\text{BS}}` is the magnetic field + computed using the Biot-Savart law. :math:`G` is known for exact boozer surfaces, so if ``G=None`` is passed, then that value is used instead. + + Args: + surface: The surface to use for the computation + iota: the surface rotational transform + G: a constant that is a function of the coil currents in vacuum field + biotsavart: the Biot-Savart magnetic field + derivatives: how many spatial derivatives of the residual to compute + weight_inv_modB: whether or not to weight the residual by :math:`1/\|\mathbf B\|`. This + is useful to activate so that the residual does not scale with the + coil currents. + + Returns: + the residual at the surface quadrature points and optionally the spatial derivatives + of the residual. + + """ + + assert derivatives in [0, 1, 2] user_provided_G = G is not None if not user_provided_G: @@ -324,8 +393,15 @@ def boozer_surface_residual(surface, iota, G, biotsavart, derivatives=0): B2 = np.sum(B**2, axis=2) residual = G*B - B2[..., None] * tang - residual_flattened = residual.reshape((nphi*ntheta*3, )) - r = residual_flattened + if weight_inv_modB: + modB = np.sqrt(B2) + w = 1./modB + rtil = w[:, :, None] * residual + else: + rtil = residual.copy() + + rtil_flattened = rtil.reshape((nphi*ntheta*3, )) + r = rtil_flattened if derivatives == 0: return r, @@ -341,24 +417,41 @@ def boozer_surface_residual(surface, iota, G, biotsavart, derivatives=0): dresidual_dc = sopp.boozer_dresidual_dc(G, dB_dc, B, tang, B2, dxphi_dc, iota, dxtheta_dc) dresidual_diota = -B2[..., None] * xtheta - dresidual_dc_flattened = dresidual_dc.reshape((nphi*ntheta*3, nsurfdofs)) - dresidual_diota_flattened = dresidual_diota.reshape((nphi*ntheta*3, 1)) + if weight_inv_modB: + dB2_dc = 2*np.einsum('ijk,ijkl->ijl', B, dB_dc, optimize=True) + dmodB_dc = 0.5*dB2_dc/np.sqrt(B2[:, :, None]) + dw_dc = -dmodB_dc/modB[:, :, None]**2 + drtil_dc = residual[..., None] * dw_dc[:, :, None, :] + w[:, :, None, None] * dresidual_dc + drtil_diota = w[:, :, None] * dresidual_diota + else: + drtil_dc = dresidual_dc.copy() + drtil_diota = dresidual_diota.copy() + + drtil_dc_flattened = drtil_dc.reshape((nphi*ntheta*3, nsurfdofs)) + drtil_diota_flattened = drtil_diota.reshape((nphi*ntheta*3, 1)) if user_provided_G: dresidual_dG = B - dresidual_dG_flattened = dresidual_dG.reshape((nphi*ntheta*3, 1)) - J = np.concatenate((dresidual_dc_flattened, dresidual_diota_flattened, dresidual_dG_flattened), axis=1) + + if weight_inv_modB: + drtil_dG = w[:, :, None] * dresidual_dG + else: + drtil_dG = dresidual_dG.copy() + + drtil_dG_flattened = drtil_dG.reshape((nphi*ntheta*3, 1)) + J = np.concatenate((drtil_dc_flattened, drtil_diota_flattened, drtil_dG_flattened), axis=1) else: - J = np.concatenate((dresidual_dc_flattened, dresidual_diota_flattened), axis=1) + J = np.concatenate((drtil_dc_flattened, drtil_diota_flattened), axis=1) + if derivatives == 1: return r, J d2B_by_dXdX = biotsavart.d2B_by_dXdX().reshape((nphi, ntheta, 3, 3, 3)) - d2B_dcdc = np.einsum('ijkpl,ijpn,ijkm->ijlmn', d2B_by_dXdX, dx_dc, dx_dc) - dB2_dc = 2. * np.einsum('ijl,ijlm->ijm', B, dB_dc) + d2B_dcdc = np.einsum('ijkpl,ijpn,ijkm->ijlmn', d2B_by_dXdX, dx_dc, dx_dc, optimize=True) + dB2_dc = 2. * np.einsum('ijl,ijlm->ijm', B, dB_dc, optimize=True) - term1 = np.einsum('ijlm,ijln->ijmn', dB_dc, dB_dc) - term2 = np.einsum('ijlmn,ijl->ijmn', d2B_dcdc, B) + term1 = np.einsum('ijlm,ijln->ijmn', dB_dc, dB_dc, optimize=True) + term2 = np.einsum('ijlmn,ijl->ijmn', d2B_dcdc, B, optimize=True) d2B2_dcdc = 2*(term1 + term2) term1 = -(dxphi_dc[..., None, :] + iota * dxtheta_dc[..., None, :]) * dB2_dc[..., None, :, None] @@ -368,42 +461,62 @@ def boozer_surface_residual(surface, iota, G, biotsavart, derivatives=0): d2residual_by_dcdiota = -(dB2_dc[..., None, :] * xtheta[..., :, None] + B2[..., None, None] * dxtheta_dc) d2residual_by_diotadiota = np.zeros(dresidual_diota.shape) - d2residual_by_dcdc_flattened = d2residual_by_dcdc.reshape((nphi*ntheta*3, nsurfdofs, nsurfdofs)) - d2residual_by_dcdiota_flattened = d2residual_by_dcdiota.reshape((nphi*ntheta*3, nsurfdofs)) - d2residual_by_diotadiota_flattened = d2residual_by_diotadiota.reshape((nphi*ntheta*3,)) - + if weight_inv_modB: + d2B2_dcdc = 2*(np.einsum('ijlm,ijln->ijmn', dB_dc, dB_dc, optimize=True)+np.einsum('ijkpl,ijpn,ijkm,ijl->ijmn', d2B_by_dXdX, dx_dc, dx_dc, B, optimize=True)) + d2modB_dc2 = (2*B2[:, :, None, None] * d2B2_dcdc - dB2_dc[:, :, :, None]*dB2_dc[:, :, None, :])*(1/(4*B2[:, :, None, None]**1.5)) + d2w_dc2 = (2*dmodB_dc[:, :, :, None] * dmodB_dc[:, :, None, :] - modB[:, :, None, None] * d2modB_dc2)/modB[:, :, None, None]**3. + + d2rtil_dcdc = residual[..., None, None] * d2w_dc2[:, :, None, ...] \ + + dw_dc[:, :, None, :, None] * dresidual_dc[:, :, :, None, :] \ + + dw_dc[:, :, None, None, :] * dresidual_dc[:, :, :, :, None] \ + + w[:, :, None, None, None] * d2residual_by_dcdc + d2rtil_dcdiota = w[:, :, None, None] * d2residual_by_dcdiota + dw_dc[:, :, None, :] * dresidual_diota[..., None] + d2rtil_diotadiota = np.zeros(dresidual_diota.shape) + else: + d2rtil_dcdc = d2residual_by_dcdc.copy() + d2rtil_dcdiota = d2residual_by_dcdiota.copy() + d2rtil_diotadiota = d2residual_by_diotadiota.copy() + + d2rtil_dcdc_flattened = d2rtil_dcdc.reshape((nphi*ntheta*3, nsurfdofs, nsurfdofs)) + d2rtil_dcdiota_flattened = d2rtil_dcdiota.reshape((nphi*ntheta*3, nsurfdofs)) + d2rtil_diotadiota_flattened = d2rtil_diotadiota.reshape((nphi*ntheta*3,)) + if user_provided_G: d2residual_by_dcdG = dB_dc - d2residual_by_diotadG = np.zeros(dresidual_diota.shape) - d2residual_by_dGdG = np.zeros(dresidual_dG.shape) - d2residual_by_dcdG_flattened = d2residual_by_dcdG.reshape((nphi*ntheta*3, nsurfdofs)) - d2residual_by_diotadG_flattened = d2residual_by_diotadG.reshape((nphi*ntheta*3,)) - d2residual_by_dGdG_flattened = d2residual_by_dGdG.reshape((nphi*ntheta*3,)) + if weight_inv_modB: + d2rtil_dcdG = dw_dc[:, :, None, :] * dresidual_dG[..., None] + w[:, :, None, None] * d2residual_by_dcdG + else: + d2rtil_dcdG = d2residual_by_dcdG.copy() + + d2rtil_dGdG = np.zeros(dresidual_dG.shape) + d2rtil_dcdG_flattened = d2rtil_dcdG.reshape((nphi*ntheta*3, nsurfdofs)) + d2rtil_diotadG_flattened = np.zeros((nphi*ntheta*3,)) + d2rtil_dGdG_flattened = d2rtil_dGdG.reshape((nphi*ntheta*3,)) + H = np.zeros((nphi*ntheta*3, nsurfdofs + 2, nsurfdofs + 2)) # noqa turns out linting so that we can align everything neatly - H[:, :nsurfdofs, :nsurfdofs] = d2residual_by_dcdc_flattened # noqa (0, 0) dcdc - H[:, :nsurfdofs, nsurfdofs] = d2residual_by_dcdiota_flattened # noqa (0, 1) dcdiota - H[:, :nsurfdofs, nsurfdofs+1] = d2residual_by_dcdG_flattened # noqa (0, 2) dcdG - H[:, nsurfdofs, :nsurfdofs] = d2residual_by_dcdiota_flattened # noqa (1, 0) diotadc - H[:, nsurfdofs, nsurfdofs] = d2residual_by_diotadiota_flattened # noqa (1, 1) diotadiota - H[:, nsurfdofs, nsurfdofs+1] = d2residual_by_diotadiota_flattened # noqa (1, 2) diotadG - H[:, nsurfdofs+1, :nsurfdofs] = d2residual_by_dcdG_flattened # noqa (2, 0) dGdc - H[:, nsurfdofs+1, nsurfdofs] = d2residual_by_diotadG_flattened # noqa (2, 1) dGdiota - H[:, nsurfdofs+1, nsurfdofs+1] = d2residual_by_dGdG_flattened # noqa (2, 2) dGdG + H[:, :nsurfdofs, :nsurfdofs] = d2rtil_dcdc_flattened # noqa (0, 0) dcdc + H[:, :nsurfdofs, nsurfdofs] = d2rtil_dcdiota_flattened # noqa (0, 1) dcdiota + H[:, :nsurfdofs, nsurfdofs+1] = d2rtil_dcdG_flattened # noqa (0, 2) dcdG + H[:, nsurfdofs, :nsurfdofs] = d2rtil_dcdiota_flattened # noqa (1, 0) diotadc + H[:, nsurfdofs, nsurfdofs] = d2rtil_diotadiota_flattened # noqa (1, 1) diotadiota + H[:, nsurfdofs, nsurfdofs+1] = d2rtil_diotadiota_flattened # noqa (1, 2) diotadG + H[:, nsurfdofs+1, :nsurfdofs] = d2rtil_dcdG_flattened # noqa (2, 0) dGdc + H[:, nsurfdofs+1, nsurfdofs] = d2rtil_diotadG_flattened # noqa (2, 1) dGdiota + H[:, nsurfdofs+1, nsurfdofs+1] = d2rtil_dGdG_flattened # noqa (2, 2) dGdG else: H = np.zeros((nphi*ntheta*3, nsurfdofs + 1, nsurfdofs + 1)) - - H[:, :nsurfdofs, :nsurfdofs] = d2residual_by_dcdc_flattened # noqa (0, 0) dcdc - H[:, :nsurfdofs, nsurfdofs] = d2residual_by_dcdiota_flattened # noqa (0, 1) dcdiota - H[:, nsurfdofs, :nsurfdofs] = d2residual_by_dcdiota_flattened # noqa (1, 0) diotadc - H[:, nsurfdofs, nsurfdofs] = d2residual_by_diotadiota_flattened # noqa (1, 1) diotadiota + H[:, :nsurfdofs, :nsurfdofs] = d2rtil_dcdc_flattened # noqa (0, 0) dcdc + H[:, :nsurfdofs, nsurfdofs] = d2rtil_dcdiota_flattened # noqa (0, 1) dcdiota + H[:, nsurfdofs, :nsurfdofs] = d2rtil_dcdiota_flattened # noqa (1, 0) diotadc + H[:, nsurfdofs, nsurfdofs] = d2rtil_diotadiota_flattened # noqa (1, 1) diotadiota return r, J, H def parameter_derivatives(surface: Surface, - shape_gradient: NDArray[Any, Float] - ) -> NDArray[Any, Float]: + shape_gradient: RealArray + ) -> RealArray: r""" Converts the shape gradient of a given figure of merit, :math:`f`, to derivatives with respect to parameters defining a surface. For @@ -544,7 +657,7 @@ def recompute_bell(self, parent=None): def compute(self): if self.boozer_surface.need_to_run_code: res = self.boozer_surface.res - res = self.boozer_surface.solve_residual_equation_exactly_newton(tol=1e-13, maxiter=20, iota=res['iota'], G=res['G']) + res = self.boozer_surface.run_code(res['iota'], G=res['G']) surface = self.surface self._J = surface.major_radius() @@ -553,7 +666,7 @@ def compute(self): iota = booz_surf.res['iota'] G = booz_surf.res['G'] P, L, U = booz_surf.res['PLU'] - dconstraint_dcoils_vjp = boozer_surface_dexactresidual_dcoils_dcurrents_vjp + dconstraint_dcoils_vjp = self.boozer_surface.res['vjp'] # tack on dJ_diota = dJ_dG = 0 to the end of dJ_ds dJ_ds = np.zeros(L.shape[0]) @@ -596,8 +709,6 @@ class NonQuasiSymmetricRatio(Optimizable): """ def __init__(self, boozer_surface, bs, sDIM=20, quasi_poloidal=False): - # only BoozerExact surfaces work for now - assert boozer_surface.res['type'] == 'exact' # only SurfaceXYZTensorFourier for now assert type(boozer_surface.surface) is SurfaceXYZTensorFourier @@ -634,7 +745,7 @@ def dJ(self): def compute(self): if self.boozer_surface.need_to_run_code: res = self.boozer_surface.res - res = self.boozer_surface.solve_residual_equation_exactly_newton(tol=1e-13, maxiter=20, iota=res['iota'], G=res['G']) + res = self.boozer_surface.run_code(res['iota'], G=res['G']) self.biotsavart.set_points(self.surface.gamma().reshape((-1, 3))) axis = self.axis @@ -665,13 +776,15 @@ def compute(self): iota = booz_surf.res['iota'] G = booz_surf.res['G'] P, L, U = booz_surf.res['PLU'] - dconstraint_dcoils_vjp = boozer_surface_dexactresidual_dcoils_dcurrents_vjp + dconstraint_dcoils_vjp = self.boozer_surface.res['vjp'] dJ_by_dB = self.dJ_by_dB().reshape((-1, 3)) dJ_by_dcoils = self.biotsavart.B_vjp(dJ_by_dB) - + # tack on dJ_diota = dJ_dG = 0 to the end of dJ_ds - dJ_ds = np.concatenate((self.dJ_by_dsurfacecoefficients(), [0., 0.])) + dJ_ds = np.zeros(L.shape[0]) + dj_ds = self.dJ_by_dsurfacecoefficients() + dJ_ds[:dj_ds.size] = dj_ds adj = forward_backward(P, L, U, dJ_ds) adj_times_dg_dcoil = dconstraint_dcoils_vjp(adj, booz_surf, iota, G) @@ -790,13 +903,14 @@ def dJ(self): def recompute_bell(self, parent=None): self._J = None + self._dJ = None self._dJ_by_dcoefficients = None self._dJ_by_dcoilcurrents = None def compute(self): if self.boozer_surface.need_to_run_code: res = self.boozer_surface.res - res = self.boozer_surface.solve_residual_equation_exactly_newton(tol=1e-13, maxiter=20, iota=res['iota'], G=res['G']) + res = self.boozer_surface.run_code(res['iota'], G=res['G']) self._J = self.boozer_surface.res['iota'] @@ -804,17 +918,136 @@ def compute(self): iota = booz_surf.res['iota'] G = booz_surf.res['G'] P, L, U = booz_surf.res['PLU'] - dconstraint_dcoils_vjp = boozer_surface_dexactresidual_dcoils_dcurrents_vjp + dconstraint_dcoils_vjp = self.boozer_surface.res['vjp'] - # tack on dJ_diota = dJ_dG = 0 to the end of dJ_ds dJ_ds = np.zeros(L.shape[0]) - dJ_ds[-2] = 1. + if G is not None: + # tack on dJ_diota = 1, and dJ_dG = 0 to the end of dJ_ds + dJ_ds[-2] = 1. + else: + # tack on dJ_diota = 1 to the end of dJ_ds + dJ_ds[-1] = 1. + adj = forward_backward(P, L, U, dJ_ds) adj_times_dg_dcoil = dconstraint_dcoils_vjp(adj, booz_surf, iota, G) self._dJ = -1.*adj_times_dg_dcoil +class BoozerResidual(Optimizable): + r""" + This term returns the Boozer residual penalty term + + .. math:: + J = \int_0^{1/n_{\text{fp}}} \int_0^1 \| \mathbf r \|^2 ~d\theta ~d\varphi + w (\text{label.J()-boozer_surface.constraint_weight})^2. + + where + + .. math:: + \mathbf r = \frac{1}{\|\mathbf B\|}[G\mathbf B_\text{BS}(\mathbf x) - ||\mathbf B_\text{BS}(\mathbf x)||^2 (\mathbf x_\varphi + \iota \mathbf x_\theta)] + + """ + + def __init__(self, boozer_surface, bs): + Optimizable.__init__(self, depends_on=[boozer_surface]) + in_surface = boozer_surface.surface + self.boozer_surface = boozer_surface + + # same number of points as on the solved surface + phis = in_surface.quadpoints_phi + thetas = in_surface.quadpoints_theta + + s = SurfaceXYZTensorFourier(mpol=in_surface.mpol, ntor=in_surface.ntor, stellsym=in_surface.stellsym, nfp=in_surface.nfp, quadpoints_phi=phis, quadpoints_theta=thetas) + s.set_dofs(in_surface.get_dofs()) + + self.constraint_weight = boozer_surface.constraint_weight + self.in_surface = in_surface + self.surface = s + self.biotsavart = bs + self.recompute_bell() + + def J(self): + """ + Return the value of the penalty function. + """ + + if self._J is None: + self.compute() + return self._J + + @derivative_dec + def dJ(self): + """ + Return the derivative of the penalty function with respect to the coil degrees of freedom. + """ + + if self._dJ is None: + self.compute() + return self._dJ + + def recompute_bell(self, parent=None): + self._J = None + self._dJ = None + + def compute(self): + if self.boozer_surface.need_to_run_code: + res = self.boozer_surface.res + res = self.boozer_surface.run_code(res['iota'], G=res['G']) + + self.surface.set_dofs(self.in_surface.get_dofs()) + self.biotsavart.set_points(self.surface.gamma().reshape((-1, 3))) + + nphi = self.surface.quadpoints_phi.size + ntheta = self.surface.quadpoints_theta.size + num_points = 3 * nphi * ntheta + + # compute J + surface = self.surface + iota = self.boozer_surface.res['iota'] + G = self.boozer_surface.res['G'] + r, J = boozer_surface_residual(surface, iota, G, self.biotsavart, derivatives=1, weight_inv_modB=self.boozer_surface.res['weight_inv_modB']) + rtil = np.concatenate((r/np.sqrt(num_points), [np.sqrt(self.constraint_weight)*(self.boozer_surface.label.J()-self.boozer_surface.targetlabel)])) + self._J = 0.5*np.sum(rtil**2) + + booz_surf = self.boozer_surface + P, L, U = booz_surf.res['PLU'] + dconstraint_dcoils_vjp = booz_surf.res['vjp'] + + dJ_by_dB = self.dJ_by_dB() + dJ_by_dcoils = self.biotsavart.B_vjp(dJ_by_dB) + + # dJ_diota, dJ_dG to the end of dJ_ds are on the end + dl = np.zeros((J.shape[1],)) + dlabel_dsurface = self.boozer_surface.label.dJ_by_dsurfacecoefficients() + dl[:dlabel_dsurface.size] = dlabel_dsurface + Jtil = np.concatenate((J/np.sqrt(num_points), np.sqrt(self.constraint_weight) * dl[None, :]), axis=0) + dJ_ds = Jtil.T@rtil + + adj = forward_backward(P, L, U, dJ_ds) + + adj_times_dg_dcoil = dconstraint_dcoils_vjp(adj, booz_surf, iota, G) + self._dJ = dJ_by_dcoils - adj_times_dg_dcoil + + def dJ_by_dB(self): + """ + Return the partial derivative of the objective with respect to the magnetic field + """ + + surface = self.surface + res = self.boozer_surface.res + nphi = self.surface.quadpoints_phi.size + ntheta = self.surface.quadpoints_theta.size + num_points = 3 * nphi * ntheta + r, r_dB = boozer_surface_residual_dB(surface, self.boozer_surface.res['iota'], self.boozer_surface.res['G'], self.biotsavart, derivatives=0, weight_inv_modB=res['weight_inv_modB']) + + r /= np.sqrt(num_points) + r_dB /= np.sqrt(num_points) + + dJ_by_dB = r[:, None]*r_dB + dJ_by_dB = np.sum(dJ_by_dB.reshape((-1, 3, 3)), axis=1) + return dJ_by_dB + + def boozer_surface_dexactresidual_dcoils_dcurrents_vjp(lm, booz_surf, iota, G): r""" For a given surface with points :math:`x` on it, this function computes the @@ -825,8 +1058,6 @@ def boozer_surface_dexactresidual_dcoils_dcurrents_vjp(lm, booz_surf, iota, G): \lambda^T \frac{d\mathbf{r}}{d\text{currents}} &= [G\lambda - 2\lambda\|\mathbf B(\mathbf x)\| (\mathbf{x}_\varphi + \iota \mathbf{x}_\theta) ]^T \frac{d\mathbf B}{d\text{currents}} where :math:`\mathbf{r}` is the Boozer residual. - G is known for exact boozer surfaces, so if G=None is passed, then that - value is used instead. Args: lm: adjoint variable, @@ -836,9 +1067,9 @@ def boozer_surface_dexactresidual_dcoils_dcurrents_vjp(lm, booz_surf, iota, G): """ surface = booz_surf.surface biotsavart = booz_surf.biotsavart - user_provided_G = G is not None - if not user_provided_G: - G = 2. * np.pi * np.sum(np.abs(biotsavart.coil_currents)) * (4 * np.pi * 10**(-7) / (2 * np.pi)) + + # G must be provided here + assert G is not None res, dres_dB = boozer_surface_residual_dB(surface, iota, G, biotsavart) dres_dB = dres_dB.reshape((-1, 3, 3)) @@ -855,23 +1086,51 @@ def boozer_surface_dexactresidual_dcoils_dcurrents_vjp(lm, booz_surf, iota, G): return lm_times_dres_dcoils+lm_times_dlabel_dcoils -def boozer_surface_residual_dB(surface, iota, G, biotsavart): - r""" +def boozer_surface_dlsqgrad_dcoils_vjp(lm, booz_surf, iota, G, weight_inv_modB=True): + """ For a given surface with points x on it, this function computes the - differentiated residual - - .. math:: - \frac{d}{dB_{i,j,k}}[ G B_{i,j,k} - \|\mathbf{B}_{i,j}\|^2 (\mathbf{x}_{\varphi} + \iota \mathbf{x}_{\theta}) ] + vector-Jacobian product of \lm^T * dlsqgrad_dcoils, \lm^T * dlsqgrad_dcurrents: + lm^T dresidual_dcoils = lm^T [dr_dsurface]^T[dr_dcoils] + sum r_i lm^T d2ri_dsdc + lm^T dresidual_dcurrents = lm^T [dr_dsurface]^T[dr_dcurrents] + sum r_i lm^T d2ri_dsdcurrents - where :math:`B_{i,j,k}` is the kth component of the magnetic field :math:`\mathbf B_{i,j}` at quadrature point :math:`(i,j)` + G is known for exact boozer surfaces, so if G=None is passed, then that + value is used instead. + """ + + surface = booz_surf.surface + biotsavart = booz_surf.biotsavart + nphi = surface.quadpoints_phi.size + ntheta = surface.quadpoints_theta.size + num_points = 3 * nphi * ntheta + # r, dr_dB, J, d2residual_dsurfacedB, d2residual_dsurfacedgradB + boozer = boozer_surface_residual_dB(surface, iota, G, biotsavart, derivatives=1, weight_inv_modB=weight_inv_modB) + r = boozer[0]/np.sqrt(num_points) + dr_dB = boozer[1].reshape((-1, 3, 3))/np.sqrt(num_points) + dr_ds = boozer[2]/np.sqrt(num_points) + d2r_dsdB = boozer[3]/np.sqrt(num_points) + d2r_dsdgradB = boozer[4]/np.sqrt(num_points) + + v1 = np.sum(np.sum(lm[:, None]*dr_ds.T, axis=0).reshape((-1, 3, 1)) * dr_dB, axis=1) + v2 = np.sum(r.reshape((-1, 3, 1))*np.sum(lm[None, None, :]*d2r_dsdB, axis=-1).reshape((-1, 3, 3)), axis=1) + v3 = np.sum(r.reshape((-1, 3, 1, 1))*np.sum(lm[None, None, None, :]*d2r_dsdgradB, axis=-1).reshape((-1, 3, 3, 3)), axis=1) + dres_dcoils = biotsavart.B_and_dB_vjp(v1+v2, v3) + return dres_dcoils[0]+dres_dcoils[1] + + +def boozer_surface_residual_dB(surface, iota, G, biotsavart, derivatives=0, weight_inv_modB=False): + """ + For a given surface with points x on it, this function computes the + differentiated residual + d/dB[ G*B_BS(x) - ||B_BS(x)||^2 * (x_phi + iota * x_theta) ] as well as the derivatives of this residual with respect to surface dofs, - :math:`\iota`, and :math:`G`. :math:`G` is known for exact boozer surfaces, so if - G=None is passed, then that value is used instead. + iota, and G. + G is known for exact boozer surfaces, so if G=None is passed, then that + value is used instead. """ - + user_provided_G = G is not None if not user_provided_G: - G = 2. * np.pi * np.sum(np.abs(biotsavart.coil_currents)) * (4 * np.pi * 10**(-7) / (2 * np.pi)) + G = 2. * np.pi * np.sum(np.abs([c.current.get_value() for c in biotsavart.coils])) * (4 * np.pi * 10**(-7) / (2 * np.pi)) x = surface.gamma() xphi = surface.gammadash1() @@ -890,11 +1149,104 @@ def boozer_surface_residual_dB(surface, iota, G, biotsavart): GI = np.eye(3, 3) * G dresidual_dB = GI[None, None, :, :] - 2. * tang[:, :, :, None] * B[:, :, None, :] + + if weight_inv_modB: + B2 = np.sum(B**2, axis=2) + modB = np.sqrt(B2) + w = 1./modB + dw_dB = -B/B2[:, :, None]**1.5 + rtil = w[:, :, None] * residual + drtil_dB = residual[:, :, :, None] * dw_dB[:, :, None, :] + dresidual_dB * w[:, :, None, None] + else: + rtil = residual.copy() + drtil_dB = dresidual_dB.copy() + + rtil_flattened = rtil.reshape((nphi*ntheta*3, )) + drtil_dB_flattened = drtil_dB.reshape((nphi*ntheta*3, 3)) + + if derivatives == 0: + return rtil_flattened, drtil_dB_flattened + + dx_dc = surface.dgamma_by_dcoeff() + dxphi_dc = surface.dgammadash1_by_dcoeff() + dxtheta_dc = surface.dgammadash2_by_dcoeff() + nsurfdofs = dx_dc.shape[-1] - residual_flattened = residual.reshape((nphi*ntheta*3, )) - dresidual_dB_flattened = dresidual_dB.reshape((nphi*ntheta*3, 3)) - r = residual_flattened - dr_dB = dresidual_dB_flattened + dB_by_dX = biotsavart.dB_by_dX().reshape((nphi, ntheta, 3, 3)) + dB_dc = np.einsum('ijkl,ijkm->ijlm', dB_by_dX, dx_dc, optimize=True) + dtang_dc = dxphi_dc + iota * dxtheta_dc + dresidual_dc = G*dB_dc \ + - 2*np.sum(B[..., None]*dB_dc, axis=2)[:, :, None, :] * tang[..., None] \ + - np.sum(B**2, axis=2)[..., None, None] * dtang_dc + dresidual_diota = -np.sum(B**2, axis=2)[..., None] * xtheta + + d2residual_dcdB = -2*dB_dc[:, :, None, :, :] * tang[:, :, :, None, None] - 2*B[:, :, None, :, None] * dtang_dc[:, :, :, None, :] + d2residual_diotadB = -2.*B[:, :, None, :] * xtheta[:, :, :, None] + d2residual_dcdgradB = -2.*B[:, :, None, None, :, None]*dx_dc[:, :, None, :, None, :]*tang[:, :, :, None, None, None] + idx = np.arange(3) + d2residual_dcdgradB[:, :, idx, :, idx, :] += dx_dc * G + + if weight_inv_modB: + dB2_dc = 2*np.einsum('ijk,ijkl->ijl', B, dB_dc, optimize=True) + dmodB_dc = 0.5*dB2_dc/modB[:, :, None] + dw_dc = -dmodB_dc/B2[:, :, None] + + d2w_dcdB = -(dB_dc * B2[:, :, None, None]**1.5 - 1.5*dB2_dc[:, :, None, :]*modB[:, :, None, None]*B[:, :, :, None])/B2[:, :, None, None]**3 + d2w_dcdgradB = dw_dB[:, :, None, :, None] * dx_dc[:, :, :, None, :] + + drtil_dc = dresidual_dc * w[:, :, None, None] + dw_dc[:, :, None, :] * residual[..., None] + drtil_diota = w[:, :, None] * dresidual_diota + d2rtil_dcdB = dresidual_dc[:, :, :, None, :]*dw_dB[:, :, None, :, None] \ + + dresidual_dB[:, :, :, :, None]*dw_dc[:, :, None, None, :] \ + + d2residual_dcdB*w[:, :, None, None, None] \ + + residual[:, :, :, None, None]*d2w_dcdB[:, :, None, :, :] + d2rtil_diotadB = dw_dB[:, :, None, :]*dresidual_diota[:, :, :, None] + w[:, :, None, None]*d2residual_diotadB + d2rtil_dcdgradB = d2w_dcdgradB[:, :, None, :, :, :]*residual[:, :, :, None, None, None] + d2residual_dcdgradB*w[:, :, None, None, None, None] + else: + drtil_dc = dresidual_dc.copy() + drtil_diota = dresidual_diota.copy() + d2rtil_dcdB = d2residual_dcdB.copy() + d2rtil_diotadB = d2residual_diotadB.copy() + d2rtil_dcdgradB = d2residual_dcdgradB.copy() + + drtil_dc_flattened = drtil_dc.reshape((nphi*ntheta*3, nsurfdofs)) + drtil_diota_flattened = drtil_diota.reshape((nphi*ntheta*3, 1)) + d2rtil_dcdB_flattened = d2rtil_dcdB.reshape((nphi*ntheta*3, 3, nsurfdofs)) + d2rtil_diotadB_flattened = d2rtil_diotadB.reshape((nphi*ntheta*3, 3, 1)) + d2rtil_dcdgradB_flattened = d2rtil_dcdgradB.reshape((nphi*ntheta*3, 3, 3, nsurfdofs)) + d2rtil_diotadgradB_flattened = np.zeros((nphi*ntheta*3, 3, 3, 1)) - return r, dr_dB + if user_provided_G: + dresidual_dG = B + d2residual_dGdB = np.ones((nphi*ntheta, 3, 3)) + d2residual_dGdB[:, :, :] = np.eye(3)[None, :, :] + d2residual_dGdB = d2residual_dGdB.reshape((nphi, ntheta, 3, 3)) + d2residual_dGdgradB = np.zeros((nphi, ntheta, 3, 3, 3)) + + if weight_inv_modB: + drtil_dG = dresidual_dG * w[:, :, None] + d2rtil_dGdB = d2residual_dGdB * w[:, :, None, None] + dw_dB[:, :, None, :]*dresidual_dG[:, :, :, None] + d2rtil_dGdgradB = d2residual_dGdgradB.copy() + else: + drtil_dG = dresidual_dG.copy() + d2rtil_dGdB = d2residual_dGdB.copy() + d2rtil_dGdgradB = d2residual_dGdgradB.copy() + + drtil_dG_flattened = drtil_dG.reshape((nphi*ntheta*3, 1)) + d2rtil_dGdB_flattened = d2rtil_dGdB.reshape((nphi*ntheta*3, 3, 1)) + d2rtil_dGdgradB_flattened = d2rtil_dGdgradB.reshape((nphi*ntheta*3, 3, 3, 1)) + + J = np.concatenate((drtil_dc_flattened, drtil_diota_flattened, drtil_dG_flattened), axis=1) + d2rtil_dsurfacedB = np.concatenate((d2rtil_dcdB_flattened, + d2rtil_diotadB_flattened, + d2rtil_dGdB_flattened), axis=-1) + d2rtil_dsurfacedgradB = np.concatenate((d2rtil_dcdgradB_flattened, + d2rtil_diotadgradB_flattened, + d2rtil_dGdgradB_flattened), axis=-1) + else: + J = np.concatenate((drtil_dc_flattened, drtil_diota_flattened), axis=1) + d2rtil_dsurfacedB = np.concatenate((d2rtil_dcdB_flattened, d2rtil_diotadB_flattened), axis=-1) + d2rtil_dsurfacedgradB = np.concatenate((d2rtil_dcdgradB_flattened, d2rtil_diotadgradB_flattened), axis=-1) + if derivatives == 1: + return rtil_flattened, drtil_dB_flattened, J, d2rtil_dsurfacedB, d2rtil_dsurfacedgradB diff --git a/src/simsopt/geo/surfacerzfourier.py b/src/simsopt/geo/surfacerzfourier.py index 391da4f47..f66a5c304 100644 --- a/src/simsopt/geo/surfacerzfourier.py +++ b/src/simsopt/geo/surfacerzfourier.py @@ -637,6 +637,130 @@ def write_nml(self, filename: str): with open(filename, 'w') as f: f.write(self.get_nml()) + def fourier_transform_scalar(self, scalar, mpol=None, ntor=None, normalization=None, **kwargs): + r""" + Compute the Fourier components of a scalar on the surface. The scalar + is evaluated at the quadrature points on the surface. + The Fourier uses the conventions of the FourierRZSurface series, + with `npol` going from `-ntor` to `ntor` and `mpol` from 0 to `mpol` + i.e.: + :math:`f(\theta, \phi) = \Sum_{m=0}^{mpol} \Sum_{n=-npol}^{npol} A^{mn}_s \sin(m\theta - n*Nfp*\phi)\\ + + A^{mn}_c \cos(m\theta - n*Nfp*\phi)` + Where the cosine series is only evaluated if the surface is not stellarator + symmetric (if the scalar does not adhere to the symmetry of the surface, + request the cosine series by setting the kwarg stellsym=False) + By default, the poloidal and toroidal resolution are the same as those of the surface, but different quantities can be specified in the kwargs. + *Arguments*: + - scalar: 2D array of shape (numquadpoints_phi, numquadpoints_theta). + - mpol: maximum poloidal mode number of the transform, if None, + the mpol attribute of the surface is used. + - ntor: maximum toroidal mode number of the transform if None, + the ntor attribute of the surface is used. + *Optional keyword arguments*: + - normalization: Fourier transform normalization. Can be: + None: forward and back transform are not normalized + float: forward transform is divided by this number + - stellsym: boolean to override the stellsym attribute + of the surface if you want to force the calculation of the cosine series + *Returns*: + - A_mns: 2D array of shape (mpol+1, 2*ntor+1) containing the sine coefficients + - A_mnc: 2D array of shape (mpol+1, 2*ntor+1) containing the cosine coefficients + (these are zero if the surface is stellarator symmetric) + """ + assert scalar.shape[0] == self.quadpoints_phi.size, "scalar must be evaluated at the quadrature points on the surface.\n the scalar you passed in has shape {}".format(scalar.shape) + assert scalar.shape[1] == self.quadpoints_theta.size, "scalar must be evaluated at the quadrature points on the surface.\n the scalar you passed in has shape {}".format(scalar.shape) + stellsym = kwargs.pop('stellsym', self.stellsym) + if mpol is None: + try: mpol = self.mpol + except AttributeError: raise ValueError("mpol must be specified") + if ntor is None: + try: ntor = self.ntor + except AttributeError: raise ValueError("ntor must be specified") + A_mns = np.zeros((int(mpol + 1), int(2 * ntor + 1))) # sine coefficients + A_mnc = np.zeros((int(mpol + 1), int(2 * ntor + 1))) # cosine coefficients + ntheta_grid = len(self.quadpoints_theta) + nphi_grid = len(self.quadpoints_phi) + + factor = 2.0 / (ntheta_grid * nphi_grid) + + phi2d, theta2d = np.meshgrid(2 * np.pi * self.quadpoints_phi, + 2 * np.pi * self.quadpoints_theta, + indexing="ij") + + for m in range(mpol + 1): + nmin = -ntor + if m == 0: nmin = 1 + for n in range(nmin, ntor+1): + angle = m * theta2d - n * self.nfp * phi2d + sinangle = np.sin(angle) + factor2 = factor + # The next 2 lines ensure inverse Fourier transform(Fourier transform) = identity + if np.mod(ntheta_grid, 2) == 0 and m == (ntheta_grid/2): factor2 = factor2 / 2 + if np.mod(nphi_grid, 2) == 0 and abs(n) == (nphi_grid/2): factor2 = factor2 / 2 + A_mns[m, n + ntor] = np.sum(scalar * sinangle * factor2) + if not stellsym: + cosangle = np.cos(angle) + A_mnc[m, n + ntor] = np.sum(scalar * cosangle * factor2) + + if not stellsym: + A_mnc[0, ntor] = np.sum(scalar) / (ntheta_grid * nphi_grid) + if normalization is not None: + if isinstance(normalization, float): + raise ValueError("normalization must be a float") + A_mns = A_mns / normalization + A_mnc = A_mnc / normalization + + return A_mns, A_mnc + + def inverse_fourier_transform_scalar(self, A_mns, A_mnc, normalization=None, **kwargs): + r""" + Compute the inverse Fourier transform of a scalar on the surface, specified by the Fourier coefficients. The quantity must be + is evaluated at the quadrature points on the surface. The Fourier + transform is defined as + :math:`f(\theta, \phi) = \Sum_{m=0}^{mpol} \Sum_{n=-npol}^{npol} A^{mn}_s \sin(m\theta - n*Nfp*\phi)\\ + + A^{mn}_c \cos(m\theta - n*Nfp*\phi)` + Where the cosine series is only evaluated if the surface is not stellarator + symmetric. + *Arguments*: + - A_mns: 2D array of shape (mpol+1, 2*ntor+1) containing the sine coefficients + - A_mnc: 2D array of shape (mpol+1, 2*ntor+1) containing the cosine coefficients + (these are zero if the surface is stellarator symmetric) + *Optional keyword arguments*: + - normalization: Fourier transform normalization. Can be: + None: forward and back transform are not normalized + float: inverse transform is multiplied by this number + - stellsym: boolean to override the stellsym attribute of the surface + """ + mpol = A_mns.shape[0] - 1 + ntor = int((A_mns.shape[1] - 1) / 2) + stellsym = kwargs.pop('stellsym', self.stellsym) + ntheta_grid = len(self.quadpoints_theta) + nphi_grid = len(self.quadpoints_phi) + + phi2d, theta2d = np.meshgrid(2 * np.pi * self.quadpoints_phi, + 2 * np.pi * self.quadpoints_theta, + indexing="ij") + + scalars = np.zeros((nphi_grid, ntheta_grid)) + for m in range(mpol + 1): + nmin = -ntor + if m == 0: nmin = 1 + for n in range(nmin, ntor+1): + angle = m * theta2d - n * self.nfp * phi2d + sinangle = np.sin(angle) + scalars = scalars + A_mns[m, n + ntor] * sinangle + if not stellsym: + cosangle = np.cos(angle) + scalars = scalars + A_mnc[m, n + ntor] * cosangle + + if not stellsym: + scalars = scalars + A_mnc[0, ntor] + if normalization is not None: + if not isinstance(normalization, float): + raise ValueError("normalization must be a float") + scalars = scalars * normalization + return scalars + def make_rotating_ellipse(self, major_radius, minor_radius, elongation, torsion=0): """ Set the surface shape to be a rotating ellipse with the given diff --git a/src/simsopt/geo/surfacexyztensorfourier.py b/src/simsopt/geo/surfacexyztensorfourier.py index a6e2197aa..8244d2f04 100644 --- a/src/simsopt/geo/surfacexyztensorfourier.py +++ b/src/simsopt/geo/surfacexyztensorfourier.py @@ -159,10 +159,12 @@ def npsame(a, b): npsame(thetas, np.linspace(0, 1, 2*mpol+1, endpoint=False)): mask[:, mpol+1:] = False mask[ntor+1:, 0] = False - if npsame(phis, np.linspace(0, 1/self.nfp, 2*ntor+1, endpoint=False)) and \ + elif npsame(phis, np.linspace(0, 1/self.nfp, 2*ntor+1, endpoint=False)) and \ npsame(thetas, np.linspace(0, 0.5, mpol+1, endpoint=False)): mask[ntor+1:, 0] = False - if npsame(phis, np.linspace(0, 1/(2*self.nfp), ntor+1, endpoint=False)) and \ + elif npsame(phis, np.linspace(0, 1/(2*self.nfp), ntor+1, endpoint=False)) and \ npsame(thetas, np.linspace(0, 1, 2*mpol+1, endpoint=False)): mask[0, mpol+1:] = False + else: + raise Exception('Stellarator symmetric BoozerExact surfaces require a specific set of quadrature points on the surface. See the SurfaceXYZTensorFourier.get_stellsym_mask() docstring for more information.') return mask diff --git a/src/simsopt/mhd/boozer.py b/src/simsopt/mhd/boozer.py index b7344c873..03b69bad4 100644 --- a/src/simsopt/mhd/boozer.py +++ b/src/simsopt/mhd/boozer.py @@ -33,7 +33,6 @@ __all__ = ['Boozer', 'Quasisymmetry'] - class Boozer(Optimizable): """ This class handles the transformation to Boozer coordinates. @@ -178,8 +177,8 @@ def run(self): self.bx.mnmax = wout.mnmax self.bx.xm = wout.xm self.bx.xn = wout.xn - logger.info('mnmax:', wout.mnmax, ' len(xm):', len(wout.xm), ' len(xn):', len(wout.xn)) - logger.info('mnmax_nyq:', wout.mnmax_nyq, ' len(xm_nyq):', len(wout.xm_nyq), ' len(xn_nyq):', len(wout.xn_nyq)) + logger.info(f'mnmax: {wout.mnmax} len(xm): {len(wout.xm)} len(xn): {len(wout.xn)}') + logger.info(f'mnmax_nyq: {wout.mnmax_nyq} len(xm_nyq): {len(wout.xm_nyq)} len(xn_nyq): {len(wout.xn_nyq)}') assert len(wout.xm) == wout.mnmax assert len(wout.xn) == wout.mnmax assert len(self.bx.xm) == self.bx.mnmax diff --git a/src/simsopt/mhd/defaults_freebound.sp b/src/simsopt/mhd/defaults_freebound.sp new file mode 100644 index 000000000..b7fa02917 --- /dev/null +++ b/src/simsopt/mhd/defaults_freebound.sp @@ -0,0 +1,210 @@ +&physicslist + Igeometry = 3 + Istellsym = 1 + Lfreebound = 1 + phiedge = 2.000000000000000E+00 + curtor = 0.000000000000000E+00 + curpol = 4.000000000000000E+01 + gamma = 0.000000000000000E+00 + Nfp = 5 + Nvol = 1 + Mpol = 3 + Ntor = 3 + Lrad = 6 2 + tflux = 1.000000000000000E+00 6.218040116397460E+00 + pflux = 0.000000000000000E+00 3.816883073688957E+00 + helicity = 6.443366715051990E-02 1.116525236095663E+00 + pscale = 1.000000000000000E+02 + Ladiabatic = 0 + pressure = 0.000000000000000E+00 0.000000000000000E+00 + adiabatic = 0.000000000000000E+00 0.000000000000000E+00 + mu = 0.000000000000000E+00 0.000000000000000E+00 + Ivolume = 0.000000000000000E+00 0.000000000000000E+00 + Isurf = 0.000000000000000E+00 0.000000000000000E+00 + Lconstraint = 3 + pl = 0 0 0 + ql = 0 0 0 + pr = 0 0 0 + qr = 0 0 0 + iota = 0.000000000000000E+00 2.809417939338480E-01 3.050000000000000E-01 + lp = 0 0 0 + lq = 0 0 0 + rp = 0 0 0 + rq = 0 0 0 + oita = 0.000000000000000E+00 2.809417939338480E-01 3.050000000000000E-01 + mupftol = 1.000000000000000E-12 + mupfits = 128 + Lreflect = 0 + rpol = 1.000000000000000E+00 + rtor = 1.000000000000000E+00 + Rac = 9.645091076834294E+00 -1.273000100134322E-01 7.227734995841448E-04 2.901752615147871E-05 + Zas = 0.000000000000000E+00 -1.201876846458274E-01 1.210937745192939E-03 8.101291120903119E-05 + Ras = 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 + Zac = 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 +Rbc(0,0) = 9.704610460216003E+00 Zbs(0,0) = 0.000000000000000E+00 Rbs(0,0) = 0.000000000000000E+00 Zbc(0,0) = 0.000000000000000E+00 +Rbc(1,0) = -1.045848541227035E-01 Zbs(1,0) = -1.034983900846667E-01 Rbs(1,0) = 0.000000000000000E+00 Zbc(1,0) = 0.000000000000000E+00 +Rbc(2,0) = 5.496924456881049E-04 Zbs(2,0) = 8.105754421674023E-04 Rbs(2,0) = 0.000000000000000E+00 Zbc(2,0) = 0.000000000000000E+00 +Rbc(3,0) = -2.605852916338383E-05 Zbs(3,0) = 2.595333996994953E-06 Rbs(3,0) = 0.000000000000000E+00 Zbc(3,0) = 0.000000000000000E+00 +Rbc(-3,1) = -1.195463633068680E-05 Zbs(-3,1) = 2.841919864618188E-05 Rbs(-3,1) = 0.000000000000000E+00 Zbc(-3,1) = 0.000000000000000E+00 +Rbc(-2,1) = -3.394450906670391E-04 Zbs(-2,1) = 3.596274021066687E-04 Rbs(-2,1) = 0.000000000000000E+00 Zbc(-2,1) = 0.000000000000000E+00 +Rbc(-1,1) = -4.931651888369649E-03 Zbs(-1,1) = 6.963549886130800E-03 Rbs(-1,1) = 0.000000000000000E+00 Zbc(-1,1) = 0.000000000000000E+00 +Rbc(0,1) = 9.918678713491879E-01 Zbs(0,1) = -9.772386678651404E-01 Rbs(0,1) = 0.000000000000000E+00 Zbc(0,1) = 0.000000000000000E+00 +Rbc(1,1) = 8.640027952833292E-02 Zbs(1,1) = 9.241036581289261E-02 Rbs(1,1) = 0.000000000000000E+00 Zbc(1,1) = 0.000000000000000E+00 +Rbc(2,1) = 1.964242130996640E-03 Zbs(2,1) = 2.153208475198715E-03 Rbs(2,1) = 0.000000000000000E+00 Zbc(2,1) = 0.000000000000000E+00 +Rbc(3,1) = 7.998671801673742E-05 Zbs(3,1) = 1.161062030463278E-04 Rbs(3,1) = 0.000000000000000E+00 Zbc(3,1) = 0.000000000000000E+00 +Rbc(-3,2) = -2.762152103889883E-06 Zbs(-3,2) = 4.166379371076043E-06 Rbs(-3,2) = 0.000000000000000E+00 Zbc(-3,2) = 0.000000000000000E+00 +Rbc(-2,2) = -1.726514233457863E-05 Zbs(-2,2) = 1.983462874964590E-05 Rbs(-2,2) = 0.000000000000000E+00 Zbc(-2,2) = 0.000000000000000E+00 +Rbc(-1,2) = -6.283360944862572E-04 Zbs(-1,2) = 7.379659477847013E-04 Rbs(-1,2) = 0.000000000000000E+00 Zbc(-1,2) = 0.000000000000000E+00 +Rbc(0,2) = -2.706714444329093E-02 Zbs(0,2) = 2.833946442940345E-02 Rbs(0,2) = 0.000000000000000E+00 Zbc(0,2) = 0.000000000000000E+00 +Rbc(1,2) = -1.663136766639212E-02 Zbs(1,2) = -2.612324295966568E-03 Rbs(1,2) = 0.000000000000000E+00 Zbc(1,2) = 0.000000000000000E+00 +Rbc(2,2) = -4.482002741556905E-03 Zbs(2,2) = -5.025208765858588E-03 Rbs(2,2) = 0.000000000000000E+00 Zbc(2,2) = 0.000000000000000E+00 +Rbc(3,2) = 6.068006959746730E-05 Zbs(3,2) = -1.030827848856039E-05 Rbs(3,2) = 0.000000000000000E+00 Zbc(3,2) = 0.000000000000000E+00 +Rbc(-3,3) = 4.496337386676320E-06 Zbs(-3,3) = -2.281597748539077E-06 Rbs(-3,3) = 0.000000000000000E+00 Zbc(-3,3) = 0.000000000000000E+00 +Rbc(-2,3) = -1.615850297435840E-05 Zbs(-2,3) = -3.695652852901507E-05 Rbs(-2,3) = 0.000000000000000E+00 Zbc(-2,3) = 0.000000000000000E+00 +Rbc(-1,3) = 1.492859671801447E-04 Zbs(-1,3) = -2.388623508824467E-04 Rbs(-1,3) = 0.000000000000000E+00 Zbc(-1,3) = 0.000000000000000E+00 +Rbc(0,3) = 3.539712137494496E-03 Zbs(0,3) = -4.998079213999107E-03 Rbs(0,3) = 0.000000000000000E+00 Zbc(0,3) = 0.000000000000000E+00 +Rbc(1,3) = -3.845595274173447E-02 Zbs(1,3) = -2.589386621604443E-02 Rbs(1,3) = 0.000000000000000E+00 Zbc(1,3) = 0.000000000000000E+00 +Rbc(2,3) = -4.164306359043766E-02 Zbs(2,3) = -4.284945955446148E-02 Rbs(2,3) = 0.000000000000000E+00 Zbc(2,3) = 0.000000000000000E+00 +Rbc(3,3) = -1.242620719798954E-03 Zbs(3,3) = -1.354757246649995E-03 Rbs(3,3) = 0.000000000000000E+00 Zbc(3,3) = 0.000000000000000E+00 +Rwc(0,0) = 1.000000000000000E+01 Zws(0,0) = 0.000000000000000E+00 Rws(0,0) = 0.000000000000000E+00 Zwc(0,0) = 0.000000000000000E+00 +Rwc(1,0) = 0.000000000000000E+00 Zws(1,0) = 0.000000000000000E+00 Rws(1,0) = 0.000000000000000E+00 Zwc(1,0) = 0.000000000000000E+00 +Rwc(2,0) = 0.000000000000000E+00 Zws(2,0) = 0.000000000000000E+00 Rws(2,0) = 0.000000000000000E+00 Zwc(2,0) = 0.000000000000000E+00 +Rwc(3,0) = 0.000000000000000E+00 Zws(3,0) = 0.000000000000000E+00 Rws(3,0) = 0.000000000000000E+00 Zwc(3,0) = 0.000000000000000E+00 +Rwc(-3,1) = 0.000000000000000E+00 Zws(-3,1) = 0.000000000000000E+00 Rws(-3,1) = 0.000000000000000E+00 Zwc(-3,1) = 0.000000000000000E+00 +Rwc(-2,1) = 0.000000000000000E+00 Zws(-2,1) = 0.000000000000000E+00 Rws(-2,1) = 0.000000000000000E+00 Zwc(-2,1) = 0.000000000000000E+00 +Rwc(-1,1) = 0.000000000000000E+00 Zws(-1,1) = 0.000000000000000E+00 Rws(-1,1) = 0.000000000000000E+00 Zwc(-1,1) = 0.000000000000000E+00 +Rwc(0,1) = 3.000000000000000E+00 Zws(0,1) = -3.000000000000000E+00 Rws(0,1) = 0.000000000000000E+00 Zwc(0,1) = 0.000000000000000E+00 +Rwc(1,1) = 1.250000000000000E+00 Zws(1,1) = 1.250000000000000E+00 Rws(1,1) = 0.000000000000000E+00 Zwc(1,1) = 0.000000000000000E+00 +Rwc(2,1) = 0.000000000000000E+00 Zws(2,1) = 0.000000000000000E+00 Rws(2,1) = 0.000000000000000E+00 Zwc(2,1) = 0.000000000000000E+00 +Rwc(3,1) = 0.000000000000000E+00 Zws(3,1) = 0.000000000000000E+00 Rws(3,1) = 0.000000000000000E+00 Zwc(3,1) = 0.000000000000000E+00 +Rwc(-3,2) = 0.000000000000000E+00 Zws(-3,2) = 0.000000000000000E+00 Rws(-3,2) = 0.000000000000000E+00 Zwc(-3,2) = 0.000000000000000E+00 +Rwc(-2,2) = 0.000000000000000E+00 Zws(-2,2) = 0.000000000000000E+00 Rws(-2,2) = 0.000000000000000E+00 Zwc(-2,2) = 0.000000000000000E+00 +Rwc(-1,2) = 0.000000000000000E+00 Zws(-1,2) = 0.000000000000000E+00 Rws(-1,2) = 0.000000000000000E+00 Zwc(-1,2) = 0.000000000000000E+00 +Rwc(0,2) = 0.000000000000000E+00 Zws(0,2) = 0.000000000000000E+00 Rws(0,2) = 0.000000000000000E+00 Zwc(0,2) = 0.000000000000000E+00 +Rwc(1,2) = 0.000000000000000E+00 Zws(1,2) = 0.000000000000000E+00 Rws(1,2) = 0.000000000000000E+00 Zwc(1,2) = 0.000000000000000E+00 +Rwc(2,2) = 0.000000000000000E+00 Zws(2,2) = 0.000000000000000E+00 Rws(2,2) = 0.000000000000000E+00 Zwc(2,2) = 0.000000000000000E+00 +Rwc(3,2) = 0.000000000000000E+00 Zws(3,2) = 0.000000000000000E+00 Rws(3,2) = 0.000000000000000E+00 Zwc(3,2) = 0.000000000000000E+00 +Rwc(-3,3) = 0.000000000000000E+00 Zws(-3,3) = 0.000000000000000E+00 Rws(-3,3) = 0.000000000000000E+00 Zwc(-3,3) = 0.000000000000000E+00 +Rwc(-2,3) = 0.000000000000000E+00 Zws(-2,3) = 0.000000000000000E+00 Rws(-2,3) = 0.000000000000000E+00 Zwc(-2,3) = 0.000000000000000E+00 +Rwc(-1,3) = 0.000000000000000E+00 Zws(-1,3) = 0.000000000000000E+00 Rws(-1,3) = 0.000000000000000E+00 Zwc(-1,3) = 0.000000000000000E+00 +Rwc(0,3) = 0.000000000000000E+00 Zws(0,3) = 0.000000000000000E+00 Rws(0,3) = 0.000000000000000E+00 Zwc(0,3) = 0.000000000000000E+00 +Rwc(1,3) = 0.000000000000000E+00 Zws(1,3) = 0.000000000000000E+00 Rws(1,3) = 0.000000000000000E+00 Zwc(1,3) = 0.000000000000000E+00 +Rwc(2,3) = 0.000000000000000E+00 Zws(2,3) = 0.000000000000000E+00 Rws(2,3) = 0.000000000000000E+00 Zwc(2,3) = 0.000000000000000E+00 +Rwc(3,3) = 0.000000000000000E+00 Zws(3,3) = 0.000000000000000E+00 Rws(3,3) = 0.000000000000000E+00 Zwc(3,3) = 0.000000000000000E+00 +Vns(0,0) = 0.000000000000000E+00 Bns(0,0) = 0.000000000000000E+00 Vnc(0,0) = 0.000000000000000E+00 Bnc(0,0) = 0.000000000000000E+00 +Vns(1,0) = 0.000000000000000E+00 Bns(1,0) = -2.098314067166154E-02 Vnc(1,0) = 0.000000000000000E+00 Bnc(1,0) = 0.000000000000000E+00 +Vns(2,0) = 0.000000000000000E+00 Bns(2,0) = -8.308195552233343E-04 Vnc(2,0) = 0.000000000000000E+00 Bnc(2,0) = 0.000000000000000E+00 +Vns(3,0) = 0.000000000000000E+00 Bns(3,0) = -1.000049567085383E-05 Vnc(3,0) = 0.000000000000000E+00 Bnc(3,0) = 0.000000000000000E+00 +Vns(-3,1) = 0.000000000000000E+00 Bns(-3,1) = 1.025035236011660E-05 Vnc(-3,1) = 0.000000000000000E+00 Bnc(-3,1) = 0.000000000000000E+00 +Vns(-2,1) = 0.000000000000000E+00 Bns(-2,1) = 6.972200102040577E-05 Vnc(-2,1) = 0.000000000000000E+00 Bnc(-2,1) = 0.000000000000000E+00 +Vns(-1,1) = 0.000000000000000E+00 Bns(-1,1) = -8.857899561787283E-04 Vnc(-1,1) = 0.000000000000000E+00 Bnc(-1,1) = 0.000000000000000E+00 +Vns(0,1) = 0.000000000000000E+00 Bns(0,1) = 1.268794075038921E-02 Vnc(0,1) = 0.000000000000000E+00 Bnc(0,1) = 0.000000000000000E+00 +Vns(1,1) = 0.000000000000000E+00 Bns(1,1) = 5.235427842411160E-03 Vnc(1,1) = 0.000000000000000E+00 Bnc(1,1) = 0.000000000000000E+00 +Vns(2,1) = 0.000000000000000E+00 Bns(2,1) = -1.115762206996049E-03 Vnc(2,1) = 0.000000000000000E+00 Bnc(2,1) = 0.000000000000000E+00 +Vns(3,1) = 0.000000000000000E+00 Bns(3,1) = -4.424638432480133E-06 Vnc(3,1) = 0.000000000000000E+00 Bnc(3,1) = 0.000000000000000E+00 +Vns(-3,2) = 0.000000000000000E+00 Bns(-3,2) = -2.420544046309371E-06 Vnc(-3,2) = 0.000000000000000E+00 Bnc(-3,2) = 0.000000000000000E+00 +Vns(-2,2) = 0.000000000000000E+00 Bns(-2,2) = -1.127639127865856E-05 Vnc(-2,2) = 0.000000000000000E+00 Bnc(-2,2) = 0.000000000000000E+00 +Vns(-1,2) = 0.000000000000000E+00 Bns(-1,2) = -6.680730994641753E-04 Vnc(-1,2) = 0.000000000000000E+00 Bnc(-1,2) = 0.000000000000000E+00 +Vns(0,2) = 0.000000000000000E+00 Bns(0,2) = -2.105169513847248E-02 Vnc(0,2) = 0.000000000000000E+00 Bnc(0,2) = 0.000000000000000E+00 +Vns(1,2) = 0.000000000000000E+00 Bns(1,2) = -3.458317607829524E-02 Vnc(1,2) = 0.000000000000000E+00 Bnc(1,2) = 0.000000000000000E+00 +Vns(2,2) = 0.000000000000000E+00 Bns(2,2) = 7.025733332835698E-03 Vnc(2,2) = 0.000000000000000E+00 Bnc(2,2) = 0.000000000000000E+00 +Vns(3,2) = 0.000000000000000E+00 Bns(3,2) = 1.097429331303196E-03 Vnc(3,2) = 0.000000000000000E+00 Bnc(3,2) = 0.000000000000000E+00 +Vns(-3,3) = 0.000000000000000E+00 Bns(-3,3) = 2.012582723897679E-06 Vnc(-3,3) = 0.000000000000000E+00 Bnc(-3,3) = 0.000000000000000E+00 +Vns(-2,3) = 0.000000000000000E+00 Bns(-2,3) = -1.738204711861772E-06 Vnc(-2,3) = 0.000000000000000E+00 Bnc(-2,3) = 0.000000000000000E+00 +Vns(-1,3) = 0.000000000000000E+00 Bns(-1,3) = 5.534246820790295E-05 Vnc(-1,3) = 0.000000000000000E+00 Bnc(-1,3) = 0.000000000000000E+00 +Vns(0,3) = 0.000000000000000E+00 Bns(0,3) = 1.008641123981896E-03 Vnc(0,3) = 0.000000000000000E+00 Bnc(0,3) = 0.000000000000000E+00 +Vns(1,3) = 0.000000000000000E+00 Bns(1,3) = -8.786509679612788E-03 Vnc(1,3) = 0.000000000000000E+00 Bnc(1,3) = 0.000000000000000E+00 +Vns(2,3) = 0.000000000000000E+00 Bns(2,3) = -1.503823116287205E-02 Vnc(2,3) = 0.000000000000000E+00 Bnc(2,3) = 0.000000000000000E+00 +Vns(3,3) = 0.000000000000000E+00 Bns(3,3) = -9.987559625167259E-04 Vnc(3,3) = 0.000000000000000E+00 Bnc(3,3) = 0.000000000000000E+00 +/ +&numericlist + Linitialize = 0 + LautoinitBn = 0 + Lzerovac = 0 + Ndiscrete = 2 + Nquad = -1 + iMpol = -4 + iNtor = -4 + Lsparse = 0 + Lsvdiota = 0 + imethod = 3 + iorder = 2 + iprecon = 1 + iotatol = -1.000000000000000E+00 + Lextrap = 0 + Mregular = -1 + Lrzaxis = 2 + Ntoraxis = 3 +/ +&locallist + LBeltrami = 4 + Linitgues = 1 + Lmatsolver = 3 + NiterGMRES = 200 + LGMRESprec = 1 + epsGMRES = 1.000000000000000E-14 + epsILU = 1.000000000000000E-12 +/ +&globallist + Lfindzero = 2 + escale = 0.000000000000000E+00 + opsilon = 1.000000000000000E+00 + pcondense = 4.000000000000000E+00 + epsilon = 1.000000000000000E+00 + wpoloidal = 1.000000000000000E+00 + upsilon = 1.000000000000000E+00 + forcetol = 1.000000000000000E-12 + c05xmax = 1.000000000000000E-06 + c05xtol = 1.000000000000000E-12 + c05factor = 1.000000000000000E-04 + LreadGF = F + mfreeits = 1 + gBntol = 1.000000000000000E-04 + gBnbld = 1.000000000000000E-01 + vcasingeps = 1.000000000000000E-10 + vcasingtol = 1.000000000000000E-04 + vcasingits = 8 + vcasingper = 1 +/ +&diagnosticslist + odetol = 1.000000000000000E-07 + nPpts = -1 + Ppts = 0.000000000000000E+00 + nPtrj = 1 1 + LHevalues = F + LHevectors = F + LHmatrix = F + Lperturbed = 0 + dpp = -1 + dqq = -1 + dRZ = 1.000000000000000E-05 + Lcheck = 0 + Ltiming = F +/ +&screenlist +/ + 0 0 9.704610460216003E+00 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 + 0 1 -1.045848541227035E-01 -1.034983900846667E-01 0.000000000000000E+00 0.000000000000000E+00 + 0 2 5.496924456881049E-04 8.105754421674023E-04 0.000000000000000E+00 0.000000000000000E+00 + 0 3 -2.605852916338383E-05 2.595333996994953E-06 0.000000000000000E+00 0.000000000000000E+00 + 1 -3 -1.195463633068680E-05 2.841919864618188E-05 0.000000000000000E+00 0.000000000000000E+00 + 1 -2 -3.394450906670391E-04 3.596274021066687E-04 0.000000000000000E+00 0.000000000000000E+00 + 1 -1 -4.931651888369649E-03 6.963549886130800E-03 0.000000000000000E+00 0.000000000000000E+00 + 1 0 9.918678713491879E-01 -9.772386678651404E-01 0.000000000000000E+00 0.000000000000000E+00 + 1 1 8.640027952833292E-02 9.241036581289261E-02 0.000000000000000E+00 0.000000000000000E+00 + 1 2 1.964242130996640E-03 2.153208475198715E-03 0.000000000000000E+00 0.000000000000000E+00 + 1 3 7.998671801673742E-05 1.161062030463278E-04 0.000000000000000E+00 0.000000000000000E+00 + 2 -3 -2.762152103889883E-06 4.166379371076043E-06 0.000000000000000E+00 0.000000000000000E+00 + 2 -2 -1.726514233457863E-05 1.983462874964590E-05 0.000000000000000E+00 0.000000000000000E+00 + 2 -1 -6.283360944862572E-04 7.379659477847013E-04 0.000000000000000E+00 0.000000000000000E+00 + 2 0 -2.706714444329093E-02 2.833946442940345E-02 0.000000000000000E+00 0.000000000000000E+00 + 2 1 -1.663136766639212E-02 -2.612324295966568E-03 0.000000000000000E+00 0.000000000000000E+00 + 2 2 -4.482002741556905E-03 -5.025208765858588E-03 0.000000000000000E+00 0.000000000000000E+00 + 2 3 6.068006959746730E-05 -1.030827848856039E-05 0.000000000000000E+00 0.000000000000000E+00 + 3 -3 4.496337386676320E-06 -2.281597748539077E-06 0.000000000000000E+00 0.000000000000000E+00 + 3 -2 -1.615850297435840E-05 -3.695652852901507E-05 0.000000000000000E+00 0.000000000000000E+00 + 3 -1 1.492859671801447E-04 -2.388623508824467E-04 0.000000000000000E+00 0.000000000000000E+00 + 3 0 3.539712137494496E-03 -4.998079213999107E-03 0.000000000000000E+00 0.000000000000000E+00 + 3 1 -3.845595274173447E-02 -2.589386621604443E-02 0.000000000000000E+00 0.000000000000000E+00 + 3 2 -4.164306359043766E-02 -4.284945955446148E-02 0.000000000000000E+00 0.000000000000000E+00 + 3 3 -1.242620719798954E-03 -1.354757246649995E-03 0.000000000000000E+00 0.000000000000000E+00 diff --git a/src/simsopt/mhd/spec.py b/src/simsopt/mhd/spec.py index 05e304a52..8a9655efc 100644 --- a/src/simsopt/mhd/spec.py +++ b/src/simsopt/mhd/spec.py @@ -1,4 +1,3 @@ -# coding: utf-8 # Copyright (c) HiddenSymmetries Development Team. # Distributed under the terms of the MIT License @@ -9,8 +8,10 @@ import copy import logging import os.path +import shutil, os import traceback from typing import Optional +from scipy.constants import mu_0 import numpy as np @@ -80,7 +81,7 @@ class Spec(Optimizable): mpi: A :obj:`simsopt.util.mpi.MpiPartition` instance, from which the worker groups will be used for SPEC calculations. If ``None``, each MPI process will run SPEC independently. - verbose: Whether to print SPEC output to stdout. + verbose: Whether to print SPEC output to stdout (and also a few other statements) keep_all_files: If ``False``, all output files will be deleted except for the first and most recent ones from worker group 0. If ``True``, all output files will be kept. @@ -102,26 +103,24 @@ def __init__(self, if py_spec is None: raise RuntimeError( "Using Spec requires py_spec to be installed.") + if tolerance <= 0: + raise ValueError( + 'tolerance should be greater than zero' + ) + self.tolerance = tolerance self.lib = spec # For the most commonly accessed fortran modules, provide a - # shorthand so ".lib" is not needed: - modules = [ - "inputlist", - "allglobal", - ] - for key in modules: - setattr(self, key, getattr(spec, key)) + # shorthand: + setattr(self, "inputlist", getattr(spec, "inputlist")) + setattr(self, "allglobal", getattr(spec, "allglobal")) self.verbose = verbose # mute screen output if necessary - # TODO: relies on /dev/null being accessible (Windows!) + # TODO: mute SPEC in windows, currently relies on /dev/null being accessible if not self.verbose: self.lib.fileunits.mute(1) - # python wrapper does not need to write files along the run - #self.lib.allglobal.skip_write = True - # If mpi is not specified, use a single worker group: if mpi is None: self.mpi = MpiPartition(ngroups=1) @@ -134,77 +133,53 @@ def __init__(self, # Read default input file, which should be in the same # directory as this file: filename = os.path.join(os.path.dirname(__file__), 'defaults.sp') - logger.info( - f"Initializing a SPEC object from defaults in {filename}") + if self.mpi.proc0_groups: + logger.info( + f"Initializing a SPEC object from defaults in {filename}") else: if not filename.endswith('.sp'): filename = f"{filename}.sp" - logger.info(f"Initializing a SPEC object from file: {filename}") - - if tolerance <= 0: - raise ValueError( - 'tolerance should be greater than zero' - ) - self.tolerance = tolerance - - self.init(filename) + if self.mpi.proc0_groups: + logger.info(f"Group {self.mpi.group}: Initializing a SPEC object from file: {filename}") + + #If spec has run before, clear the f90wrap array caches. + # See https://github.com/hiddenSymmetries/simsopt/pull/431 + # This addresses the issue https://github.com/hiddenSymmetries/simsopt/issues/357 + if spec.allglobal._arrays: + self._clear_f90wrap_array_caches() + + # Initialize the FORTRAN state with values in the input file: + self._init_fortran_state(filename) si = spec.inputlist # Shorthand - # Read number of (plasma) volumes + # Copy useful and commonly used values from SPEC inputlist to + self.stellsym = bool(si.istellsym) + self.freebound = bool(si.lfreebound) + self.nfp = si.nfp + self.mpol = si.mpol + self.ntor = si.ntor self.nvol = si.nvol - - # Read number of (plasma+vacuum) volumes - if si.lfreebound: - self.mvol = self.nvol + 1 - else: - self.mvol = self.nvol + if self.freebound: + self.mvol = si.nvol + 1 + else: + self.mvol = si.nvol # Store initial guess data # The initial guess is a collection of SurfaceRZFourier instances, # stored in a list of size Mvol-1 (the number of inner interfaces) - nmodes = self.allglobal.num_modes - stellsym = bool(si.istellsym) - if nmodes > 0 and self.nvol > 1: - self.initial_guess = [ - SurfaceRZFourier(nfp=si.nfp, stellsym=stellsym, mpol=si.mpol, ntor=si.ntor) for n in range(0, self.mvol-1) - ] - for imode in range(0, nmodes): - mm = self.allglobal.mmrzrz[imode] - nn = self.allglobal.nnrzrz[imode] - if mm > si.mpol: - continue - if abs(nn) > si.ntor: - continue - - # Populate SurfaceRZFourier instances, except plasma boundary - for lvol in range(0, self.nvol-1): - self.initial_guess[lvol].set_rc(mm, nn, self.allglobal.allrzrz[0, lvol, imode]) - self.initial_guess[lvol].set_zs(mm, nn, self.allglobal.allrzrz[1, lvol, imode]) - - if not si.istellsym: - self.initial_guess[lvol].set_rs(mm, nn, self.allglobal.allrzrz[2, lvol, imode]) - self.initial_guess[lvol].set_zc(mm, nn, self.allglobal.allrzrz[3, lvol, imode]) - - if si.lfreebound: # Populate plasma boundary as well - self.initial_guess[self.nvol-1].set_rc(mm, nn, si.rbc[si.mntor+nn, si.mmpol+mm]) - self.initial_guess[self.nvol-1].set_zs(mm, nn, si.zbs[si.mntor+nn, si.mmpol+mm]) - - if not si.istellsym: - self.initial_guess[self.nvol-1].set_rs(mm, nn, si.rbs[si.mntor+nn, si.mmpol+mm]) - self.initial_guess[self.nvol-1].set_zc(mm, nn, si.zbc[si.mntor+nn, si.mmpol+mm]) - + read_initial_guess = self.inputlist.linitialize == 0 and self.nvol > 1 + if read_initial_guess: + self.initial_guess = self._read_initial_guess() # In general, initial guess is NOT a degree of freedom for the # optimization - we thus fix them. - for lvol in range(0, self.mvol-1): - self.initial_guess[lvol].fix_all() - + for surface in self.initial_guess: + surface.fix_all() else: # There is no initial guess - in this case, we let SPEC handle # the construction of the initial guess. This generally means # that the geometry of the inner interfaces will be constructed # by interpolation between the plasma (or computational) boundary # and the magnetic axis - self.initial_guess = None # Store axis data @@ -220,31 +195,28 @@ def __init__(self, self.files_to_delete = [] # Create a surface object for the boundary: - logger.debug(f"In __init__, si.istellsym={si.istellsym} stellsym={stellsym}") - self._boundary = SurfaceRZFourier(nfp=si.nfp, - stellsym=stellsym, - mpol=si.mpol, - ntor=si.ntor) - - # Transfer the boundary shape from fortran to the boundary - # surface object: - for m in range(si.mpol + 1): - for n in range(-si.ntor, si.ntor + 1): - self._boundary.rc[m, - n + si.ntor] = si.rbc[n + si.mntor, - m + si.mmpol] - self._boundary.zs[m, - n + si.ntor] = si.zbs[n + si.mntor, - m + si.mmpol] - if not stellsym: - self._boundary.rs[m, - n + si.ntor] = si.rbs[n + si.mntor, - m + si.mmpol] - self._boundary.zc[m, - n + si.ntor] = si.zbc[n + si.mntor, - m + si.mmpol] + self._boundary = SurfaceRZFourier(nfp=self.nfp, stellsym=self.stellsym, + mpol=self.mpol, ntor=self.ntor) + self._boundary.rc[:] = self.array_translator(si.rbc, style='spec').as_simsopt + self._boundary.zs[:] = self.array_translator(si.zbs, style='spec').as_simsopt + if not self.freebound: + self._boundary.rs[:] = self.array_translator(si.rbs, style='spec').as_simsopt + self._boundary.zc[:] = self.array_translator(si.zbc, style='spec').as_simsopt self._boundary.local_full_x = self._boundary.get_dofs() + # If the equilibrium is freeboundary, we need to read the computational + # boundary as well. Otherwise set the outermost boundary as the + # computational boundary. + if self.freebound: + self._computational_boundary = SurfaceRZFourier(nfp=self.nfp, stellsym=self.stellsym, + mpol=self.mpol, ntor=self.ntor) + self._computational_boundary.rc[:] = self.array_translator(si.rwc, style='spec').as_simsopt + self._computational_boundary.zs[:] = self.array_translator(si.zws, style='spec').as_simsopt + if not self.stellsym: + self._computational_boundary.rs[:] = self.array_translator(si.rws, style='spec').as_simsopt + self._computational_boundary.zc[:] = self.array_translator(si.zwc, style='spec').as_simsopt + self._computational_boundary.local_full_x = self._computational_boundary.get_dofs() + self.need_to_run_code = True self.counter = -1 @@ -262,24 +234,132 @@ def __init__(self, # Define normal field - these are the Vns, Vnc harmonics. Can be used as # dofs in an optimization - if si.lfreebound: - self.normal_field = NormalField.from_spec(filename) + if self.freebound: + vns = self.array_translator(si.vns) + vnc = self.array_translator(si.vnc) + self._normal_field = NormalField(nfp=self.nfp, stellsym=self.stellsym, + mpol=self.mpol, ntor=self.ntor, + vns=vns.as_simsopt, vnc=vnc.as_simsopt, + surface=self._computational_boundary) else: - self.normal_field: Optional[NormalField] = None + self._normal_field: Optional[NormalField] = None # By default, all dofs owned by SPEC directly, as opposed to # dofs owned by the boundary surface object, are fixed. x0 = self.get_dofs() fixed = np.full(len(x0), True) names = ['phiedge', 'curtor'] - if si.lfreebound: - depends_on = [self.normal_field] + if self.freebound: + depends_on = [self._normal_field] else: depends_on = [self._boundary] super().__init__(x0=x0, fixed=fixed, names=names, depends_on=depends_on, external_dof_setter=Spec.set_dofs) + + @classmethod + def default_freeboundary(cls, copy_to_pwd, verbose=True): + """ + Create a default freeboundary SPEC object + Args: + copy_to_pwd: boolean, if True, the default input file will be copied to the current working directory. Has to be set True as free-boundary SPEC can only handle files in the current working directory. + verbose: boolean, if True, print statements will be printed + """ + filename = 'defaults_freebound.sp' + if verbose: + print(f'Copying {os.path.join(os.path.dirname(__file__), filename)} to {os.getcwd()}/{filename}') + shutil.copy(os.path.join(os.path.dirname(__file__), filename), os.getcwd()) + return cls(filename=filename, verbose=verbose) + + @classmethod + def default_fixedboundary(cls): + """ + Create a default fixedboundary SPEC object (same as calling class empty) + """ + return cls() + + def _read_initial_guess(self): + """ + Read initial guesses from SPEC and return a list of surfaceRZFourier objects. + """ + nmodes = self.allglobal.num_modes + interfaces = [] # initialize list + n_guess_surfs = self.nvol if self.freebound else self.nvol - 1 # if freeboundary, plasma boundary is also a guess surface + for lvol in range(0, n_guess_surfs): # loop over volumes + # the fourier comonents of the initial guess are stored in the allrzrz array + thissurf_rc = self.allglobal.allrzrz[0, lvol, :nmodes] + thissurf_zs = self.allglobal.allrzrz[1, lvol, :nmodes] + if not self.stellsym: + thissurf_rs = self.allglobal.allrzrz[2, lvol, :nmodes] + thissurf_zc = self.allglobal.allrzrz[3, lvol, :nmodes] + thissurf = SurfaceRZFourier(nfp=self.nfp, stellsym=self.stellsym, + mpol=self.mpol, ntor=self.ntor) + # the mode number convention is different in SPEC. Best to use the + # in-built array mmrzrz to get the numbers for each fourier component: + for imode in range(0, nmodes): + mm = self.allglobal.mmrzrz[imode] # helper arrays to get index for each mode + nn = self.allglobal.nnrzrz[imode] + # The guess surface could have more modes than we are running SPEC with, skip if case + if mm > self.mpol or abs(nn) > self.ntor: + continue + thissurf.set_rc(mm, nn, thissurf_rc[imode]) + thissurf.set_zs(mm, nn, thissurf_zs[imode]) + if not self.stellsym: + thissurf.set_rs(mm, nn, thissurf_rs[imode]) + thissurf.set_zc(mm, nn, thissurf_zc[imode]) + interfaces.append(thissurf) + return interfaces + + def _set_spec_initial_guess(self): + """ + Set initial guesses in SPEC from a list of surfaceRZFourier objects. + """ + # Set all modes to zero + spec.allglobal.mmrzrz[:] = 0 + spec.allglobal.nnrzrz[:] = 0 + spec.allglobal.allrzrz[:] = 0 + + # transform to SurfaceRZFourier if necessary + initial_guess = [s.to_RZFourier() for s in self.initial_guess] + + # Loop on modes + imn = -1 # counter + for mm in range(0, self.mpol+1): + for nn in range(-self.ntor, self.ntor+1): + if mm == 0 and nn < 0: + continue + + imn += 1 + + spec.allglobal.mmrzrz[imn] = mm + spec.allglobal.nnrzrz[imn] = nn + + # Populate inner plasma boundaries + for lvol in range(0, self.nvol-1): + spec.allglobal.allrzrz[0, lvol, imn] = initial_guess[lvol].get_rc(mm, nn) + spec.allglobal.allrzrz[1, lvol, imn] = initial_guess[lvol].get_zs(mm, nn) + + if not self.stellsym: + spec.allglobal.allrzrz[2, lvol, imn] = initial_guess[lvol].get_rs(mm, nn) + spec.allglobal.allrzrz[3, lvol, imn] = initial_guess[lvol].get_zc(mm, nn) + spec.allglobal.num_modes = imn + 1 + # possibly cleaner way to do this (tested to work Chris Smiet 11/9/2023): +# n_indices, m_values = np.indices([2*si.ntor+1, si.mpol+1]) #get indices for array +# n_values = n_indices - si.ntor # offset indices to correspond with mode numbers +# index_mask = ~np.logical_and(m_values==0, n_values < 0) # twiddle ~ NOT, pick elements +# numel = np.sum(index_mask) # number of trues in mask, i.e. chosen elements +# spec.allglobal.mmrzrz[:numel] = m_values[index_mask] # skip elements, make 1 +# spec.allglobal.nnrzrz[:numel] = n_values[index_mask] # skip m==0 n<0 elements +# +# initial_guess = [s.to_RZFourier() for s in self.initial_guess] +# for lvol, surface in enumerate(initial_guess): +# # EXPLAIN: surface.rc is m,n indexed, transpose, apply above mask which unravels to 1d +# spec.allglobal.allrzrz[0, lvol, :numel] = surface.rc.transpose()[index_mask] +# spec.allglobal.allrzrz[1, lvol, :numel] = surface.zs.transpose()[index_mask] +# if not self.stellsym: +# spec.allglobal.allrzrz[2, lvol, :numel] = surface.rs.transpose()[index_mask] +# spec.allglobal.allrzrz[3, lvol, :numel] = surface.zc.transpose()[index_mask] @property def boundary(self): @@ -291,6 +371,56 @@ def boundary(self): """ return self._boundary + @boundary.setter + def boundary(self, boundary): + """ + Setter for the geometry of the plasma boundary + """ + if not self.freebound: + if self._boundary is not boundary: + self.remove_parent(self._boundary) + self._boundary = boundary + self.append_parent(boundary) + return + else: # in freeboundary case, plasma boundary is is not a parent + self._boundary = boundary + + @property + def normal_field(self): + """ + Getter for the normal field + """ + return self._normal_field + + @normal_field.setter + def normal_field(self, normal_field): + """ + Setter for the normal field + """ + if not self.freebound: + raise ValueError('Normal field can only be set in freeboundary case') + if not isinstance(normal_field, NormalField): + raise ValueError('Input should be a NormalField or CoilNormalField') + if self._normal_field is not normal_field: + self.remove_parent(self._normal_field) + if self._computational_boundary is not normal_field.surface: + normal_field.surface = self._computational_boundary + self._normal_field = normal_field + self.append_parent(normal_field) + return + + @property + def computational_boundary(self): + """ + Getter for the computational boundary. + Same as the plasma boundary in the non-free-boundary case, + gives the surface on which Vns and Vnc are defined in the free-boundary case. + + Returns: + SurfaceRZFourier instance representing the plasma boundary + """ + return self._computational_boundary + @property def pressure_profile(self): """ @@ -617,6 +747,39 @@ def helicity_profile(self, helicity_profile): self.append_parent(helicity_profile) self.need_to_run_code = True + def activate_profile(self, longname): + """ + Take a profile from the inputlist, and make it optimizable in + simsopt. + Args: + longname: string, either + - 'pressure' + - 'volume_current' + - 'interface_current' + - 'iota' + - 'oita' + - 'mu' + - 'pflux' + - 'tflux' + - 'helicity' + """ + profile_dict = { + 'pressure': {'specname': 'pressure', 'cumulative': False, 'length': self.nvol}, + 'volume_current': {'specname': 'ivolume', 'cumulative': True, 'length': self.nvol}, + 'interface_current': {'specname': 'isurf', 'cumulative': False, 'length': self.nvol-1}, + 'helicity': {'specname': 'helicity', 'cumulative': False, 'length': self.mvol}, + 'iota': {'specname': 'iota', 'cumulative': False, 'length': self.mvol}, + 'oita': {'specname': 'oita', 'cumulative': False, 'length': self.mvol}, + 'mu': {'specname': 'mu', 'cumulative': False, 'length': self.mvol}, + 'pflux': {'specname': 'pflux', 'cumulative': True, 'length': self.mvol}, + 'tflux': {'specname': 'tflux', 'cumulative': True, 'length': self.mvol} + } + + profile_data = self.inputlist.__getattribute__(profile_dict[longname]['specname'])[0:profile_dict[longname]['length']] + profile = ProfileSpec(profile_data, cumulative=profile_dict[longname]['cumulative'], psi_edge=self.inputlist.phiedge) + profile.unfix_all() + self.__setattr__(longname + '_profile', profile) + def set_profile(self, longname, lvol, value): """ This function is used to set the pressure, currents, iota, oita, @@ -678,17 +841,6 @@ def get_profile(self, longname, lvol): return profile.f(lvol) - @boundary.setter - def boundary(self, boundary): - """ - Setter for the geometry of the plasma boundary - """ - - if self._boundary is not boundary: - self.remove_parent(self._boundary) - self._boundary = boundary - self.append_parent(boundary) - def recompute_bell(self, parent=None): self.need_to_run_code = True @@ -714,9 +866,29 @@ def set_dofs(self, x): ] for p in profiles: if p is not None: - p.phiedge = x[0] + p.psi_edge = x[0] - def init(self, filename: str): + @property + def poloidal_current_amperes(self): + """ + return the total poloidal current in Amperes, + i.e. the current that must be carried by the coils that link the plasma + poloidally + """ + return self.inputlist.curpol/(mu_0) + + def _clear_f90wrap_array_caches(self): + """ + Clear the f90wrap array caches. This is necessary when a new file is read after SPEC has run before. + + See https://github.com/hiddenSymmetries/simsopt/pull/431 + + This function is for addressing the issue https://github.com/hiddenSymmetries/simsopt/issues/357 + """ + spec.allglobal._arrays = {} + spec.inputlist._arrays = {} + + def _init_fortran_state(self, filename: str): """ Initialize SPEC fortran state from an input file. @@ -742,6 +914,11 @@ def init(self, filename: str): def run(self, update_guess: bool = True): """ Run SPEC, if needed. + The FORTRAN state has been created in the __init__ method (there can be only one for one python kernel), and the values in the FORTRAN memory are updated by python. + + The most important values are in inputlist and allglobal. + + Note: Since all calls to fortran memory access the same memory, there is no difference between spec.inputlist and self.inputlist (or even my_other_spec2.inputlist). Args: - update_guess: boolean. If True, initial guess will be updated with @@ -751,11 +928,17 @@ def run(self, update_guess: bool = True): if not self.need_to_run_code: logger.info("run() called but no need to re-run SPEC.") return - logger.info("Preparing to run SPEC.") + if self.mpi.proc0_groups: + logger.info(f"Group {self.mpi.group}: Preparing to run SPEC.") self.counter += 1 si = self.inputlist # Shorthand + # if freeboundary, store plasma-caused boundary field to re-set if run does not converge + if self.freebound: + initial_bns = np.copy(si.bns) + initial_bnc = np.copy(si.bnc) + # Check that number of volumes in internal memory is consistent with # the input file if self.nvol != si.nvol: @@ -770,21 +953,19 @@ def run(self, update_guess: bool = True): boundary_RZFourier = self.boundary.to_RZFourier() # Transfer boundary data to fortran: - si.rbc[:, :] = 0.0 - si.zbs[:, :] = 0.0 + si.rbc[:, :] = self.array_translator(boundary_RZFourier.rc, style='simsopt').as_spec + si.zbs[:, :] = self.array_translator(boundary_RZFourier.zs, style='simsopt').as_spec si.rbs[:, :] = 0.0 si.zbc[:, :] = 0.0 - mpol_capped = np.min([boundary_RZFourier.mpol, si.mmpol]) - ntor_capped = np.min([boundary_RZFourier.ntor, si.mntor]) - stellsym = bool(si.istellsym) - logger.debug(f"In run, si.istellsym = {si.istellsym} stellsym = {stellsym}") - for m in range(mpol_capped + 1): - for n in range(-ntor_capped, ntor_capped + 1): - si.rbc[n + si.mntor, m + si.mmpol] = boundary_RZFourier.get_rc(m, n) - si.zbs[n + si.mntor, m + si.mmpol] = boundary_RZFourier.get_zs(m, n) - if not stellsym: - si.rbs[n + si.mntor, m + si.mmpol] = boundary_RZFourier.get_rs(m, n) - si.zbc[n + si.mntor, m + si.mmpol] = boundary_RZFourier.get_zc(m, n) + if not self.stellsym: + si.rbs[:, :] = self.array_translator(boundary_RZFourier.rs, style='simsopt').as_spec + si.zbc[:, :] = self.array_translator(boundary_RZFourier.zc, style='simsopt').as_spec + + # transfer normal field to fortran: + if self.freebound: + si.vns[:, :] = self.array_translator(self.normal_field.get_vns_asarray(), style='simsopt').as_spec + if not self.stellsym: + si.vnc[:, :] = self.array_translator(self.normal_field.get_vnc_asarray(), style='simsopt').as_spec # Set the coordinate axis using the lrzaxis=2 feature: si.lrzaxis = 2 @@ -798,46 +979,17 @@ def run(self, update_guess: bool = True): si.zac[0:mn] = self.axis['zac'] # Set initial guess - if self.initial_guess is not None: - # Set all modes to zero - spec.allglobal.mmrzrz[:] = 0 - spec.allglobal.nnrzrz[:] = 0 - spec.allglobal.allrzrz[:] = 0 - - # transform to SurfaceRZFourier if necessary - initial_guess = [s.to_RZFourier() for s in self.initial_guess] - - # Loop on modes - imn = -1 # counter - for mm in range(0, si.mpol+1): - for nn in range(-si.ntor, si.ntor+1): - if mm == 0 and nn < 0: - continue - - imn += 1 - - spec.allglobal.mmrzrz[imn] = mm - spec.allglobal.nnrzrz[imn] = nn - - # Populate inner plasma boundaries - for lvol in range(0, self.nvol-1): - spec.allglobal.allrzrz[0, lvol, imn] = initial_guess[lvol].get_rc(mm, nn) - spec.allglobal.allrzrz[1, lvol, imn] = initial_guess[lvol].get_zs(mm, nn) - - if not si.istellsym: - spec.allglobal.allrzrz[2, lvol, imn] = initial_guess[lvol].get_rs(mm, nn) - spec.allglobal.allrzrz[3, lvol, imn] = initial_guess[lvol].get_zc(mm, nn) - - # Populate plasma boundary - if si.lfreebound: - si.rbc[si.mntor+nn, si.mmpol+mm] = initial_guess[self.nvol-1].get_rc(mm, nn) - si.zbs[si.mntor+nn, si.mmpol+mm] = initial_guess[self.nvol-1].get_zs(mm, nn) - - if not si.istellsym: - si.rbs[si.mntor+nn, si.mmpol+mm] = initial_guess[self.nvol-1].get_rs(mm, nn) - si.zbc[si.mntor+nn, si.mmpol+mm] = initial_guess[self.nvol-1].get_zc(mm, nn) - - spec.allglobal.num_modes = imn + 1 + if self.initial_guess is not None: # note: self.initial_guess is None for workers!! only leaders read and do_stuff with initial_guess + self._set_spec_initial_guess() # workers get the info through a broadcast. this line fails if workers get a guess set + + # write the boundary which is a guess in freeboundary + if self.freebound: + boundaryguess = self.initial_guess[-1].to_RZFourier() + si.rbc[:] = self.array_translator(boundaryguess.rc, style='simsopt').as_spec + si.zbs[:] = self.array_translator(boundaryguess.zs, style='simsopt').as_spec + if not self.stellsym: + si.rbs[:] = self.array_translator(boundaryguess.rs, style='simsopt').as_spec + si.zbc[:] = self.array_translator(boundaryguess.zc, style='simsopt').as_spec # Set profiles from dofs if self.pressure_profile is not None: @@ -936,6 +1088,7 @@ def run(self, update_guess: bool = True): logger.debug('About to call check_inputs') spec.allglobal.check_inputs() logger.debug('About to call broadcast_inputs') + self.mpi.comm_groups.Barrier() # Barrier to ensure all groups are ready to broadcast. spec.allglobal.broadcast_inputs() logger.debug('About to call preset') spec.preset() @@ -968,8 +1121,8 @@ def run(self, update_guess: bool = True): if self.verbose: traceback.print_exc() raise ObjectiveFailure("SPEC did not run successfully.") - - logger.info("SPEC run complete.") + if self.mpi.proc0_groups: + logger.info(f"{filename}: SPEC run complete.") # Barrier so workers do not try to read the .h5 file before it # is finished: self.mpi.comm_groups.Barrier() @@ -983,16 +1136,35 @@ def run(self, update_guess: bool = True): raise ObjectiveFailure( "Unable to read results following SPEC execution") - logger.info("Successfully loaded SPEC results.") + if self.mpi.proc0_groups: + logger.info("Successfully loaded SPEC results.") self.need_to_run_code = False # Deal with unconverged equilibria - these are excluded by # the optimizer, and the objective function is set to a large number if self.results.output.ForceErr > self.tolerance: + # re-set the boundary field guess before failing, so the next run does not start unconverged. + if self.freebound: + logger.info(f"run {filename}: Force balance unconverged, re-setting boundary field guess and raising ObjectiveFailure") + si.bns, si.bnc = initial_bns, initial_bnc raise ObjectiveFailure( 'SPEC could not find force balance' ) - + + # check for picard convergence once SPEC is updated + if self.freebound: + try: + if self.results.output.BnsErr > self.inputlist.gbntol: + if self.mpi.proc0_groups: + logger.info(f"run {filename}: Picard iteration unconverged, re-setting boundary field guess and raising ObjectiveFailure") + si.bns, si.bnc = initial_bns, initial_bnc + raise ObjectiveFailure( + 'Picard iteration failed to reach convergence, increase mfreeits or gbntol' + ) + except AttributeError: + logger.info('Picard convergence not checked, please update SPEC version 3.22 or higher') + print("Picard convergence not checked, please update SPEC version 3.22 or higher") + # Save geometry as initial guess for next iterations if update_guess: new_guess = None @@ -1002,7 +1174,7 @@ def run(self, update_guess: bool = True): ] for ii, (mm, nn) in enumerate(zip(self.results.output.im, self.results.output.in_)): - nnorm = (nn / si.nfp).astype('int') + nnorm = (nn / si.nfp).astype('int') # results.output.in_ is fourier number for 1 field period for reasons... for lvol in range(0, self.mvol-1): new_guess[lvol].set_rc(mm, nnorm, self.results.output.Rbc[lvol+1, ii]) new_guess[lvol].set_zs(mm, nnorm, self.results.output.Zbs[lvol+1, ii]) @@ -1016,8 +1188,9 @@ def run(self, update_guess: bool = True): axis['zas'] = self.results.output.Zbs[0, 0:si.ntor+1] self.axis = copy.copy(axis) - # Enforce SPEC to use initial guess - self.initial_guess = new_guess + # Enforce SPEC to use initial guess, but only group leaders have the necessary arrays + if self.mpi.proc0_groups: + self.initial_guess = new_guess # set this here? or make whole above monster proc0-exclusive self.inputlist.linitialize = 0 # Group leaders handle deletion of files: @@ -1027,6 +1200,8 @@ def run(self, update_guess: bool = True): if (not self.keep_all_files) and (self.mpi.group > 0): os.remove(filename + '.sp.h5') os.remove(filename + '.sp.end') + if os.path.exists('.' + filename + '.sp.DF'): + os.remove('.' + filename + '.sp.DF') # Delete the previous output file, if desired: for file_to_delete in self.files_to_delete: @@ -1038,6 +1213,8 @@ def run(self, update_guess: bool = True): self.counter > 0) and (not self.keep_all_files): self.files_to_delete.append(filename + '.sp.h5') self.files_to_delete.append(filename + '.sp.end') + if self.mpi.proc0_groups: + logger.info(f"file {filename} completed run sucessfully") def volume(self): """ @@ -1052,6 +1229,98 @@ def iota(self): """ self.run() return self.results.transform.fiota[1, 0] + + def array_translator(self, array=None, style='spec'): + """ + Returns a SpecFourierArray object to help transforming between + arrays using SPEC conventions and simsopt conventions. + + create from an array of either style by setting style='spec' or + style='simsopt' upon creation. + + The created class will have properties: + - as_spec: returns the SPEC style array + - as_simsopt: returns the simsopt style array + and setters to set the arrays from either convention after creation. + + SPEC arrays are zero-padded and indexed with Fortran conventions, + in python that means the m=0,n=0 component is at [nmtor,mmpol]. + + use: + vnc = myspec.array_translator(myspec.inputlist.rbc) + mysurf.rc = vnc.as_simsopt + """ + if style == 'spec': + return Spec.SpecFourierArray(self, array) + elif style == 'simsopt': + obj = Spec.SpecFourierArray(self) + obj.as_simsopt = array # setter function + return obj + else: + raise ValueError(f'array style:{style} not supported, options: [simsopt, spec]') + + # Inner class of Spec + class SpecFourierArray: + """ + Helper class to make index-jangling easier and hide away + strange SPEC array sizing and indexing conventions. + + SPEC stores Fourier series in a very large zero-padded + array with Fortran variable indexing and 'n,m' indexing + convention. + In python this means the m=0,n=0 component is at [nmtor,mmpol]. + + + """ + def __init__(self, outer_spec, array=None): + self._outer_spec = outer_spec + self._mmpol = outer_spec.inputlist.mmpol + self._mntor = outer_spec.inputlist.mntor + if array is None: + array = np.zeros((2*self._mntor+1, 2*self._mmpol+1)) + self._array = np.array(array) + + @property + def as_spec(self): + return self._array + + @as_spec.setter + def as_spec(self, array): + if array.shape != [2*self.mntor+1, 2*self.mmpol+1]: + raise ValueError('Array size is not consistent witn mmpol and mntor') + self._array = array + + @property + def as_simsopt(self, ntor=None, mpol=None): + """ + get a simsopt style 'n,m' intexed non-padded array + from the SpecFourierArray. + """ + if ntor is None: + ntor = self._outer_spec.ntor + if mpol is None: + mpol = self._outer_spec.mpol + n_start = self._mntor - ntor + n_end = self._mntor + ntor + 1 + m_start = self._mmpol + m_end = self._mmpol + mpol + 1 + return self._array[n_start:n_end, m_start:m_end].transpose() # switch n and m + + @as_simsopt.setter + def as_simsopt(self, array, ntor=None, mpol=None): + """ + set the SpecFourierArray from a simsopt style 'm,n' intexed non-padded array + """ + if mpol is None: + mpol = array.shape[0]-1 + if ntor is None: + ntor = int((array.shape[1]-1)/2) + n_start = self._mntor - ntor + n_end = self._mntor + ntor + 1 + m_start = self._mmpol + m_end = self._mmpol + mpol + 1 + self._array = np.zeros((2*self._mntor+1, 2*self._mmpol+1)) + self._array[n_start:n_end, m_start:m_end] = array.transpose() class Residue(Optimizable): @@ -1069,7 +1338,7 @@ class Residue(Optimizable): rtol: the relative tolerance of the integrator """ - def __init__(self, spec, pp, qq, vol=1, theta=0, s_guess=None, s_min=-1.0, + def __init__(self, spec, pp, qq, vol=1, theta=0., s_guess=None, s_min=-1.0, s_max=1.0, rtol=1e-9): # if not spec_found: if spec is None: @@ -1113,7 +1382,7 @@ def J(self): self.spec.run() if not self.mpi.proc0_groups: - logger.info( + logger.debug( "This proc is skipping Residue.J() since it is not a group leader.") return 0.0 else: @@ -1133,5 +1402,6 @@ def J(self): if self.fixed_point is None: raise ObjectiveFailure("Residue calculation failed") + logger.info(f"group {self.mpi.group} found residue {self.fixed_point.GreenesResidue} for {self.pp}/{self.qq} in {self.spec.allglobal.ext}") return self.fixed_point.GreenesResidue diff --git a/src/simsopt/mhd/vmec.py b/src/simsopt/mhd/vmec.py index 94af6cc98..507c8c9a7 100644 --- a/src/simsopt/mhd/vmec.py +++ b/src/simsopt/mhd/vmec.py @@ -752,7 +752,11 @@ def run(self): # Delete the previous output file, if desired: for filename in self.files_to_delete: - os.remove(filename) + try: + os.remove(filename) + except FileNotFoundError: + logger.debug(f"Tried to delete the file {filename} but it was not found") + self.files_to_delete = [] # Record the latest output file to delete if we run again: diff --git a/src/simsopt/mhd/vmec_diagnostics.py b/src/simsopt/mhd/vmec_diagnostics.py index 716524595..4f4e640b1 100644 --- a/src/simsopt/mhd/vmec_diagnostics.py +++ b/src/simsopt/mhd/vmec_diagnostics.py @@ -720,15 +720,23 @@ def vmec_splines(vmec): """ vmec.run() results = Struct() - if vmec.wout.lasym: - raise ValueError("vmec_splines is not yet set up for non-stellarator-symmetric cases.") - + stellsym = not vmec.wout.lasym rmnc = [] zmns = [] lmns = [] d_rmnc_d_s = [] d_zmns_d_s = [] d_lmns_d_s = [] + + # for stellarator non-symmetric configs + rmns = [] + zmnc = [] + lmnc = [] + d_rmns_d_s = [] + d_zmnc_d_s = [] + d_lmnc_d_s = [] + + for jmn in range(vmec.wout.mnmax): rmnc.append(InterpolatedUnivariateSpline(vmec.s_full_grid, vmec.wout.rmnc[jmn, :])) zmns.append(InterpolatedUnivariateSpline(vmec.s_full_grid, vmec.wout.zmns[jmn, :])) @@ -736,7 +744,22 @@ def vmec_splines(vmec): d_rmnc_d_s.append(rmnc[-1].derivative()) d_zmns_d_s.append(zmns[-1].derivative()) d_lmns_d_s.append(lmns[-1].derivative()) + if vmec.wout.lasym: + # stellarator non-symmetric + rmns.append(InterpolatedUnivariateSpline(vmec.s_full_grid, vmec.wout.rmns[jmn, :])) + zmnc.append(InterpolatedUnivariateSpline(vmec.s_full_grid, vmec.wout.zmnc[jmn, :])) + lmnc.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.lmnc[jmn, 1:])) + else: + # if stellarator symmetric, set modes to zero + rmns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + zmnc.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + lmnc.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + + d_rmns_d_s.append(rmns[-1].derivative()) + d_zmnc_d_s.append(zmnc[-1].derivative()) + d_lmnc_d_s.append(lmnc[-1].derivative()) + # nyquist quantities gmnc = [] bmnc = [] bsupumnc = [] @@ -747,6 +770,20 @@ def vmec_splines(vmec): d_bmnc_d_s = [] d_bsupumnc_d_s = [] d_bsupvmnc_d_s = [] + + # for stellarator non-symmetric configs + gmns = [] + bmns = [] + bsupumns = [] + bsupvmns = [] + bsubsmnc = [] + bsubumns = [] + bsubvmns = [] + d_bmns_d_s = [] + d_bsupumns_d_s = [] + d_bsupvmns_d_s = [] + + for jmn in range(vmec.wout.mnmax_nyq): gmnc.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.gmnc[jmn, 1:])) bmnc.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bmnc[jmn, 1:])) @@ -759,7 +796,31 @@ def vmec_splines(vmec): d_bmnc_d_s.append(bmnc[-1].derivative()) d_bsupumnc_d_s.append(bsupumnc[-1].derivative()) d_bsupvmnc_d_s.append(bsupvmnc[-1].derivative()) - + if vmec.wout.lasym: + # stellarator non-symmetric + gmns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.gmns[jmn, 1:])) + bmns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bmns[jmn, 1:])) + bsupumns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bsupumns[jmn, 1:])) + bsupvmns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bsupvmns[jmn, 1:])) + # Note that bsubsmns is on the full mesh, unlike the other components: + bsubsmnc.append(InterpolatedUnivariateSpline(vmec.s_full_grid, vmec.wout.bsubsmnc[jmn, :])) + bsubumns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bsubumns[jmn, 1:])) + bsubvmns.append(InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.bsubvmns[jmn, 1:])) + else: + # if stellarator symmetric, set modes to zero + gmns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bmns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bsupumns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bsupvmns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bsubsmnc.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bsubumns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + bsubvmns.append(InterpolatedUnivariateSpline([0, 1], [0, 0], k=1)) + + d_bmns_d_s.append(bmns[-1].derivative()) + d_bsupumns_d_s.append(bsupumns[-1].derivative()) + d_bsupvmns_d_s.append(bsupvmns[-1].derivative()) + + # Handle 1d profiles: results.pressure = InterpolatedUnivariateSpline(vmec.s_half_grid, vmec.wout.pres[1:]) results.d_pressure_d_s = results.pressure.derivative() @@ -774,7 +835,12 @@ def vmec_splines(vmec): variables = ['rmnc', 'zmns', 'lmns', 'd_rmnc_d_s', 'd_zmns_d_s', 'd_lmns_d_s', 'gmnc', 'bmnc', 'd_bmnc_d_s', 'bsupumnc', 'bsupvmnc', 'd_bsupumnc_d_s', 'd_bsupvmnc_d_s', - 'bsubsmns', 'bsubumnc', 'bsubvmnc'] + 'bsubsmns', 'bsubumnc', 'bsubvmnc', 'stellsym'] + # stellarator non-symmetric + variables = variables + \ + ['rmns', 'zmnc', 'lmnc', 'd_rmns_d_s', 'd_zmnc_d_s', 'd_lmnc_d_s', + 'gmns', 'bmns', 'd_bmns_d_s', 'bsupumns', 'bsupvmns', 'd_bsupumns_d_s', 'd_bsupvmns_d_s', + 'bsubsmnc', 'bsubumns', 'bsubvmns'] for v in variables: results.__setattr__(v, eval(v)) @@ -833,6 +899,7 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): - ``grad_alpha_dot_grad_alpha``: :math:`|\nabla\alpha|^2 = \nabla\alpha\cdot\nabla\alpha`. - ``grad_alpha_dot_grad_psi``: :math:`\nabla\alpha\cdot\nabla\psi`. - ``grad_psi_dot_grad_psi``: :math:`|\nabla\psi|^2 = \nabla\psi\cdot\nabla\psi`. + - ``L_grad_B``: The scale length of the magnetic field, from Kappel et al, PPCF 66 025018 (2024). - ``iota``: The rotational transform :math:`\iota`. This array has shape ``(ns,)``. - ``shat``: The magnetic shear :math:`\hat s= (x/q) (d q / d x)` where :math:`x = \mathrm{Aminor_p} \, \sqrt{s}` and :math:`q=1/\iota`. This array has shape ``(ns,)``. @@ -880,6 +947,8 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): # If given a Vmec object, convert it to vmec_splines: if isinstance(vs, Vmec): vs = vmec_splines(vs) + if not vs.stellsym: + raise NotImplementedError("vmec_compute_geometry() does not yet support non-stellarator-symmetric configurations.") # Make sure s is an array: try: @@ -959,6 +1028,8 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): bsubsmns = np.zeros((ns, mnmax_nyq)) bsubumnc = np.zeros((ns, mnmax_nyq)) bsubvmnc = np.zeros((ns, mnmax_nyq)) + d_bsupumnc_d_s = np.zeros((ns, mnmax_nyq)) + d_bsupvmnc_d_s = np.zeros((ns, mnmax_nyq)) for jmn in range(mnmax_nyq): gmnc[:, jmn] = vs.gmnc[jmn](s) bmnc[:, jmn] = vs.bmnc[jmn](s) @@ -968,6 +1039,8 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): bsubsmns[:, jmn] = vs.bsubsmns[jmn](s) bsubumnc[:, jmn] = vs.bsubumnc[jmn](s) bsubvmnc[:, jmn] = vs.bsubvmnc[jmn](s) + d_bsupumnc_d_s[:, jmn] = vs.d_bsupumnc_d_s[jmn](s) + d_bsupvmnc_d_s[:, jmn] = vs.d_bsupvmnc_d_s[jmn](s) # Now that we know theta_vmec, compute all the geometric quantities angle = xm[:, None, None, None] * theta_vmec[None, :, :, :] - xn[:, None, None, None] * phi[None, :, :, :] @@ -975,24 +1048,40 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): sinangle = np.sin(angle) mcosangle = xm[:, None, None, None] * cosangle ncosangle = xn[:, None, None, None] * cosangle + mncosangle = xm[:, None, None, None] * xn[:, None, None, None] * cosangle + m2cosangle = xm[:, None, None, None]**2 * cosangle + n2cosangle = xn[:, None, None, None]**2 * cosangle msinangle = xm[:, None, None, None] * sinangle nsinangle = xn[:, None, None, None] * sinangle + mnsinangle = xm[:, None, None, None] * xn[:, None, None, None] * sinangle + m2sinangle = xm[:, None, None, None]**2 * sinangle + n2sinangle = xn[:, None, None, None]**2 * sinangle # Order of indices in cosangle and sinangle: mn, s, theta, phi # Order of indices in rmnc, bmnc, etc: s, mn R = np.einsum('ij,jikl->ikl', rmnc, cosangle) d_R_d_s = np.einsum('ij,jikl->ikl', d_rmnc_d_s, cosangle) - d_R_d_theta_vmec = -np.einsum('ij,jikl->ikl', rmnc, msinangle) + d_R_d_theta_vmec = np.einsum('ij,jikl->ikl', -rmnc, msinangle) d_R_d_phi = np.einsum('ij,jikl->ikl', rmnc, nsinangle) - + d2_R_d_phi2 = np.einsum('ij,jikl->ikl', -rmnc, n2cosangle) + d2_R_d_theta_vmec2 = np.einsum('ij,jikl->ikl', -rmnc, m2cosangle) + d2_R_d_theta_vmec_d_phi = np.einsum('ij,jikl->ikl', rmnc, mncosangle) + d2_R_d_s_d_theta_vmec = np.einsum('ij,jikl->ikl', -d_rmnc_d_s, msinangle) + d2_R_d_s_d_phi = np.einsum('ij,jikl->ikl', d_rmnc_d_s, nsinangle) + Z = np.einsum('ij,jikl->ikl', zmns, sinangle) d_Z_d_s = np.einsum('ij,jikl->ikl', d_zmns_d_s, sinangle) d_Z_d_theta_vmec = np.einsum('ij,jikl->ikl', zmns, mcosangle) - d_Z_d_phi = -np.einsum('ij,jikl->ikl', zmns, ncosangle) + d_Z_d_phi = np.einsum('ij,jikl->ikl', -zmns, ncosangle) + d2_Z_d_theta_vmec2 = np.einsum('ij,jikl->ikl', -zmns, m2sinangle) + d2_Z_d_phi2 = np.einsum('ij,jikl->ikl', -zmns, n2sinangle) + d2_Z_d_theta_vmec_d_phi = np.einsum('ij,jikl->ikl', zmns, mnsinangle) + d2_Z_d_s_d_theta_vmec = np.einsum('ij,jikl->ikl', d_zmns_d_s, mcosangle) + d2_Z_d_s_d_phi = np.einsum('ij,jikl->ikl', -d_zmns_d_s, ncosangle) lambd = np.einsum('ij,jikl->ikl', lmns, sinangle) d_lambda_d_s = np.einsum('ij,jikl->ikl', d_lmns_d_s, sinangle) d_lambda_d_theta_vmec = np.einsum('ij,jikl->ikl', lmns, mcosangle) - d_lambda_d_phi = -np.einsum('ij,jikl->ikl', lmns, ncosangle) + d_lambda_d_phi = np.einsum('ij,jikl->ikl', -lmns, ncosangle) theta_pest = theta_vmec + lambd # Now handle the Nyquist quantities: @@ -1007,7 +1096,7 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): sqrt_g_vmec = np.einsum('ij,jikl->ikl', gmnc, cosangle) modB = np.einsum('ij,jikl->ikl', bmnc, cosangle) d_B_d_s = np.einsum('ij,jikl->ikl', d_bmnc_d_s, cosangle) - d_B_d_theta_vmec = -np.einsum('ij,jikl->ikl', bmnc, msinangle) + d_B_d_theta_vmec = np.einsum('ij,jikl->ikl', -bmnc, msinangle) d_B_d_phi = np.einsum('ij,jikl->ikl', bmnc, nsinangle) B_sup_theta_vmec = np.einsum('ij,jikl->ikl', bsupumnc, cosangle) @@ -1016,6 +1105,12 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): B_sub_theta_vmec = np.einsum('ij,jikl->ikl', bsubumnc, cosangle) B_sub_phi = np.einsum('ij,jikl->ikl', bsubvmnc, cosangle) B_sup_theta_pest = iota[:, None, None] * B_sup_phi + d_B_sup_phi_d_theta_vmec = np.einsum('ij,jikl->ikl', -bsupvmnc, msinangle) + d_B_sup_phi_d_phi = np.einsum('ij,jikl->ikl', bsupvmnc, nsinangle) + d_B_sup_theta_vmec_d_theta_vmec = np.einsum('ij,jikl->ikl', -bsupumnc, msinangle) + d_B_sup_theta_vmec_d_phi = np.einsum('ij,jikl->ikl', bsupumnc, nsinangle) + d_B_sup_theta_vmec_d_s = np.einsum('ij,jikl->ikl', d_bsupumnc_d_s, cosangle) + d_B_sup_phi_d_s = np.einsum('ij,jikl->ikl', d_bsupvmnc_d_s, cosangle) sqrt_g_vmec_alt = R * (d_Z_d_s * d_R_d_theta_vmec - d_R_d_s * d_Z_d_theta_vmec) @@ -1154,6 +1249,119 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): cvdrift0 = gbdrift0 + # Quantities related to the grad \vec{B} tensor. + # See Appendix C of Kappel et al, "The Magnetic Gradient Scale Length + # Explains Why Certain Plasmas Require Close External Magnetic Coils" + # Plasma Phys. Control. Fusion 66 (2024) 025018 + # https://doi.org/10.1088/1361-6587/ad1a3e + + d_B_X_d_s = ( + d_B_sup_theta_vmec_d_s * d_R_d_theta_vmec * cosphi + + B_sup_theta_vmec * d2_R_d_s_d_theta_vmec * cosphi + + d_B_sup_phi_d_s * d_R_d_phi * cosphi + + B_sup_phi * d2_R_d_s_d_phi * cosphi + - d_B_sup_phi_d_s * R * sinphi + - B_sup_phi * d_R_d_s * sinphi + ) + + d_B_X_d_theta = ( + d_B_sup_theta_vmec_d_theta_vmec * d_R_d_theta_vmec * cosphi + + B_sup_theta_vmec * d2_R_d_theta_vmec2 * cosphi + + d_B_sup_phi_d_theta_vmec * d_R_d_phi * cosphi + + B_sup_phi * d2_R_d_theta_vmec_d_phi * cosphi + - d_B_sup_phi_d_theta_vmec * R * sinphi + - B_sup_phi * d_R_d_theta_vmec * sinphi + ) + + d_B_X_d_phi = ( + d_B_sup_theta_vmec_d_phi * d_R_d_theta_vmec * cosphi + + B_sup_theta_vmec * d2_R_d_theta_vmec_d_phi * cosphi + - B_sup_theta_vmec * d_R_d_theta_vmec * sinphi + + d_B_sup_phi_d_phi * d_R_d_phi * cosphi + + B_sup_phi * d2_R_d_phi2 * cosphi + - B_sup_phi * d_R_d_phi * sinphi + - d_B_sup_phi_d_phi * R * sinphi + - B_sup_phi * d_R_d_phi * sinphi + - B_sup_phi * R * cosphi + ) + + d_B_Y_d_s = ( + d_B_sup_theta_vmec_d_s * d_R_d_theta_vmec * sinphi + + B_sup_theta_vmec * d2_R_d_s_d_theta_vmec * sinphi + + d_B_sup_phi_d_s * d_R_d_phi * sinphi + + B_sup_phi * d2_R_d_s_d_phi * sinphi + + d_B_sup_phi_d_s * R * cosphi + + B_sup_phi * d_R_d_s * cosphi + ) + + d_B_Y_d_theta = ( + d_B_sup_theta_vmec_d_theta_vmec * d_R_d_theta_vmec * sinphi + + B_sup_theta_vmec * d2_R_d_theta_vmec2 * sinphi + + d_B_sup_phi_d_theta_vmec * d_R_d_phi * sinphi + + B_sup_phi * d2_R_d_theta_vmec_d_phi * sinphi + + d_B_sup_phi_d_theta_vmec * R * cosphi + + B_sup_phi * d_R_d_theta_vmec * cosphi + ) + + d_B_Y_d_phi = ( + d_B_sup_theta_vmec_d_phi * d_R_d_theta_vmec * sinphi + + B_sup_theta_vmec * d2_R_d_theta_vmec_d_phi * sinphi + + B_sup_theta_vmec * d_R_d_theta_vmec * cosphi + + d_B_sup_phi_d_phi * d_R_d_phi * sinphi + + B_sup_phi * d2_R_d_phi2 * sinphi + + B_sup_phi * d_R_d_phi * cosphi + + d_B_sup_phi_d_phi * R * cosphi + + B_sup_phi * d_R_d_phi * cosphi + - B_sup_phi * R * sinphi + ) + + d_B_Z_d_s = ( + d_B_sup_theta_vmec_d_s * d_Z_d_theta_vmec + + B_sup_theta_vmec * d2_Z_d_s_d_theta_vmec + + d_B_sup_phi_d_s * d_Z_d_phi + + B_sup_phi * d2_Z_d_s_d_phi + ) + + d_B_Z_d_theta = ( + d_B_sup_theta_vmec_d_theta_vmec * d_Z_d_theta_vmec + + B_sup_theta_vmec * d2_Z_d_theta_vmec2 + + d_B_sup_phi_d_theta_vmec * d_Z_d_phi + + B_sup_phi * d2_Z_d_theta_vmec_d_phi + ) + + d_B_Z_d_phi = ( + d_B_sup_theta_vmec_d_phi * d_Z_d_theta_vmec + + B_sup_theta_vmec * d2_Z_d_theta_vmec_d_phi + + d_B_sup_phi_d_phi * d_Z_d_phi + + B_sup_phi * d2_Z_d_phi2 + ) + + grad_B__XX = d_B_X_d_s * grad_s_X + d_B_X_d_theta * grad_theta_vmec_X + d_B_X_d_phi * grad_phi_X + grad_B__XY = d_B_X_d_s * grad_s_Y + d_B_X_d_theta * grad_theta_vmec_Y + d_B_X_d_phi * grad_phi_Y + grad_B__XZ = d_B_X_d_s * grad_s_Z + d_B_X_d_theta * grad_theta_vmec_Z + d_B_X_d_phi * grad_phi_Z + + grad_B__YX = d_B_Y_d_s * grad_s_X + d_B_Y_d_theta * grad_theta_vmec_X + d_B_Y_d_phi * grad_phi_X + grad_B__YY = d_B_Y_d_s * grad_s_Y + d_B_Y_d_theta * grad_theta_vmec_Y + d_B_Y_d_phi * grad_phi_Y + grad_B__YZ = d_B_Y_d_s * grad_s_Z + d_B_Y_d_theta * grad_theta_vmec_Z + d_B_Y_d_phi * grad_phi_Z + + grad_B__ZX = d_B_Z_d_s * grad_s_X + d_B_Z_d_theta * grad_theta_vmec_X + d_B_Z_d_phi * grad_phi_X + grad_B__ZY = d_B_Z_d_s * grad_s_Y + d_B_Z_d_theta * grad_theta_vmec_Y + d_B_Z_d_phi * grad_phi_Y + grad_B__ZZ = d_B_Z_d_s * grad_s_Z + d_B_Z_d_theta * grad_theta_vmec_Z + d_B_Z_d_phi * grad_phi_Z + + grad_B_double_dot_grad_B = ( + grad_B__XX * grad_B__XX + + grad_B__XY * grad_B__XY + + grad_B__XZ * grad_B__XZ + + grad_B__YX * grad_B__YX + + grad_B__YY * grad_B__YY + + grad_B__YZ * grad_B__YZ + + grad_B__ZX * grad_B__ZX + + grad_B__ZY * grad_B__ZY + + grad_B__ZZ * grad_B__ZZ + ) + norm_grad_B = np.sqrt(grad_B_double_dot_grad_B) + L_grad_B = modB * np.sqrt(2 / grad_B_double_dot_grad_B) + # Package results into a structure to return: results = Struct() variables = ['ns', 'ntheta', 'nphi', 's', 'iota', 'd_iota_d_s', 'd_pressure_d_s', 'shat', @@ -1161,6 +1369,10 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): 'd_lambda_d_s', 'd_lambda_d_theta_vmec', 'd_lambda_d_phi', 'sqrt_g_vmec', 'sqrt_g_vmec_alt', 'modB', 'd_B_d_s', 'd_B_d_theta_vmec', 'd_B_d_phi', 'B_sup_theta_vmec', 'B_sup_theta_pest', 'B_sup_phi', 'B_sub_s', 'B_sub_theta_vmec', 'B_sub_phi', 'edge_toroidal_flux_over_2pi', 'sinphi', 'cosphi', + 'd2_R_d_phi2', 'd2_R_d_theta_vmec2', 'd2_R_d_theta_vmec_d_phi', 'd2_R_d_s_d_theta_vmec', 'd2_R_d_s_d_phi', + 'd2_Z_d_theta_vmec2', 'd2_Z_d_phi2', 'd2_Z_d_theta_vmec_d_phi', 'd2_Z_d_s_d_theta_vmec', 'd2_Z_d_s_d_phi', + 'd_B_sup_phi_d_theta_vmec', 'd_B_sup_phi_d_phi', 'd_B_sup_theta_vmec_d_theta_vmec', + 'd_B_sup_theta_vmec_d_phi', 'd_B_sup_theta_vmec_d_s', 'd_B_sup_phi_d_s', 'R', 'd_R_d_s', 'd_R_d_theta_vmec', 'd_R_d_phi', 'X', 'Y', 'Z', 'd_Z_d_s', 'd_Z_d_theta_vmec', 'd_Z_d_phi', 'd_X_d_theta_vmec', 'd_X_d_phi', 'd_X_d_s', 'd_Y_d_theta_vmec', 'd_Y_d_phi', 'd_Y_d_s', 'grad_s_X', 'grad_s_Y', 'grad_s_Z', 'grad_theta_vmec_X', 'grad_theta_vmec_Y', 'grad_theta_vmec_Z', @@ -1172,7 +1384,10 @@ def vmec_compute_geometry(vs, s, theta, phi, phi_center=0): 'B_cross_grad_B_dot_grad_psi', 'B_cross_kappa_dot_grad_psi', 'B_cross_kappa_dot_grad_alpha', 'grad_alpha_dot_grad_alpha', 'grad_alpha_dot_grad_psi', 'grad_psi_dot_grad_psi', 'L_reference', 'B_reference', 'toroidal_flux_sign', - 'bmag', 'gradpar_theta_pest', 'gradpar_phi', 'gds2', 'gds21', 'gds22', 'gbdrift', 'gbdrift0', 'cvdrift', 'cvdrift0'] + 'bmag', 'gradpar_theta_pest', 'gradpar_phi', 'gds2', 'gds21', 'gds22', 'gbdrift', 'gbdrift0', 'cvdrift', 'cvdrift0', + 'grad_B__XX', 'grad_B__XY', 'grad_B__XZ', 'grad_B__YX', 'grad_B__YY', 'grad_B__YZ', 'grad_B__ZX', 'grad_B__ZY', 'grad_B__ZZ', + 'grad_B_double_dot_grad_B', 'norm_grad_B', 'L_grad_B', + ] for v in variables: results.__setattr__(v, eval(v)) diff --git a/src/simsopt/objectives/utilities.py b/src/simsopt/objectives/utilities.py index 8e63954ff..2fe22c2e2 100644 --- a/src/simsopt/objectives/utilities.py +++ b/src/simsopt/objectives/utilities.py @@ -5,7 +5,7 @@ from .._core.optimizable import Optimizable from .._core.derivative import Derivative, derivative_dec -__all__ = ['MPIObjective', 'QuadraticPenalty', 'Weight', 'forward_backward'] +__all__ = ['MPIOptimizable', 'MPIObjective', 'QuadraticPenalty', 'Weight', 'forward_backward'] def forward_backward(P, L, U, rhs, iterative_refinement=False): @@ -49,6 +49,59 @@ def sum_across_comm(derivative, comm): return Derivative(newdict) +class MPIOptimizable(Optimizable): + + def __init__(self, optimizables, attributes, comm): + r""" + Ensures that a list of Optimizables on separate ranks have a consistent set of attributes on all ranks. + For example, say that all ranks have the list ``optimizables``. Rank ``i`` modifies attributes + of ``optimizable[i]``. The value attribute ``attr``, i.e., ``optimizables[i].attr`` potentially + will be different on ranks ``i`` and ``j``, for ``i`` not equal to ``j``. This class ensures that + if the cache is invalidated on the ``Optimizables`` in the list ``optimizables``, then when the list + is accessed, the attributes in ``attributes`` will be communicated accross all ranks. + + Args: + objectives: A python list of ``Optimizables`` with attributes in ``attributes`` that can be + communicated using ``mpi4py``. + attributes: A python list of strings corresponding to the list of attributes that is to be + maintained consistent across all ranks. + comm: The MPI communicator to use. + """ + + from simsopt._core.util import parallel_loop_bounds + startidx, endidx = parallel_loop_bounds(comm, len(optimizables)) + self.local_optimizables = optimizables[startidx:endidx] + self.global_optimizables = optimizables + + self.comm = comm + self.attributes = attributes + Optimizable.__init__(self, x0=np.asarray([]), depends_on=optimizables) + + for opt in optimizables: + for attr in self.attributes: + if not hasattr(opt, attr): + raise Exception(f'All Optimizables in the optimizable list must contain the attribute {attr}') + + def __getitem__(self, key): + if self.need_to_communicate: + self.communicate() + return self.global_optimizables[key] + + def communicate(self): + if self.need_to_communicate: + for attr in self.attributes: + local_vals = [getattr(J, attr) for J in self.local_optimizables] + global_vals = local_vals if self.comm is None else [i for o in self.comm.allgather(local_vals) for i in o] + for val, J in zip(global_vals, self.global_optimizables): + if J in self.local_optimizables: + continue + setattr(J, attr, val) + self.need_to_communicate = False + + def recompute_bell(self, parent=None): + self.need_to_communicate = True + + class MPIObjective(Optimizable): def __init__(self, objectives, comm, needs_splitting=False): diff --git a/src/simsopt/solve/mpi.py b/src/simsopt/solve/mpi.py index 6876cecaf..0f6a6988b 100644 --- a/src/simsopt/solve/mpi.py +++ b/src/simsopt/solve/mpi.py @@ -79,6 +79,7 @@ def least_squares_mpi_solve(prob: LeastSquaresProblem, abs_step: float = 1.0e-7, rel_step: float = 0.0, diff_method: str = "forward", + save_residuals: bool = False, **kwargs): """ Solve a nonlinear-least-squares minimization problem using @@ -101,6 +102,8 @@ def least_squares_mpi_solve(prob: LeastSquaresProblem, "forward". If ``centered``, centered finite differences will be used. If ``forward``, one-sided finite differences will be used. Else, error is raised. + save_residuals: Whether to save the residuals at each iteration. + This may be useful for debugging, although the file can become large. kwargs: Any arguments to pass to `scipy.optimize.least_squares `_. For instance, you can supply ``max_nfev=100`` to set @@ -159,20 +162,21 @@ def _f_proc0(x): objective_file.write(f"Problem type:\nleast_squares\nnparams:\n{prob.dof_size}\n") objective_file.write("function_evaluation,seconds") - residuals_file = open(f"residuals_{datestr}.dat", 'w') - residuals_file.write(f"Problem type:\nleast_squares\nnparams:\n{prob.dof_size}\n") - residuals_file.write("function_evaluation,seconds") - for j in range(prob.dof_size): objective_file.write(f",x({j})") objective_file.write(",objective_function\n") - for j in range(prob.dof_size): - residuals_file.write(f",x({j})") - residuals_file.write(",objective_function") - for j in range(len(residuals)): - residuals_file.write(f",F({j})") - residuals_file.write("\n") + if save_residuals: + residuals_file = open(f"residuals_{datestr}.dat", 'w') + residuals_file.write(f"Problem type:\nleast_squares\nnparams:\n{prob.dof_size}\n") + residuals_file.write("function_evaluation,seconds") + + for j in range(prob.dof_size): + residuals_file.write(f",x({j})") + residuals_file.write(",objective_function") + for j in range(len(residuals)): + residuals_file.write(f",F({j})") + residuals_file.write("\n") del_t = time() - start_time objective_file.write(f"{nevals:6d},{del_t:12.4e}") @@ -181,14 +185,16 @@ def _f_proc0(x): objective_file.write(f",{objective_val:24.16e}\n") objective_file.flush() - residuals_file.write(f"{nevals:6d},{del_t:12.4e}") - for xj in x: - residuals_file.write(f",{xj:24.16e}") - residuals_file.write(f",{objective_val:24.16e}") - for fj in unweighted_residuals: - residuals_file.write(f",{fj:24.16e}") - residuals_file.write("\n") - residuals_file.flush() + if save_residuals: + residuals_file.write(f"{nevals:6d},{del_t:12.4e}") + for xj in x: + residuals_file.write(f",{xj:24.16e}") + residuals_file.write(f",{objective_val:24.16e}") + for fj in unweighted_residuals: + residuals_file.write(f",{fj:24.16e}") + residuals_file.write("\n") + residuals_file.flush() + nevals += 1 logger.debug(f"residuals are {residuals}") return residuals @@ -225,7 +231,8 @@ def _f_proc0(x): x = result.x objective_file.close() - residuals_file.close() + if save_residuals: + residuals_file.close() datalog_started = False logger.info("Completed solve.") diff --git a/src/simsopt/solve/serial.py b/src/simsopt/solve/serial.py index 5096d828c..14865da7b 100644 --- a/src/simsopt/solve/serial.py +++ b/src/simsopt/solve/serial.py @@ -33,6 +33,7 @@ def least_squares_serial_solve(prob: LeastSquaresProblem, abs_step: float = 1.0e-7, rel_step: float = 0.0, diff_method: str = "forward", + save_residuals: bool = False, **kwargs): """ Solve a nonlinear-least-squares minimization problem using @@ -52,6 +53,8 @@ def least_squares_serial_solve(prob: LeastSquaresProblem, ``"forward"``. If ``"centered"``, centered finite differences will be used. If ``"forward"``, one-sided finite differences will be used. Else, error is raised. + save_residuals: Whether to save the residuals at each iteration. + This can be useful for debugging, although the file can become large. kwargs: Any arguments to pass to `scipy.optimize.least_squares `_. For instance, you can supply ``max_nfev=100`` to set @@ -62,7 +65,8 @@ def least_squares_serial_solve(prob: LeastSquaresProblem, datestr = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") objective_file = open(f"simsopt_{datestr}.dat", 'w') - residuals_file = open(f"residuals_{datestr}.dat", 'w') + if save_residuals: + residuals_file = open(f"residuals_{datestr}.dat", 'w') nevals = 0 start_time = time() @@ -105,15 +109,16 @@ def objective(x): objective_file.write(f",x({j})") objective_file.write(",objective_function\n") - residuals_file.write( - f"Problem type:\nleast_squares\nnparams:\n{ndofs}\n") - residuals_file.write("function_evaluation,seconds") - for j in range(ndofs): - residuals_file.write(f",x({j})") - residuals_file.write(",objective_function") - for j in range(len(residuals)): - residuals_file.write(f",F({j})") - residuals_file.write("\n") + if save_residuals: + residuals_file.write( + f"Problem type:\nleast_squares\nnparams:\n{ndofs}\n") + residuals_file.write("function_evaluation,seconds") + for j in range(ndofs): + residuals_file.write(f",x({j})") + residuals_file.write(",objective_function") + for j in range(len(residuals)): + residuals_file.write(f",F({j})") + residuals_file.write("\n") elapsed_t = time() - start_time objective_file.write(f"{nevals:6d},{elapsed_t:12.4e}") @@ -123,14 +128,15 @@ def objective(x): objective_file.write("\n") objective_file.flush() - residuals_file.write(f"{nevals:6d},{elapsed_t:12.4e}") - for xj in x: - residuals_file.write(f",{xj:24.16e}") - residuals_file.write(f",{objective_val:24.16e}") - for fj in residuals: - residuals_file.write(f",{fj:24.16e}") - residuals_file.write("\n") - residuals_file.flush() + if save_residuals: + residuals_file.write(f"{nevals:6d},{elapsed_t:12.4e}") + for xj in x: + residuals_file.write(f",{xj:24.16e}") + residuals_file.write(f",{objective_val:24.16e}") + for fj in residuals: + residuals_file.write(f",{fj:24.16e}") + residuals_file.write("\n") + residuals_file.flush() nevals += 1 return residuals @@ -154,7 +160,8 @@ def objective(x): datalogging_started = False objective_file.close() - residuals_file.close() + if save_residuals: + residuals_file.close() logger.info("Completed solve.") prob.x = result.x diff --git a/src/simsoptpp/boozerresidual_impl.h b/src/simsoptpp/boozerresidual_impl.h new file mode 100644 index 000000000..cb9ab3832 --- /dev/null +++ b/src/simsoptpp/boozerresidual_impl.h @@ -0,0 +1,558 @@ +#include "xsimd/xsimd.hpp" +#include "simdhelpers.h" +#include "vec3dsimd.h" +#include "xtensor/xarray.hpp" + +#if __cplusplus >= 201703L +#define MYIF(c) if constexpr(c) +#else +#define MYIF(c) if(c) +#endif + +#if defined(USE_XSIMD) +template void boozer_residual_impl(double G, double iota, T& B, T& dB_dx, T& d2B_dx2, T& xphi, T& xtheta, T& dx_ds, T& dxphi_ds, T& dxtheta_ds, double& res, T& dres, T& d2res, size_t ndofs, bool weight_inv_modB){ + int nphi = xphi.shape(0); + int ntheta = xtheta.shape(1); + int num_points = 3 * nphi * ntheta; + + constexpr size_t simd_size = xsimd::simd_type::size; + auto dx_ds_ij0 = AlignedPaddedVec(ndofs, 0); + auto dx_ds_ij1 = AlignedPaddedVec(ndofs, 0); + auto dx_ds_ij2 = AlignedPaddedVec(ndofs, 0); + auto dxphi_ds_ij0 = AlignedPaddedVec(ndofs, 0); + auto dxphi_ds_ij1 = AlignedPaddedVec(ndofs, 0); + auto dxphi_ds_ij2 = AlignedPaddedVec(ndofs, 0); + auto dxtheta_ds_ij0 = AlignedPaddedVec(ndofs, 0); + auto dxtheta_ds_ij1 = AlignedPaddedVec(ndofs, 0); + auto dxtheta_ds_ij2 = AlignedPaddedVec(ndofs, 0); + + auto drtilij0 = AlignedPaddedVec(ndofs+2, 0); + auto drtilij1 = AlignedPaddedVec(ndofs+2, 0); + auto drtilij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dresij0 = AlignedPaddedVec(ndofs+2, 0); + auto dresij1 = AlignedPaddedVec(ndofs+2, 0); + auto dresij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dw_ij = AlignedPaddedVec(ndofs+2, 0); + + auto dtang_ij0 = AlignedPaddedVec(ndofs+2, 0); + auto dtang_ij1 = AlignedPaddedVec(ndofs+2, 0); + auto dtang_ij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dB2_ij = AlignedPaddedVec(ndofs+2, 0); + auto dBij0 = AlignedPaddedVec(ndofs+2, 0); + auto dBij1 = AlignedPaddedVec(ndofs+2, 0); + auto dBij2 = AlignedPaddedVec(ndofs+2, 0); + auto dmodB_ij = AlignedPaddedVec(ndofs+2, 0); + + simd_t it(iota); + simd_t GG(G); + + for(int i=0; i0){ + simd_t Bij0(B(i, j, 0)); + simd_t Bij1(B(i, j, 1)); + simd_t Bij2(B(i, j, 2)); + + simd_t dB_dxij00(dB_dx(i, j, 0, 0)); + simd_t dB_dxij10(dB_dx(i, j, 1, 0)); + simd_t dB_dxij20(dB_dx(i, j, 2, 0)); + simd_t dB_dxij01(dB_dx(i, j, 0, 1)); + simd_t dB_dxij11(dB_dx(i, j, 1, 1)); + simd_t dB_dxij21(dB_dx(i, j, 2, 1)); + simd_t dB_dxij02(dB_dx(i, j, 0, 2)); + simd_t dB_dxij12(dB_dx(i, j, 1, 2)); + simd_t dB_dxij22(dB_dx(i, j, 2, 2)); + + simd_t bw_ij(wij); + simd_t btang_ij0(tang_ij0); + simd_t btang_ij1(tang_ij1); + simd_t btang_ij2(tang_ij2); + + simd_t brtil_ij0(rtil_ij0); + simd_t brtil_ij1(rtil_ij1); + simd_t brtil_ij2(rtil_ij2); + + for (int m = 0; m < ndofs; ++m) { + dx_ds_ij0[m] = dx_ds(i,j,0,m); + dx_ds_ij1[m] = dx_ds(i,j,1,m); + dx_ds_ij2[m] = dx_ds(i,j,2,m); + + dxphi_ds_ij0[m] = dxphi_ds(i,j,0,m); + dxphi_ds_ij1[m] = dxphi_ds(i,j,1,m); + dxphi_ds_ij2[m] = dxphi_ds(i,j,2,m); + + dxtheta_ds_ij0[m] = dxtheta_ds(i,j,0,m); + dxtheta_ds_ij1[m] = dxtheta_ds(i,j,1,m); + dxtheta_ds_ij2[m] = dxtheta_ds(i,j,2,m); + + } + + for (int m = 0; m < ndofs; m+=simd_size) { + simd_t dx_ds_ij0m = xs::load_aligned(&dx_ds_ij0[m]); + simd_t dx_ds_ij1m = xs::load_aligned(&dx_ds_ij1[m]); + simd_t dx_ds_ij2m = xs::load_aligned(&dx_ds_ij2[m]); + + simd_t dxphi_ds_ij0m = xs::load_aligned(&dxphi_ds_ij0[m]); + simd_t dxphi_ds_ij1m = xs::load_aligned(&dxphi_ds_ij1[m]); + simd_t dxphi_ds_ij2m = xs::load_aligned(&dxphi_ds_ij2[m]); + + simd_t dxtheta_ds_ij0m = xs::load_aligned(&dxtheta_ds_ij0[m]); + simd_t dxtheta_ds_ij1m = xs::load_aligned(&dxtheta_ds_ij1[m]); + simd_t dxtheta_ds_ij2m = xs::load_aligned(&dxtheta_ds_ij2[m]); + + auto dBij0m = xsimd::fma(dB_dxij00,dx_ds_ij0m,xsimd::fma(dB_dxij10,dx_ds_ij1m,dB_dxij20*dx_ds_ij2m)); + auto dBij1m = xsimd::fma(dB_dxij01,dx_ds_ij0m,xsimd::fma(dB_dxij11,dx_ds_ij1m,dB_dxij21*dx_ds_ij2m)); + auto dBij2m = xsimd::fma(dB_dxij02,dx_ds_ij0m,xsimd::fma(dB_dxij12,dx_ds_ij1m,dB_dxij22*dx_ds_ij2m)); + + auto dB2_ijm = 2*(Bij0 * dBij0m + Bij1 * dBij1m + Bij2 * dBij2m); + auto tang_ij0m = xsimd::fma(it, dxtheta_ds_ij0m , dxphi_ds_ij0m); + auto tang_ij1m = xsimd::fma(it, dxtheta_ds_ij1m , dxphi_ds_ij1m); + auto tang_ij2m = xsimd::fma(it, dxtheta_ds_ij2m , dxphi_ds_ij2m); + + auto dresij0m = xsimd::fms(GG , dBij0m , xsimd::fma(dB2_ijm , btang_ij0 , B2ij * tang_ij0m)); + auto dresij1m = xsimd::fms(GG , dBij1m , xsimd::fma(dB2_ijm , btang_ij1 , B2ij * tang_ij1m)); + auto dresij2m = xsimd::fms(GG , dBij2m , xsimd::fma(dB2_ijm , btang_ij2 , B2ij * tang_ij2m)); + + auto dmodB_ijm = 0.5 * dB2_ijm * wij; + auto dw_ijm = weight_inv_modB ? -dmodB_ijm * rB2ij : simd_t(0.); + auto drtil_ij0m = xsimd::fma(dresij0m , bw_ij , dw_ijm * resij0); + auto drtil_ij1m = xsimd::fma(dresij1m , bw_ij , dw_ijm * resij1); + auto drtil_ij2m = xsimd::fma(dresij2m , bw_ij , dw_ijm * resij2); + + // sum_k (r_k grad r_k) + auto dresm = xsimd::fma(brtil_ij0, drtil_ij0m, xsimd::fma(brtil_ij1, drtil_ij1m , brtil_ij2 * drtil_ij2m)); + + int jjlimit = std::min(simd_size, ndofs-m); + for(int jj = 0; jj < jjlimit; jj++){ + dres(m+jj) += dresm[jj]; + + drtilij0[m+jj] = drtil_ij0m[jj]; + drtilij1[m+jj] = drtil_ij1m[jj]; + drtilij2[m+jj] = drtil_ij2m[jj]; + + dB2_ij[m+jj] = dB2_ijm[jj]; + dtang_ij0[m+jj] = tang_ij0m[jj]; + dtang_ij1[m+jj] = tang_ij1m[jj]; + dtang_ij2[m+jj] = tang_ij2m[jj]; + dresij0[m+jj] = dresij0m[jj]; + dresij1[m+jj] = dresij1m[jj]; + dresij2[m+jj] = dresij2m[jj]; + + dBij0[m+jj] = dBij0m[jj]; + dBij1[m+jj] = dBij1m[jj]; + dBij2[m+jj] = dBij2m[jj]; + + dw_ij[m+jj] = dw_ijm[jj]; + + dmodB_ij[m+jj] = dmodB_ijm[jj]; + } + } + + double dres_ij0iota = -B2ij * xtheta(i, j, 0); + double dres_ij1iota = -B2ij * xtheta(i, j, 1); + double dres_ij2iota = -B2ij * xtheta(i, j, 2); + + double drtil_ij0iota = dres_ij0iota * wij; + double drtil_ij1iota = dres_ij1iota * wij; + double drtil_ij2iota = dres_ij2iota * wij; + dres(ndofs + 0) += rtil_ij0 * drtil_ij0iota + rtil_ij1 * drtil_ij1iota + rtil_ij2 * drtil_ij2iota; + + drtilij0[ndofs + 0] = drtil_ij0iota; + drtilij1[ndofs + 0] = drtil_ij1iota; + drtilij2[ndofs + 0] = drtil_ij2iota; + + + double dres_ij0_dG = B(i, j, 0); + double dres_ij1_dG = B(i, j, 1); + double dres_ij2_dG = B(i, j, 2); + + double drtil_ij0_dG = wij * dres_ij0_dG; + double drtil_ij1_dG = wij * dres_ij1_dG; + double drtil_ij2_dG = wij * dres_ij2_dG; + dres(ndofs + 1) += rtil_ij0 * drtil_ij0_dG + rtil_ij1 * drtil_ij1_dG + rtil_ij2 * drtil_ij2_dG; + + drtilij0[ndofs + 1] = drtil_ij0_dG; + drtilij1[ndofs + 1] = drtil_ij1_dG; + drtilij2[ndofs + 1] = drtil_ij2_dG; + + MYIF(deriv > 1) { + // outer product d_rij0_dm (x) d_rij0_dm + for(int m = 0; m < ndofs + 2; m+=simd_size){ + simd_t drtilij0_dm = xs::load_aligned(&drtilij0[m]); + simd_t drtilij1_dm = xs::load_aligned(&drtilij1[m]); + simd_t drtilij2_dm = xs::load_aligned(&drtilij2[m]); + for(int n = m; n < ndofs + 2; n++){ + simd_t drtilij0_dn(drtilij0[n]); + simd_t drtilij1_dn(drtilij1[n]); + simd_t drtilij2_dn(drtilij2[n]); + simd_t d2res_mn = drtilij0_dm * drtilij0_dn + drtilij1_dm * drtilij1_dn + drtilij2_dm * drtilij2_dn; + + int jjlimit = std::min(simd_size, ndofs+2-m); + for(int jj = 0; jj < jjlimit; jj++){ + d2res(m+jj, n) += d2res_mn[jj]; + } + } + } + + // rij * d2rij_dmn + for(int m = 0; m < ndofs; m+=simd_size){ + simd_t dx_ds_ij0m = xsimd::load_aligned(&dx_ds_ij0[m]); + simd_t dx_ds_ij1m = xsimd::load_aligned(&dx_ds_ij1[m]); + simd_t dx_ds_ij2m = xsimd::load_aligned(&dx_ds_ij2[m]); + + simd_t dxphi_ds_ij0m = xsimd::load_aligned(&dxphi_ds_ij0[m]); + simd_t dxphi_ds_ij1m = xsimd::load_aligned(&dxphi_ds_ij1[m]); + simd_t dxphi_ds_ij2m = xsimd::load_aligned(&dxphi_ds_ij2[m]); + + simd_t dxtheta_ds_ij0m = xsimd::load_aligned(&dxtheta_ds_ij0[m]); + simd_t dxtheta_ds_ij1m = xsimd::load_aligned(&dxtheta_ds_ij1[m]); + simd_t dxtheta_ds_ij2m = xsimd::load_aligned(&dxtheta_ds_ij2[m]); + + simd_t dBij0m = xsimd::load_aligned(&dBij0[m]); + simd_t dBij1m = xsimd::load_aligned(&dBij1[m]); + simd_t dBij2m = xsimd::load_aligned(&dBij2[m]); + + simd_t dB2_ijm = xsimd::load_aligned(&dB2_ij[m]); + simd_t dmodB_ijm = xsimd::load_aligned(&dmodB_ij[m]); + simd_t dw_ijm = xsimd::load_aligned(&dw_ij[m]); + + simd_t dresij0m = xsimd::load_aligned(&dresij0[m]); + simd_t dresij1m = xsimd::load_aligned(&dresij1[m]); + simd_t dresij2m = xsimd::load_aligned(&dresij2[m]); + + simd_t dtang_ij0m = xsimd::load_aligned(&dtang_ij0[m]); + simd_t dtang_ij1m = xsimd::load_aligned(&dtang_ij1[m]); + simd_t dtang_ij2m = xsimd::load_aligned(&dtang_ij2[m]); + + for(int n = m; n < ndofs; n++){ + simd_t d2Bij0_mn(0.); + simd_t d2Bij1_mn(0.); + simd_t d2Bij2_mn(0.); + for(int l = 0; l < 3; l++){ + simd_t dx_ds_ijln(dx_ds(i, j, l, n)); + + d2Bij0_mn += d2B_dx2(i, j, 0, l, 0) * dx_ds_ij0m * dx_ds_ijln; + d2Bij1_mn += d2B_dx2(i, j, 0, l, 1) * dx_ds_ij0m * dx_ds_ijln; + d2Bij2_mn += d2B_dx2(i, j, 0, l, 2) * dx_ds_ij0m * dx_ds_ijln; + d2Bij0_mn += d2B_dx2(i, j, 1, l, 0) * dx_ds_ij1m * dx_ds_ijln; + d2Bij1_mn += d2B_dx2(i, j, 1, l, 1) * dx_ds_ij1m * dx_ds_ijln; + d2Bij2_mn += d2B_dx2(i, j, 1, l, 2) * dx_ds_ij1m * dx_ds_ijln; + d2Bij0_mn += d2B_dx2(i, j, 2, l, 0) * dx_ds_ij2m * dx_ds_ijln; + d2Bij1_mn += d2B_dx2(i, j, 2, l, 1) * dx_ds_ij2m * dx_ds_ijln; + d2Bij2_mn += d2B_dx2(i, j, 2, l, 2) * dx_ds_ij2m * dx_ds_ijln; + } + + auto d2B2_ijmn = 2*(dBij0m*dBij0[n] + dBij1m*dBij1[n] + dBij2m*dBij2[n]+ B(i,j,0) * d2Bij0_mn + B(i,j,1) * d2Bij1_mn + B(i,j,2) * d2Bij2_mn); + auto term1_0 = -dtang_ij0[n] * dB2_ijm; + auto term1_1 = -dtang_ij1[n] * dB2_ijm; + auto term1_2 = -dtang_ij2[n] * dB2_ijm; + + auto term2_0 = -dtang_ij0m * dB2_ij[n]; + auto term2_1 = -dtang_ij1m * dB2_ij[n]; + auto term2_2 = -dtang_ij2m * dB2_ij[n]; + + auto term3_0 = -tang_ij0 * d2B2_ijmn; + auto term3_1 = -tang_ij1 * d2B2_ijmn; + auto term3_2 = -tang_ij2 * d2B2_ijmn; + + auto d2res_ij0mn = xsimd::fma(GG , d2Bij0_mn , term1_0) + term2_0 + term3_0; + auto d2res_ij1mn = xsimd::fma(GG , d2Bij1_mn , term1_1) + term2_1 + term3_1; + auto d2res_ij2mn = xsimd::fma(GG , d2Bij2_mn , term1_2) + term2_2 + term3_2; + + auto d2modB_ijmn = (2 * B2ij * d2B2_ijmn - dB2_ijm*dB2_ij[n]) * powrmodBijthree / 4. ; + auto d2wij_mn = weight_inv_modB ? (2. * dmodB_ijm * dmodB_ij[n] - modB_ij * d2modB_ijmn) * powrmodBijthree : simd_t(0.); + + auto d2rtil_0mn = dresij0m *dw_ij[n] + dresij0[n] * dw_ijm + d2res_ij0mn * wij + resij0 * d2wij_mn; + auto d2rtil_1mn = dresij1m *dw_ij[n] + dresij1[n] * dw_ijm + d2res_ij1mn * wij + resij1 * d2wij_mn; + auto d2rtil_2mn = dresij2m *dw_ij[n] + dresij2[n] * dw_ijm + d2res_ij2mn * wij + resij2 * d2wij_mn; + + auto d2res_mn = rtil_ij0 * d2rtil_0mn + rtil_ij1 * d2rtil_1mn +rtil_ij2 * d2rtil_2mn; + + int jjlimit = std::min(simd_size, ndofs-m); + for(int jj = 0; jj < jjlimit; jj++){ + d2res(m+jj, n) += d2res_mn[jj]; + } + } + auto d2res_ij0miota = -(dB2_ijm * xtheta(i, j, 0) + B2ij * dxtheta_ds_ij0m); + auto d2res_ij1miota = -(dB2_ijm * xtheta(i, j, 1) + B2ij * dxtheta_ds_ij1m); + auto d2res_ij2miota = -(dB2_ijm * xtheta(i, j, 2) + B2ij * dxtheta_ds_ij2m); + + + auto d2rtil_ij0miota = d2res_ij0miota * wij + dres_ij0iota * dw_ijm ; + auto d2rtil_ij1miota = d2res_ij1miota * wij + dres_ij1iota * dw_ijm ; + auto d2rtil_ij2miota = d2res_ij2miota * wij + dres_ij2iota * dw_ijm ; + auto d2res_miota = rtil_ij0*d2rtil_ij0miota+rtil_ij1*d2rtil_ij1miota+rtil_ij2*d2rtil_ij2miota; + + int jjlimit = std::min(simd_size, ndofs-m); + for(int jj = 0; jj < jjlimit; jj++){ + d2res(m+jj, ndofs) += d2res_miota[jj]; + } + + auto d2res_ij0mG = dBij0m; + auto d2res_ij1mG = dBij1m; + auto d2res_ij2mG = dBij2m; + + auto d2rtil_ij0mG = d2res_ij0mG * wij + dres_ij0_dG * dw_ijm; + auto d2rtil_ij1mG = d2res_ij1mG * wij + dres_ij1_dG * dw_ijm; + auto d2rtil_ij2mG = d2res_ij2mG * wij + dres_ij2_dG * dw_ijm; + auto d2res_mG = rtil_ij0*d2rtil_ij0mG+rtil_ij1*d2rtil_ij1mG+rtil_ij2*d2rtil_ij2mG; + + for(int jj = 0; jj < jjlimit; jj++){ + d2res(m+jj, ndofs+1) += d2res_mG[jj]; + } + + } + } + } + } + } + + MYIF(deriv > 1){ + // symmetrize the Hessian + for(int m = 0; m < ndofs+2; m++){ + for(int n = m+1; n < ndofs+2; n++){ + d2res(n, m) = d2res(m, n); + } + } + } +} + +#else +template void boozer_residual_impl(double G, double iota, T& B, T& dB_dx, T& d2B_dx2, T& xphi, T& xtheta, T& dx_ds, T& dxphi_ds, T& dxtheta_ds, double& res, T& dres, T& d2res, size_t ndofs, bool weight_inv_modB){ + int nphi = xphi.shape(0); + int ntheta = xtheta.shape(1); + + for(int i=0; i0){ + auto drtilij0 = AlignedPaddedVec(ndofs+2, 0); + auto drtilij1 = AlignedPaddedVec(ndofs+2, 0); + auto drtilij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dresij0 = AlignedPaddedVec(ndofs+2, 0); + auto dresij1 = AlignedPaddedVec(ndofs+2, 0); + auto dresij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dw_ij = AlignedPaddedVec(ndofs+2, 0); + + auto dtang_ij0 = AlignedPaddedVec(ndofs+2, 0); + auto dtang_ij1 = AlignedPaddedVec(ndofs+2, 0); + auto dtang_ij2 = AlignedPaddedVec(ndofs+2, 0); + + auto dB2_ij = AlignedPaddedVec(ndofs+2, 0); + auto dBij0 = AlignedPaddedVec(ndofs+2, 0); + auto dBij1 = AlignedPaddedVec(ndofs+2, 0); + auto dBij2 = AlignedPaddedVec(ndofs+2, 0); + auto dmodB_ij = AlignedPaddedVec(ndofs+2, 0); + + for (int m = 0; m < ndofs; m++) { + double dBij0m = dB_dx(i,j,0,0)*dx_ds(i,j,0,m)+dB_dx(i,j,1,0)*dx_ds(i,j,1,m)+dB_dx(i,j,2,0)*dx_ds(i,j,2,m); + double dBij1m = dB_dx(i,j,0,1)*dx_ds(i,j,0,m)+dB_dx(i,j,1,1)*dx_ds(i,j,1,m)+dB_dx(i,j,2,1)*dx_ds(i,j,2,m); + double dBij2m = dB_dx(i,j,0,2)*dx_ds(i,j,0,m)+dB_dx(i,j,1,2)*dx_ds(i,j,1,m)+dB_dx(i,j,2,2)*dx_ds(i,j,2,m); + + double dB2_ijm = 2*(B(i,j,0) * dBij0m + B(i,j,1) * dBij1m + B(i,j,2) * dBij2m); + double tang_ij0m = iota*dxtheta_ds(i,j,0,m) + dxphi_ds(i,j,0,m); + double tang_ij1m = iota*dxtheta_ds(i,j,1,m) + dxphi_ds(i,j,1,m); + double tang_ij2m = iota*dxtheta_ds(i,j,2,m) + dxphi_ds(i,j,2,m); + + double dresij0m = G * dBij0m - (dB2_ijm * tang_ij0 + B2ij * tang_ij0m); + double dresij1m = G * dBij1m - (dB2_ijm * tang_ij1 + B2ij * tang_ij1m); + double dresij2m = G * dBij2m - (dB2_ijm * tang_ij2 + B2ij * tang_ij2m); + + double dmodB_ijm = 0.5 * dB2_ijm * wij; + double dw_ijm = weight_inv_modB ? -dmodB_ijm * rB2ij : 0.; + double drtil_ij0m = dresij0m * wij + dw_ijm * resij0; + double drtil_ij1m = dresij1m * wij + dw_ijm * resij1; + double drtil_ij2m = dresij2m * wij + dw_ijm * resij2; + + // sum_k (r_k grad r_k) + dres(m) += rtil_ij0 * drtil_ij0m + rtil_ij1 * drtil_ij1m + rtil_ij2 * drtil_ij2m; + + drtilij0[m] = drtil_ij0m; + drtilij1[m] = drtil_ij1m; + drtilij2[m] = drtil_ij2m; + + dB2_ij[m] = dB2_ijm; + dtang_ij0[m] = tang_ij0m; + dtang_ij1[m] = tang_ij1m; + dtang_ij2[m] = tang_ij2m; + dresij0[m] = dresij0m; + dresij1[m] = dresij1m; + dresij2[m] = dresij2m; + + dBij0[m] = dBij0m; + dBij1[m] = dBij1m; + dBij2[m] = dBij2m; + + dw_ij[m] = dw_ijm; + + dmodB_ij[m] = dmodB_ijm; + } + + double dres_ij0iota = -B2ij * xtheta(i, j, 0); + double dres_ij1iota = -B2ij * xtheta(i, j, 1); + double dres_ij2iota = -B2ij * xtheta(i, j, 2); + + double drtil_ij0iota = dres_ij0iota * wij; + double drtil_ij1iota = dres_ij1iota * wij; + double drtil_ij2iota = dres_ij2iota * wij; + dres(ndofs + 0) += rtil_ij0 * drtil_ij0iota + rtil_ij1 * drtil_ij1iota + rtil_ij2 * drtil_ij2iota; + + drtilij0[ndofs + 0] = drtil_ij0iota; + drtilij1[ndofs + 0] = drtil_ij1iota; + drtilij2[ndofs + 0] = drtil_ij2iota; + + + double dres_ij0_dG = B(i, j, 0); + double dres_ij1_dG = B(i, j, 1); + double dres_ij2_dG = B(i, j, 2); + + double drtil_ij0_dG = wij * dres_ij0_dG; + double drtil_ij1_dG = wij * dres_ij1_dG; + double drtil_ij2_dG = wij * dres_ij2_dG; + dres(ndofs + 1) += rtil_ij0 * drtil_ij0_dG + rtil_ij1 * drtil_ij1_dG + rtil_ij2 * drtil_ij2_dG; + + drtilij0[ndofs + 1] = drtil_ij0_dG; + drtilij1[ndofs + 1] = drtil_ij1_dG; + drtilij2[ndofs + 1] = drtil_ij2_dG; + MYIF(deriv > 1) { + // outer product d_rij0_dm (x) d_rij0_dm + for(int m = 0; m < ndofs + 2; m++){ + for(int n = m; n < ndofs + 2; n++){ + d2res(m, n) += drtilij0[m] * drtilij0[n] + drtilij1[m] * drtilij1[n] + drtilij2[m] * drtilij2[n]; + } + } + + // rij * d2rij_dmn + for(int m = 0; m < ndofs; m++){ + for(int n = m; n < ndofs; n++){ + double d2Bij0_mn = 0.; + double d2Bij1_mn = 0.; + double d2Bij2_mn = 0.; + for(int l = 0; l < 3; l++){ + d2Bij0_mn += d2B_dx2(i, j, 0, l, 0) * dx_ds(i,j,0,m) * dx_ds(i, j, l, n); + d2Bij1_mn += d2B_dx2(i, j, 0, l, 1) * dx_ds(i,j,0,m) * dx_ds(i, j, l, n); + d2Bij2_mn += d2B_dx2(i, j, 0, l, 2) * dx_ds(i,j,0,m) * dx_ds(i, j, l, n); + d2Bij0_mn += d2B_dx2(i, j, 1, l, 0) * dx_ds(i,j,1,m) * dx_ds(i, j, l, n); + d2Bij1_mn += d2B_dx2(i, j, 1, l, 1) * dx_ds(i,j,1,m) * dx_ds(i, j, l, n); + d2Bij2_mn += d2B_dx2(i, j, 1, l, 2) * dx_ds(i,j,1,m) * dx_ds(i, j, l, n); + d2Bij0_mn += d2B_dx2(i, j, 2, l, 0) * dx_ds(i,j,2,m) * dx_ds(i, j, l, n); + d2Bij1_mn += d2B_dx2(i, j, 2, l, 1) * dx_ds(i,j,2,m) * dx_ds(i, j, l, n); + d2Bij2_mn += d2B_dx2(i, j, 2, l, 2) * dx_ds(i,j,2,m) * dx_ds(i, j, l, n); + } + + auto d2B2_ijmn = 2*(dBij0[m]*dBij0[n] + dBij1[m]*dBij1[n] + dBij2[m]*dBij2[n]+ B(i,j,0) * d2Bij0_mn + B(i,j,1) * d2Bij1_mn + B(i,j,2) * d2Bij2_mn); + auto term1_0 = -dtang_ij0[n] * dB2_ij[m]; + auto term1_1 = -dtang_ij1[n] * dB2_ij[m]; + auto term1_2 = -dtang_ij2[n] * dB2_ij[m]; + + auto term2_0 = -dtang_ij0[m] * dB2_ij[n]; + auto term2_1 = -dtang_ij1[m] * dB2_ij[n]; + auto term2_2 = -dtang_ij2[m] * dB2_ij[n]; + + auto term3_0 = -tang_ij0 * d2B2_ijmn; + auto term3_1 = -tang_ij1 * d2B2_ijmn; + auto term3_2 = -tang_ij2 * d2B2_ijmn; + + auto d2res_ij0mn = G * d2Bij0_mn + term1_0 + term2_0 + term3_0; + auto d2res_ij1mn = G * d2Bij1_mn + term1_1 + term2_1 + term3_1; + auto d2res_ij2mn = G * d2Bij2_mn + term1_2 + term2_2 + term3_2; + + auto d2modB_ijmn = (2 * B2ij * d2B2_ijmn - dB2_ij[m]*dB2_ij[n]) * powrmodBijthree / 4. ; + auto d2wij_mn = weight_inv_modB ? (2. * dmodB_ij[m] * dmodB_ij[n] - modB_ij * d2modB_ijmn) * powrmodBijthree : 0.; + + auto d2rtil_0mn = dresij0[m] *dw_ij[n] + dresij0[n] * dw_ij[m] + d2res_ij0mn * wij + resij0 * d2wij_mn; + auto d2rtil_1mn = dresij1[m] *dw_ij[n] + dresij1[n] * dw_ij[m] + d2res_ij1mn * wij + resij1 * d2wij_mn; + auto d2rtil_2mn = dresij2[m] *dw_ij[n] + dresij2[n] * dw_ij[m] + d2res_ij2mn * wij + resij2 * d2wij_mn; + + auto d2res_mn = rtil_ij0 * d2rtil_0mn + rtil_ij1 * d2rtil_1mn +rtil_ij2 * d2rtil_2mn; + + d2res(m, n) += d2res_mn; + } + auto d2res_ij0miota = -(dB2_ij[m] * xtheta(i, j, 0) + B2ij * dxtheta_ds(i,j,0,m)); + auto d2res_ij1miota = -(dB2_ij[m] * xtheta(i, j, 1) + B2ij * dxtheta_ds(i,j,1,m)); + auto d2res_ij2miota = -(dB2_ij[m] * xtheta(i, j, 2) + B2ij * dxtheta_ds(i,j,2,m)); + + + auto d2rtil_ij0miota = d2res_ij0miota * wij + dres_ij0iota * dw_ij[m] ; + auto d2rtil_ij1miota = d2res_ij1miota * wij + dres_ij1iota * dw_ij[m] ; + auto d2rtil_ij2miota = d2res_ij2miota * wij + dres_ij2iota * dw_ij[m] ; + auto d2res_miota = rtil_ij0*d2rtil_ij0miota+rtil_ij1*d2rtil_ij1miota+rtil_ij2*d2rtil_ij2miota; + + d2res(m, ndofs) += d2res_miota; + + auto d2res_ij0mG = dBij0[m]; + auto d2res_ij1mG = dBij1[m]; + auto d2res_ij2mG = dBij2[m]; + + auto d2rtil_ij0mG = d2res_ij0mG * wij + dres_ij0_dG * dw_ij[m]; + auto d2rtil_ij1mG = d2res_ij1mG * wij + dres_ij1_dG * dw_ij[m]; + auto d2rtil_ij2mG = d2res_ij2mG * wij + dres_ij2_dG * dw_ij[m]; + auto d2res_mG = rtil_ij0*d2rtil_ij0mG+rtil_ij1*d2rtil_ij1mG+rtil_ij2*d2rtil_ij2mG; + + d2res(m, ndofs+1) += d2res_mG; + + } + } + } + } + } + + MYIF(deriv > 1){ + // symmetrize the Hessian + for(int m = 0; m < ndofs+2; m++){ + for(int n = m+1; n < ndofs+2; n++){ + d2res(n, m) = d2res(m, n); + } + } + } +} + +#endif diff --git a/src/simsoptpp/boozerresidual_py.cpp b/src/simsoptpp/boozerresidual_py.cpp new file mode 100644 index 000000000..d8d41e85b --- /dev/null +++ b/src/simsoptpp/boozerresidual_py.cpp @@ -0,0 +1,32 @@ +#include "boozerresidual_impl.h" +#include "boozerresidual_py.h" + +double boozer_residual(double G, double iota, Array& xphi, Array& xtheta, Array& B, bool weight_inv_modB){ + double res = 0.; + Array dummy = xt::zeros({1}); + boozer_residual_impl(G, iota, B, dummy, dummy, xphi, xtheta, dummy, dummy, dummy, res, dummy, dummy, 0, weight_inv_modB); + return res; +} + +std::tuple boozer_residual_ds(double G, double iota, Array& B, Array& dB_dx, Array& xphi, Array& xtheta, Array& dx_ds, Array& dxphi_ds, Array& dxtheta_ds, bool weight_inv_modB){ + size_t ndofs = dx_ds.shape(3); + + double res = 0.; + Array dres = xt::zeros({ndofs+2}); + Array dummy = xt::zeros({1}); + boozer_residual_impl(G, iota, B, dB_dx, dummy, xphi, xtheta, dx_ds, dxphi_ds, dxtheta_ds, res, dres, dummy, ndofs, weight_inv_modB); + auto tup = std::make_tuple(res, dres); + return tup; +} + +std::tuple boozer_residual_ds2(double G, double iota, Array& B, Array& dB_dx, Array& d2B_dx2, Array& xphi, Array& xtheta, Array& dx_ds, Array& dxphi_ds, Array& dxtheta_ds, bool weight_inv_modB){ + size_t ndofs = dx_ds.shape(3); + + double res = 0.; + Array dres = xt::zeros({ndofs+2}); + Array d2res = xt::zeros({ndofs+2, ndofs+2}); + boozer_residual_impl(G, iota, B, dB_dx, d2B_dx2, xphi, xtheta, dx_ds, dxphi_ds, dxtheta_ds, res, dres, d2res, ndofs, weight_inv_modB); + auto tup = std::make_tuple(res, dres, d2res); + return tup; +} + diff --git a/src/simsoptpp/boozerresidual_py.h b/src/simsoptpp/boozerresidual_py.h new file mode 100644 index 000000000..8b5fc5f9b --- /dev/null +++ b/src/simsoptpp/boozerresidual_py.h @@ -0,0 +1,9 @@ +#include "xtensor/xarray.hpp" +#include "xtensor/xmath.hpp" +#include "xtensor-python/pyarray.hpp" // Numpy bindings + +typedef xt::pyarray Array; + +double boozer_residual(double G, double iota, Array& xphi, Array& xtheta, Array& B, bool weight_inv_modB); +std::tuple boozer_residual_ds(double G, double iota, Array& B, Array& dB_dx, Array& xphi, Array& xtheta, Array& dx_ds, Array& dxphi_ds, Array& dxtheta_ds, bool weight_inv_modB); +std::tuple boozer_residual_ds2(double G, double iota, Array& B, Array& dB_dx, Array& d2B_dx2, Array& xphi, Array& xtheta, Array& dx_ds, Array& dxphi_ds, Array& dxtheta_ds, bool weight_inv_modB); diff --git a/src/simsoptpp/python.cpp b/src/simsoptpp/python.cpp index 83a1c93f2..3082265fe 100644 --- a/src/simsoptpp/python.cpp +++ b/src/simsoptpp/python.cpp @@ -21,6 +21,7 @@ typedef xt::pytensor PyTensor; #include "permanent_magnet_optimization.h" #include "reiman.h" #include "simdhelpers.h" +#include "boozerresidual_py.h" namespace py = pybind11; @@ -123,6 +124,10 @@ PYBIND11_MODULE(simsoptpp, m) { return res; }); + m.def("boozer_residual", &boozer_residual); + m.def("boozer_residual_ds", &boozer_residual_ds); + m.def("boozer_residual_ds2", &boozer_residual_ds2); + m.def("matmult", [](PyArray& A, PyArray&B) { // Product of an lxm matrix with an mxn matrix, results in an l x n matrix int l = A.shape(0); diff --git a/src/simsoptpp/simdhelpers.h b/src/simsoptpp/simdhelpers.h index b5485febc..994292d9d 100644 --- a/src/simsoptpp/simdhelpers.h +++ b/src/simsoptpp/simdhelpers.h @@ -129,6 +129,7 @@ using AlignedPaddedVec = std::vector>; #endif #if defined(USE_XSIMD) +/* #if __AVX512F__ // On skylake _mm512_sqrt_pd takes 24 CPI and _mm512_div_pd takes 16 CPI, so // 1/sqrt(vec) takes 40 CPI. Instead we can use the approximate inverse square @@ -147,6 +148,7 @@ inline simd_t rsqrt(simd_t r2){ return rinv; } #else +*/ inline simd_t rsqrt(const simd_t& r2){ //On my avx2 machine, computing the sqrt and then the inverse is actually a //bit faster. just keeping this line here to remind myself how to compute @@ -155,7 +157,7 @@ inline simd_t rsqrt(const simd_t& r2){ return 1./sqrt(r2); } -#endif +//#endif #endif inline double rsqrt(const double& r2){ diff --git a/tests/core/test_optimizable.py b/tests/core/test_optimizable.py index 2dc08b5f3..222c94ec1 100755 --- a/tests/core/test_optimizable.py +++ b/tests/core/test_optimizable.py @@ -1422,6 +1422,35 @@ def test_derivative(self): self.assertTrue((sum_obj.dJ(partials=True)(adder_orig) == sum_obj.dJ()).all()) self.assertTrue((sum_obj.dJ(partials=True)(adder_shared_dofs) == sum_obj.dJ()).all()) + def test_as_derivative1(self): + # this test checks that you can restrict the Derivative dictionary + # to the proper subset of Optimizables when as_derivative=True + + optA = OptClassSharedDOFs(x0=[1, 2, 3], names=["x", "y", "z"], + fixed=[False, False, True]) + optA_shared_dofs = OptClassSharedDOFs(dofs=optA.dofs) + + optB = OptClassSharedDOFs(x0=[np.pi, 1, 1.21], names=["xx", "yy", "zz"], + fixed=[False, False, True]) + sum_opt = optA + optA_shared_dofs + optB + deriv = sum_opt.dJ(partials=True)(sum_opt, as_derivative=True) + + # restrict to optA + np.testing.assert_allclose(deriv(optA), optA.dJ()*2, atol=1e-14) + # restrict to optA_shared_dofs + np.testing.assert_allclose(deriv(optA_shared_dofs), optA.dJ()*2, atol=1e-14) + # restrict to sum_opt + np.testing.assert_allclose(deriv(sum_opt), np.concatenate((optA.dJ()*2, optB.dJ())), atol=1e-14) + + def test_as_derivative2(self): + # this test checks that when you sum a Derivative dictionary generated using as_derivative=True, + # to another that things work as expected when some DOFs are fixed. + + opt = OptClassSharedDOFs(x0=[1, 2, 3], names=["x", "y", "z"], + fixed=[False, False, True]) + deriv = opt.dJ(partials=True)(opt, as_derivative=True) + opt.dJ(partials=True) + np.testing.assert_allclose(deriv(opt), opt.dJ()*2, atol=1e-14) + def test_load_save(self): import tempfile from pathlib import Path diff --git a/tests/field/test_normal_field.py b/tests/field/test_normal_field.py index ea639b563..c17ee816b 100644 --- a/tests/field/test_normal_field.py +++ b/tests/field/test_normal_field.py @@ -93,9 +93,13 @@ def test_getter_setter(self): normal_field.set_vns(m=1, n=-1, value=1) self.assertEqual(normal_field.get_vns(m=1, n=-1), 1) + i, j = normal_field.get_index_in_array(m=1, n=-1) + self.assertEqual(normal_field.vns[i, j], 1) normal_field.set_vnc(m=2, n=1, value=0.5) self.assertEqual(normal_field.get_vnc(m=2, n=1), 0.5) + i, j = normal_field.get_index_in_array(m=2, n=1) + self.assertEqual(normal_field.vnc[i, j], 0.5) def test_check_mn(self): """ @@ -208,3 +212,138 @@ def test_fixed_range(self): self.assertTrue(normal_field.is_fixed(ii)) else: self.assertTrue(normal_field.is_free(ii)) + + @unittest.skipIf(py_spec is None, "py_spec not found") + def test_from_spec_object(self): + """ + test classmethod to instantiate from an existing SPEC object + """ + from simsopt.mhd import Spec + # Init from SPEC input file + filename = os.path.join(TEST_DIR, 'Dommaschk.sp') + spec = Spec(filename) + normal_field = NormalField.from_spec_object(spec) + normal_field_2 = NormalField.from_spec(filename) + + self.assertAlmostEqual(normal_field.get_vns(m=3, n=-1), 1.71466651E-03) + self.assertAlmostEqual(normal_field.get_vns(m=5, n=1), -3.56991494E-05) + + self.assertTrue(np.allclose(normal_field.local_full_x, normal_field_2.local_full_x)) + + @unittest.skipIf(py_spec is None, "py_spec not found") + def test_fail_for_fixedb(self): + """ + test if instantiation fails if spec is not freeboundary + """ + from simsopt.mhd import Spec + # Init from SPEC input file + spec = Spec() + with self.assertRaises(ValueError): + NormalField.from_spec_object(spec) + + def test_wrong_index(self): + """ + test if accessing a wrong m or n raises an error + """ + normal_field = NormalField(stellsym=False, mpol=3, ntor=2) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=4, n=1) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=4, n=1, even=True) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=1, n=3) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=1, n=3, even=True) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=0, n=-1) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=0, n=-1, even=True) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=3, n=-3) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=3, n=-3, even=True) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=4, n=-3) + with self.assertRaises(ValueError): + normal_field.get_index_in_array(m=4, n=-3, even=True) + self.assertIsInstance(normal_field.get_index_in_array(m=0, n=0, even=True), list) + normal_field2 = NormalField(stellsym=True, mpol=3, ntor=2) + with self.assertRaises(ValueError): + normal_field2.get_index_in_array(m=0, n=0) + + def test_asarray_getter_setter_raises(self): + """ + test that if wrong bounds are given, an error is raised + """ + normal_field = NormalField(stellsym=False, mpol=3, ntor=2) + with self.assertRaises(ValueError): + normal_field.get_vns_asarray(mpol=4, ntor=5) + with self.assertRaises(ValueError): + normal_field.get_vns_asarray(mpol=3, ntor=4) + with self.assertRaises(ValueError): + normal_field.get_vnc_asarray(mpol=4, ntor=5) + with self.assertRaises(ValueError): + normal_field.get_vnc_asarray(mpol=3, ntor=4) + with self.assertRaises(ValueError): + normal_field.get_vns_vnc_asarray(mpol=4, ntor=5) + with self.assertRaises(ValueError): + normal_field.get_vns_vnc_asarray(mpol=3, ntor=4) + with self.assertRaises(ValueError): + normal_field.set_vns_asarray(np.zeros((3, 7)), mpol=2, ntor=3) + with self.assertRaises(ValueError): + normal_field.set_vnc_asarray(np.zeros((4, 7)), mpol=2, ntor=3) + with self.assertRaises(ValueError): + normal_field.set_vns_vnc_asarray(np.zeros((4, 7)), np.zeros((4, 7)), mpol=2, ntor=3) + + + @unittest.skipIf(py_spec is None, "py_spec not found") + def test_get_set_vns_vnc_asarray(self): + """ + test the array-wise getter and setter functions for the + Vns and Vnc arrays + """ + filename = os.path.join(TEST_DIR, 'M16N08.sp') + normal_field = NormalField.from_spec(filename) + vns = normal_field.get_vns_asarray() + vnc = normal_field.get_vnc_asarray() + vns2, vnc2 = normal_field.get_vns_vnc_asarray() + self.assertTrue(np.allclose(vns, vns2)) + self.assertTrue(np.allclose(vnc, vnc2)) + vns3 = np.copy(vnc) + vnc3 = np.copy(vnc) + i, j = normal_field.get_index_in_array(m=3, n=-1) + vns3[i, j] = 0.5 + normal_field.set_vns_asarray(vns3) + self.assertEqual(normal_field.get_vns(m=3, n=-1), 0.5) + dof_index = normal_field.get_index_in_dofs(m=3, n=-1) + self.assertEqual(normal_field.local_full_x[dof_index], 0.5) + i, j = normal_field.get_index_in_array(m=2, n=1) + vnc3[i, j] = 1.5 + normal_field.set_vnc_asarray(vnc3) + self.assertEqual(normal_field.get_vnc(m=2, n=1), 1.5) + dof_index = normal_field.get_index_in_dofs(m=2, n=1, even=True) + self.assertEqual(normal_field.local_full_x[dof_index], 1.5) + normal_field.set_vns_vnc_asarray(vns2, vnc2) + + @unittest.skipIf(py_spec is None, "py_spec not found") + def test_get_real_space_field(self): + """ + test the conversion to real space + """ + filename = os.path.join(TEST_DIR, 'Dommaschk.sp') + + normal_field = NormalField.from_spec(filename) + real_space_field = normal_field.get_real_space_field() + self.assertTrue(real_space_field is not None) + self.assertEqual(real_space_field.shape, (normal_field.surface.quadpoints_phi.size, normal_field.surface.quadpoints_theta.size)) + + def test_vns_vnc_setter(self): + normal_field = NormalField() + with self.assertRaises(AttributeError): + normal_field.vns = 1 + with self.assertRaises(AttributeError): + normal_field.vnc = 1 + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/tests/geo/surface_test_helpers.py b/tests/geo/surface_test_helpers.py index 6effa0e37..12d9fcfdd 100644 --- a/tests/geo/surface_test_helpers.py +++ b/tests/geo/surface_test_helpers.py @@ -3,7 +3,7 @@ import numpy as np from simsopt.configs import get_ncsx_data from simsopt.field import coils_via_symmetries, BiotSavart -from simsopt.geo import Volume, Area, ToroidalFlux, SurfaceXYZFourier, SurfaceRZFourier, SurfaceXYZTensorFourier, BoozerSurface +from simsopt.geo import Volume, Area, ToroidalFlux, SurfaceXYZFourier, SurfaceRZFourier, SurfaceXYZTensorFourier, BoozerSurface, AspectRatio TEST_DIR = Path(__file__).parent / ".." / "test_files" @@ -74,27 +74,39 @@ def get_exact_surface(surface_type='SurfaceXYZFourier'): return s -def get_boozer_surface(label="Volume", nphi=None, ntheta=None): +def get_boozer_surface(label="Volume", nphi=None, ntheta=None, boozer_type='exact', optimize_G=True, converge=True, stellsym=True, weight_inv_modB=False): """ Returns a boozer surface that will be used in unit tests. """ - assert label == "Volume" or label == "ToroidalFlux" or label == "Area" + assert label in ["Volume", "ToroidalFlux", "Area", "AspectRatio"] + + if boozer_type == 'exact': + assert weight_inv_modB == False base_curves, base_currents, ma = get_ncsx_data() coils = coils_via_symmetries(base_curves, base_currents, 3, True) bs = BiotSavart(coils) current_sum = sum(abs(c.current.get_value()) for c in coils) - G0 = 2. * np.pi * current_sum * (4 * np.pi * 10**(-7) / (2 * np.pi)) + G0 = 2. * np.pi * current_sum * (4 * np.pi * 10**(-7) / (2 * np.pi)) if optimize_G else None + + # currents need to be fixed if optimize_G is None + if optimize_G is False: + for c in bs.coils: + c.current.fix_all() ## RESOLUTION DETAILS OF SURFACE ON WHICH WE OPTIMIZE FOR QA - mpol = 6 - ntor = 6 - stellsym = True + mpol = 6 if boozer_type == 'exact' else 3 + ntor = 6 if boozer_type == 'exact' else 3 nfp = 3 + + if boozer_type == 'exact': + phis = np.linspace(0, 1/nfp, 2*ntor+1, endpoint=False) + thetas = np.linspace(0, 1, 2*mpol+1, endpoint=False) + elif boozer_type == 'ls': + phis = np.linspace(0, 1/nfp, 20, endpoint=False) + thetas = np.linspace(0, 1, 20, endpoint=False) - phis = np.linspace(0, 1/nfp, 2*ntor+1, endpoint=False) - thetas = np.linspace(0, 1, 2*mpol+1, endpoint=False) s = SurfaceXYZTensorFourier( mpol=mpol, ntor=ntor, stellsym=stellsym, nfp=nfp, quadpoints_phi=phis, quadpoints_theta=thetas) s.fit_to_curve(ma, 0.1, flip_theta=True) @@ -110,10 +122,18 @@ def get_boozer_surface(label="Volume", nphi=None, ntheta=None): elif label == "Area": lab = Area(s, nphi=nphi, ntheta=ntheta) lab_target = lab.J() + elif label == "AspectRatio": + lab = AspectRatio(s, nphi=nphi, ntheta=ntheta) + lab_target = lab.J()*0.9 ## COMPUTE THE SURFACE - boozer_surface = BoozerSurface(bs, s, lab, lab_target) - res = boozer_surface.solve_residual_equation_exactly_newton(tol=1e-13, maxiter=20, iota=iota, G=G0) - print(f"NEWTON {res['success']}: iter={res['iter']}, iota={res['iota']:.3f}, vol={s.volume():.3f}") + cw = None if boozer_type == 'exact' else 100. + if weight_inv_modB: + boozer_surface = BoozerSurface(bs, s, lab, lab_target, constraint_weight=cw) + else: + boozer_surface = BoozerSurface(bs, s, lab, lab_target, constraint_weight=cw, options={'weight_inv_modB':False}) + + if converge: + boozer_surface.run_code(iota, G=G0) return bs, boozer_surface diff --git a/tests/geo/test_boozersurface.py b/tests/geo/test_boozersurface.py index 06ae8aeff..badd5b34e 100644 --- a/tests/geo/test_boozersurface.py +++ b/tests/geo/test_boozersurface.py @@ -4,6 +4,7 @@ from simsopt.field.coil import coils_via_symmetries from simsopt.geo.boozersurface import BoozerSurface from simsopt.field.biotsavart import BiotSavart +from simsopt.geo import SurfaceXYZTensorFourier, SurfaceRZFourier from simsopt.geo.surfaceobjectives import ToroidalFlux, Area from simsopt.configs.zoo import get_ncsx_data, get_hsx_data, get_giuliani_data from .surface_test_helpers import get_surface, get_exact_surface, get_boozer_surface @@ -55,11 +56,12 @@ def test_boozer_penalty_constraints_gradient(self): for surfacetype in surfacetypes_list: for stellsym in stellsym_list: for optimize_G in [True, False]: - with self.subTest(surfacetype=surfacetype, - stellsym=stellsym, - optimize_G=optimize_G): - self.subtest_boozer_penalty_constraints_gradient( - surfacetype, stellsym, optimize_G) + for vectorize in [True, False]: + with self.subTest(surfacetype=surfacetype, + stellsym=stellsym, + optimize_G=optimize_G, + vectorize=vectorize): + self.subtest_boozer_penalty_constraints_gradient(surfacetype, stellsym, optimize_G, vectorize) def test_boozer_penalty_constraints_hessian(self): """ @@ -69,14 +71,16 @@ def test_boozer_penalty_constraints_hessian(self): for surfacetype in surfacetypes_list: for stellsym in stellsym_list: for optimize_G in [True, False]: - with self.subTest(surfacetype=surfacetype, - stellsym=stellsym, - optimize_G=optimize_G): - self.subtest_boozer_penalty_constraints_hessian( - surfacetype, stellsym, optimize_G) + for vectorize in [True, False]: + with self.subTest(surfacetype=surfacetype, + stellsym=stellsym, + optimize_G=optimize_G, + vectorize=vectorize): + self.subtest_boozer_penalty_constraints_hessian( + surfacetype, stellsym, optimize_G, vectorize) def subtest_boozer_penalty_constraints_gradient(self, surfacetype, stellsym, - optimize_G=False): + optimize_G=False, vectorize=False): np.random.seed(1) curves, currents, ma = get_ncsx_data() coils = coils_via_symmetries(curves, currents, 3, True) @@ -93,14 +97,13 @@ def subtest_boozer_penalty_constraints_gradient(self, surfacetype, stellsym, tf_target = 0.1 boozer_surface = BoozerSurface(bs, s, tf, tf_target) + fun = boozer_surface.boozer_penalty_constraints_vectorized if vectorize else boozer_surface.boozer_penalty_constraints iota = -0.3 x = np.concatenate((s.get_dofs(), [iota])) if optimize_G: x = np.concatenate((x, [2.*np.pi*current_sum*(4*np.pi*10**(-7)/(2 * np.pi))])) - f0, J0 = boozer_surface.boozer_penalty_constraints( - x, derivatives=1, constraint_weight=weight, optimize_G=optimize_G) - + f0, J0 = fun(x, derivatives=1, constraint_weight=weight, optimize_G=optimize_G) h = np.random.uniform(size=x.shape)-0.5 Jex = J0@h @@ -108,9 +111,7 @@ def subtest_boozer_penalty_constraints_gradient(self, surfacetype, stellsym, epsilons = np.power(2., -np.asarray(range(7, 20))) print("###############################################################") for eps in epsilons: - f1 = boozer_surface.boozer_penalty_constraints( - x + eps*h, derivatives=0, constraint_weight=weight, - optimize_G=optimize_G) + f1 = fun(x + eps*h, derivatives=0, constraint_weight=weight, optimize_G=optimize_G) Jfd = (f1-f0)/eps err = np.linalg.norm(Jfd-Jex)/np.linalg.norm(Jex) print(err/err_old, f0, f1) @@ -119,7 +120,7 @@ def subtest_boozer_penalty_constraints_gradient(self, surfacetype, stellsym, print("###############################################################") def subtest_boozer_penalty_constraints_hessian(self, surfacetype, stellsym, - optimize_G=False): + optimize_G=False, vectorize=False): np.random.seed(1) curves, currents, ma = get_ncsx_data() coils = coils_via_symmetries(curves, currents, 3, True) @@ -134,15 +135,15 @@ def subtest_boozer_penalty_constraints_hessian(self, surfacetype, stellsym, tf_target = 0.1 boozer_surface = BoozerSurface(bs, s, tf, tf_target) + fun = boozer_surface.boozer_penalty_constraints_vectorized if vectorize else boozer_surface.boozer_penalty_constraints iota = -0.3 x = np.concatenate((s.get_dofs(), [iota])) if optimize_G: x = np.concatenate( (x, [2.*np.pi*current_sum*(4*np.pi*10**(-7)/(2 * np.pi))])) - f0, J0, H0 = boozer_surface.boozer_penalty_constraints( - x, derivatives=2, optimize_G=optimize_G) + f0, J0, H0 = fun(x, derivatives=2, optimize_G=optimize_G) h1 = np.random.uniform(size=x.shape)-0.5 h2 = np.random.uniform(size=x.shape)-0.5 d2f = h1 @ H0 @ h2 @@ -151,8 +152,7 @@ def subtest_boozer_penalty_constraints_hessian(self, surfacetype, stellsym, epsilons = np.power(2., -np.asarray(range(10, 20))) print("###############################################################") for eps in epsilons: - fp, Jp = boozer_surface.boozer_penalty_constraints( - x + eps*h1, derivatives=1, optimize_G=optimize_G) + fp, Jp = fun(x + eps*h1, derivatives=1, optimize_G=optimize_G) d2f_fd = (Jp@h2-J0@h2)/eps err = np.abs(d2f_fd-d2f)/np.abs(d2f) print(err/err_old) @@ -231,15 +231,17 @@ def test_boozer_surface_optimisation_convergence(self): ] for surfacetype, stellsym, optimize_G, second_stage in configs: for get_data in [get_hsx_data, get_ncsx_data, get_giuliani_data]: - with self.subTest( - surfacetype=surfacetype, stellsym=stellsym, - optimize_G=optimize_G, second_stage=second_stage, get_data=get_data): - self.subtest_boozer_surface_optimisation_convergence( - surfacetype, stellsym, optimize_G, second_stage, get_data) + for vectorize in [True, False]: + with self.subTest( + surfacetype=surfacetype, stellsym=stellsym, + optimize_G=optimize_G, second_stage=second_stage, get_data=get_data, vectorize=vectorize): + self.subtest_boozer_surface_optimisation_convergence( + surfacetype, stellsym, optimize_G, second_stage, get_data, vectorize) def subtest_boozer_surface_optimisation_convergence(self, surfacetype, stellsym, optimize_G, - second_stage, get_data): + second_stage, get_data, + vectorize): curves, currents, ma = get_data() if stellsym: coils = coils_via_symmetries(curves, currents, ma.nfp, True) @@ -264,7 +266,7 @@ def subtest_boozer_surface_optimisation_convergence(self, surfacetype, s = get_surface(surfacetype, stellsym, nfp=ma.nfp) s.fit_to_curve(ma, 0.1) if get_data is get_ncsx_data: - iota = -0.3 + iota = -0.4 elif get_data is get_giuliani_data: iota = 0.4 elif get_data is get_hsx_data: @@ -280,30 +282,34 @@ def subtest_boozer_surface_optimisation_convergence(self, surfacetype, G = 2.*np.pi*current_sum*(4*np.pi*10**(-7)/(2 * np.pi)) else: G = None - + + cw = (s.quadpoints_phi.size * s.quadpoints_theta.size * 3) # compute surface first using LBFGS exact and an area constraint res = boozer_surface.minimize_boozer_penalty_constraints_LBFGS( - tol=1e-9, maxiter=500, constraint_weight=100., iota=iota, G=G) - print('Residual norm after LBFGS', np.sqrt(2*res['fun'])) + tol=1e-12, maxiter=700, constraint_weight=100/cw, iota=iota, G=G, + vectorize=vectorize) + print('Residual norm after LBFGS', res['iter'], np.sqrt(2*res['fun'])) boozer_surface.recompute_bell() if second_stage == 'ls': res = boozer_surface.minimize_boozer_penalty_constraints_ls( - tol=1e-11, maxiter=100, constraint_weight=1000., + tol=1e-11, maxiter=100, constraint_weight=1000./cw, iota=res['iota'], G=res['G']) elif second_stage == 'newton': res = boozer_surface.minimize_boozer_penalty_constraints_newton( - tol=1e-9, maxiter=15, constraint_weight=100., - iota=res['iota'], G=res['G'], stab=1e-4) + tol=1e-10, maxiter=20, constraint_weight=100./cw, + iota=res['iota'], G=res['G'], stab=1e-4, vectorize=vectorize) elif second_stage == 'newton_exact': res = boozer_surface.minimize_boozer_exact_constraints_newton( - tol=1e-9, maxiter=15, iota=res['iota'], G=res['G']) + tol=1e-10, maxiter=15, iota=res['iota'], G=res['G']) elif second_stage == 'residual_exact': res = boozer_surface.solve_residual_equation_exactly_newton( tol=1e-12, maxiter=15, iota=res['iota'], G=res['G']) print('Residual norm after second stage', np.linalg.norm(res['residual'])) assert res['success'] + assert not boozer_surface.surface.is_self_intersecting(thetas=100) + # For the stellsym case we have z(0, 0) = y(0, 0) = 0. For the not # stellsym case, we enforce z(0, 0) = 0, but expect y(0, 0) \neq 0 gammazero = s.gamma()[0, 0, :] @@ -348,6 +354,244 @@ def subtest_boozer_serialization(self, label): # check that BoozerSurface.surface and label.surface are the same surfaces assert bs_regen.label.surface is bs_regen.surface + + def test_run_code(self): + """ + This unit test verifies that the run_code portion of the BoozerSurface class is working as expected + """ + bs, boozer_surface = get_boozer_surface(boozer_type='ls') + boozer_surface.run_code(boozer_surface.res['iota'], G=boozer_surface.res['G']) + + # this second time should not actually run + boozer_surface.run_code(boozer_surface.res['iota'], G=boozer_surface.res['G']) + + for c in bs.coils: + c.current.fix_all() + + boozer_surface.need_to_run_code=True + # run without providing value of G + boozer_surface.run_code(boozer_surface.res['iota']) + + bs, boozer_surface = get_boozer_surface(boozer_type='exact') + boozer_surface.run_code(boozer_surface.res['iota'], G=boozer_surface.res['G']) + + # this second time should not actually run + boozer_surface.run_code(boozer_surface.res['iota'], G=boozer_surface.res['G']) + + # run the BoozerExact algorithm without a guess for G + boozer_surface.need_to_run_code = True + boozer_surface.solve_residual_equation_exactly_newton(iota=boozer_surface.res['iota']) + + def test_convergence_cpp_and_notcpp_same(self): + """ + This unit test verifies that that the cpp and not cpp implementations converge to + the same solutions + """ + x_vec = self.subtest_convergence_cpp_and_notcpp_same(True) + x_nonvec = self.subtest_convergence_cpp_and_notcpp_same(False) + np.testing.assert_allclose(x_vec, x_nonvec, atol=1e-14) + + def subtest_convergence_cpp_and_notcpp_same(self, vectorize): + """ + compute a surface using either the vectorized or non-vectorized subroutines + """ + curves, currents, ma = get_ncsx_data() + coils = coils_via_symmetries(curves, currents, ma.nfp, True) + current_sum = sum(abs(c.current.get_value()) for c in coils) + bs = BiotSavart(coils) + + s = get_surface('SurfaceXYZTensorFourier', True, nfp=ma.nfp) + s.fit_to_curve(ma, 0.1) + iota = -0.4 + + ar = Area(s) + ar_target = ar.J() + boozer_surface = BoozerSurface(bs, s, ar, ar_target) + + G = 2.*np.pi*current_sum*(4*np.pi*10**(-7)/(2 * np.pi)) + + cw = 3*s.quadpoints_phi.size * s.quadpoints_theta.size + # vectorized solution first + res = boozer_surface.minimize_boozer_penalty_constraints_LBFGS( + tol=1e-10, maxiter=600, constraint_weight=100./cw, iota=iota, G=G, + vectorize=vectorize) + print('Residual norm after LBFGS', np.sqrt(2*res['fun'])) + + boozer_surface.recompute_bell() + res = boozer_surface.minimize_boozer_penalty_constraints_newton( + tol=1e-10, maxiter=20, constraint_weight=100./cw, + iota=res['iota'], G=res['G'], stab=0., vectorize=vectorize) + + assert res['success'] + x = boozer_surface.surface.x.copy() + iota = res['iota'] + G = res['G'] + return np.concatenate([x, [iota, G]]) + + def test_boozer_penalty_constraints_cpp_notcpp(self): + """ + Test to verify cpp and python implementations of the BoozerLS objective return the same thing. + """ + for surfacetype in surfacetypes_list: + for stellsym in stellsym_list: + for weight_inv_modB in [False, True]: + for (optimize_G, nphi, ntheta, mpol, ntor) in [(True, 1, 1, 3, 3), (False, 1, 1, 13, 2), (True, 2, 2, 10, 3), (False, 2, 1, 3, 4), (True, 6, 9, 3, 3), (False, 7, 8, 3, 4), (True, 3, 3, 3, 3), (False, 3, 3, 3, 5)]: + with self.subTest(surfacetype=surfacetype, + stellsym=stellsym, + optimize_G=optimize_G, + weight_inv_modB=weight_inv_modB, + mpol=mpol, + ntor=ntor): + self.subtest_boozer_penalty_constraints_cpp_notcpp(surfacetype, stellsym, optimize_G, nphi, ntheta, weight_inv_modB, mpol, ntor) + + def subtest_boozer_penalty_constraints_cpp_notcpp(self, surfacetype, stellsym, optimize_G, nphi, ntheta, weight_inv_modB, mpol, ntor): + + np.random.seed(1) + curves, currents, ma = get_ncsx_data() + coils = coils_via_symmetries(curves, currents, 3, stellsym) + bs = BiotSavart(coils) + bs_tf = BiotSavart(coils) + current_sum = sum(abs(c.current.get_value()) for c in coils) + + phis = None + thetas = None + if nphi == 1: + phis = [0.2234567989] + elif nphi == 2: + phis = [0.2234567989, 0.432123451] + + if ntheta == 1: + thetas = [0.2432101234] + elif ntheta == 2: + thetas = [0.2432101234, 0.9832134] + + s = get_surface(surfacetype, stellsym, nphi=nphi, ntheta=ntheta, thetas=thetas, phis=phis, mpol=mpol, ntor=ntor) + s.fit_to_curve(ma, 0.1) + s.x = s.x + np.random.rand(s.x.size)*1e-6 + + tf = ToroidalFlux(s, bs_tf, nphi=51, ntheta=51) + + tf_target = 0.1 + boozer_surface = BoozerSurface(bs, s, tf, tf_target) + + iota = -0.3 + x = np.concatenate((s.get_dofs(), [iota])) + if optimize_G: + x = np.concatenate((x, [2.*np.pi*current_sum*(4*np.pi*10**(-7)/(2 * np.pi))])) + + # deriv = 0 + w = 0. + f0 = boozer_surface.boozer_penalty_constraints( + x, derivatives=0, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + f1 = boozer_surface.boozer_penalty_constraints_vectorized( + x, derivatives=0, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + np.testing.assert_allclose(f0, f1, atol=1e-13, rtol=1e-13) + print(np.abs(f0-f1)/np.abs(f0)) + + # deriv = 1 + f0, J0 = boozer_surface.boozer_penalty_constraints( + x, derivatives=1, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + f1, J1 = boozer_surface.boozer_penalty_constraints_vectorized( + x, derivatives=1, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + np.testing.assert_allclose(f0, f1, atol=1e-13, rtol=1e-13) + np.testing.assert_allclose(J0, J1, atol=1e-11, rtol=1e-11) + + # check directional derivative + h1 = np.random.rand(J0.size)-0.5 + np.testing.assert_allclose(J0@h1, J1@h1, atol=1e-13, rtol=1e-13) + print(np.abs(f0-f1)/np.abs(f0), np.abs(J0@h1-J1@h1)/np.abs(J0@h1)) + + # deriv = 2 + f0, J0, H0 = boozer_surface.boozer_penalty_constraints( + x, derivatives=2, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + f1, J1, H1 = boozer_surface.boozer_penalty_constraints_vectorized( + x, derivatives=2, constraint_weight=w, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + + np.testing.assert_allclose(f0, f1, atol=1e-13, rtol=1e-13) + np.testing.assert_allclose(J0, J1, atol=1e-11, rtol=1e-11) + np.testing.assert_allclose(H0, H1, atol=1e-10, rtol=1e-10) + h2 = np.random.rand(J0.size)-0.5 + + np.testing.assert_allclose(f0, f1, atol=1e-13, rtol=1e-13) + np.testing.assert_allclose(J0@h1, J1@h1, atol=1e-13, rtol=1e-13) + np.testing.assert_allclose((H0@h1)@h2, (H1@h1)@h2, atol=1e-13, rtol=1e-13) + print(np.abs(f0-f1)/np.abs(f0), np.abs(J0@h1-J1@h1)/np.abs(J0@h1), np.abs((H0@h1)@h2-(H1@h1)@h2)/np.abs((H0@h1)@h2)) + + def compute_differences(Ha, Hb): + diff = np.abs(Ha.flatten() - Hb.flatten()) + rel_diff = diff/np.abs(Ha.flatten()) + ij1 = np.where(diff.reshape(Ha.shape) == np.max(diff)) + i1 = ij1[0][0] + j1 = ij1[1][0] + + ij2 = np.where(rel_diff.reshape(Ha.shape) == np.max(rel_diff)) + i2 = ij2[0][0] + j2 = ij2[1][0] + print(f'max err ({i1:03}, {j1:03}): {np.max(diff):.6e}, {Ha[i1, j1]:.6e}\nmax rel err ({i2:03}, {j2:03}): {np.max(rel_diff):.6e}, {Ha[i2,j2]:.6e}\n') + compute_differences(H0, H1) + + def test_boozer_surface_quadpoints(self): + """ + this unit test checks that the quadpoints mask for stellarator symmetric Boozer Surfaces are correctly initialized + """ + for idx in range(4): + with self.subTest(idx=idx): + self.subtest_boozer_surface_quadpoints(idx) + + def subtest_boozer_surface_quadpoints(self, idx): + mpol = 6 + ntor = 6 + nfp = 3 + + if idx == 0: + phis = np.linspace(0, 1/nfp, 2*ntor+1, endpoint=False) + thetas = np.linspace(0, 1, 2*mpol+1, endpoint=False) + mask_true = np.ones((phis.size, thetas.size), dtype=bool) + mask_true[:, mpol+1:] = False + mask_true[ntor+1:, 0] = False + elif idx == 1: + phis = np.linspace(0, 1/nfp, 2*ntor+1, endpoint=False) + thetas = np.linspace(0, 0.5, mpol+1, endpoint=False) + mask_true = np.ones((phis.size, thetas.size), dtype=bool) + mask_true[ntor+1:, 0] = False + elif idx == 2: + phis = np.linspace(0, 1/(2*nfp), ntor+1, endpoint=False) + thetas = np.linspace(0, 1, 2*mpol+1, endpoint=False) + mask_true = np.ones((phis.size, thetas.size), dtype=bool) + mask_true[0, mpol+1:] = False + elif idx == 3: + phis = np.linspace(0, 1., 2*ntor+1, endpoint=False) + thetas = np.linspace(0, 1., 2*mpol+1, endpoint=False) + + s = SurfaceXYZTensorFourier(mpol=mpol, ntor=ntor, stellsym=True, nfp=nfp, quadpoints_phi=phis, quadpoints_theta=thetas) + + if idx < 3: # the first three quadrature point sets should pass without issue. + mask = s.get_stellsym_mask() + assert np.all(mask == mask_true) + else: + with self.assertRaises(Exception): + mask = s.get_stellsym_mask() + + def test_boozer_surface_type_assert(self): + """ + this unit test checks that an exception is raised if a SurfaceRZFourier is passed to a BoozerSurface + """ + mpol = 6 + ntor = 6 + nfp = 3 + phis = np.linspace(0, 1/nfp, 2*ntor+1, endpoint=False) + thetas = np.linspace(0, 1, 2*mpol+1, endpoint=False) + s = SurfaceRZFourier(mpol=mpol, ntor=ntor, stellsym=True, nfp=nfp, quadpoints_phi=phis, quadpoints_theta=thetas) + + base_curves, base_currents, ma = get_ncsx_data() + coils = coils_via_symmetries(base_curves, base_currents, 3, True) + bs = BiotSavart(coils) + + lab = Area(s) + lab_target = 0.1 + + with self.assertRaises(Exception): + _ = BoozerSurface(bs, s, lab, lab_target) if __name__ == "__main__": diff --git a/tests/geo/test_curve.py b/tests/geo/test_curve.py index acf3314bf..a997a6e84 100644 --- a/tests/geo/test_curve.py +++ b/tests/geo/test_curve.py @@ -11,12 +11,14 @@ from simsopt.geo.curverzfourier import CurveRZFourier from simsopt.geo.curveplanarfourier import CurvePlanarFourier from simsopt.geo.curvehelical import CurveHelical +from simsopt.geo.curvexyzfouriersymmetries import CurveXYZFourierSymmetries from simsopt.geo.curve import RotatedCurve, curves_to_vtk from simsopt.geo import parameters from simsopt.configs.zoo import get_ncsx_data, get_w7x_data +from simsopt.field import BiotSavart, Current, coils_via_symmetries, Coil from simsopt.field.coil import coils_to_makegrid from simsopt.geo import CurveLength, CurveCurveDistance - +from math import gcd try: import pyevtk @@ -36,7 +38,7 @@ def taylor_test(f, df, x, epsilons=None, direction=None): dfx = df(x)@direction if epsilons is None: epsilons = np.power(2., -np.asarray(range(7, 20))) - # print("################################################################################") + print("################################################################################") err_old = 1e9 counter = 0 for eps in epsilons: @@ -46,6 +48,8 @@ def taylor_test(f, df, x, epsilons=None, direction=None): fminuseps = f(x - eps * direction) dfest = (fpluseps-fminuseps)/(2*eps) err = np.linalg.norm(dfest - dfx) + print(err, err/err_old) + assert err < 1e-9 or err < 0.3 * err_old if err < 1e-9: break @@ -53,7 +57,7 @@ def taylor_test(f, df, x, epsilons=None, direction=None): counter += 1 if err > 1e-10: assert counter > 3 - # print("################################################################################") + print("################################################################################") def get_curve(curvetype, rotated, x=np.asarray([0.5])): @@ -73,9 +77,15 @@ def get_curve(curvetype, rotated, x=np.asarray([0.5])): curve = CurveHelical(x, order, 5, 2, 1.0, 0.3, x0=np.ones((2*order,))) elif curvetype == "CurvePlanarFourier": curve = CurvePlanarFourier(x, order, 2, True) + elif curvetype == "CurveXYZFourierSymmetries1": + curve = CurveXYZFourierSymmetries(x, order, 2, True) + elif curvetype == "CurveXYZFourierSymmetries2": + curve = CurveXYZFourierSymmetries(x, order, 2, False) + elif curvetype == "CurveXYZFourierSymmetries3": + curve = CurveXYZFourierSymmetries(x, order, 2, False, ntor=3) else: assert False - + dofs = np.zeros((curve.dof_size, )) if curvetype in ["CurveXYZFourier", "JaxCurveXYZFourier"]: dofs[1] = 1. @@ -87,10 +97,38 @@ def get_curve(curvetype, rotated, x=np.asarray([0.5])): dofs[order+1] = 0.1 elif curvetype in ["CurveHelical", "CurveHelicalInitx0"]: dofs[0] = np.pi/2 + elif curvetype == "CurveXYZFourierSymmetries1": + R = 1 + r = 0.5 + curve.set('xc(0)', R) + curve.set('xc(1)', -r) + curve.set('zs(1)', -r) + dofs = curve.get_dofs() + elif curvetype == "CurveXYZFourierSymmetries2": + R = 1 + r = 0.5 + curve.set('xc(0)', R) + curve.set('xs(1)', -0.1*r) + curve.set('xc(1)', -r) + curve.set('zs(1)', -r) + curve.set('zc(0)', 1) + curve.set('zs(1)', r) + dofs = curve.get_dofs() + elif curvetype == "CurveXYZFourierSymmetries3": + R = 1 + r = 0.5 + curve.set('xc(0)', R) + curve.set('xs(1)', -0.1*r) + curve.set('xc(1)', -r) + curve.set('zs(1)', -r) + curve.set('zc(0)', 1) + curve.set('zs(1)', r) + dofs = curve.get_dofs() else: assert False curve.x = dofs + rand_scale * np.random.rand(len(dofs)).reshape(dofs.shape) + if rotated: curve = RotatedCurve(curve, 0.5, flip=False) return curve @@ -98,7 +136,239 @@ def get_curve(curvetype, rotated, x=np.asarray([0.5])): class Testing(unittest.TestCase): - curvetypes = ["CurveXYZFourier", "JaxCurveXYZFourier", "CurveRZFourier", "CurvePlanarFourier", "CurveHelical", "CurveHelicalInitx0"] + curvetypes = ["CurveXYZFourier", "JaxCurveXYZFourier", "CurveRZFourier", "CurvePlanarFourier", "CurveHelical", "CurveXYZFourierSymmetries1","CurveXYZFourierSymmetries2", "CurveXYZFourierSymmetries3", "CurveHelicalInitx0"] + + def get_curvexyzfouriersymmetries(self, stellsym=True, x=None, nfp=None, ntor=1): + # returns a CurveXYZFourierSymmetries that is randomly perturbed + + np.random.seed(1) + rand_scale = 1e-2 + + if nfp is None: + nfp = 3 + if x is None: + x = np.linspace(0, 1, 200, endpoint=False) + + order = 2 + curve = CurveXYZFourierSymmetries(x, order, nfp, stellsym, ntor=ntor) + R = 1 + r = 0.25 + curve.set('xc(0)', R) + curve.set('xc(2)', r) + curve.set('ys(2)', -r) + curve.set('zs(1)', -2*r) + curve.set('zs(2)', r) + dofs = curve.x.copy() + curve.x = dofs + rand_scale * np.random.rand(len(dofs)).reshape(dofs.shape) + + return curve + + def test_curvexyzsymmetries_raisesexception(self): + # test ensures that an exception is raised when you try and create a curvexyzfouriersymmetries + # where gcd(ntor, nfp) != 1. + + order = 1 + nfp = 1 + ntor = 2 + # nfp = 1 and ntor = 2 here, so it should work + curve = CurveXYZFourierSymmetries(100, order, nfp, True, ntor=ntor, x0=np.ones(3*order+1)) + print(curve.x) + + with self.assertRaises(Exception): + order = 1 + nfp = 2 + ntor = 2 + # nfp = 2 and ntor = 2 here, so an exception should be raised + _ = CurveXYZFourierSymmetries(100, order, nfp, True, ntor=ntor, x0=np.ones(3*order+1)) + + def test_curvehelical_is_curvexyzfouriersymmetries(self): + # this test checks that both helical coil representations can produce the same helical curve on a torus + order = 1 + nfp = 2 + curve1 = CurveXYZFourierSymmetries(100, order, nfp, True) + R = 1 + r = 0.5 + curve1.set('xc(0)', R) + curve1.set('xc(1)', r) + curve1.set('zs(1)', -r) + curve2 = CurveHelical(np.linspace(0, 1, 100, endpoint=False), order, nfp, 1, R, r, x0=np.zeros((2*order,))) + np.testing.assert_allclose(curve1.gamma(), curve2.gamma(), atol=1e-14) + + def test_trefoil_nonstellsym(self): + r''' This test checks that a CurveXYZFourierSymmetries can represent a non-stellarator symmetric + trefoil knot. A parametric representation of a trefoil knot is given by: + + x(t) = sin(t) + 2sin(t) + y(t) = cos(t) - 2cos(t) + z(t) = -sin(3t) + + The above can be rewritten the CurveXYZFourierSymmetries representation, with + order = 1, nfp = 3, and ntor = 2: + + x(t) = xhat(t) * cos(ntor*t) - yhat(t) * sin(ntor*t), + y(t) = xhat(t) * sin(ntor*t) + yhat(t) * cos(ntor*t), + z(t) = -sin(nfp*t), + + where + xhat(t) = sin(nfp*t), + yhat(t) = -2 + cos(nfp*t), + + i.e., The dofs are xs(1)=1, yc(0)=-2, yc(1)=1, zs(1)=-1, and zero otherwise. + ''' + + order = 1 + nfp = 3 + ntor = 2 + x = np.linspace(0, 1, 500, endpoint=False) + curve = CurveXYZFourierSymmetries(x, order, nfp, False, ntor=ntor) + + X = np.sin(2*np.pi * x) + 2 * np.sin(2*2*np.pi * x) + Y = np.cos(2*np.pi * x) - 2 * np.cos(2*2*np.pi * x) + Z = -np.sin(3*2*np.pi*x) + XYZ = np.concatenate([X[:, None], Y[:, None], Z[:, None]], axis=1) + + curve.set('xs(1)', 1.) + curve.set('yc(0)', -2.) + curve.set('yc(1)', 1.) + curve.set('zs(1)', -1.) + np.testing.assert_allclose(curve.gamma(), XYZ, atol=1e-14) + + def test_trefoil_stellsym(self): + r''' This test checks that a CurveXYZFourierSymmetries can represent a stellarator symmetric + trefoil knot. A parametric representation of a trefoil knot is given by: + + x(t) = cos(t) - 2cos(t), + y(t) =-sin(t) - 2sin(t), + z(t) = -sin(3t). + + The above can be rewritten the CurveXYZFourierSymmetries representation, with + order = 1, nfp = 3, and ntor = 2: + + x(t) = xhat(t) * cos(ntor*t) - yhat(t) * sin(ntor*t), + y(t) = xhat(t) * sin(ntor*t) + yhat(t) * cos(ntor*t), + z(t) = -sin(nfp*t), + + where + + xhat(t) = -2 + cos(nfp*t) + yhat(t) = -sin(nfp*t) + + i.e., xc(0)=-2, xc(1)=1, ys(1)=-1, zs(1)=-1. + ''' + + order = 1 + nfp = 3 + ntor = 2 + x = np.linspace(0, 1, 500, endpoint=False) + curve = CurveXYZFourierSymmetries(x, order, nfp, True, ntor=ntor) + + X = np.cos(2*np.pi * x) - 2 * np.cos(2*2*np.pi * x) + Y =-np.sin(2*np.pi * x) - 2 * np.sin(2*2*np.pi * x) + Z = -np.sin(3*2*np.pi*x) + XYZ = np.concatenate([X[:, None], Y[:, None], Z[:, None]], axis=1) + + curve.set('xc(0)', -2) + curve.set('xc(1)', 1) + curve.set('ys(1)', -1) + curve.set('zs(1)', -1) + np.testing.assert_allclose(curve.gamma(), XYZ, atol=1e-14) + + + def test_nonstellsym(self): + # this test checks that you can obtain a stellarator symmetric magnetic field from two non-stellarator symmetric + # CurveXYZFourierSymmetries curves. + for nfp in [1, 2, 3, 4, 5, 6]: + for ntor in [1, 2, 3, 4, 5, 6]: + with self.subTest(nfp=nfp, ntor=ntor): + self.subtest_nonstellsym(nfp, ntor) + + def subtest_nonstellsym(self, nfp, ntor): + if gcd(ntor, nfp) != 1: + return + + # this test checks that you can obtain a stellarator symmetric magnetic field from two non-stellarator symmetric + # CurveXYZFourierSymmetries curves. + curve = self.get_curvexyzfouriersymmetries(stellsym=False, nfp=nfp, ntor=ntor) + current = Current(1e5) + coils = coils_via_symmetries([curve], [current], 1, True) + bs = BiotSavart(coils) + bs.set_points([[1, 1, 1], [1, -1, -1]]) + B=bs.B_cyl() + np.testing.assert_allclose(B[0, 0], -B[1, 0], atol=1e-14) + np.testing.assert_allclose(B[0, 1], B[1, 1], atol=1e-14) + np.testing.assert_allclose(B[0, 2], B[1, 2], atol=1e-14) + + def test_xyzhelical_symmetries(self): + # checking various symmetries of the CurveXYZFourierSymmetries representation + for nfp in [1, 2, 3, 4, 5, 6]: + for ntor in [1, 2, 3, 4, 5, 6]: + with self.subTest(nfp=nfp, ntor=ntor): + self.subtest_xyzhelical_symmetries(nfp, ntor) + + def subtest_xyzhelical_symmetries(self, nfp, ntor): + if gcd(nfp, ntor) != 1 : + return + + # does the stellarator symmetric curve have rotational symmetry? + curve = self.get_curvexyzfouriersymmetries(stellsym=True, nfp=nfp, x=np.array([0.123, 0.123+1/nfp]), ntor=ntor) + out = curve.gamma() + + # NOTE: the point at angle t+1/nfp is the point at angle t, but rotated by 2pi *(ntor/nfp) radians. + alpha = 2*np.pi*ntor/nfp + R = np.array([ + [np.cos(alpha), -np.sin(alpha), 0], + [np.sin(alpha), np.cos(alpha), 0], + [0, 0, 1] + ]) + + print(R@out[0], out[1]) + np.testing.assert_allclose(out[1], R@out[0], atol=1e-14) + + # does the stellarator symmetric curve indeed pass through (x0, 0, 0)? + curve = self.get_curvexyzfouriersymmetries(stellsym=True, nfp=nfp, x = np.array([0]), ntor=ntor) + out = curve.gamma() + assert np.abs(out[0, 0]) > 1e-3 + np.testing.assert_allclose(out[0, 1], 0, atol=1e-14) + np.testing.assert_allclose(out[0, 2], 0, atol=1e-14) + + + # does the non-stellarator symmetric curve not pass through (x0, 0, 0)? + curve = self.get_curvexyzfouriersymmetries(stellsym=False, nfp=nfp, x = np.array([0]), ntor=ntor) + out = curve.gamma() + assert np.abs(out[0, 0]) > 1e-3 + assert np.abs(out[0, 1]) > 1e-3 + assert np.abs(out[0, 2]) > 1e-3 + + # is the stellarator symmetric curve actually stellarator symmetric? + curve = self.get_curvexyzfouriersymmetries(stellsym=True, nfp=nfp, x = np.array([0.123, -0.123]), ntor=ntor) + pts = curve.gamma() + np.testing.assert_allclose(pts[0, 0], pts[1, 0], atol=1e-14) + np.testing.assert_allclose(pts[0, 1], -pts[1, 1], atol= 1e-14) + np.testing.assert_allclose(pts[0, 2], -pts[1, 2], atol= 1e-14) + + # is the field from the stellarator symmetric curve actually stellarator symmetric? + curve = self.get_curvexyzfouriersymmetries(stellsym=True, nfp=nfp, x=np.linspace(0, 1, 200, endpoint=False), ntor=ntor) + current = Current(1e5) + coil = Coil(curve, current) + bs = BiotSavart([coil]) + bs.set_points([[1, 1, 1], [1, -1, -1]]) + B=bs.B_cyl() + np.testing.assert_allclose(B[0, 0],-B[1, 0], atol=1e-14) + np.testing.assert_allclose(B[0, 1], B[1, 1], atol=1e-14) + np.testing.assert_allclose(B[0, 2], B[1, 2], atol=1e-14) + + # does the non-stellarator symmetric curve have rotational symmetry still? + # NOTE: the point at angle t+1/nfp is the point at angle t, but rotated by 2pi *(ntor/nfp) radians. + curve = self.get_curvexyzfouriersymmetries(stellsym=False, nfp=nfp, x = np.array([0.123, 0.123+1./nfp]), ntor=ntor) + out = curve.gamma() + alpha = 2*np.pi*ntor/nfp + R = np.array([ + [np.cos(alpha), -np.sin(alpha), 0], + [np.sin(alpha), np.cos(alpha), 0], + [0, 0, 1] + ]) + print(R@out[0], out[1]) + np.testing.assert_allclose(out[1], R@out[0], atol=1e-14) def test_curve_helical_xyzfourier(self): x = np.asarray([0.6]) diff --git a/tests/geo/test_surface_objectives.py b/tests/geo/test_surface_objectives.py index 759d3ccaf..5abb41c3e 100644 --- a/tests/geo/test_surface_objectives.py +++ b/tests/geo/test_surface_objectives.py @@ -2,7 +2,7 @@ import numpy as np from simsopt.field.biotsavart import BiotSavart from simsopt.field.coil import coils_via_symmetries -from simsopt.geo.surfaceobjectives import ToroidalFlux, QfmResidual, parameter_derivatives, Volume, PrincipalCurvature, MajorRadius, Iotas, NonQuasiSymmetricRatio +from simsopt.geo.surfaceobjectives import ToroidalFlux, QfmResidual, parameter_derivatives, Volume, PrincipalCurvature, MajorRadius, Iotas, NonQuasiSymmetricRatio, BoozerResidual from simsopt.configs.zoo import get_ncsx_data from .surface_test_helpers import get_surface, get_exact_surface, get_boozer_surface @@ -259,13 +259,21 @@ def test_major_radius_derivative(self): """ Taylor test for derivative of surface major radius wrt coil parameters """ - - for label in ["Volume", "ToroidalFlux"]: - with self.subTest(label=label): - self.subtest_major_radius_surface_derivative(label) - - def subtest_major_radius_surface_derivative(self, label): - bs, boozer_surface = get_boozer_surface(label=label, nphi=51, ntheta=51) + for boozer_type in ['exact', 'ls']: + for label in ["Volume", "ToroidalFlux"]: + for optimize_G in [True, False]: + for weight_inv_modB in [True, False]: + with self.subTest(label=label, boozer_type=boozer_type, optimize_G=optimize_G): + if boozer_type == 'ls' and label == 'ToroidalFlux': + continue + if boozer_type == 'exact' and optimize_G is False: + continue + if boozer_type == 'exact' and weight_inv_modB: + continue + self.subtest_major_radius_surface_derivative(label, boozer_type, optimize_G, weight_inv_modB) + + def subtest_major_radius_surface_derivative(self, label, boozer_type, optimize_G, weight_inv_modB): + bs, boozer_surface = get_boozer_surface(label=label, nphi=51, ntheta=51, boozer_type=boozer_type, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) coeffs = bs.x mr = MajorRadius(boozer_surface) @@ -286,16 +294,25 @@ def test_iotas_derivative(self): Taylor test for derivative of surface rotational transform wrt coil parameters """ - for label in ["Volume", "ToroidalFlux"]: - with self.subTest(label=label): - self.subtest_iotas_derivative(label) - - def subtest_iotas_derivative(self, label): + for boozer_type in ['exact', 'ls']: + for label in ["Volume", "ToroidalFlux"]: + for optimize_G in [True, False]: + for weight_inv_modB in [True, False]: + if boozer_type == 'ls' and label == 'ToroidalFlux': + continue + if boozer_type == 'exact' and optimize_G is False: + continue + if boozer_type == 'exact' and weight_inv_modB: + continue + with self.subTest(label=label, boozer_type=boozer_type, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB): + self.subtest_iotas_derivative(label, boozer_type, optimize_G, weight_inv_modB) + + def subtest_iotas_derivative(self, label, boozer_type, optimize_G, weight_inv_modB): """ Taylor test for derivative of surface rotational transform wrt coil parameters """ - bs, boozer_surface = get_boozer_surface(label=label) + bs, boozer_surface = get_boozer_surface(label=label, boozer_type=boozer_type, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) coeffs = bs.x io = Iotas(boozer_surface) @@ -316,13 +333,27 @@ def test_nonQSratio_derivative(self): """ Taylor test for derivative of surface non QS ratio wrt coil parameters """ - for label in ["Volume", "ToroidalFlux"]: - for axis in [False, True]: - with self.subTest(label=label, axis=axis): - self.subtest_nonQSratio_derivative(label, axis) - - def subtest_nonQSratio_derivative(self, label, axis): - bs, boozer_surface = get_boozer_surface(label=label) + for boozer_type in ['exact', 'ls']: + for label in ["Volume", "ToroidalFlux"]: + for weight_inv_modB in [True, False]: + for optimize_G in [True, False]: + for fix_coil_dof in [True, False]: + if boozer_type == 'ls' and label == 'ToroidalFlux': + continue + if boozer_type == 'exact' and optimize_G is False: + continue + if boozer_type == 'exact' and weight_inv_modB: + continue + for axis in [False, True]: + with self.subTest(label=label, axis=axis, boozer_type=boozer_type, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB, fix_coil_dof=fix_coil_dof): + self.subtest_nonQSratio_derivative(label, axis, boozer_type, optimize_G, weight_inv_modB, fix_coil_dof) + + def subtest_nonQSratio_derivative(self, label, axis, boozer_type, optimize_G, weight_inv_modB, fix_coil_dof): + bs, boozer_surface = get_boozer_surface(label=label, boozer_type=boozer_type, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + + if fix_coil_dof: + bs.coils[0].curve.fix('xc(0)') + coeffs = bs.x io = NonQuasiSymmetricRatio(boozer_surface, bs, quasi_poloidal=axis) @@ -338,14 +369,46 @@ def df(dofs): epsilons=np.power(2., -np.asarray(range(13, 19)))) +class BoozerResidualTests(unittest.TestCase): + def test_boozerresidual_derivative(self): + """ + Taylor test for derivative of surface non QS ratio wrt coil parameters + """ + for label in ["Volume"]: + for optimize_G in [True, False]: + for weight_inv_modB in [True, False]: + with self.subTest(label=label, optimize_G=optimize_G, weight_inv_modB=weight_inv_modB): + self.subtest_boozerresidual_derivative(label, optimize_G, weight_inv_modB) + + def subtest_boozerresidual_derivative(self, label, optimize_G, weight_inv_modB): + bs, boozer_surface = get_boozer_surface(label=label, boozer_type='ls', optimize_G=optimize_G, weight_inv_modB=weight_inv_modB) + coeffs = bs.x + br = BoozerResidual(boozer_surface, bs) + + def f(dofs): + bs.x = dofs + return br.J() + + def df(dofs): + bs.x = dofs + return br.dJ() + + taylor_test1(f, df, coeffs, + epsilons=np.power(2., -np.asarray(range(13, 19)))) + + class LabelTests(unittest.TestCase): def test_label_surface_derivative1(self): - for label in ["Volume", "ToroidalFlux", "Area"]: - with self.subTest(label=label): - self.subtest_label_derivative1(label) - - def subtest_label_derivative1(self, label): - bs, boozer_surface = get_boozer_surface(label=label) + for label in ["Volume", "ToroidalFlux", "Area", "AspectRatio"]: + for stellsym in stellsym_list: + for nphi, ntheta in [(13, 14), (None, None), (13, None), (None, 14)]: + with self.subTest(label=label, stellsym=stellsym, converge=stellsym): + # don't converge the BoozerSurface when stellsym=False because it takes a long time + # for a unit test + self.subtest_label_derivative1(label, stellsym=stellsym, converge=stellsym, nphi=nphi, ntheta=ntheta) + + def subtest_label_derivative1(self, label, stellsym, converge, nphi, ntheta): + bs, boozer_surface = get_boozer_surface(label=label, nphi=nphi, ntheta=ntheta, converge=converge, stellsym=stellsym) surface = boozer_surface.surface label = boozer_surface.label coeffs = surface.x @@ -359,10 +422,10 @@ def df(dofs): return label.dJ(partials=True)(surface) taylor_test1(f, df, coeffs, - epsilons=np.power(2., -np.asarray(range(13, 19)))) + epsilons=np.power(2., -np.asarray(range(12, 18)))) def test_label_surface_derivative2(self): - for label in ["Volume", "ToroidalFlux", "Area"]: + for label in ["Volume", "ToroidalFlux", "Area", "AspectRatio"]: with self.subTest(label=label): self.subtest_label_derivative2(label) diff --git a/tests/geo/test_surface_rzfourier.py b/tests/geo/test_surface_rzfourier.py index 538cf17d2..fce6fec00 100755 --- a/tests/geo/test_surface_rzfourier.py +++ b/tests/geo/test_surface_rzfourier.py @@ -732,6 +732,44 @@ def test_make_rotating_ellipse_iota(self): np.testing.assert_array_less(0, eq.wout.iotaf) np.testing.assert_allclose(eq.mean_iota(), 0.4291137962772453, rtol=1e-6) + def test_fourier_transform_scalar(self): + """ + Test the Fourier transform of a field on a surface. + """ + s = SurfaceRZFourier(mpol=4, ntor=5) + s.rc[0, 0] = 1.3 + s.rc[1, 0] = 0.4 + s.zs[1, 0] = 0.2 + + # Create the grid of quadpoints: + phi2d, theta2d = np.meshgrid(2 * np.pi * s.quadpoints_phi, + 2 * np.pi * s.quadpoints_theta, + indexing='ij') + + # create a test field where only Fourier elements [m=2, n=3] + # and [m=4,n=5] are nonzero: + field = 0.8 * np.sin(2*theta2d - 3*s.nfp*phi2d) + 0.2*np.sin(4*theta2d - 5*s.nfp*phi2d)+ 0.7*np.cos(3*theta2d - 3*s.nfp*phi2d) + + # Transform the field to Fourier space: + ft_sines, ft_cosines = s.fourier_transform_scalar(field, stellsym=False) + self.assertAlmostEqual(ft_sines[2, 3+s.ntor], 0.8) + self.assertAlmostEqual(ft_sines[4, 5+s.ntor], 0.2) + self.assertAlmostEqual(ft_cosines[3, 3+s.ntor], 0.7) + + # Test that all other elements are close to zero + sines_mask = np.ones_like(ft_sines, dtype=bool) + cosines_mask = np.copy(sines_mask) + sines_mask[2, 3 + s.ntor] = False + sines_mask[4, 5 + s.ntor] = False + cosines_mask[3, 3 + s.ntor] = False + self.assertEqual(np.all(np.abs(ft_sines[sines_mask]) < 1e-10), True) + self.assertEqual(np.all(np.abs(ft_cosines[cosines_mask]) < 1e-10), True) + + # Transform back to real space: + field2 = s.inverse_fourier_transform_scalar(ft_sines, ft_cosines, stellsym=False, normalization=1/2*np.pi**2) + + # Check that the result is the same as the original field: + np.testing.assert_allclose(field/2*np.pi**2, field2) class SurfaceRZPseudospectralTests(unittest.TestCase): def test_names(self): diff --git a/tests/mhd/test_integrated_mpi.py b/tests/mhd/test_integrated_mpi.py index d00448154..40dc773c4 100644 --- a/tests/mhd/test_integrated_mpi.py +++ b/tests/mhd/test_integrated_mpi.py @@ -190,7 +190,7 @@ def test_Residue_parallelization(self): (residue2.J, 0, 1)]) # Solve for two nfevs to test if runs - least_squares_mpi_solve(prob, mpi=mpi, grad=grad, max_nfev=2) + least_squares_mpi_solve(prob, mpi=mpi, grad=grad, save_residuals=True, max_nfev=2) # No assertions, run is too short to complete, just testing if it does run diff --git a/tests/mhd/test_spec.py b/tests/mhd/test_spec.py index 0ab5fb536..179a7e2af 100755 --- a/tests/mhd/test_spec.py +++ b/tests/mhd/test_spec.py @@ -2,8 +2,11 @@ import os import unittest + import numpy as np from monty.tempfile import ScratchDir +from scipy.constants import mu_0 +from simsopt._core.util import ObjectiveFailure try: import spec as spec_mod @@ -22,6 +25,7 @@ from simsopt.geo import SurfaceGarabedian from simsopt.mhd import ProfileSpec +from simsopt.field import NormalField from simsopt.objectives import LeastSquaresProblem from simsopt.solve import least_squares_serial_solve @@ -91,6 +95,27 @@ def test_init_freeboundary_nonstellsym(self): self.assertAlmostEqual(s.normal_field.get_vns(3, -1), -1.269776831212886e-04, places) self.assertAlmostEqual(s.normal_field.get_vnc(1, 0), 1.924871538367248e-04, places) self.assertAlmostEqual(s.normal_field.get_vnc(1, -2), 4.070523669489626e-04, places) + + def test_normal_field_setter(self): + """ + Try creating a Spec instance from a freeboundary file that is also + non-stellarator symmetric. + Check value of normal field + """ + + filename = os.path.join(TEST_DIR, 'M16N08.sp') + + with ScratchDir("."): + s = Spec(filename) + surface = s.boundary + old_normal = s.normal_field + new_normal = NormalField(s.nfp, stellsym=s.stellsym, mpol=s.mpol, ntor=s.ntor, surface=surface) + s.normal_field = new_normal + self.assertAlmostEqual(s.normal_field.get_vns(0,1), 0) # set to zeros + self.assertIs(s.normal_field.surface, s._computational_boundary) # normal field surface is set to spec computational boundary. + self.assertIsNot(old_normal, new_normal) + + def test_init_freeboundary(self): """ @@ -196,6 +221,93 @@ def test_set_profile_cumulative(self): else: self.assertEqual(s.get_profile('volume_current', lvol), 1) + def test_activate_profiles(self): + """ + test activate all profiles and confirm that DOFs are + correctly added + """ + profiles = ['pressure', + 'volume_current', + 'interface_current', + 'iota', + 'oita', + 'mu', + 'pflux', + 'tflux', + 'helicity'] + + for profile in profiles: + with ScratchDir("."): + s = Spec.default_freeboundary(copy_to_pwd=True) + startdofs = len(s.x) + self.assertIsNone(s.__getattribute__(profile+'_profile')) + s.activate_profile(profile) + self.assertIsNotNone(s.__getattribute__(profile+'_profile')) + if profile in ['tflux', 'pflux', 'mu', 'oita', 'iota', 'helicity']: + # test that the 'mvol' length profiles have been increased by two + self.assertEqual(len(s.x), startdofs+2) + elif profile in ['volume_current', 'pressure']: + # test that the 'nvol' length profiles have been increased by one + self.assertEqual(len(s.x), startdofs+1) + elif profile in ['interface_current']: + # test that the surface current profile has not been increased + self.assertEqual(len(s.x), startdofs) + else: + raise ValueError(f"Profile {profile} not recognized") + + + def test_freeboundary_default(self): + """ + test the default freeboundary file, and re-set if Picard + iteration fails + """ + with ScratchDir("."): + s = Spec.default_freeboundary(copy_to_pwd=True) + startingboundary = np.copy(s.inputlist.bns) + # run sucessfully as default should be converged + s.run() + # ask to generate guess, not enough freeboundary iterations + s.inputlist.linitialize = 2 + s.inputlist.lautoinitbn = 1 + s.inputlist.mfreeits = 2 + s.recompute_bell() + try: + s.run() + except ObjectiveFailure: + self.assertTrue(np.all(s.inputlist.bns == startingboundary)) + else: + raise ValueError("ObjectiveFailure not raised") + # give enough freeboundary iterations, let ir run successfully + s.inputlist.mfreeits = 10 + s.recompute_bell() + s.run() + + def test_array_translator(self): + """ + Test the array_translator method to convert a SPEC style array to simsopt style array. + """ + spec = Spec() + array = spec.inputlist.rbc + translator = spec.array_translator(array) + translator2 = spec.array_translator(array, style='spec') + translator3 = spec.array_translator(translator.as_simsopt, style='simsopt') + + self.assertTrue(np.all(array == translator.as_spec)) + self.assertTrue(np.all(array == translator2.as_spec)) + self.assertTrue(np.all(array == translator3.as_spec)) + self.assertTrue(np.all(translator.as_simsopt == translator2.as_simsopt)) + self.assertTrue(np.all(translator2.as_simsopt == translator3.as_simsopt)) + # test that the shape of the array is correct: + self.assertEqual(translator2.as_simsopt.shape, (spec.inputlist.ntor+1, (2*spec.inputlist.mpol)+1)) + + def test_poloidal_current_amperes(self): + """ + Test the poloidal current in amperes + """ + filename = os.path.join(TEST_DIR, 'RotatingEllipse_Nvol8.sp') + s = Spec(filename) + self.assertAlmostEqual(s.poloidal_current_amperes, s.inputlist.curpol/mu_0) + def test_integrated_stellopt_scenarios_1dof(self): """ This script implements the "1DOF_circularCrossSection_varyR0_targetVolume" diff --git a/tests/mhd/test_vmec_diagnostics.py b/tests/mhd/test_vmec_diagnostics.py index 82a5c545e..a65400e0b 100755 --- a/tests/mhd/test_vmec_diagnostics.py +++ b/tests/mhd/test_vmec_diagnostics.py @@ -490,6 +490,142 @@ def test_compare_to_desc(self): np.testing.assert_allclose(simsopt_data.grad_psi_dot_grad_psi, desc_data, rtol=0.005, atol=0.0005) + def test_derivatives(self): + """ + Compare some of the derivatives to finite differences. + """ + vmec = Vmec(os.path.join(TEST_DIR, "wout_LandremanPaul2021_QA_lowres.nc")) + + ds = 0.01 + s = [1.0 - ds, 1.0] + ntheta = 100 + nphi = 102 + theta = np.linspace(0, 2 * np.pi, ntheta, endpoint=False) + phi = np.linspace(0, 2 * np.pi / vmec.wout.nfp, nphi, endpoint=False) + dtheta = theta[1] - theta[0] + dphi = phi[1] - phi[0] + + def d_d_theta(f): + return (np.roll(f, -1, axis=1) - np.roll(f, 1, axis=1)) / (2 * dtheta) + + def d_d_phi(f): + return (np.roll(f, -1, axis=2) - np.roll(f, 1, axis=2)) / (2 * dphi) + + def d2_d_theta2(f): + return (np.roll(f, -1, axis=1) - 2 * f + np.roll(f, 1, axis=1)) / (dtheta**2) + + def d2_d_phi2(f): + return (np.roll(f, -1, axis=2) - 2 * f + np.roll(f, 1, axis=2)) / (dphi**2) + + def d_d_s(f): + return (f[1, :, :] - f[0, :, :]) / ds + + def s_mean(f): + # Average over the two surfaces + return 0.5 * (f[0, :, :] + f[1, :, :]) + + data = vmec_compute_geometry(vmec, s, theta, phi) + + np.testing.assert_allclose(data.d_R_d_theta_vmec, d_d_theta(data.R), atol=3e-3) + np.testing.assert_allclose(data.d2_R_d_theta_vmec_d_phi, d_d_theta(d_d_phi(data.R)), atol=2e-3) + np.testing.assert_allclose(data.d2_Z_d_theta_vmec_d_phi, d_d_theta(d_d_phi(data.Z)), atol=2e-3) + np.testing.assert_allclose(data.d2_R_d_theta_vmec2, d2_d_theta2(data.R), atol=4e-4) + np.testing.assert_allclose(data.d2_Z_d_theta_vmec2, d2_d_theta2(data.Z), atol=3e-4) + np.testing.assert_allclose(data.d2_R_d_phi2, d2_d_phi2(data.R), atol=2e-3) + np.testing.assert_allclose(data.d2_Z_d_phi2, d2_d_phi2(data.Z), atol=2e-3) + np.testing.assert_allclose(s_mean(data.d2_R_d_s_d_phi), d_d_s(data.d_R_d_phi), atol=3e-6) + np.testing.assert_allclose(s_mean(data.d2_Z_d_s_d_phi), d_d_s(data.d_Z_d_phi), atol=2e-6) + np.testing.assert_allclose(s_mean(data.d2_R_d_s_d_theta_vmec), d_d_s(data.d_R_d_theta_vmec), atol=2e-6) + np.testing.assert_allclose(s_mean(data.d2_Z_d_s_d_theta_vmec), d_d_s(data.d_Z_d_theta_vmec), atol=2e-6) + + np.testing.assert_allclose(data.d_B_sup_theta_vmec_d_theta_vmec, d_d_theta(data.B_sup_theta_vmec), atol=2e-2) + np.testing.assert_allclose(data.d_B_sup_theta_vmec_d_phi, d_d_phi(data.B_sup_theta_vmec), atol=4e-3) + np.testing.assert_allclose(data.d_B_sup_phi_d_theta_vmec, d_d_theta(data.B_sup_phi), atol=8e-3) + np.testing.assert_allclose(data.d_B_sup_phi_d_phi, d_d_phi(data.B_sup_phi), atol=8e-4) + np.testing.assert_allclose(s_mean(data.d_B_sup_phi_d_s), d_d_s(data.B_sup_phi), atol=6e-6) + np.testing.assert_allclose(s_mean(data.d_B_sup_theta_vmec_d_s), d_d_s(data.B_sup_theta_vmec), atol=4e-5) + + if False: + # f_an = np.squeeze(data.d2_R_d_phi2)[1, :, :] + # f_fd = np.squeeze(d2_d_phi2(data.R))[1, :, :] + f_an = s_mean(data.d2_R_d_s_d_theta_vmec) + f_fd = d_d_s(data.d_R_d_theta_vmec) + import matplotlib.pyplot as plt + plt.figure(figsize=(14, 7)) + nrows = 1 + ncols = 3 + ncontours = 25 + + plt.subplot(nrows, ncols, 1) + plt.contour(phi, theta, f_an, ncontours) + plt.colorbar() + plt.title("analytic") + + plt.subplot(nrows, ncols, 2) + plt.contour(phi, theta, f_fd, ncontours) + plt.colorbar() + plt.title("finite diff") + + plt.subplot(nrows, ncols, 3) + plt.contour(phi, theta, f_an - f_fd, ncontours) + plt.colorbar() + plt.title("diff") + + plt.tight_layout() + plt.show() + + def test_L_grad_B_regression(self): + """ + Compare L_{grad B} to an indepedent calculation in Matt Landreman's + Matlab code m20240601_01_gradBTensorComplexityMetricForVMEC.m + """ + vmec = Vmec(os.path.join(TEST_DIR, "wout_LandremanPaul2021_QA_lowres.nc")) + + s = 1.0 + ntheta = 9 + nphi = 7 + theta = np.linspace(0, 2 * np.pi, ntheta, endpoint=True) + phi = np.linspace(0, 2 * np.pi / vmec.wout.nfp, nphi, endpoint=True) + + data = vmec_compute_geometry(vmec, s, theta, phi) + + matlab_data = np.array([ + [0.777048118791033, 0.850059335051267, 1.058251880937882, 1.238755906102585, 1.058251880937882, 0.850059335051267, 0.777048118791033], + [0.732357468770512, 0.887635027604753, 1.100038034467113, 1.149372447382607, 0.914652536061020, 0.732423846297739, 0.732357468770512], + [0.642772279126891, 0.810075234122540, 1.009506601358511, 1.036192879128092, 0.822941521630497, 0.638233465781766, 0.642772279126891], + [0.561114055795734, 0.718502389029629, 0.920071594222606, 0.997769685332234, 0.817986738735225, 0.595098001722719, 0.561114055795734], + [0.520891960189527, 0.633214068787356, 0.866980355399107, 0.967856711826989, 0.866980355399108, 0.633214068787355, 0.520891960189527], + [0.561114055795734, 0.595098001722719, 0.817986738735225, 0.997769685332234, 0.920071594222606, 0.718502389029630, 0.561114055795734], + [0.642772279126891, 0.638233465781766, 0.822941521630497, 1.036192879128092, 1.009506601358511, 0.810075234122540, 0.642772279126891], + [0.732357468770512, 0.732423846297739, 0.914652536061019, 1.149372447382608, 1.100038034467113, 0.887635027604753, 0.732357468770512], + [0.777048118791033, 0.850059335051268, 1.058251880937882, 1.238755906102585, 1.058251880937882, 0.850059335051267, 0.777048118791033], + ]) + + np.testing.assert_allclose(np.squeeze(data.L_grad_B), matlab_data, rtol=7e-3) + + # Trace of the grad \vec{B} tensor is div(B), which should be 0. + div_B = data.grad_B__XX + data.grad_B__YY + data.grad_B__ZZ + np.testing.assert_allclose(div_B, 0, atol=4e-4) + + def test_L_grad_B_axisymmetry(self): + """ + For a purely toroidal magnetic field, L_{grad B} should equal the major radius. + """ + vmec = Vmec(os.path.join(TEST_DIR, "wout_purely_toroidal_field_reference.nc")) + + s = 1.0 + ntheta = 50 + nphi = 4 + theta = np.linspace(0, 2 * np.pi, ntheta, endpoint=True) + phi = np.linspace(0, 2 * np.pi / vmec.wout.nfp, nphi, endpoint=True) + + data = vmec_compute_geometry(vmec, s, theta, phi) + np.testing.assert_allclose(data.L_grad_B, data.R, rtol=1e-5) + + # Trace of the grad \vec{B} tensor is div(B), which should be 0. + div_B = data.grad_B__XX + data.grad_B__YY + data.grad_B__ZZ + np.testing.assert_allclose(div_B, 0, atol=3e-11) + class VmecFieldlinesTests(unittest.TestCase): def test_fieldline_grids(self): diff --git a/tests/objectives/test_utilities.py b/tests/objectives/test_utilities.py index 5357cd6cd..1c6414dd2 100644 --- a/tests/objectives/test_utilities.py +++ b/tests/objectives/test_utilities.py @@ -3,11 +3,13 @@ import numpy as np +from simsopt.geo import SurfaceXYZTensorFourier from simsopt.geo.curvexyzfourier import CurveXYZFourier from simsopt.geo.curveobjectives import CurveLength, LpCurveTorsion -from simsopt.objectives.utilities import MPIObjective, QuadraticPenalty +from simsopt.objectives.utilities import MPIObjective, QuadraticPenalty, MPIOptimizable from simsopt.geo import parameters from simsopt._core.json import GSONDecoder, GSONEncoder, SIMSON +from simsopt._core.util import parallel_loop_bounds parameters['jit'] = False try: from mpi4py import MPI @@ -61,10 +63,8 @@ def test_quadratic_penalty(self): with self.assertRaises(Exception): self.subtest_quadratic_penalty(curve, J.J()+0.1, 'NotInList') + @unittest.skipIf(MPI is None, "mpi4py not found") def test_mpi_objective(self): - if MPI is None: - print("skip test_mpi_objective") - return comm = MPI.COMM_WORLD c = self.create_curve() @@ -84,3 +84,32 @@ def test_mpi_objective(self): Jmpi1 = MPIObjective(Js1subset, comm, needs_splitting=False) assert abs(Jmpi1.J() - sum(J.J() for J in Js)/n) < 1e-14 assert np.sum(np.abs(Jmpi1.dJ() - sum(J.dJ() for J in Js)/n)) < 1e-14 + + @unittest.skipIf(MPI is None, "mpi4py not found") + def test_mpi_optimizable(self): + """ + This test checks that the `x` attribute of the surfaces is correctly communicated across the ranks. + """ + + comm = MPI.COMM_WORLD + for size in [1, 2, 3, 4, 5]: + surfaces = [SurfaceXYZTensorFourier(mpol=1, ntor=1, stellsym=True) for i in range(size)] + + equal_to = [] + for i in range(size): + x = np.zeros(surfaces[i].x.size) + x[:] = i + equal_to.append(x) + + startidx, endidx = parallel_loop_bounds(comm, len(surfaces)) + for idx in range(startidx, endidx): + surfaces[idx].x = equal_to[idx] + + mpi_surfaces = MPIOptimizable(surfaces, ["x"], comm) + for s, sx in zip(mpi_surfaces, equal_to): + np.testing.assert_allclose(s.x, sx, atol=1e-14) + + # this should raise an exception + mpi_surfaces = [SurfaceXYZTensorFourier(mpol=1, ntor=1, stellsym=True) for i in range(size)] + with self.assertRaises(Exception): + _ = MPIOptimizable(surfaces, ["y"], comm) diff --git a/tests/solve/test_least_squares.py b/tests/solve/test_least_squares.py index a2a04d77f..4896e1903 100755 --- a/tests/solve/test_least_squares.py +++ b/tests/solve/test_least_squares.py @@ -72,11 +72,12 @@ def test_solve_rosenbrock(self): """ with ScratchDir("."): for solver in solvers: - #for grad in [True, False]: - r = Rosenbrock() - prob = LeastSquaresProblem(0, 1, depends_on=r) - solver(prob) # , grad=grad) - self.assertAlmostEqual(prob.objective(), 0) + for save_residuals in [True, False]: + #for grad in [True, False]: + r = Rosenbrock() + prob = LeastSquaresProblem(0, 1, depends_on=r) + solver(prob, save_residuals=save_residuals) # , grad=grad) + self.assertAlmostEqual(prob.objective(), 0) if __name__ == "__main__": diff --git a/tests/test_files/input.purely_toroidal_field b/tests/test_files/input.purely_toroidal_field new file mode 100644 index 000000000..343d885d3 --- /dev/null +++ b/tests/test_files/input.purely_toroidal_field @@ -0,0 +1,37 @@ +! DSHAPE tokamak boundary shape from Hirshman and Whitson 1983, but with no pressure and iota ~ 0. +&INDATA + MGRID_FILE = 'NONE ' + LOPTIM = F + LSPECTRUM_DUMP = F + DELT = 0.9 + TCON0 = 2. + NFP = 1 + MPOL = 6 + NTOR = 0 + +! NS_ARRAY = 13 25 51 +! FTOL_ARRAY = 1e-20 1e-20 1e-11 +! NITER_ARRAY = 1000 1500 2000 + + NS_ARRAY = 13 25 51 101 + FTOL_ARRAY = 1e-20 1e-20 1e-20 1e-15 + NITER_ARRAY = 1000 1500 2000 30000 + +! NS_ARRAY = 13 25 51 101 150 201 +! FTOL_ARRAY = 1e-20 1e-20 1e-20 1e-20 1e-20 1e-14 +! NITER_ARRAY = 1000 1500 2000 2500 3000 30000 + + NSTEP = 200 + NVACSKIP = 3 + GAMMA = 0.00000000E+00 + PHIEDGE = 5.0 + CURTOR = 1.0 + SPRES_PED = 1.0000E+00 + NCURR = 0 + AM = 0.0 + AI = 1.0e-6 ! Add a tiny iota so the problem is not completely degenerate + AC = 0.0 + RBC(0, 0) = 3.510 ZBS(0, 0) = 0.000 + RBC(0, 1) = 1.000 ZBS(0, 1) = 1.470 + RBC(0, 2) = 0.106 ZBS(0, 2) = -0.160 + / diff --git a/tests/test_files/wout_purely_toroidal_field_reference.nc b/tests/test_files/wout_purely_toroidal_field_reference.nc new file mode 100644 index 000000000..5beb6f859 Binary files /dev/null and b/tests/test_files/wout_purely_toroidal_field_reference.nc differ