Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
env: ['base', 'fenics', 'mpi4py', 'petsc']
env: ['base', 'fenics', 'mpi4py', 'petsc', 'DAE', 'PinTSimE', 'parallelSDC_reloaded', 'Resilience']

defaults:
run:
Expand Down
17 changes: 17 additions & 0 deletions etc/environment-DAE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pySDC
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy>=0.17.1
- matplotlib>=3.0
- sympy>=1.0
- numba>=0.35
- dill>=0.2.6
- pytest
- pytest-benchmark
- pytest-timeout
- pytest-order
- coverage[toml]
- sphinx
17 changes: 17 additions & 0 deletions etc/environment-PinTSimE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pySDC
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy>=0.17.1
- matplotlib>=3.0
- sympy>=1.0
- numba>=0.35
- dill>=0.2.6
- pytest
- pytest-benchmark
- pytest-timeout
- pytest-order
- coverage[toml]
- sphinx
17 changes: 17 additions & 0 deletions etc/environment-Resilience.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pySDC
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy>=0.17.1
- matplotlib>=3.0
- sympy>=1.0
- numba>=0.35
- dill>=0.2.6
- pytest
- pytest-benchmark
- pytest-timeout
- pytest-order
- coverage[toml]
- sphinx
17 changes: 17 additions & 0 deletions etc/environment-parallelSDC_reloaded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pySDC
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy>=0.17.1
- matplotlib>=3.0
- sympy>=1.0
- numba>=0.35
- dill>=0.2.6
- pytest
- pytest-benchmark
- pytest-timeout
- pytest-order
- coverage[toml]
- sphinx
6 changes: 3 additions & 3 deletions pySDC/tests/test_projects/test_DAE/test_DAEMesh.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('shape', [(6,), (4, 6), (4, 6, 8)])
def testInitialization(shape):
"""
Expand All @@ -20,7 +20,7 @@ def testInitialization(shape):
assert len(mesh.components) == len(mesh), 'ERROR: Mesh does not contain two component arrays!'


@pytest.mark.base
@pytest.mark.DAE
def testInitializationGivenMesh():
"""
Tests if for a given mesh the initialization results in the same mesh.
Expand All @@ -42,7 +42,7 @@ def testInitializationGivenMesh():
), 'ERROR: Components in initialized meshes do not match!'


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('shape', [(6,), (4, 6), (4, 6, 8)])
def testArrayUFuncOperator(shape):
"""
Expand Down
2 changes: 1 addition & 1 deletion pySDC/tests/test_projects/test_DAE/test_HookClass_DAE.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('M', [2, 3, 4])
def testHookClassDiffAlgComps(M):
"""
Expand Down
10 changes: 5 additions & 5 deletions pySDC/tests/test_projects/test_DAE/test_SemiImplicitDAE.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def getTestSetup(problem, sweeper, hook_class):
return description, controller_params


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('initial_guess', ['spread', 'zero', 'random'])
def testPredict(initial_guess):
r"""
Expand Down Expand Up @@ -104,7 +104,7 @@ def testPredict(initial_guess):
assert all(abs(fRandomItem) > 0.0 for fRandomItem in fRandom), "Gradient needs to be spreaded as zero!"


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('residual_type', ['full_abs', 'last_abs', 'full_rel', 'last_rel', 'else'])
def testComputeResidual(residual_type):
r"""
Expand Down Expand Up @@ -162,7 +162,7 @@ def testComputeResidual(residual_type):
assert L.status.residual == resNormRef[-1] / abs(uRef)


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('quad_type', ['RADAU-RIGHT', 'RADAU-LEFT'])
def testComputeEndpoint(quad_type):
r"""
Expand Down Expand Up @@ -210,7 +210,7 @@ def testComputeEndpoint(quad_type):
assert np.isclose(L.u[-1], L.uend), "Endpoint is not computed correctly!"


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('M', [2, 3])
def testCompareResults(M):
r"""
Expand Down Expand Up @@ -260,7 +260,7 @@ def testCompareResults(M):
assert np.allclose(errSI, errFI), "Errors does not match!"


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('case', [0, 1])
@pytest.mark.parametrize('M', [2, 3])
@pytest.mark.parametrize('QI', ['IE', 'LU'])
Expand Down
2 changes: 1 addition & 1 deletion pySDC/tests/test_projects/test_DAE/test_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np


@pytest.mark.base
@pytest.mark.DAE
def test_main():
from pySDC.projects.DAE.run.run_convergence_test import setup, run

Expand Down
6 changes: 3 additions & 3 deletions pySDC/tests/test_projects/test_DAE/test_fully_implicit_DAE.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np


@pytest.mark.base
@pytest.mark.DAE
def test_predict_main():
from pySDC.projects.DAE.problems.simple_DAE import simple_dae_1
from pySDC.projects.DAE.sweepers.fully_implicit_DAE import fully_implicit_DAE
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_predict_main():
assert abs(L.f[i + 1]) > 0.0


@pytest.mark.base
@pytest.mark.DAE
def test_residual_main():
from pySDC.projects.DAE.problems.simple_DAE import simple_dae_1
from pySDC.projects.DAE.sweepers.fully_implicit_DAE import fully_implicit_DAE
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_residual_main():
assert L.status.residual == ref_norm[-1] / abs(L.u[0]), "ERROR: incorrect norm used"


@pytest.mark.base
@pytest.mark.DAE
def test_compute_end_point_main():
from pySDC.projects.DAE.problems.simple_DAE import simple_dae_1
from pySDC.projects.DAE.sweepers.fully_implicit_DAE import fully_implicit_DAE
Expand Down
2 changes: 1 addition & 1 deletion pySDC/tests/test_projects/test_DAE/test_iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np


@pytest.mark.base
@pytest.mark.DAE
def test_main():
from pySDC.projects.DAE.run.run_iteration_test import setup, run

Expand Down
4 changes: 2 additions & 2 deletions pySDC/tests/test_projects/test_DAE/test_playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import warnings


@pytest.mark.base
@pytest.mark.DAE
def test_problematic_main():
from pySDC.projects.DAE.run.fully_implicit_dae_playground import main

main()


@pytest.mark.base
@pytest.mark.DAE
def test_synch_gen_playground_main():
from pySDC.projects.DAE.run.synchronous_machine_playground import main

Expand Down
28 changes: 14 additions & 14 deletions pySDC/tests/test_projects/test_DAE/test_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np


@pytest.mark.base
@pytest.mark.DAE
def test_pendulum_u_exact_main():
from pySDC.projects.DAE.problems.simple_DAE import pendulum_2d

Expand All @@ -18,7 +18,7 @@ def test_pendulum_u_exact_main():
assert np.isclose(abs(u_test), 0.0)


@pytest.mark.base
@pytest.mark.DAE
def test_one_transistor_amplifier_u_exact_main():
from pySDC.projects.DAE.problems.transistor_amplifier import one_transistor_amplifier

Expand All @@ -33,7 +33,7 @@ def test_one_transistor_amplifier_u_exact_main():
assert np.array_equal(abs(u_test), 0.0)


@pytest.mark.base
@pytest.mark.DAE
def test_two_transistor_amplifier_u_exact_main():
from pySDC.projects.DAE.problems.transistor_amplifier import two_transistor_amplifier

Expand All @@ -51,7 +51,7 @@ def test_two_transistor_amplifier_u_exact_main():
#
# Explicit test for the pendulum example
#
@pytest.mark.base
@pytest.mark.DAE
def test_pendulum_main():
from pySDC.projects.DAE.problems.simple_DAE import pendulum_2d
from pySDC.implementations.controller_classes.controller_nonMPI import controller_nonMPI
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_pendulum_main():
assert np.isclose(err, 0.0, atol=1e-4), "Error too large."


@pytest.mark.base
@pytest.mark.DAE
def test_one_transistor_amplifier_main():
from pySDC.projects.DAE.problems.transistor_amplifier import one_transistor_amplifier
from pySDC.implementations.controller_classes.controller_nonMPI import controller_nonMPI
Expand Down Expand Up @@ -168,7 +168,7 @@ def test_one_transistor_amplifier_main():
assert np.isclose(err, 0.0, atol=1e-4), "Error too large."


@pytest.mark.base
@pytest.mark.DAE
def test_two_transistor_amplifier_main():
from pySDC.projects.DAE.problems.transistor_amplifier import two_transistor_amplifier
from pySDC.implementations.controller_classes.controller_nonMPI import controller_nonMPI
Expand Down Expand Up @@ -236,7 +236,7 @@ def test_two_transistor_amplifier_main():
assert np.isclose(err, 0.0, atol=1e-4), "Error too large."


@pytest.mark.base
@pytest.mark.DAE
def test_synchgen_infinite_bus_main():
from pySDC.projects.DAE.problems.synchronous_machine import synchronous_machine_infinite_bus
from pySDC.implementations.controller_classes.controller_nonMPI import controller_nonMPI
Expand Down Expand Up @@ -313,7 +313,7 @@ def test_synchgen_infinite_bus_main():
assert np.isclose(err, 0.0, atol=1e-4), "Error too large."


@pytest.mark.base
@pytest.mark.DAE
def test_DiscontinuousTestDAE_singularity():
"""
Test if the event occurs at the correct time and proves if the right-hand side has with the correct values at the event.
Expand Down Expand Up @@ -361,7 +361,7 @@ def test_DiscontinuousTestDAE_singularity():
), f"ERROR: Right-hand side after event does not match! Expected {(7 * np.sqrt(51), 0.0)}, got {(f_after_event.diff[0], f_after_event.alg[0])}"


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('M', [2, 3, 4, 5])
def test_DiscontinuousTestDAE_SDC(M):
"""
Expand Down Expand Up @@ -427,7 +427,7 @@ def test_DiscontinuousTestDAE_SDC(M):
assert err < err_tol[M], f"ERROR: Error is too large! Expected {err_tol[M]=}, got {err=}"


@pytest.mark.base
@pytest.mark.DAE
@pytest.mark.parametrize('M', [3, 4, 5])
def test_DiscontinuousTestDAE_SDC_detection(M):
"""
Expand Down Expand Up @@ -521,7 +521,7 @@ def test_DiscontinuousTestDAE_SDC_detection(M):
), f"ERROR for M={M}: Event error is too large! Expected {event_err_tol[M]=}, got {event_err=}"


@pytest.mark.base
@pytest.mark.DAE
def test_WSCC9_evaluation():
r"""
Test for WSCC9 bus test case. The class is written for components :math:`m = 3`, :math:`n = 9`.
Expand All @@ -547,7 +547,7 @@ def test_WSCC9_evaluation():
assert len(f.diff) == nvars and len(f.alg) == nvars, 'Shape of f does not match with shape it is supposed to be!'


@pytest.mark.base
@pytest.mark.DAE
def test_WSCC9_update_YBus():
"""
Test if YBus is updated at time 0.05. For this SDC performs one time step.
Expand Down Expand Up @@ -612,7 +612,7 @@ def test_WSCC9_update_YBus():
), 'YBus after line outage does not match with the one it should supposed to!'


@pytest.mark.base
@pytest.mark.DAE
def test_WSCC9_SDC_detection():
"""
Test if state function states a root.
Expand Down Expand Up @@ -692,7 +692,7 @@ def test_WSCC9_SDC_detection():
), f'Found event does not match a threshold! Got {t_switch=}'


# @pytest.mark.base
# @pytest.mark.DAE
# def test_WSCC9_SDC_detection():
# """
# Test for one SDC run with event detection if the found event is close to the exact value and if the global error
Expand Down
Loading