Skip to content

Commit a3c0f51

Browse files
authored
Merge pull request #330 from jgray-19/elem_fixes
Element Track Fixes
2 parents 7f12140 + 70175bc commit a3c0f51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/madl_etrck.mad

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ local function track_drift (elm, m)
299299
end
300300

301301
local function track_multipole (elm, m)
302-
get_mult(elm, m) ; adj_mult(m)
302+
get_mult(elm, m, 1) ; adj_mult(m)
303303

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

@@ -618,7 +618,7 @@ local function track_solenoid (elm, m)
618618
end
619619

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

0 commit comments

Comments
 (0)