Skip to content

Commit

Permalink
cosusceptibility kicks in after incubation period
Browse files Browse the repository at this point in the history
  • Loading branch information
debog committed Nov 7, 2024
1 parent e8e7edc commit 2839e6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DiseaseCoupling.H
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ struct DiseaseCouplingParm
cs_arr[i] = 1.0;
for (int d = 0; d < nd; d++) {
if (d == a_d) { continue; }
auto status = a_ptd.m_runtime_idata[i0(d)+IntIdxDisease::status][i];
if (status == Status::infected) {
auto status = a_ptd.m_runtime_idata[i0(d)+IntIdxDisease::status][i];
auto counter = a_ptd.m_runtime_rdata[r0(d)+RealIdxDisease::disease_counter][i];
auto incub = a_ptd.m_runtime_rdata[r0(d)+RealIdxDisease::incubation_period][i];
if ((status == Status::infected) && (counter >= incub)) {
cs_arr[i] *= cosus_mat_arr[idx1D(a_d,d,nd)];
}
}
Expand Down

0 comments on commit 2839e6d

Please sign in to comment.