Skip to content

Commit

Permalink
better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Sep 27, 2024
1 parent cf42a71 commit 0d2de61
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
17 changes: 8 additions & 9 deletions src/DiseaseStatus.H
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,14 @@ void DiseaseStatus<AC,ACT,ACTD,A>::updateAgents(AC& a_agents, /*!< Agent contain
if (timer_ptr[i] > 0) { flag_hosp_ptr[i] = 1; }
if (flag_ICU_i) { flag_ICU_ptr[i] = 1; }
if (flag_vent_i) { flag_vent_ptr[i] = 1; }
} else {
if (!isHospitalized(i,ptd)) {
if (counter_ptr[i] >= (latent_period_ptr[i] + infectious_period_ptr[i])) {
status_ptr[i] = Status::immune;
counter_ptr[i] = amrex::RandomNormal(immune_length_mean, immune_length_std, engine);
symptomatic_ptr[i] = SymptomStatus::presymptomatic;
withdrawn_ptr[i] = 0;
}
}
}
}
if (!isHospitalized(i,ptd)) {
if (counter_ptr[i] >= (latent_period_ptr[i] + infectious_period_ptr[i])) {
status_ptr[i] = Status::immune;
counter_ptr[i] = amrex::RandomNormal(immune_length_mean, immune_length_std, engine);
symptomatic_ptr[i] = SymptomStatus::presymptomatic;
withdrawn_ptr[i] = 0;
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ void runAgent ()
}

File << std::setw(5) << "Day"
<< std::setw(10) << "Susceptible"
<< std::setw(10) << "Infected"
<< std::setw(10) << "Recovered"
<< std::setw(10) << "Deaths"
<< std::setw(12) << "Susceptible"
<< std::setw(12) << "Infected"
<< std::setw(12) << "Recovered"
<< std::setw(12) << "Deaths"
<< std::setw(15) << "Hospitalized"
<< std::setw(15) << "Ventilated"
<< std::setw(10) << "ICU"
<< std::setw(10) << "Exposed"
<< std::setw(12) << "ICU"
<< std::setw(12) << "Exposed"
<< std::setw(15) << "Asymptomatic"
<< std::setw(15) << "Presymptomatic"
<< std::setw(15) << "Symptomatic\n";
Expand Down Expand Up @@ -307,14 +307,14 @@ void runAgent ()
}

File << std::setw(5) << i
<< std::setw(10) << counts[0]
<< std::setw(10) << counts[1]
<< std::setw(10) << counts[2]
<< std::setw(10) << counts[4]
<< std::setw(12) << counts[0]
<< std::setw(12) << counts[1]
<< std::setw(12) << counts[2]
<< std::setw(12) << counts[4]
<< std::setw(15) << mmc[0]
<< std::setw(15) << mmc[1]
<< std::setw(10) << mmc[2]
<< std::setw(10) << counts[5]
<< std::setw(12) << mmc[2]
<< std::setw(12) << counts[5]
<< std::setw(15) << counts[6]
<< std::setw(15) << counts[7]
<< std::setw(15) << counts[8] << "\n";
Expand Down

0 comments on commit 0d2de61

Please sign in to comment.