Skip to content

Commit

Permalink
examples fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMeisrimelModelon committed Dec 20, 2023
1 parent d9d0103 commit 072db04
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,219 +18,219 @@
import nose
from assimulo import testattr
from assimulo.exception import AssimuloException
import assimulo.examples
from assimulo.examples import *

class Test_Examples:
@testattr(stddist = True)
def test_cvode_with_jac_sparse(self):
try:
assimulo.examples.cvode_with_jac_sparse.run_example(with_plots=False)
cvode_with_jac_sparse.run_example(with_plots=False)
except AssimuloException:
pass #Handle the case when SuperLU is not installed

@testattr(stddist = True)
def test_ida_with_user_defined_handle_result(self):
assimulo.examples.ida_with_user_defined_handle_result.run_example(with_plots=False)
ida_with_user_defined_handle_result.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5dae_time_events_f(self):
assimulo.examples.radau5dae_time_events.run_example(with_plots=False)
radau5dae_time_events.run_example(with_plots=False)

@testattr(stddist = True)
def test_kinsol_basic(self):
assimulo.examples.kinsol_basic.run_example(with_plots=False)
kinsol_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_kinsol_with_jac(self):
assimulo.examples.kinsol_with_jac.run_example(with_plots=False)
kinsol_with_jac.run_example(with_plots=False)

@testattr(stddist = True)
def test_kinsol_ors(self):
assimulo.examples.kinsol_ors.run_example(with_plots=False)
kinsol_ors.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_preconditioning(self):
assimulo.examples.cvode_with_preconditioning.run_example(with_plots=False)
cvode_with_preconditioning.run_example(with_plots=False)

@testattr(stddist = True)
def test_dasp3_basic(self):
print("Currently not running test_dasp3_basic. Numerically unstable problem.")
#assimulo.examples.dasp3_basic.run_example(with_plots=False)
#dasp3_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_gyro(self):
assimulo.examples.cvode_gyro.run_example(with_plots=False)
cvode_gyro.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_basic(self):
assimulo.examples.cvode_basic.run_example(with_plots=False)
cvode_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_disc(self):
assimulo.examples.cvode_with_disc.run_example(with_plots=False)
cvode_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_initial_sensitivity(self):
assimulo.examples.cvode_with_initial_sensitivity.run_example(with_plots=False)
cvode_with_initial_sensitivity.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_jac(self):
assimulo.examples.cvode_with_jac.run_example(with_plots=False)
cvode_with_jac.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_jac_spgmr(self):
assimulo.examples.cvode_with_jac_spgmr.run_example(with_plots=False)
cvode_with_jac_spgmr.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_with_jac_spgmr(self):
assimulo.examples.ida_with_jac_spgmr.run_example(with_plots=False)
ida_with_jac_spgmr.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_parameters(self):
assimulo.examples.cvode_with_parameters.run_example(with_plots=False)
cvode_with_parameters.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_parameters_fcn(self):
assimulo.examples.cvode_with_parameters_fcn.run_example(with_plots=False)
cvode_with_parameters_fcn.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_with_parameters_modified(self):
assimulo.examples.cvode_with_parameters_modified.run_example(with_plots=False)
cvode_with_parameters_modified.run_example(with_plots=False)

@testattr(stddist = True)
def test_euler_basic(self):
assimulo.examples.euler_basic.run_example(with_plots=False)
euler_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_euler_with_disc(self):
assimulo.examples.euler_with_disc.run_example(with_plots=False)
euler_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_rungekutta4_basic(self):
assimulo.examples.rungekutta4_basic.run_example(with_plots=False)
rungekutta4_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_rungekutta34_basic(self):
assimulo.examples.rungekutta34_basic.run_example(with_plots=False)
rungekutta34_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_rungekutta34_with_disc(self):
assimulo.examples.rungekutta34_with_disc.run_example(with_plots=False)
rungekutta34_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_with_disc(self):
assimulo.examples.ida_with_disc.run_example(with_plots=False)
ida_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_with_initial_sensitivity(self):
assimulo.examples.ida_with_initial_sensitivity.run_example(with_plots=False)
ida_with_initial_sensitivity.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_with_jac(self):
assimulo.examples.ida_with_jac.run_example(with_plots=False)
ida_with_jac.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_with_parameters(self):
assimulo.examples.ida_with_parameters.run_example(with_plots=False)
ida_with_parameters.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_vanderpol_c(self):
assimulo.examples.radau5ode_vanderpol.run_example(with_plots=False)
radau5ode_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_vanderpol_f(self):
assimulo.examples.radau5ode_vanderpol.run_example(with_plots=False)
radau5ode_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_with_disc_c(self):
assimulo.examples.radau5ode_with_disc.run_example(with_plots=False)
radau5ode_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_with_disc_f(self):
assimulo.examples.radau5ode_with_disc.run_example(with_plots=False)
radau5ode_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_with_disc_sparse(self):
assimulo.examples.radau5ode_with_disc_sparse.run_example(with_plots=False)
radau5ode_with_disc_sparse.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5ode_with_jac_sparse_c(self):
assimulo.examples.radau5ode_with_jac_sparse.run_example(with_plots=False)
radau5ode_with_jac_sparse.run_example(with_plots=False)

@testattr(stddist = True)
def test_radau5dae_vanderpol_f(self):
assimulo.examples.radau5dae_vanderpol.run_example(with_plots=False)
radau5dae_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_dopri5_basic(self):
assimulo.examples.dopri5_basic.run_example(with_plots=False)
dopri5_basic.run_example(with_plots=False)

@testattr(stddist = True)
def test_dopri5_with_disc(self):
assimulo.examples.dopri5_with_disc.run_example(with_plots=False)
dopri5_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_rodasode_vanderpol(self):
assimulo.examples.rodasode_vanderpol.run_example(with_plots=False)
rodasode_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_mech_system_pendulum1(self):
"""
This tests the class Mechanical_system together with ind1 and ida
"""
assimulo.examples.mech_system_pendulum.run_example('ind1',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ind1',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_mech_system_pendulum2(self):
"""
This tests the class Mechanical_system together with ind2 and ida
"""
assimulo.examples.mech_system_pendulum.run_example('ind2',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ind2',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_mech_system_pendulum3(self):
"""
This tests the class Mechanical_system together with ind3 and ida
"""
assimulo.examples.mech_system_pendulum.run_example('ind3',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ind3',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_mech_system_pendulum_ggl2(self):
"""
This tests the class Mechanical_system together with ggl2 and ida
"""
assimulo.examples.mech_system_pendulum.run_example('ggl2',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ggl2',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_mech_system_pendulum_ovstab2(self):
"""
This tests the class Mechanical_system together with ovstab2 and odassl
"""
assimulo.examples.mech_system_pendulum.run_example('ovstab2',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ovstab2',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_mech_system_pendulum_ovstab1(self):
"""
This tests the class Mechanical_system together with ovstab1 and odassl
"""
assimulo.examples.mech_system_pendulum.run_example('ovstab1',with_plots=False,with_test=True)
mech_system_pendulum.run_example('ovstab1',with_plots=False,with_test=True)

@testattr(stddist = True)
def test_lsodar_vanderpol(self):
assimulo.examples.lsodar_vanderpol.run_example(with_plots=False)
lsodar_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_lsodar_with_disc(self):
assimulo.examples.lsodar_with_disc.run_example(with_plots=False)
lsodar_with_disc.run_example(with_plots=False)

@testattr(stddist = True)
def test_euler_vanderpol(self):
assimulo.examples.euler_vanderpol.run_example(with_plots=False)
euler_vanderpol.run_example(with_plots=False)

@testattr(stddist = True)
def test_cvode_basic_backward(self):
assimulo.examples.cvode_basic_backward.run_example(with_plots=False)
cvode_basic_backward.run_example(with_plots=False)

@testattr(stddist = True)
def test_ida_basic_backward(self):
assimulo.examples.ida_basic_backward.run_example(with_plots=False)
ida_basic_backward.run_example(with_plots=False)

0 comments on commit 072db04

Please sign in to comment.