PyOpenMagnetics 1.3.10__tar.gz → 1.3.13__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.10 → pyopenmagnetics-1.3.13}/.github/workflows/publish.yml +16 -11
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/CMakeLists.txt +28 -12
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/PKG-INFO +1 -1
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/PyOpenMagnetics.pyi +36 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/pyproject.toml +1 -1
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/converter.cpp +594 -25
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/converter.h +11 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/settings.cpp +6 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/.github/workflows/ci.yml +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/.gitignore +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/AGENTS.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/LICENSE +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/README.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/api/MAS.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/api/mas_db_reader.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/api/validation.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/clear_cibuildwheel_cache.sh +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/docs/compatibility.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/docs/errors.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/docs/performance.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/README.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/buck_inductor.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/complete_simulation_example.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/converter_design_example.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/debug_bobbin.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/debug_coil.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/debug_core.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/debug_plotting.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_220v_12v_1a.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_220v_12v_2a_complete.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_bh_curve.png +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_core.png +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_design.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_summary.png +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/flyback_waveforms.png +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/list_plot_funcs.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/plot_flyback_design.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/plot_flyback_pyom.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/test_field_calc.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/examples/test_field_plot.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/force_fresh_build.sh +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/llms.txt +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/notebooks/01_getting_started.ipynb +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/notebooks/02_buck_inductor.ipynb +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/notebooks/03_core_losses.ipynb +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/notebooks/README.md +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/requirements.txt +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/advisers.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/advisers.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/bobbin.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/bobbin.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/common.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/core.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/core.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/database.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/database.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/logging.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/logging.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/losses.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/losses.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/module.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/plotting.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/plotting.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/settings.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/simulation.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/simulation.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/utils.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/utils.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/winding.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/winding.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/wire.cpp +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/src/wire.h +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/test.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/__init__.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/conftest.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_converter_endpoints.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_core.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_core_adviser.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_examples_integration.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_inputs.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_logging.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_magnetic_adviser.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_plotting.py +0 -0
- {pyopenmagnetics-1.3.10 → pyopenmagnetics-1.3.13}/tests/test_winding.py +0 -0
|
@@ -10,6 +10,11 @@ on:
|
|
|
10
10
|
required: false
|
|
11
11
|
default: false
|
|
12
12
|
type: boolean
|
|
13
|
+
publish_to_pypi:
|
|
14
|
+
description: 'Publish to real PyPI instead of TestPyPI (use to rebuild a failed release without recreating the GitHub release/tag)'
|
|
15
|
+
required: false
|
|
16
|
+
default: false
|
|
17
|
+
type: boolean
|
|
13
18
|
|
|
14
19
|
env:
|
|
15
20
|
GIT_LFS_SKIP_SMUDGE: 1 # Skip LFS to avoid bandwidth quota issues
|
|
@@ -109,18 +114,18 @@ jobs:
|
|
|
109
114
|
if [ $i -lt 3 ]; then sleep 60; fi
|
|
110
115
|
done
|
|
111
116
|
CIBW_ENVIRONMENT_LINUX: PATH=/opt/rh/gcc-toolset-13/root/usr/bin:$PATH LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:$LD_LIBRARY_PATH
|
|
112
|
-
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core cmake ninja pybind11
|
|
117
|
+
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core "cmake<4" ninja pybind11
|
|
113
118
|
CIBW_TEST_COMMAND: python -c "import PyOpenMagnetics; print(f'PyOpenMagnetics loaded successfully with {len(dir(PyOpenMagnetics))} functions')"
|
|
114
119
|
|
|
115
120
|
- name: Publish Linux wheels to PyPI
|
|
116
|
-
if: github.event_name == 'release'
|
|
121
|
+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish_to_pypi)
|
|
117
122
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
118
123
|
with:
|
|
119
124
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
120
125
|
packages-dir: wheelhouse/
|
|
121
126
|
|
|
122
127
|
- name: Publish Linux wheels to TestPyPI
|
|
123
|
-
if: github.event_name == 'workflow_dispatch'
|
|
128
|
+
if: github.event_name == 'workflow_dispatch' && !inputs.publish_to_pypi
|
|
124
129
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
125
130
|
with:
|
|
126
131
|
repository-url: https://test.pypi.org/legacy/
|
|
@@ -181,21 +186,21 @@ jobs:
|
|
|
181
186
|
CIBW_BUILD: cp310-* cp311-* cp312-* cp313-*
|
|
182
187
|
CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* pp*"
|
|
183
188
|
CIBW_BEFORE_ALL_WINDOWS: npm install -g quicktype
|
|
184
|
-
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core cmake ninja pybind11
|
|
189
|
+
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core "cmake<4" ninja pybind11
|
|
185
190
|
CIBW_TEST_COMMAND: python -c "import PyOpenMagnetics; print(f'PyOpenMagnetics loaded successfully with {len(dir(PyOpenMagnetics))} functions')"
|
|
186
191
|
|
|
187
192
|
- name: Install twine
|
|
188
193
|
run: python -m pip install twine
|
|
189
194
|
|
|
190
195
|
- name: Publish Windows wheels to PyPI
|
|
191
|
-
if: github.event_name == 'release'
|
|
196
|
+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish_to_pypi)
|
|
192
197
|
run: python -m twine upload wheelhouse/*.whl
|
|
193
198
|
env:
|
|
194
199
|
TWINE_USERNAME: __token__
|
|
195
200
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
196
201
|
|
|
197
202
|
- name: Publish Windows wheels to TestPyPI
|
|
198
|
-
if: github.event_name == 'workflow_dispatch'
|
|
203
|
+
if: github.event_name == 'workflow_dispatch' && !inputs.publish_to_pypi
|
|
199
204
|
run: python -m twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl
|
|
200
205
|
env:
|
|
201
206
|
TWINE_USERNAME: __token__
|
|
@@ -266,21 +271,21 @@ jobs:
|
|
|
266
271
|
if [ $i -lt 5 ]; then sleep 60; fi
|
|
267
272
|
done
|
|
268
273
|
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=15.0
|
|
269
|
-
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core cmake ninja pybind11
|
|
274
|
+
CIBW_BEFORE_BUILD: pip install --default-timeout=60 --retries 5 scikit-build-core "cmake<4" ninja pybind11
|
|
270
275
|
CIBW_TEST_COMMAND: python -c "import PyOpenMagnetics; print(f'PyOpenMagnetics loaded successfully with {len(dir(PyOpenMagnetics))} functions')"
|
|
271
276
|
|
|
272
277
|
- name: Install twine
|
|
273
278
|
run: python -m pip install twine
|
|
274
279
|
|
|
275
280
|
- name: Publish macOS wheels to PyPI
|
|
276
|
-
if: github.event_name == 'release'
|
|
281
|
+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish_to_pypi)
|
|
277
282
|
run: python -m twine upload wheelhouse/*.whl
|
|
278
283
|
env:
|
|
279
284
|
TWINE_USERNAME: __token__
|
|
280
285
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
281
286
|
|
|
282
287
|
- name: Publish macOS wheels to TestPyPI
|
|
283
|
-
if: github.event_name == 'workflow_dispatch'
|
|
288
|
+
if: github.event_name == 'workflow_dispatch' && !inputs.publish_to_pypi
|
|
284
289
|
run: python -m twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl
|
|
285
290
|
env:
|
|
286
291
|
TWINE_USERNAME: __token__
|
|
@@ -338,14 +343,14 @@ jobs:
|
|
|
338
343
|
run: python -m build --sdist
|
|
339
344
|
|
|
340
345
|
- name: Publish sdist to PyPI
|
|
341
|
-
if: github.event_name == 'release'
|
|
346
|
+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish_to_pypi)
|
|
342
347
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
343
348
|
with:
|
|
344
349
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
345
350
|
packages-dir: dist/
|
|
346
351
|
|
|
347
352
|
- name: Publish sdist to TestPyPI
|
|
348
|
-
if: github.event_name == 'workflow_dispatch'
|
|
353
|
+
if: github.event_name == 'workflow_dispatch' && !inputs.publish_to_pypi
|
|
349
354
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
350
355
|
with:
|
|
351
356
|
repository-url: https://test.pypi.org/legacy/
|
|
@@ -123,12 +123,12 @@ if(NOT LOCAL_MKF_MAS)
|
|
|
123
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/
|
|
126
|
+
# GIT_SUBMODULES_RECURSE pulls in CAS/PEAS (added 2026-04 alongside the
|
|
127
127
|
# ExtraComponentsMode API). MAS is also a submodule of MKF but PyMKF
|
|
128
|
-
# fetches it independently below for fast-update reasons; CAS/
|
|
128
|
+
# fetches it independently below for fast-update reasons; CAS/PEAS only
|
|
129
129
|
# exist as MKF submodules, so we need them populated under MKF/.
|
|
130
130
|
# NOTE: we cannot use GIT_SHALLOW with GIT_SUBMODULES — shallow clone
|
|
131
|
-
# skips submodule init. Drop the shallow flag for MKF so CAS/
|
|
131
|
+
# skips submodule init. Drop the shallow flag for MKF so CAS/PEAS/
|
|
132
132
|
# cci_coords are actually checked out. cci_coords MUST stay in this
|
|
133
133
|
# list — the CCI generator reads from MKF/cci_coords/coordinates/.
|
|
134
134
|
# MAS is fetched separately below (not a sub-fetch of MKF here) so
|
|
@@ -137,7 +137,7 @@ if(NOT LOCAL_MKF_MAS)
|
|
|
137
137
|
GIT_REPOSITORY https://github.com/OpenMagnetics/MKF.git
|
|
138
138
|
GIT_TAG main
|
|
139
139
|
GIT_PROGRESS TRUE
|
|
140
|
-
GIT_SUBMODULES "CAS" "
|
|
140
|
+
GIT_SUBMODULES "CAS" "PEAS" "cci_coords"
|
|
141
141
|
GIT_SUBMODULES_RECURSE TRUE)
|
|
142
142
|
|
|
143
143
|
message(STATUS "Fetching mas")
|
|
@@ -232,7 +232,6 @@ add_custom_command(
|
|
|
232
232
|
-S ${MAS_DIR}/schemas/inputs/topologies/currentTransformer.json
|
|
233
233
|
-S ${MAS_DIR}/schemas/inputs/topologies/boost.json
|
|
234
234
|
-S ${MAS_DIR}/schemas/inputs/topologies/buck.json
|
|
235
|
-
-S ${MAS_DIR}/schemas/inputs/topologies/flybuck.json
|
|
236
235
|
-S ${MAS_DIR}/schemas/inputs/topologies/forward.json
|
|
237
236
|
-S ${MAS_DIR}/schemas/inputs/topologies/isolatedBuck.json
|
|
238
237
|
-S ${MAS_DIR}/schemas/inputs/topologies/isolatedBuckBoost.json
|
|
@@ -240,7 +239,20 @@ add_custom_command(
|
|
|
240
239
|
-S ${MAS_DIR}/schemas/inputs/topologies/dualActiveBridge.json
|
|
241
240
|
-S ${MAS_DIR}/schemas/inputs/topologies/llcResonant.json
|
|
242
241
|
-S ${MAS_DIR}/schemas/inputs/topologies/cllcResonant.json
|
|
243
|
-
-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
|
|
244
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
|
|
245
257
|
USES_TERMINAL)
|
|
246
258
|
|
|
@@ -250,14 +262,14 @@ add_custom_target(PyMASGeneration
|
|
|
250
262
|
|
|
251
263
|
# ──────────────────────────────────────────────────────────────────
|
|
252
264
|
# CAS.hpp generation (mirrors MKF/CMakeLists.txt:419-451)
|
|
253
|
-
# CAS = Capacitor Adviser Schema.
|
|
265
|
+
# CAS = Capacitor Adviser Schema. PEAS = Power Element Adviser Schema.
|
|
254
266
|
# Both are submodules of MKF (added 2026-04). MKF/Topology.h #includes
|
|
255
267
|
# <CAS.hpp> for the get_extra_components_inputs API; we must generate
|
|
256
268
|
# the header here so PyOpenMagnetics's TU sees it.
|
|
257
269
|
# ──────────────────────────────────────────────────────────────────
|
|
258
270
|
set(CAS_DIRECTORY "${CMAKE_BINARY_DIR}/CAS/")
|
|
259
271
|
set(CAS_DIR "${MKF_DIR}/CAS")
|
|
260
|
-
set(
|
|
272
|
+
set(PEAS_DIR "${MKF_DIR}/PEAS")
|
|
261
273
|
file(MAKE_DIRECTORY "${CAS_DIRECTORY}")
|
|
262
274
|
|
|
263
275
|
add_custom_command(
|
|
@@ -265,8 +277,10 @@ add_custom_command(
|
|
|
265
277
|
COMMAND ${CMAKE_COMMAND} -E remove -f "${CAS_DIRECTORY}/CAS.hpp"
|
|
266
278
|
COMMAND quicktype -l c++ -s schema ${CAS_DIR}/schemas/inputs.json
|
|
267
279
|
-S ${CAS_DIR}/schemas/inputs/designRequirements.json
|
|
268
|
-
-S ${
|
|
269
|
-
-S ${
|
|
280
|
+
-S ${PEAS_DIR}/schemas/utils.json
|
|
281
|
+
-S ${PEAS_DIR}/schemas/inputs/twoTerminalOperatingPoint.json
|
|
282
|
+
-S ${PEAS_DIR}/schemas/inputs/operatingConditions.json
|
|
283
|
+
-S ${PEAS_DIR}/schemas/inputs/operatingPointExcitation.json
|
|
270
284
|
-o ${CAS_DIRECTORY}/CAS.hpp --namespace CAS --source-style single-source
|
|
271
285
|
--type-style pascal-case --member-style underscore-case
|
|
272
286
|
--enumerator-style upper-underscore-case --no-boost
|
|
@@ -274,8 +288,10 @@ add_custom_command(
|
|
|
274
288
|
DEPENDS
|
|
275
289
|
"${CAS_DIR}/schemas/inputs.json"
|
|
276
290
|
"${CAS_DIR}/schemas/inputs/designRequirements.json"
|
|
277
|
-
"${
|
|
278
|
-
"${
|
|
291
|
+
"${PEAS_DIR}/schemas/utils.json"
|
|
292
|
+
"${PEAS_DIR}/schemas/inputs/twoTerminalOperatingPoint.json"
|
|
293
|
+
"${PEAS_DIR}/schemas/inputs/operatingConditions.json"
|
|
294
|
+
"${PEAS_DIR}/schemas/inputs/operatingPointExcitation.json"
|
|
279
295
|
USES_TERMINAL)
|
|
280
296
|
|
|
281
297
|
add_custom_target(PyCASGeneration
|
|
@@ -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
|
+
...
|