vmecpp 0.4.2__tar.gz → 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. {vmecpp-0.4.2 → vmecpp-0.4.3}/PKG-INFO +8 -6
  2. {vmecpp-0.4.2 → vmecpp-0.4.3}/README.md +3 -2
  3. {vmecpp-0.4.2 → vmecpp-0.4.3}/pyproject.toml +4 -3
  4. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/__init__.py +122 -43
  5. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/_pydantic_numpy.py +14 -19
  6. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/MODULE.bazel +1 -1
  7. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/util/util.h +18 -0
  8. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/free_boundary_base/free_boundary_base.h +8 -0
  9. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/handover_storage/handover_storage.h +3 -0
  10. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/ideal_mhd_model/ideal_mhd_model.cc +74 -35
  11. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/ideal_mhd_model/ideal_mhd_model.h +14 -10
  12. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/output_quantities.cc +12 -8
  13. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/output_quantities.h +5 -4
  14. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/vmec.cc +33 -23
  15. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/vmec.h +3 -4
  16. {vmecpp-0.4.2 → vmecpp-0.4.3}/.clang-format +0 -0
  17. {vmecpp-0.4.2 → vmecpp-0.4.3}/.clang-tidy +0 -0
  18. {vmecpp-0.4.2 → vmecpp-0.4.3}/.gitignore +0 -0
  19. {vmecpp-0.4.2 → vmecpp-0.4.3}/.gitmodules +0 -0
  20. {vmecpp-0.4.2 → vmecpp-0.4.3}/.pre-commit-config.yaml +0 -0
  21. {vmecpp-0.4.2 → vmecpp-0.4.3}/CITATION.cff +0 -0
  22. {vmecpp-0.4.2 → vmecpp-0.4.3}/CMakeLists.txt +0 -0
  23. {vmecpp-0.4.2 → vmecpp-0.4.3}/LICENSE.txt +0 -0
  24. {vmecpp-0.4.2 → vmecpp-0.4.3}/docker/Dockerfile +0 -0
  25. {vmecpp-0.4.2 → vmecpp-0.4.3}/docker/README.md +0 -0
  26. {vmecpp-0.4.2 → vmecpp-0.4.3}/environment.yml +0 -0
  27. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/CMakeLists.txt +0 -0
  28. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/CMakeLists.txt +0 -0
  29. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/__main__.py +0 -0
  30. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/_free_boundary.py +0 -0
  31. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/_util.py +0 -0
  32. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/.bazelrc +0 -0
  33. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/.bazelversion +0 -0
  34. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/.gitattributes +0 -0
  35. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/CMakeLists.txt +0 -0
  36. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/MODULE.bazel.lock +0 -0
  37. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/WORKSPACE.bazel +0 -0
  38. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/third_party/hdf5/BUILD.bazel +0 -0
  39. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/third_party/netcdf4/BUILD.bazel +0 -0
  40. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/CMakeLists.txt +0 -0
  41. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/file_io/BUILD.bazel +0 -0
  42. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/file_io/CMakeLists.txt +0 -0
  43. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/file_io/file_io.cc +0 -0
  44. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/file_io/file_io.h +0 -0
  45. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/file_io/file_io_test.cc +0 -0
  46. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/hdf5_io/BUILD.bazel +0 -0
  47. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/hdf5_io/CMakeLists.txt +0 -0
  48. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/hdf5_io/hdf5_io.cc +0 -0
  49. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/hdf5_io/hdf5_io.h +0 -0
  50. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/json_io/BUILD.bazel +0 -0
  51. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/json_io/CMakeLists.txt +0 -0
  52. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/json_io/json_io.cc +0 -0
  53. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/json_io/json_io.h +0 -0
  54. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/json_io/json_io_test.cc +0 -0
  55. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/BUILD.bazel +0 -0
  56. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/CMakeLists.txt +0 -0
  57. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/example_netcdf.nc +0 -0
  58. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/netcdf_io.cc +0 -0
  59. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/netcdf_io.h +0 -0
  60. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/netcdf_io/netcdf_io_test.cc +0 -0
  61. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/test_data/BUILD.bazel +0 -0
  62. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/test_data/empty.txt +0 -0
  63. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/test_data/lorem.txt +0 -0
  64. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/testing/BUILD.bazel +0 -0
  65. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/testing/CMakeLists.txt +0 -0
  66. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/testing/numerical_comparison_lib.cc +0 -0
  67. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/testing/numerical_comparison_lib.h +0 -0
  68. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/util/testing/numerical_comparison_test.cc +0 -0
  69. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/CMakeLists.txt +0 -0
  70. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/CMakeLists.txt +0 -0
  71. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_definition/BUILD.bazel +0 -0
  72. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_definition/CMakeLists.txt +0 -0
  73. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_definition/composed_types.h +0 -0
  74. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_lib/BUILD.bazel +0 -0
  75. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_lib/CMakeLists.txt +0 -0
  76. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_lib/composed_types_lib.cc +0 -0
  77. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_lib/composed_types_lib.h +0 -0
  78. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/composed_types_lib/composed_types_lib_test.cc +0 -0
  79. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/flow_control/BUILD.bazel +0 -0
  80. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/flow_control/CMakeLists.txt +0 -0
  81. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/flow_control/flow_control.cc +0 -0
  82. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/flow_control/flow_control.h +0 -0
  83. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_poloidal/BUILD.bazel +0 -0
  84. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_poloidal/CMakeLists.txt +0 -0
  85. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_poloidal/fourier_basis_fast_poloidal.cc +0 -0
  86. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_poloidal/fourier_basis_fast_poloidal.h +0 -0
  87. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_poloidal/fourier_basis_fast_poloidal_test.cc +0 -0
  88. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_toroidal/BUILD.bazel +0 -0
  89. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_toroidal/CMakeLists.txt +0 -0
  90. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_toroidal/fourier_basis_fast_toroidal.cc +0 -0
  91. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_toroidal/fourier_basis_fast_toroidal.h +0 -0
  92. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/fourier_basis_fast_toroidal/fourier_basis_fast_toroidal_test.cc +0 -0
  93. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_definition/BUILD.bazel +0 -0
  94. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_definition/CMakeLists.txt +0 -0
  95. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_definition/magnetic_configuration.h +0 -0
  96. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_lib/BUILD.bazel +0 -0
  97. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_lib/CMakeLists.txt +0 -0
  98. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_lib/magnetic_configuration_lib.cc +0 -0
  99. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_lib/magnetic_configuration_lib.h +0 -0
  100. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_configuration_lib/magnetic_configuration_lib_test.cc +0 -0
  101. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_field_provider/BUILD.bazel +0 -0
  102. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_field_provider/CMakeLists.txt +0 -0
  103. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_field_provider/magnetic_field_provider_lib.cc +0 -0
  104. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_field_provider/magnetic_field_provider_lib.h +0 -0
  105. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/magnetic_field_provider/magnetic_field_provider_lib_test.cc +0 -0
  106. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/BUILD.bazel +0 -0
  107. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/CMakeLists.txt +0 -0
  108. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/create_reference_mgrid.sh +0 -0
  109. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/makegrid_lib.cc +0 -0
  110. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/makegrid_lib.h +0 -0
  111. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/makegrid_lib/makegrid_lib_test.cc +0 -0
  112. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/sizes/BUILD.bazel +0 -0
  113. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/sizes/CMakeLists.txt +0 -0
  114. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/sizes/sizes.cc +0 -0
  115. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/sizes/sizes.h +0 -0
  116. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/util/BUILD.bazel +0 -0
  117. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/util/CMakeLists.txt +0 -0
  118. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/util/util.cc +0 -0
  119. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/util/util_test.cc +0 -0
  120. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/BUILD.bazel +0 -0
  121. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/CMakeLists.txt +0 -0
  122. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/boundary_from_json.cc +0 -0
  123. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/boundary_from_json.h +0 -0
  124. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/vmec_indata.cc +0 -0
  125. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/vmec_indata.h +0 -0
  126. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/common/vmec_indata/vmec_indata_test.cc +0 -0
  127. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/CMakeLists.txt +0 -0
  128. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/external_magnetic_field/BUILD.bazel +0 -0
  129. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/external_magnetic_field/CMakeLists.txt +0 -0
  130. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/external_magnetic_field/external_magnetic_field.cc +0 -0
  131. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/external_magnetic_field/external_magnetic_field.h +0 -0
  132. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/free_boundary_base/BUILD.bazel +0 -0
  133. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/free_boundary_base/CMakeLists.txt +0 -0
  134. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/laplace_solver/BUILD.bazel +0 -0
  135. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/laplace_solver/CMakeLists.txt +0 -0
  136. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/laplace_solver/laplace_solver.cc +0 -0
  137. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/laplace_solver/laplace_solver.h +0 -0
  138. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/mgrid_provider/BUILD.bazel +0 -0
  139. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/mgrid_provider/CMakeLists.txt +0 -0
  140. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/mgrid_provider/mgrid_provider.cc +0 -0
  141. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/mgrid_provider/mgrid_provider.h +0 -0
  142. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/nestor/BUILD.bazel +0 -0
  143. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/nestor/CMakeLists.txt +0 -0
  144. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/nestor/nestor.cc +0 -0
  145. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/nestor/nestor.h +0 -0
  146. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/regularized_integrals/BUILD.bazel +0 -0
  147. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/regularized_integrals/CMakeLists.txt +0 -0
  148. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/regularized_integrals/regularized_integrals.cc +0 -0
  149. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/regularized_integrals/regularized_integrals.h +0 -0
  150. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/singular_integrals/BUILD.bazel +0 -0
  151. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/singular_integrals/CMakeLists.txt +0 -0
  152. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/singular_integrals/singular_integrals.cc +0 -0
  153. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/singular_integrals/singular_integrals.h +0 -0
  154. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/singular_integrals/singular_integrals_test.cc +0 -0
  155. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry/BUILD.bazel +0 -0
  156. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry/CMakeLists.txt +0 -0
  157. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry/surface_geometry.cc +0 -0
  158. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry/surface_geometry.h +0 -0
  159. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry/surface_geometry_test.cc +0 -0
  160. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry_mockup/BUILD.bazel +0 -0
  161. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry_mockup/lcfs.SurfaceRZFourier.csv +0 -0
  162. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry_mockup/surface_geometry_mockup.cc +0 -0
  163. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/surface_geometry_mockup/surface_geometry_mockup.h +0 -0
  164. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/tangential_partitioning/BUILD.bazel +0 -0
  165. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/tangential_partitioning/CMakeLists.txt +0 -0
  166. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/tangential_partitioning/tangential_partitioning.cc +0 -0
  167. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/free_boundary/tangential_partitioning/tangential_partitioning.h +0 -0
  168. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/simsopt_compat/README.md +0 -0
  169. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/simsopt_compat/__init__.py +0 -0
  170. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/simsopt_compat/_indata_to_surfacerzfourier.py +0 -0
  171. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/CMakeLists.txt +0 -0
  172. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/BUILD.bazel +0 -0
  173. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/CMakeLists.txt +0 -0
  174. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/boundaries.cc +0 -0
  175. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/boundaries.h +0 -0
  176. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/guess_magnetic_axis.cc +0 -0
  177. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/boundaries/guess_magnetic_axis.h +0 -0
  178. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_coefficients/BUILD.bazel +0 -0
  179. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_coefficients/CMakeLists.txt +0 -0
  180. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_coefficients/fourier_coefficients.cc +0 -0
  181. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_coefficients/fourier_coefficients.h +0 -0
  182. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_forces/BUILD.bazel +0 -0
  183. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_forces/CMakeLists.txt +0 -0
  184. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_forces/fourier_forces.cc +0 -0
  185. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_forces/fourier_forces.h +0 -0
  186. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_geometry/BUILD.bazel +0 -0
  187. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_geometry/CMakeLists.txt +0 -0
  188. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_geometry/fourier_geometry.cc +0 -0
  189. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_geometry/fourier_geometry.h +0 -0
  190. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_velocity/BUILD.bazel +0 -0
  191. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_velocity/CMakeLists.txt +0 -0
  192. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_velocity/fourier_velocity.cc +0 -0
  193. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/fourier_velocity/fourier_velocity.h +0 -0
  194. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/handover_storage/BUILD.bazel +0 -0
  195. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/handover_storage/CMakeLists.txt +0 -0
  196. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/handover_storage/handover_storage.cc +0 -0
  197. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/ideal_mhd_model/BUILD.bazel +0 -0
  198. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/ideal_mhd_model/CMakeLists.txt +0 -0
  199. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/ideal_mhd_model/dft_data.h +0 -0
  200. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/BUILD.bazel +0 -0
  201. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/CMakeLists.txt +0 -0
  202. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/output_quantities_io_test.cc +0 -0
  203. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/output_quantities_test.cc +0 -0
  204. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/output_quantities/test_helpers.h +0 -0
  205. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/profile_parameterization_data/BUILD.bazel +0 -0
  206. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/profile_parameterization_data/CMakeLists.txt +0 -0
  207. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/profile_parameterization_data/profile_parameterization_data.cc +0 -0
  208. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/profile_parameterization_data/profile_parameterization_data.h +0 -0
  209. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/.gitignore +0 -0
  210. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/BUILD.bazel +0 -0
  211. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/pybind_vmec.cc +0 -0
  212. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/vmec_indata_pywrapper.cc +0 -0
  213. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/vmec_indata_pywrapper.h +0 -0
  214. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/pybind11/vmec_indata_pywrapper_test.cc +0 -0
  215. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_partitioning/BUILD.bazel +0 -0
  216. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_partitioning/CMakeLists.txt +0 -0
  217. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_partitioning/radial_partitioning.cc +0 -0
  218. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_partitioning/radial_partitioning.h +0 -0
  219. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_partitioning/radial_partitioning_test.cc +0 -0
  220. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_profiles/BUILD.bazel +0 -0
  221. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_profiles/CMakeLists.txt +0 -0
  222. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_profiles/radial_profiles.cc +0 -0
  223. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/radial_profiles/radial_profiles.h +0 -0
  224. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/thread_local_storage/BUILD.bazel +0 -0
  225. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/thread_local_storage/CMakeLists.txt +0 -0
  226. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/thread_local_storage/thread_local_storage.cc +0 -0
  227. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/thread_local_storage/thread_local_storage.h +0 -0
  228. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/BUILD.bazel +0 -0
  229. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/CMakeLists.txt +0 -0
  230. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/vmec_in_memory_mgrid_test.cc +0 -0
  231. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec/vmec_test.cc +0 -0
  232. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_constants/BUILD.bazel +0 -0
  233. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_constants/CMakeLists.txt +0 -0
  234. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_constants/vmec_constants.cc +0 -0
  235. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_constants/vmec_constants.h +0 -0
  236. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_standalone/BUILD.bazel +0 -0
  237. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/cpp/vmecpp/vmec/vmec_standalone/vmec_standalone.cc +0 -0
  238. {vmecpp-0.4.2 → vmecpp-0.4.3}/src/vmecpp/simsopt_compat.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vmecpp
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Proxima Fusion's reimplementation of the Variational Moments Equilibrium Code (VMEC), a free-boundary ideal-MHD equilibrium solver for stellarators and Tokamaks.
5
5
  Author-Email: Jonathan Schilling <jons@proximafusion.com>, Enrico Guiraud <eguiraud@proximafusion.com>, Philipp Jurasic <jurasic@proximafusion.com>
6
6
  License-Expression: MIT
@@ -20,9 +20,10 @@ Project-URL: Source, https://github.com/proximafusion/vmecpp
20
20
  Requires-Python: >=3.10
21
21
  Requires-Dist: netCDF4
22
22
  Requires-Dist: numpy
23
- Requires-Dist: pydantic
24
- Requires-Dist: jaxtyping
25
- Requires-Dist: jax<=0.5.0
23
+ Requires-Dist: pydantic>=2.11
24
+ Requires-Dist: jaxtyping>=0.2.6
25
+ Requires-Dist: jax!=0.5.2
26
+ Requires-Dist: jax!=0.5.1
26
27
  Requires-Dist: simsopt>=1.8.1
27
28
  Provides-Extra: test
28
29
  Requires-Dist: pytest; extra == "test"
@@ -56,6 +57,7 @@ Description-Content-Type: text/markdown
56
57
 
57
58
  [![CI](https://github.com/proximafusion/vmecpp/actions/workflows/tests.yaml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/tests.yaml)
58
59
  [![C++ core tests](https://github.com/proximafusion/vmecpp/actions/workflows/test_bazel.yaml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/test_bazel.yaml)
60
+ [![Publish wheels to PyPI](https://github.com/proximafusion/vmecpp/actions/workflows/pypi_publish.yml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/pypi_publish.yml)
59
61
 
60
62
  VMEC++ is a Python-friendly, from-scratch reimplementation in C++ of the Variational Moments Equilibrium Code (VMEC),
61
63
  a free-boundary ideal-MHD equilibrium solver for stellarators and tokamaks.
@@ -128,7 +130,7 @@ print(vmec_output.mercier.iota)
128
130
  vmec_output.wout.save("wout_w7x.nc")
129
131
  ```
130
132
 
131
- Note that other output files are planned to be accessible via members of the `output` object called `threed1`, `jxbout` and `mercier` soon.
133
+ All other output files are accessible via members of the `output` object called `threed1_volumetrics`, `jxbout` and `mercier`.
132
134
 
133
135
  ### With SIMSOPT
134
136
 
@@ -369,7 +371,7 @@ VMEC++:
369
371
  ## Roadmap
370
372
 
371
373
  Some of the things we are planning for VMEC++'s future:
372
- - [ ] free-boundary hot-restart in Python
374
+ - [x] free-boundary hot-restart in Python
373
375
  - [X] open-sourcing the full VMEC++ test suite (including the Verification&Validation part that compares `wout` contents)
374
376
  - [x] open-sourcing the source code to reproduce VMEC++'s performance benchmarks
375
377
  - [ ] VMEC++ usable as a C++ bazel module
@@ -19,6 +19,7 @@
19
19
 
20
20
  [![CI](https://github.com/proximafusion/vmecpp/actions/workflows/tests.yaml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/tests.yaml)
21
21
  [![C++ core tests](https://github.com/proximafusion/vmecpp/actions/workflows/test_bazel.yaml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/test_bazel.yaml)
22
+ [![Publish wheels to PyPI](https://github.com/proximafusion/vmecpp/actions/workflows/pypi_publish.yml/badge.svg)](https://github.com/proximafusion/vmecpp/actions/workflows/pypi_publish.yml)
22
23
 
23
24
  VMEC++ is a Python-friendly, from-scratch reimplementation in C++ of the Variational Moments Equilibrium Code (VMEC),
24
25
  a free-boundary ideal-MHD equilibrium solver for stellarators and tokamaks.
@@ -91,7 +92,7 @@ print(vmec_output.mercier.iota)
91
92
  vmec_output.wout.save("wout_w7x.nc")
92
93
  ```
93
94
 
94
- Note that other output files are planned to be accessible via members of the `output` object called `threed1`, `jxbout` and `mercier` soon.
95
+ All other output files are accessible via members of the `output` object called `threed1_volumetrics`, `jxbout` and `mercier`.
95
96
 
96
97
  ### With SIMSOPT
97
98
 
@@ -332,7 +333,7 @@ VMEC++:
332
333
  ## Roadmap
333
334
 
334
335
  Some of the things we are planning for VMEC++'s future:
335
- - [ ] free-boundary hot-restart in Python
336
+ - [x] free-boundary hot-restart in Python
336
337
  - [X] open-sourcing the full VMEC++ test suite (including the Verification&Validation part that compares `wout` contents)
337
338
  - [x] open-sourcing the source code to reproduce VMEC++'s performance benchmarks
338
339
  - [ ] VMEC++ usable as a C++ bazel module
@@ -30,9 +30,10 @@ classifiers = [
30
30
  dependencies = [
31
31
  "netCDF4",
32
32
  "numpy",
33
- "pydantic",
34
- "jaxtyping",
35
- "jax<=0.5.0", # To prevent a circular import bug in jax on arch Linux
33
+ "pydantic>=2.11", # Introduced support for by_alias validation
34
+ "jaxtyping>=0.2.6",
35
+ "jax!=0.5.2", # To prevent a circular import bug in jax on arch Linux
36
+ "jax!=0.5.1", # To prevent a circular import bug in jax on arch Linux
36
37
  "simsopt>=1.8.1",
37
38
  ]
38
39
 
@@ -38,10 +38,10 @@ SerializableSparseCoefficientArray: typing.TypeAlias = typing.Annotated[
38
38
  ),
39
39
  pydantic.BeforeValidator(_util.sparse_to_dense_coefficients_implicit),
40
40
  ]
41
- SerializeInt32AsFloat: typing.TypeAlias = typing.Annotated[
41
+ SerializeIntAsFloat: typing.TypeAlias = typing.Annotated[
42
42
  _ArrayType,
43
- pydantic.PlainSerializer(lambda x: x.astype(np.float64)),
44
- pydantic.BeforeValidator(lambda x: x.astype(np.int32)),
43
+ pydantic.PlainSerializer(lambda x: np.array(x).astype(np.float64).tolist()),
44
+ pydantic.BeforeValidator(lambda x: np.array(x).astype(np.int64)),
45
45
  ]
46
46
 
47
47
  AuxFType = typing.Annotated[
@@ -85,7 +85,8 @@ class VmecInput(BaseModelWithNumpy):
85
85
  lasym: bool
86
86
  """Flag to indicate non-stellarator-symmetry.
87
87
 
88
- Note: this flag is False if stellarator symmetry is present, True if not.
88
+ - False, assumes stellarator symmetry (only cosine/sine coefficients used).
89
+ - True, (currently unsupported) allows for non-stellarator-symmetric terms.
89
90
  """
90
91
 
91
92
  nfp: int
@@ -99,15 +100,24 @@ class VmecInput(BaseModelWithNumpy):
99
100
  ntor-1, ntor."""
100
101
 
101
102
  ntheta: int
102
- """Number of poloidal grid points; if odd: is rounded to next smaller even
103
- number."""
103
+ """Number of poloidal grid points (ntheta >= 0).
104
+
105
+ Controls the poloidal resolution in real space. If 0, chosen automatically as
106
+ minimally allowed. Must be at least 2*mpol + 6.
107
+ """
104
108
 
105
109
  nzeta: int
106
- """Number of toroidal grid points; must match nzeta of mgrid file if using free-
107
- boundary."""
110
+ """Number of toroidal grid points (nzeta >= 0).
111
+
112
+ Controls the toroidal resolution in real space. If 0, chosen automatically as
113
+ minimally allowed. Must be at least 2*ntor + 4.
114
+ """
108
115
 
109
116
  ns_array: jt.Int[np.ndarray, "num_grids"]
110
- """Number of flux surfaces per multigrid step."""
117
+ """Number of flux surfaces per multigrid step.
118
+
119
+ Each entry >= 3 and >= previous entry.
120
+ """
111
121
 
112
122
  ftol_array: jt.Float[np.ndarray, "num_grids"]
113
123
  """Requested force tolerance for convergence per multigrid step."""
@@ -116,16 +126,28 @@ class VmecInput(BaseModelWithNumpy):
116
126
  """Maximum number of iterations per multigrid step."""
117
127
 
118
128
  phiedge: float
119
- """Total enclosed toroidal magnetic flux in Vs == Wb."""
129
+ """Total enclosed toroidal magnetic flux in Vs == Wb.
130
+
131
+ - In fixed-boundary, this determines the magnetic field strength.
132
+ - In free-boundary, the magnetic field strength is given externally,
133
+ so this determines cross-section area and volume of the plasma.
134
+ """
120
135
 
121
136
  ncurr: typing.Literal[0, 1]
122
- """Select constraint on iota or enclosed toroidal current profiles 0: constrained-iota; 1: constrained-current"""
137
+ """Select constraint on iota or enclosed toroidal current profiles.
138
+
139
+ - 0: constrained-iota (rotational transform profile specified)
140
+ - 1: constrained-current (toroidal current profile specified)
141
+ """
123
142
 
124
143
  pmass_type: ProfileType
125
144
  """Parametrization of mass/pressure profile."""
126
145
 
127
146
  am: jt.Float[np.ndarray, "am_len"]
128
- """Mass/pressure profile coefficients."""
147
+ """Mass/pressure profile coefficients.
148
+
149
+ Units: Pascals for pressure.
150
+ """
129
151
 
130
152
  am_aux_s: jt.Float[np.ndarray, "am_aux_len"]
131
153
  """Spline mass/pressure profile: knot locations in s"""
@@ -137,13 +159,20 @@ class VmecInput(BaseModelWithNumpy):
137
159
  """Global scaling factor for mass/pressure profile."""
138
160
 
139
161
  gamma: float
140
- """Adiabatic index."""
162
+ """Adiabatic index (ratio of specific heats).
163
+
164
+ Specifying 0 implies that the pressure profile is specified. For all other values,
165
+ the mass profile is specified.
166
+ """
141
167
 
142
168
  spres_ped: float
143
- """Location of pressure pedestal in s."""
169
+ """Location of pressure pedestal in s.
170
+
171
+ Outside this radial location, pressure is constant.
172
+ """
144
173
 
145
174
  piota_type: ProfileType
146
- """Parametrization of iota profile."""
175
+ """Parametrization of iota (rotational transform) profile."""
147
176
 
148
177
  ai: jt.Float[np.ndarray, "ai_len"]
149
178
  """Iota profile coefficients."""
@@ -155,7 +184,14 @@ class VmecInput(BaseModelWithNumpy):
155
184
  """Spline iota profile: values at knots"""
156
185
 
157
186
  pcurr_type: ProfileType
158
- """Parametrization of toroidal current profile."""
187
+ """Parametrization of toroidal current profile.
188
+
189
+ One of: 'power_series', 'power_series_i', 'gauss_trunc', 'sum_atan', 'two_power',
190
+ 'two_power_gs', 'akima_spline_i', 'akima_spline_ip', 'cubic_spline_i',
191
+ 'cubic_spline_ip', 'pedestal', 'rational', 'line_segment_i', 'line_segment_ip',
192
+ 'sum_cossq_s', 'sum_cossq_sqrts', 'sum_cossq_s_free'.
193
+ Default: 'power_series'.
194
+ """
159
195
 
160
196
  ac: jt.Float[np.ndarray, "ac_len"]
161
197
  """Enclosed toroidal current profile coefficients."""
@@ -167,16 +203,25 @@ class VmecInput(BaseModelWithNumpy):
167
203
  """Spline toroidal current profile: values at knots"""
168
204
 
169
205
  curtor: float
170
- """Toroidal current in A."""
206
+ """Toroidal current in A.
207
+
208
+ Net toroidal current. The toroidal current profile is scaled to yield this total.
209
+ """
171
210
 
172
211
  bloat: float
173
212
  """Bloating factor (for constrained toroidal current)"""
174
213
 
175
214
  lfreeb: bool
176
- """Flag to indicate free-boundary."""
215
+ """Flag to indicate free-boundary.
216
+
217
+ If True, run in free-boundary mode; if False, fixed-boundary.
218
+ """
177
219
 
178
220
  mgrid_file: typing.Annotated[str, pydantic.Field(max_length=200)]
179
- """Full path for vacuum Green's function data."""
221
+ """Full path for vacuum Green's function data.
222
+
223
+ NetCDF MGRID file with magnetic field response factors for external coils.
224
+ """
180
225
 
181
226
  extcur: jt.Float[np.ndarray, "ext_current"]
182
227
  """Coil currents in A."""
@@ -185,7 +230,7 @@ class VmecInput(BaseModelWithNumpy):
185
230
  """Number of iterations between full vacuum calculations."""
186
231
 
187
232
  nstep: int
188
- """Printout interval."""
233
+ """Printout interval at which convergence progress is logged."""
189
234
 
190
235
  aphi: jt.Float[np.ndarray, "aphi_len"]
191
236
  """Radial flux zoning profile coefficients."""
@@ -206,16 +251,28 @@ class VmecInput(BaseModelWithNumpy):
206
251
  """
207
252
 
208
253
  raxis_c: jt.Float[np.ndarray, "ntor_plus_1"]
209
- """Magnetic axis coefficients for R ~ cos(n*v); stellarator-symmetric."""
254
+ """Magnetic axis coefficients for R ~ cos(n*v); stellarator-symmetric.
255
+
256
+ At least 1 value required, up to n=ntor considered.
257
+ """
210
258
 
211
259
  zaxis_s: jt.Float[np.ndarray, "ntor_plus_1"]
212
- """Magnetic axis coefficients for Z ~ sin(n*v); stellarator-symmetric."""
260
+ """Magnetic axis coefficients for Z ~ sin(n*v); stellarator-symmetric.
261
+
262
+ Up to n=ntor considered; first entry (n=0) is ignored.
263
+ """
213
264
 
214
265
  raxis_s: jt.Float[np.ndarray, "ntor_plus_1"] | None = None
215
- """Magnetic axis coefficients for R ~ sin(n*v); non-stellarator-symmetric."""
266
+ """Magnetic axis coefficients for R ~ sin(n*v); non-stellarator-symmetric.
267
+
268
+ Up to n=ntor considered; first entry (n=0) is ignored. Only used if lasym=True.
269
+ """
216
270
 
217
271
  zaxis_c: jt.Float[np.ndarray, "ntor_plus_1"] | None = None
218
- """Magnetic axis coefficients for Z ~ cos(n*v); non-stellarator-symmetric."""
272
+ """Magnetic axis coefficients for Z ~ cos(n*v); non-stellarator-symmetric.
273
+
274
+ Only used if lasym=True.
275
+ """
219
276
 
220
277
  rbc: SerializableSparseCoefficientArray[
221
278
  jt.Float[np.ndarray, "mpol two_ntor_plus_one"]
@@ -233,7 +290,10 @@ class VmecInput(BaseModelWithNumpy):
233
290
  ]
234
291
  | None
235
292
  ) = None
236
- """Boundary coefficients for R ~ sin(m*u - n*v); non-stellarator-symmetric"""
293
+ """Boundary coefficients for R ~ sin(m*u - n*v); non-stellarator-symmetric.
294
+
295
+ Only used if lasym=True.
296
+ """
237
297
 
238
298
  zbc: (
239
299
  SerializableSparseCoefficientArray[
@@ -241,25 +301,32 @@ class VmecInput(BaseModelWithNumpy):
241
301
  ]
242
302
  | None
243
303
  ) = None
244
- """Boundary coefficients for Z ~ cos(m*u - n*v); non-stellarator-symmetric"""
304
+ """Boundary coefficients for Z ~ cos(m*u - n*v); non-stellarator-symmetric.
305
+
306
+ Only used if lasym=True.
307
+ """
245
308
 
246
309
  @pydantic.model_validator(mode="after")
247
310
  def _validate_fourier_coefficients_shapes(self) -> VmecInput:
248
311
  """All geometry coefficients need to have the shape (mpol, 2*ntor+1), wit 'rbs',
249
312
  'zbc' only populated for non-stellarator symmetric configurations."""
250
313
  mpol_two_ntor_plus_one_fields = ["rbc", "zbs"]
251
- mpol_two_ntor_plus_one_fields_lasym = ["rbs", "zbc"]
252
314
  if self.lasym:
253
- mpol_two_ntor_plus_one_fields.extend(mpol_two_ntor_plus_one_fields_lasym)
315
+ mpol_two_ntor_plus_one_fields.extend(["rbs", "zbc"])
254
316
 
255
317
  expected_shape = (self.mpol, 2 * self.ntor + 1)
256
318
  for field in mpol_two_ntor_plus_one_fields:
257
319
  shape = np.shape(getattr(self, field))
258
320
  if shape != expected_shape:
259
- msg = f"{field} has shape {shape} instead of the expected {expected_shape}."
260
- "Please resize your coefficient array using vmecpp.VmecInput.resize_2d_coeff"
261
- f"({field}, {self.mpol}, {self.ntor}) to match mpol={self.mpol} or ntor={self.ntor}"
262
- raise ValueError(msg)
321
+ setattr(
322
+ self,
323
+ field,
324
+ VmecInput.resize_2d_coeff(
325
+ getattr(self, field),
326
+ mpol_new=self.mpol,
327
+ ntor_new=self.ntor,
328
+ ),
329
+ )
263
330
  return self
264
331
 
265
332
  @pydantic.model_validator(mode="after")
@@ -322,6 +389,11 @@ class VmecInput(BaseModelWithNumpy):
322
389
 
323
390
  smaller_ntor = min(ntor, ntor_new)
324
391
  smaller_mpol = min(mpol, mpol_new)
392
+ if mpol_new < mpol or ntor_new < ntor:
393
+ logger.warning(
394
+ f"Discarding coefficients because mpol={mpol} or ntor={ntor} "
395
+ f"are smaller than mpol_new={mpol_new} or ntor_new={ntor_new}"
396
+ )
325
397
 
326
398
  for m in range(smaller_mpol):
327
399
  for n in range(-smaller_ntor, smaller_ntor + 1):
@@ -567,10 +639,10 @@ class VmecWOut(BaseModelWithNumpy):
567
639
  DMerc: jt.Float[np.ndarray, "n_surfaces"]
568
640
  equif: jt.Float[np.ndarray, "n_surfaces"]
569
641
  # In wout these are stored as float64, although they only take integer values.
570
- xm: SerializeInt32AsFloat[jt.Int[np.ndarray, "mn_mode"]]
571
- xn: SerializeInt32AsFloat[jt.Int[np.ndarray, "mn_mode"]]
572
- xm_nyq: SerializeInt32AsFloat[jt.Int[np.ndarray, "mn_mode_nyq"]]
573
- xn_nyq: SerializeInt32AsFloat[jt.Int[np.ndarray, "mn_mode_nyq"]]
642
+ xm: SerializeIntAsFloat[jt.Int[np.ndarray, "mn_mode"]]
643
+ xn: SerializeIntAsFloat[jt.Int[np.ndarray, "mn_mode"]]
644
+ xm_nyq: SerializeIntAsFloat[jt.Int[np.ndarray, "mn_mode_nyq"]]
645
+ xn_nyq: SerializeIntAsFloat[jt.Int[np.ndarray, "mn_mode_nyq"]]
574
646
  mass: jt.Float[np.ndarray, "n_surfaces"]
575
647
  buco: jt.Float[np.ndarray, "n_surfaces"]
576
648
  bvco: jt.Float[np.ndarray, "n_surfaces"]
@@ -609,7 +681,7 @@ class VmecWOut(BaseModelWithNumpy):
609
681
  jt.Float[np.ndarray, "ext_current"],
610
682
  pydantic.BeforeValidator(lambda x: x if np.shape(x) != () else np.array([])),
611
683
  pydantic.PlainSerializer(
612
- lambda x: x if x.shape != (0,) else netCDF4.default_fillvals["f8"]
684
+ lambda x: x if np.shape(x) != (0,) else netCDF4.default_fillvals["f8"]
613
685
  ),
614
686
  ]
615
687
  """Coil currents in A.
@@ -791,7 +863,8 @@ class VmecWOut(BaseModelWithNumpy):
791
863
  )
792
864
  string_variable[:] = padded_value_as_netcdf3_compatible_chararray
793
865
 
794
- elif field_type is np.ndarray:
866
+ elif field_type is np.ndarray or field_type is list:
867
+ value_array = np.array(value)
795
868
  if (
796
869
  field_info is not None # is a model field
797
870
  and field_info.annotation is not None # has an annotation
@@ -809,23 +882,29 @@ class VmecWOut(BaseModelWithNumpy):
809
882
  )
810
883
  else:
811
884
  # The dimensions are not annotated (must be an extra field)
812
- shape_string = tuple([f"dim_{dim:05d}" for dim in value.shape])
885
+ shape_string = tuple(
886
+ [f"dim_{dim:05d}" for dim in value_array.shape]
887
+ )
813
888
 
814
889
  for dim_name, dim_size in zip(
815
- shape_string, value.shape, strict=True
890
+ shape_string, value_array.shape, strict=True
816
891
  ):
817
892
  if dim_name not in fnc.dimensions:
818
893
  fnc.createDimension(dim_name, dim_size)
819
894
 
820
- dtype = value.dtype
895
+ dtype = value_array.dtype
896
+ if np.issubdtype(dtype, np.integer):
897
+ # wout format uses 32 bit integers, Python uses 64 bit by default
898
+ dtype = np.int32
899
+
821
900
  if len(shape_string) == 1:
822
901
  fnc.createVariable(field, dtype, shape_string)
823
902
  # Slice arrays that are padded in wout and unpadded in VMEC++
824
- fnc[field][: len(value)] = value
903
+ fnc[field][: len(value_array)] = value_array
825
904
  elif len(shape_string) == 2:
826
905
  # 2D arrays are transposed in Fortran, also reverse the dimension order
827
906
  fnc.createVariable(field, dtype, shape_string[::-1])
828
- fnc[field][:] = value.T
907
+ fnc[field][:] = value_array.T
829
908
  else:
830
909
  msg = f"Field {field} has an unsupported shape: {shape_string}"
831
910
  raise ValueError(msg)
@@ -21,15 +21,13 @@ class BaseModelWithNumpy(pydantic.BaseModel):
21
21
  model_config = pydantic.ConfigDict(
22
22
  arbitrary_types_allowed=True,
23
23
  # Serialize NaN and infinite floats as strings in JSON output.
24
- # See: https://docs.google.com/document/d/1fTvLrCl_tfjgud8SL7PVwhG28az0oy22gVa5wvqXSxY
25
- # for why.
26
24
  # Due to a bug in Pydantic, this setting is ignored by model_dump(mode="json"),
27
25
  # so we override it below to also convert values to string there.
28
26
  ser_json_inf_nan="strings",
29
27
  )
30
28
 
31
29
  @pydantic.field_serializer("*", mode="wrap", when_used="json")
32
- def _dapper_serialize_field(
30
+ def _serialize_field(
33
31
  self,
34
32
  value: typing.Any,
35
33
  default_handler: pydantic.SerializerFunctionWrapHandler,
@@ -42,7 +40,7 @@ class BaseModelWithNumpy(pydantic.BaseModel):
42
40
 
43
41
  @pydantic.field_validator("*", mode="wrap")
44
42
  @classmethod
45
- def _dapper_validate_field(
43
+ def _validate_field(
46
44
  cls,
47
45
  value: typing.Any,
48
46
  default_handler: pydantic.ValidatorFunctionWrapHandler,
@@ -75,7 +73,7 @@ class BaseModelWithNumpy(pydantic.BaseModel):
75
73
  return output_dict
76
74
 
77
75
 
78
- """This module handles special cases for serialization of DapperData types.
76
+ """This module handles special cases for serialization of BaseModelWithNumpy types.
79
77
 
80
78
  Any data type that pydantic cannot natively handle can be supported by
81
79
  adding a case in this module.
@@ -87,16 +85,16 @@ Before adding a special case to this module, consider one of these two alternati
87
85
 
88
86
  1) Wrap the type definition and add Pydantic serializers and validators directly:
89
87
  `Annotated[<type>, pydantic.PlainSerializer(...), pydantic.BeforeValidator(...)]`
90
- Example can be found here: dapper/examples/annotated_serialization.py
88
+ Example can be found here: vmecpp/src/vmecpp/__init__.py
91
89
 
92
- 2) Convert/wrap the unsupported class in a DapperData class and provide a
90
+ 2) Convert/wrap the unsupported class in a BaseModelWithNumpy class and provide a
93
91
  @pydantic.field_serializer and @pydantic.field_validator method on that class.
94
92
  See: https://docs.pydantic.dev/latest/concepts/serialization/#custom-serializers
95
93
 
96
94
  The advantage of adding a special case to this module is solely so types can be
97
- declared in DapperData classes "as-is" without wrapping them with Annotated types.
95
+ declared in BaseModelWithNumpy classes "as-is" without wrapping them with Annotated types.
98
96
  For example, you can declare `value: jt.Float[np.ndarray, ...]` instead of
99
- `value: dapper.NumpyArrayWrapper[...]`.
97
+ `value: NumpyArrayWrapper[...]`.
100
98
 
101
99
  ----
102
100
 
@@ -104,7 +102,7 @@ The mechanism for serialization is to convert "special" fields to JSON-serializa
104
102
  values and then let Pydantic take care of the rest.
105
103
  In practice:
106
104
  - If the field is "special", (e.g. `np.ndarray`) it is converted to either a primitive
107
- list or a `dapper.Blob`, depending on the presence of a `dapper.Binary` annotation.
105
+ list.
108
106
  - If the field is a generic/composed type such as a list, an optional or a union,
109
107
  recurse and do the same for the inner types.
110
108
  - Otherwise just return the field as is.
@@ -119,8 +117,9 @@ JAX array handling works as follows:
119
117
  - During serialization, JAX arrays are converted to numpy arrays and serialized with
120
118
  the same rules.
121
119
  - During validation, "jt.Array" annotations are NOT treated specially, thus only numpy
122
- arrays can be produced by the deserialization process. To put JAX arrays into Dapper
123
- types that should be serializable, they must be annotated with np.ndarray | jt.Array!
120
+ arrays can be produced by the deserialization process. To put JAX arrays into
121
+ BaseModelWithNumpy types that should be serializable, they must be annotated with
122
+ np.ndarray | jt.Array!
124
123
  """
125
124
  NpOrAbstractArray = np.ndarray | jt.AbstractArray
126
125
 
@@ -187,12 +186,10 @@ def _serialize_value(declared_type: type, value: Any, field_metadata: list[Any])
187
186
  declared_type: The innermost declared type of the field. Unused, since for
188
187
  serialization, the runtime type of the value is enough.
189
188
  value: The scalar value to serialize, that potentially needs special handling.
190
- field_metadata: The annotation metadata of the field, which may contain the
191
- `dapper.Binary` annotation.
192
189
 
193
190
  Returns:
194
- Any value that can be serialized by Pydantic, for example a `dapper.Blob`,
195
- a dict representation of the object, or a raw string.
191
+ Any value that can be serialized by Pydantic, for example a dict representation
192
+ of the object, or a raw string.
196
193
  Returns the unmodified value if no special handling applies.
197
194
  """
198
195
  if issubclass(declared_type, NpOrAbstractArray) and _is_arraylike(value):
@@ -295,7 +292,7 @@ def _traverse_field_contents(
295
292
  # happen to those and if more cases even exist, so let's be defensive and admit that
296
293
  # we don't know how to handle them ...
297
294
  if not isinstance(outer_type, type) and outer_type is not Union:
298
- msg = f"Dapper serialization does not know how to handle type {outer_type}! "
295
+ msg = f"BaseModelWithNumpy serialization does not know how to handle type {outer_type}! "
299
296
  raise NotImplementedError(msg)
300
297
 
301
298
  # - Union[T, TOther].
@@ -384,8 +381,6 @@ def sanitize_floats_in_container(value: list | dict) -> None:
384
381
  value[key] = _sanitize_float(item)
385
382
 
386
383
 
387
- # See: https://docs.google.com/document/d/1fTvLrCl_tfjgud8SL7PVwhG28az0oy22gVa5wvqXSxY
388
- # for the rationale behind representing these values as strings.
389
384
  def _sanitize_float(value: float) -> float | str:
390
385
  if np.isnan(value):
391
386
  return "NaN"
@@ -1,7 +1,7 @@
1
1
  # Find available modules at https://registry.bazel.build
2
2
 
3
3
  # NOTE: if updating the version, must also update src/vmecpp/__about__.py
4
- module(name = "vmecpp", version = "0.3.0")
4
+ module(name = "vmecpp", version = "0.4.2")
5
5
 
6
6
  bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1")
7
7
  bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
@@ -162,6 +162,24 @@ enum class VmecStatus : std::uint8_t {
162
162
  SUCCESSFUL_TERMINATION = 11
163
163
  };
164
164
 
165
+ enum class VacuumPressureState : std::int8_t {
166
+ // No vacuum pressure
167
+ kOff = -1,
168
+
169
+ // No vacuum pressure yet, force free-boundary update, but ignore the result
170
+ // in this force-balance computation.
171
+ kInitializing = 0,
172
+
173
+ // vacuum pressure turned on.
174
+ // soft restart equilibrium calculation by returning BAD_JACOBIAN in the
175
+ // process of reducing rCon0,zCon0 *= 0.9;
176
+ kInitialized = 1,
177
+
178
+ // vacuum pressure turned on
179
+ // in the process of reducing rCon0,zCon0 *= 0.9;
180
+ kActive = 2
181
+ };
182
+
165
183
  int VmecStatusCode(const VmecStatus vmec_status);
166
184
 
167
185
  std::string VmecStatusAsString(const VmecStatus vmec_status);
@@ -58,10 +58,18 @@ class FreeBoundaryBase {
58
58
  SurfaceGeometry sg_;
59
59
  ExternalMagneticField ef_;
60
60
 
61
+ // [nZnT] vacuum magnetic pressure |B_vac^2|/2 at the plasma boundary
62
+ // Points to vacuum_magnetic_pressure in HandoverStorage
61
63
  std::span<double> bSqVacShare;
62
64
 
65
+ // [nZnT] cylindrical B^R of Nestor's vacuum magnetic field
66
+ // Points to vacuum_b_r in HandoverStorage
63
67
  std::span<double> vacuum_b_r_share_;
68
+ // [nZnT] cylindrical B^phi of Nestor's vacuum magnetic field
69
+ // Points to vacuum_b_phi in HandoverStorage
64
70
  std::span<double> vacuum_b_phi_share_;
71
+ // [nZnT] cylindrical B^Z of Nestor's vacuum magnetic field
72
+ // Points to vacuum_b_z in HandoverStorage
65
73
  std::span<double> vacuum_b_z_share_;
66
74
  }; // FreeBoundaryBase
67
75
 
@@ -88,6 +88,9 @@ class HandoverStorage {
88
88
  // Amperes
89
89
  double bSubVVac;
90
90
 
91
+ // Used only in rzConIntoVolume() to extrapolate the constraint force
92
+ // contribution from the LCFS into the plasma volume.
93
+ // TODO(jurasic) this should have a smaller scope.
91
94
  std::vector<double> rCon_LCFS;
92
95
  std::vector<double> zCon_LCFS;
93
96