Skip to content

Element Track Fixes #330

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

Merged
merged 1 commit into from
Jun 27, 2023
Merged
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
4 changes: 2 additions & 2 deletions src/madl_etrck.mad
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ local function track_drift (elm, m)
end

local function track_multipole (elm, m)
get_mult(elm, m) ; adj_mult(m)
get_mult(elm, m, 1) ; adj_mult(m)

if m.nmul == 0 and abs(elm.ksi) < minstr then return track_marker(elm, m) end

Expand Down Expand Up @@ -618,7 +618,7 @@ local function track_solenoid (elm, m)
end

if l < minlen then
if model == "DKD" and lrad ~= 0 then
if model == "DKD" and lrad > minlen then
return track_multipole(elm, m)
end
errorf("invalid solenoid '%s' length=%.4e [m] (>0 expected)", elm.name, l)
Expand Down