Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/source/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ you can simply load the latest NICE module:

.. code-block:: bash

module load NICE

module load NICE/3.0.0-intel-2025b-DD-4.1.1
Comment thread
SBlokhuizen marked this conversation as resolved.
Comment thread
SBlokhuizen marked this conversation as resolved.

If the NICE module is not available, you must compile NICE manually.
See the following page for further details on how to set this up:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/muscle3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ input port** selects between two modes:
``time`` array is empty.

.. code-block:: yaml
:caption: Example ``implementations`` section for running the waveform-editor actor
:caption: Example ``programs`` section for running the waveform-editor actor

implementations:
programs:
waveform_actor:
executable: waveform-editor
args: actor
Expand Down
13 changes: 7 additions & 6 deletions docs/source/shape_editor_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Installing dependencies

.. code-block:: bash

module load IMAS-Python IMAS-AL-Cpp/5.4.0-intel-2023b-DD-4.0.0 \
Comment thread
SBlokhuizen marked this conversation as resolved.
module load IMAS-Python IMAS-AL-Cpp/5.4.0-intel-2023b-DD-4.1.1 \
SuiteSparse/7.7.0-intel-2023b MUSCLE3

.. md-tab-item:: Ubuntu 24.04
Expand All @@ -46,23 +46,23 @@ Installing dependencies

# Install imas_core and muscle3 with pip
pip install 'imas_core @ git+ssh://git@git.iter.org/imas/al-core.git'
pip install 'muscle3==0.8.0'
pip install 'muscle3==0.10.0'
Comment thread
SBlokhuizen marked this conversation as resolved.

# Install AL-CPP in ~/.local
git clone ssh://git@git.iter.org/imas/al-cpp.git
cd al-cpp
cmake -B build -D AL_EXAMPLES=OFF -D AL_HLI_DOCS=OFF -D AL_PLUGINS=OFF \
-D AL_TESTS=OFF -D CMAKE_INSTALL_PREFIX=~/.local \
-D DD_GIT_REPOSITORY=https://github.com/iterorganization/IMAS-Data-Dictionary.git \
-D DD_VERSION=4.0.0
-D DD_VERSION=4.1.1
make -C build -j
make -C build install
cd ..

# Install C++ libs of MUSCLE3 in ~/.local
wget https://github.com/multiscale/muscle3/archive/0.8.0/muscle3-0.8.0.tar.gz
tar xf muscle3-0.8.0.tar.gz
cd muscle3-0.8.0
wget https://github.com/multiscale/muscle3/archive/0.10.0/muscle3-0.10.0.tar.gz
tar xf muscle3-0.10.0.tar.gz
cd muscle3-0.10.0
make
PREFIX=~/.local make install
cd ..
Expand All @@ -85,6 +85,7 @@ https://blfauger.gitlabpages.inria.fr/nice/install.html.

git clone https://gitlab.inria.fr/blfauger/nice.git
cd nice
git checkout v3.0.0
git submodule init
git submodule update
cd src
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"ruamel.yaml",
"kaleido", # required for exporting PNG to disk
"asteval",
"muscle3",
"muscle3>=0.10",
]
dynamic = ["version"]

Expand Down
59 changes: 31 additions & 28 deletions tests/muscle3_integration/coupling.ymmsl.in
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
ymmsl_version: v0.1
ymmsl_version: v0.2

model:
name: example_coupling_with_waveform_actor
models:
example_coupling_with_waveform_actor:
components:
controller:
description: Simple controller
implementation: controller
ports:
o_i: time_out
s:
- ec_launchers_in
- nbi_in

components:
controller:
implementation: controller
ports:
o_i: time_out
s:
- ec_launchers_in
- nbi_in

waveform_actor:
implementation: waveform_actor
ports:
# The name of the input port can be freely chosen:
f_init: time_in
# Names of the output port are "<ids_name>_out":
o_f:
- ec_launchers_out
- nbi_out

conduits:
controller.time_out: waveform_actor.time_in
waveform_actor.ec_launchers_out: controller.ec_launchers_in
waveform_actor.nbi_out: controller.nbi_in
waveform_actor:
description: Waveform actor
implementation: waveform_actor
ports:
# The name of the input port can be freely chosen:
f_init: time_in
# Names of the output port are "<ids_name>_out":
o_f:
- ec_launchers_out
- nbi_out

conduits:
controller.time_out: waveform_actor.time_in
waveform_actor.ec_launchers_out: controller.ec_launchers_in
waveform_actor.nbi_out: controller.nbi_in

settings:
# Mandatory setting for the waveform actor: the waveform configuration:
Expand All @@ -37,11 +38,13 @@ resources:
waveform_actor:
threads: 1

implementations:
programs:
controller:
description: Simple controller implementation
executable: python
args: __PATH__/controller.py

waveform_actor:
description: Waveform actor implementation
executable: waveform-editor
args: actor
55 changes: 29 additions & 26 deletions tests/muscle3_integration/overlay.ymmsl.in
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
ymmsl_version: v0.1

model:
name: example_overlay_with_waveform_actor

components:
solver:
implementation: solver
ports:
o_i: equilibrium_out
s:
- equilibrium_in

waveform_actor:
implementation: waveform_actor
ports:
# An IDS-named input port selects overlay mode:
f_init: equilibrium_in
# Name of the output port is "<ids_name>_out":
o_f:
- equilibrium_out

conduits:
solver.equilibrium_out: waveform_actor.equilibrium_in
waveform_actor.equilibrium_out: solver.equilibrium_in
ymmsl_version: v0.2

models:
example_overlay_with_waveform_actor:
components:
solver:
description: Equilibrium solver
implementation: solver
ports:
o_i: equilibrium_out
s:
- equilibrium_in

waveform_actor:
description: Waveform actor
implementation: waveform_actor
ports:
# An IDS-named input port selects overlay mode:
f_init: equilibrium_in
# Name of the output port is "<ids_name>_out":
o_f:
- equilibrium_out

conduits:
solver.equilibrium_out: waveform_actor.equilibrium_in
waveform_actor.equilibrium_out: solver.equilibrium_in

settings:
# Mandatory setting for the waveform actor: the waveform configuration:
Expand All @@ -34,11 +35,13 @@ resources:
waveform_actor:
threads: 1

implementations:
programs:
solver:
description: Equilibrium solver implementation
executable: python
args: __PATH__/overlay_solver.py

waveform_actor:
description: Waveform actor implementation
executable: waveform-editor
args: actor
82 changes: 50 additions & 32 deletions tests/test_muscle3.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,31 @@
VALUES_PER_TIME = [8.33e5 / 20, 8.33e5, 8.33e5 * 15 / 25]

YMMSL = """
ymmsl_version: v0.1

model:
name: test_waveform_actor

components:
time_generator:
implementation: time_generator
waveform_actor:
implementation: waveform_actor
waveform_validator:
implementation: waveform_validator

conduits:
time_generator.output: waveform_actor.input
waveform_actor.ec_launchers_out: waveform_validator.ec_launchers_in
ymmsl_version: v0.2

models:
test_waveform_actor:
components:
time_generator:
description: Emits a fixed time sequence
implementation: time_generator
ports:
o_i: [output]
waveform_actor:
description: The actor under test
implementation: waveform_actor
ports:
f_init: [input]
o_f: [ec_launchers_out]
waveform_validator:
description: Validates the exported waveform
implementation: waveform_validator
ports:
f_init: [ec_launchers_in]

conduits:
time_generator.output: waveform_actor.input
waveform_actor.ec_launchers_out: waveform_validator.ec_launchers_in

settings:
waveform_actor.waveforms: {waveform_yaml}
Expand Down Expand Up @@ -120,22 +129,31 @@ def test_muscle3(tmp_path, monkeypatch):
BOUNDARY_R = [4.0, 5.0, 6.0] # pre-existing data the overlay must preserve

TRACE_YMMSL = """
ymmsl_version: v0.1

model:
name: test_waveform_actor_trace

components:
trace_generator:
implementation: trace_generator
waveform_actor:
implementation: waveform_actor
trace_validator:
implementation: trace_validator

conduits:
trace_generator.output: waveform_actor.equilibrium_in
waveform_actor.equilibrium_out: trace_validator.equilibrium_in
ymmsl_version: v0.2

models:
test_waveform_actor_trace:
components:
trace_generator:
description: Emits a whole-trace equilibrium
implementation: trace_generator
ports:
o_i: [output]
waveform_actor:
description: The actor under test
implementation: waveform_actor
ports:
f_init: [equilibrium_in]
o_f: [equilibrium_out]
trace_validator:
description: Validates the exported trace
implementation: trace_validator
ports:
f_init: [equilibrium_in]

conduits:
trace_generator.output: waveform_actor.equilibrium_in
waveform_actor.equilibrium_out: trace_validator.equilibrium_in

settings:
waveform_actor.waveforms: {waveform_yaml}
Expand Down
Loading
Loading