You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
511 B
23 lines
511 B
INITDUR = 100 // # ms to reach steady state |
|
DTSTEP = 0.1 |
|
proc init() { local temp |
|
//print "Using Custom Init" |
|
finitialize(v_init) |
|
t = -2*INITDUR // jump to a time "before" 0 |
|
temp = cvode.active() |
|
if (temp != 0) { // if cvode is on, turn it off |
|
cvode.active(0) |
|
dt = DTSTEP |
|
} |
|
while (t < -INITDUR) { |
|
fadvance() |
|
} |
|
if (temp != 0) { cvode.active(1) } // turn cvode back on if necessary |
|
t = 0 |
|
if (cvode.active()) { |
|
cvode.re_init() |
|
} else { |
|
fcurrent() |
|
} |
|
frecord_init() |
|
}
|
|
|