Skip to content
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

added support of complex numbers for mesh adaptivity in MIRK method #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions lib/BoundaryValueDiffEqMIRK/src/adaptivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Generate new mesh based on the defect.
(abstol, _, _), kwargs = __split_mirk_kwargs(; cache.kwargs...)
N = length(mesh)

safety_factor = T(1.3)
ρ = T(1.0) # Set rho=1 means mesh distribution will take place everytime.
safety_factor = abs.(T(1.3))
ρ = abs.(T(1.0)) # Set rho=1 means mesh distribution will take place everytime.
Nsub_star = 0
Nsub_star_ub = 4 * (N - 1)
Nsub_star_lb = N ÷ 2
Expand All @@ -47,7 +47,7 @@ Generate new mesh based on the defect.

n_predict = round(Int, (safety_factor * r₂) + 1)
n = N - 1
n_ = T(0.1) * n
n_ = abs.(T(0.1)) * n
n_predict = ifelse(abs((n_predict - n)) < n_, round(Int, n + n_), n_predict)

if r₁ ≤ ρ * r₂
Expand Down
Loading