PyOpenMagnetics 1.3.9__tar.gz → 1.3.12__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.
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/CMakeLists.txt +64 -5
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/PKG-INFO +1 -1
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/PyOpenMagnetics.pyi +36 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/pyproject.toml +1 -1
- pyopenmagnetics-1.3.12/src/converter.cpp +1383 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/converter.h +11 -0
- pyopenmagnetics-1.3.9/src/converter.cpp +0 -656
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/.github/workflows/ci.yml +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/.github/workflows/publish.yml +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/.gitignore +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/AGENTS.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/LICENSE +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/README.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/api/MAS.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/api/mas_db_reader.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/api/validation.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/clear_cibuildwheel_cache.sh +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/docs/compatibility.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/docs/errors.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/docs/performance.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/README.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/buck_inductor.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/complete_simulation_example.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/converter_design_example.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/debug_bobbin.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/debug_coil.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/debug_core.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/debug_plotting.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_220v_12v_1a.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_220v_12v_2a_complete.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_bh_curve.png +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_core.png +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_design.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_summary.png +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/flyback_waveforms.png +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/list_plot_funcs.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/plot_flyback_design.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/plot_flyback_pyom.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/test_field_calc.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/examples/test_field_plot.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/force_fresh_build.sh +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/llms.txt +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/notebooks/01_getting_started.ipynb +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/notebooks/02_buck_inductor.ipynb +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/notebooks/03_core_losses.ipynb +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/notebooks/README.md +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/requirements.txt +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/advisers.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/advisers.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/bobbin.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/bobbin.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/common.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/core.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/core.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/database.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/database.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/logging.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/logging.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/losses.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/losses.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/module.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/plotting.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/plotting.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/settings.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/settings.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/simulation.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/simulation.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/utils.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/utils.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/winding.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/winding.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/wire.cpp +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/src/wire.h +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/test.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/__init__.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/conftest.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_converter_endpoints.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_core.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_core_adviser.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_examples_integration.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_inputs.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_logging.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_magnetic_adviser.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_plotting.py +0 -0
- {pyopenmagnetics-1.3.9 → pyopenmagnetics-1.3.12}/tests/test_winding.py +0 -0
|
@@ -120,14 +120,25 @@ include_directories("${CMAKE_BINARY_DIR}/_deps/eigen-src")
|
|
|
120
120
|
if(NOT LOCAL_MKF_MAS)
|
|
121
121
|
message(STATUS "Fetching MKF")
|
|
122
122
|
# Force fresh clone by using a unique timestamp - update this when MKF changes
|
|
123
|
-
set(MKF_FORCE_REFRESH "
|
|
123
|
+
set(MKF_FORCE_REFRESH "2026-04-29-extra-components")
|
|
124
124
|
# Tell MKF to disable matplotplusplus and use SVG-based Painter instead
|
|
125
125
|
set(INCLUDE_PYMKF ON CACHE BOOL "Build Python interface" FORCE)
|
|
126
|
+
# GIT_SUBMODULES_RECURSE pulls in CAS/EAS (added 2026-04 alongside the
|
|
127
|
+
# ExtraComponentsMode API). MAS is also a submodule of MKF but PyMKF
|
|
128
|
+
# fetches it independently below for fast-update reasons; CAS/EAS only
|
|
129
|
+
# exist as MKF submodules, so we need them populated under MKF/.
|
|
130
|
+
# NOTE: we cannot use GIT_SHALLOW with GIT_SUBMODULES — shallow clone
|
|
131
|
+
# skips submodule init. Drop the shallow flag for MKF so CAS/EAS/
|
|
132
|
+
# cci_coords are actually checked out. cci_coords MUST stay in this
|
|
133
|
+
# list — the CCI generator reads from MKF/cci_coords/coordinates/.
|
|
134
|
+
# MAS is fetched separately below (not a sub-fetch of MKF here) so
|
|
135
|
+
# leave it out, otherwise FetchContent doubles the clone.
|
|
126
136
|
FetchContent_Declare(MKF
|
|
127
137
|
GIT_REPOSITORY https://github.com/OpenMagnetics/MKF.git
|
|
128
138
|
GIT_TAG main
|
|
129
139
|
GIT_PROGRESS TRUE
|
|
130
|
-
|
|
140
|
+
GIT_SUBMODULES "CAS" "EAS" "cci_coords"
|
|
141
|
+
GIT_SUBMODULES_RECURSE TRUE)
|
|
131
142
|
|
|
132
143
|
message(STATUS "Fetching mas")
|
|
133
144
|
# Skip Git LFS to avoid bandwidth quota issues - data files are optional for build
|
|
@@ -221,7 +232,6 @@ add_custom_command(
|
|
|
221
232
|
-S ${MAS_DIR}/schemas/inputs/topologies/currentTransformer.json
|
|
222
233
|
-S ${MAS_DIR}/schemas/inputs/topologies/boost.json
|
|
223
234
|
-S ${MAS_DIR}/schemas/inputs/topologies/buck.json
|
|
224
|
-
-S ${MAS_DIR}/schemas/inputs/topologies/flybuck.json
|
|
225
235
|
-S ${MAS_DIR}/schemas/inputs/topologies/forward.json
|
|
226
236
|
-S ${MAS_DIR}/schemas/inputs/topologies/isolatedBuck.json
|
|
227
237
|
-S ${MAS_DIR}/schemas/inputs/topologies/isolatedBuckBoost.json
|
|
@@ -229,7 +239,20 @@ add_custom_command(
|
|
|
229
239
|
-S ${MAS_DIR}/schemas/inputs/topologies/dualActiveBridge.json
|
|
230
240
|
-S ${MAS_DIR}/schemas/inputs/topologies/llcResonant.json
|
|
231
241
|
-S ${MAS_DIR}/schemas/inputs/topologies/cllcResonant.json
|
|
232
|
-
-S ${MAS_DIR}/schemas/inputs/topologies/
|
|
242
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/clllcResonant.json
|
|
243
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/phaseShiftedFullBridge.json
|
|
244
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/phaseShiftedHalfBridge.json
|
|
245
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/powerFactorCorrection.json
|
|
246
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/commonModeChoke.json
|
|
247
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/differentialModeChoke.json
|
|
248
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/asymmetricHalfBridge.json
|
|
249
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/cuk.json
|
|
250
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/sepic.json
|
|
251
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/zeta.json
|
|
252
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/weinberg.json
|
|
253
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/fourSwitchBuckBoost.json
|
|
254
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/seriesResonant.json
|
|
255
|
+
-S ${MAS_DIR}/schemas/inputs/topologies/vienna.json
|
|
233
256
|
-o ${MAS_DIRECTORY}/MAS.hpp --namespace MAS --source-style single-source --type-style pascal-case --member-style underscore-case --enumerator-style upper-underscore-case --no-boost
|
|
234
257
|
USES_TERMINAL)
|
|
235
258
|
|
|
@@ -237,6 +260,42 @@ add_custom_target(PyMASGeneration
|
|
|
237
260
|
/bin/echo "RUNNING PyMASGeneration"
|
|
238
261
|
DEPENDS "${MAS_DIRECTORY}/MAS.hpp")
|
|
239
262
|
|
|
263
|
+
# ──────────────────────────────────────────────────────────────────
|
|
264
|
+
# CAS.hpp generation (mirrors MKF/CMakeLists.txt:419-451)
|
|
265
|
+
# CAS = Capacitor Adviser Schema. EAS = Element Adviser Schema.
|
|
266
|
+
# Both are submodules of MKF (added 2026-04). MKF/Topology.h #includes
|
|
267
|
+
# <CAS.hpp> for the get_extra_components_inputs API; we must generate
|
|
268
|
+
# the header here so PyOpenMagnetics's TU sees it.
|
|
269
|
+
# ──────────────────────────────────────────────────────────────────
|
|
270
|
+
set(CAS_DIRECTORY "${CMAKE_BINARY_DIR}/CAS/")
|
|
271
|
+
set(CAS_DIR "${MKF_DIR}/CAS")
|
|
272
|
+
set(EAS_DIR "${MKF_DIR}/EAS")
|
|
273
|
+
file(MAKE_DIRECTORY "${CAS_DIRECTORY}")
|
|
274
|
+
|
|
275
|
+
add_custom_command(
|
|
276
|
+
OUTPUT "${CAS_DIRECTORY}/CAS.hpp"
|
|
277
|
+
COMMAND ${CMAKE_COMMAND} -E remove -f "${CAS_DIRECTORY}/CAS.hpp"
|
|
278
|
+
COMMAND quicktype -l c++ -s schema ${CAS_DIR}/schemas/inputs.json
|
|
279
|
+
-S ${CAS_DIR}/schemas/inputs/designRequirements.json
|
|
280
|
+
-S ${EAS_DIR}/schemas/utils.json
|
|
281
|
+
-S ${EAS_DIR}/schemas/inputs/twoTerminalOperatingPoint.json
|
|
282
|
+
-o ${CAS_DIRECTORY}/CAS.hpp --namespace CAS --source-style single-source
|
|
283
|
+
--type-style pascal-case --member-style underscore-case
|
|
284
|
+
--enumerator-style upper-underscore-case --no-boost
|
|
285
|
+
--top-level Inputs
|
|
286
|
+
DEPENDS
|
|
287
|
+
"${CAS_DIR}/schemas/inputs.json"
|
|
288
|
+
"${CAS_DIR}/schemas/inputs/designRequirements.json"
|
|
289
|
+
"${EAS_DIR}/schemas/utils.json"
|
|
290
|
+
"${EAS_DIR}/schemas/inputs/twoTerminalOperatingPoint.json"
|
|
291
|
+
USES_TERMINAL)
|
|
292
|
+
|
|
293
|
+
add_custom_target(PyCASGeneration
|
|
294
|
+
/bin/echo "RUNNING PyCASGeneration"
|
|
295
|
+
DEPENDS "${CAS_DIRECTORY}/CAS.hpp")
|
|
296
|
+
add_dependencies(PyCASGeneration PyMASGeneration)
|
|
297
|
+
include_directories("${CAS_DIRECTORY}")
|
|
298
|
+
|
|
240
299
|
message(STATUS "Compiling PyOpenMagnetics with modular structure")
|
|
241
300
|
file(GLOB SOURCES src/*.cpp
|
|
242
301
|
${MKF_DIR}/src/*.cpp
|
|
@@ -266,7 +325,7 @@ message(STATUS SOURCES)
|
|
|
266
325
|
message(STATUS ${SOURCES})
|
|
267
326
|
pybind11_add_module(PyOpenMagnetics ${SOURCES})
|
|
268
327
|
|
|
269
|
-
add_dependencies(PyOpenMagnetics PyMASGeneration cci_data_gen)
|
|
328
|
+
add_dependencies(PyOpenMagnetics PyMASGeneration PyCASGeneration cci_data_gen)
|
|
270
329
|
|
|
271
330
|
target_link_libraries(PyOpenMagnetics PUBLIC nlohmann_json::nlohmann_json levmar rapidfuzz::rapidfuzz)
|
|
272
331
|
|
|
@@ -960,3 +960,39 @@ def process_isolated_buck_boost(isolated_buck_boost: JsonDict) -> Inputs:
|
|
|
960
960
|
def process_current_transformer(ct: JsonDict, turns_ratio: float, secondary_resistance: float = 0.0) -> Inputs:
|
|
961
961
|
"""Process Current Transformer specification to Inputs."""
|
|
962
962
|
...
|
|
963
|
+
|
|
964
|
+
def process_cuk(cuk: JsonDict) -> Inputs:
|
|
965
|
+
"""Process Cuk converter specification to Inputs."""
|
|
966
|
+
...
|
|
967
|
+
|
|
968
|
+
def process_sepic(sepic: JsonDict) -> Inputs:
|
|
969
|
+
"""Process SEPIC converter specification to Inputs."""
|
|
970
|
+
...
|
|
971
|
+
|
|
972
|
+
def process_zeta(zeta: JsonDict) -> Inputs:
|
|
973
|
+
"""Process Zeta converter specification to Inputs."""
|
|
974
|
+
...
|
|
975
|
+
|
|
976
|
+
def process_four_switch_buck_boost(converter: JsonDict) -> Inputs:
|
|
977
|
+
"""Process Four-Switch Buck-Boost converter specification to Inputs."""
|
|
978
|
+
...
|
|
979
|
+
|
|
980
|
+
def process_asymmetric_half_bridge(converter: JsonDict) -> Inputs:
|
|
981
|
+
"""Process Asymmetric Half-Bridge converter specification to Inputs."""
|
|
982
|
+
...
|
|
983
|
+
|
|
984
|
+
def process_weinberg(converter: JsonDict) -> Inputs:
|
|
985
|
+
"""Process Weinberg converter specification to Inputs."""
|
|
986
|
+
...
|
|
987
|
+
|
|
988
|
+
def process_vienna(converter: JsonDict) -> Inputs:
|
|
989
|
+
"""Process Vienna Rectifier converter specification to Inputs."""
|
|
990
|
+
...
|
|
991
|
+
|
|
992
|
+
def process_clllc(converter: JsonDict) -> Inputs:
|
|
993
|
+
"""Process CLLLC Resonant converter specification to Inputs."""
|
|
994
|
+
...
|
|
995
|
+
|
|
996
|
+
def process_src(converter: JsonDict) -> Inputs:
|
|
997
|
+
"""Process Series Resonant Converter (SRC) specification to Inputs."""
|
|
998
|
+
...
|