Closed kellypierce closed 2 years ago
https://github.com/eho-tacc/episimlab/blob/b409c88b262cd91783cd35ecc0d6fb14623ac891/episimlab/seir/bf_cython_engine.pyx#L231
If new_S = S + d_S and compt_v[n, a, r, 0] = new_S - S, then compt_v[n, a, r, 0] = d_S
new_S = S + d_S
compt_v[n, a, r, 0] = new_S - S
compt_v[n, a, r, 0] = d_S
Other compartment deltas can be similarly revised. This wouldn't make a dramatic impact on performance, but it would clean up the code a bit.
partially addressed in https://github.com/eho-tacc/episimlab/pull/38
Fixed in v2
https://github.com/eho-tacc/episimlab/blob/b409c88b262cd91783cd35ecc0d6fb14623ac891/episimlab/seir/bf_cython_engine.pyx#L231
If
new_S = S + d_S
andcompt_v[n, a, r, 0] = new_S - S
, thencompt_v[n, a, r, 0] = d_S
Other compartment deltas can be similarly revised. This wouldn't make a dramatic impact on performance, but it would clean up the code a bit.