Skip to content

Add julia example in resonant circuit #658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

marinlauber
Copy link

This PR adds Julia participants to the resonant-circuit.

@MakisH MakisH self-assigned this Jul 28, 2025
Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, @marinlauber!

I still have not managed to run it (first time I try out Julia and our Julia bindings), but I added some first comments that you could already address if you want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our run scripts, we have some more features that we would need here for consistency as well:

  • shell is bash, set via env
  • we set -e -u to make the script more robust
  • we capture all logging into a file

See the python variant for an example.

It would be good if the script also installed the Julia bindings, in case they are not already installed. Similarly to the Python example.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've addressed most of those, for the Julia binding installation I just added a line in run.sh that initialises the environment using the packages specified in the Project.toml file (this file is similar to setting up a Python environment to run the project).
Not sure if that's why you had in mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick response. Yes, this is exactly what I had in mind.

I now still need to test this (currently precice/PreCICE.jl#70 is blocking me).

@@ -33,6 +33,7 @@ preCICE configuration (image generated using the [precice-config-visualizer](htt
* *MATLAB* A solver using the [MATLAB bindings](https://precice.org/installation-bindings-matlab.html).
Before running this tutorial, follow the [instructions](https://precice.org/installation-bindings-matlab.html) to correctly install the MATLAB bindings.
* *Python* A solver using the preCICE [Python bindings](https://precice.org/installation-bindings-python.html).
* *Julia* A solver using the preCICE [Julia bindings](https://precice.org/installation-bindings-julia.html).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-reminder: We will need also an edit in https://precice.org/tutorials.html

@@ -1,7 +1,7 @@
---
title: Resonant Circuit
permalink: tutorials-resonant-circuit.html
keywords: MATLAB, Python
keywords: MATLAB, Python, Julia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the page seems to be a bit focused on MATLAB. This is a good chance to change this (I can do).

@marinlauber
Copy link
Author

@MakisH, I've modified the example to be more in line with the other examples, the run.sh script now also generates the Project.toml file and installs the PreCICE.jl binding (with the ODE solver lib).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants