Skip to content

Commit

Permalink
Merge pull request #161 from n-claes/fix/tests
Browse files Browse the repository at this point in the history
Updated automated tests
  • Loading branch information
jordidj authored Dec 3, 2024
2 parents 54ca9e8 + 02a2bcf commit 3528514
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pylbo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
pip install pytest pytest-cov
sudo apt-get update
sudo apt-get install ffmpeg
pip install matplotlib==3.9.2
pip install numpy==2.0.2
cd post_processing
python setup.py develop
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Cache ARPACK
id: arpack-cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: tests/arpack-ng/
key: ${{ runner.os }}-arpackv3
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
find $LEGOLASDIR/build -name '*.gc*' -delete
- name: Archive failed logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: failed_logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Cache pFUnit
id: pfunit-cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: tests/pFUnit/
key: ${{ runner.os }}-${{ matrix.compiler }}-pfunitv1
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Cache ARPACK
id: arpack-cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: tests/arpack-ng/
key: ${{ runner.os }}-${{ matrix.compiler }}-arpackv1
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
find $LEGOLASDIR/build -name '*.gc*' -delete
- name: Archive failed logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: failed_logs
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx_source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

# -- General configuration ---------------------------------------------------
extensions = [
"autoapi.extension",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
Expand All @@ -44,7 +45,6 @@
}

# autoAPI settings
extensions.append("autoapi.extension")
autoapi_type = "python"
autoapi_dirs = ["../../post_processing/pylbo/"]
autoapi_options = [
Expand Down
15 changes: 11 additions & 4 deletions post_processing/pylbo/visualisation/continua.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,21 @@ def _get_resistive_thermal_continuum(ds: LegolasDataSet) -> np.ndarray:
T0 = ds.equilibria["T0"]
eps = ds.scale_factor
deps = 0
if ds.geometry == 'cylindrical':
if ds.geometry == "cylindrical":
deps = 1
drB02 = deps * ds.equilibria["B02"] + eps * ds.equilibria["dB02"]
dB03 = ds.equilibria["dB03"]

return -1j * (gamma - 1) * ((kappa_para * kpara**2
+ detadT * ((drB02 / eps)**2 + dB03**2)) / rho0
+ dLdT - (L0 + rho0 * dLdrho) / T0) / gamma
return (
-1j
* (gamma - 1)
* (
(kappa_para * kpara**2 + detadT * ((drB02 / eps) ** 2 + dB03**2)) / rho0
+ dLdT
- (L0 + rho0 * dLdrho) / T0
)
/ gamma
)


def _get_thermal_continuum_analytical(ds: LegolasDataSet) -> np.ndarray:
Expand Down

0 comments on commit 3528514

Please sign in to comment.