Skip to content

Commit

Permalink
Cleaner main branch again with default velocity formulation in Radau.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBreuling committed Aug 23, 2024
1 parent b89f99f commit 089f67b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 2,064 deletions.
6 changes: 1 addition & 5 deletions examples/daes/robertson.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ def jac(t, y, yp):

##############
# dae solution
##############
# method = "Radau"
# method = "PSIDE"
method = "PTIRK"

##############
start = time.time()
sol = solve_dae(F, t_span, y0, yp0, atol=atol, rtol=rtol, method=method, t_eval=t_eval, jac=jac, dense_output=True)
end = time.time()
Expand Down
5 changes: 2 additions & 3 deletions examples/odes/one_element_timoshenko_rod.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ def f(t, vy):
t_eval = np.linspace(t0, t1, num=int(1e4))
t_eval = None

# method = "RK23"
# method = "BDF"
method = "Radau"
# method = "RK23"
# method = "PSIDE"

# initial positions
q0 = np.array([length, 0, 0], dtype=float)
Expand Down Expand Up @@ -213,7 +212,7 @@ def f(t, vy):
# dae solution
##############
start = time.time()
sol = solve_dae(F, t_span, y0, yp0, atol=atol, rtol=rtol, method=method, t_eval=t_eval, stages=5)
sol = solve_dae(F, t_span, y0, yp0, atol=atol, rtol=rtol, method=method, t_eval=t_eval, stages=3)
# sol = solve_ivp(f, t_span, y0, method=method, t_eval=t_eval, atol=atol, rtol=rtol)
end = time.time()
t = sol.t
Expand Down
4 changes: 0 additions & 4 deletions scipy_dae/integrate/_dae/dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@
from .base import DaeSolver
from .bdf import BDFDAE
from .radau import RadauDAE
from .pside import PPSIDEDAE
from .ptirk import PTIRKDAE
from scipy.optimize import OptimizeResult
from .common import DaeSolution


METHODS = {
"BDF": BDFDAE,
"Radau": RadauDAE,
"PSIDE": PPSIDEDAE,
"PTIRK": PTIRKDAE,
}


Expand Down
2 changes: 0 additions & 2 deletions scipy_dae/integrate/_dae/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ py3.install_sources([
'common.py',
'dae.py',
'radau.py',
'pside.py',
'ptirk.py',
],
subdir: 'scipy_dae/integrate/_dae'
)
Expand Down
Loading

0 comments on commit 089f67b

Please sign in to comment.