Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 20 additions & 31 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
# List of source files
# Automatically detect source files in subdirectories
# Find all subdirectories in src/
file(GLOB _subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
list(FILTER _subdirs INCLUDE REGEX "^[^.]+$") # Exclude hidden files
set(_subdir_sources "")

# For each subdirectory, collect all .cpp and .H files
foreach(_dir IN LISTS _subdirs)
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir})
file(GLOB_RECURSE _dir_sources
"${_dir}/*.cpp"
"${_dir}/*.H"
)
list(APPEND _subdir_sources ${_dir_sources})
endif()
endforeach()

# Main source file list includes main.cpp and all subdirectory sources
set(_sources
main.cpp
AgentDefinitions.H
AgentContainer.H
AgentContainer.cpp
AirTravelFlow.H
AirTravelFlow.cpp
CaseData.H
CaseData.cpp
DiseaseCoupling.H
CensusData.H
CensusData.cpp
DiseaseParm.H
DiseaseParm.cpp
DemographicData.H
DemographicData.cpp
IO.H
IO.cpp
InteractionModel.H
InteractionModHome.H
InteractionModHomeNborhood.H
InteractionModWorkNborhood.H
InteractionModSchool.H
InteractionModWork.H
InteractionModelLibrary.H
InitializeInfections.H
InitializeInfections.cpp
UrbanPopAgentStruct.H
UrbanPopData.H
UrbanPopData.cpp
Utils.H
Utils.cpp)
${_subdir_sources}
)

# List of input files
set(_input_files)
Expand Down
2 changes: 1 addition & 1 deletion src/AgentContainer.H → src/agents/AgentContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "DiseaseStatus.H"
#include "HospitalModel.H"
#include "InteractionModelLibrary.H"
#include "Utils.H"
#include "RuntimeParams.H"

/*! \brief Derived class from ParticleContainer that defines agents and their functions */
class AgentContainer : public amrex::ParticleContainer<0, 0, RealIdx::nattribs, IntIdx::nattribs> {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/DiseaseStatus.H → src/disease/DiseaseStatus.H
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ template <typename AC, /*!< agent container type */
class DiseaseStatus {
public:
/*! \brief constructor */
DiseaseStatus<AC, ACT, ACTD, A>() {}
DiseaseStatus() {}

/*! \brief default destructor */
virtual ~DiseaseStatus<AC, ACT, ACTD, A>() = default;
virtual ~DiseaseStatus() = default;

/*! \brief Updates disease status of each agent at a given step and
* also updates a MultiFab that tracks disease statistics (hospitalization,
Expand Down
2 changes: 1 addition & 1 deletion src/HospitalModel.H → src/disease/HospitalModel.H
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "AgentDefinitions.H"
#include "DiseaseParm.H"
#include "InteractionModel.H"
#include "Utils.H"
#include "RuntimeParams.H"

using namespace amrex;

Expand Down
6 changes: 3 additions & 3 deletions src/Utils.H → src/init/RuntimeParams.H
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*! @file Utils.H
/*! @file RuntimeParams.H
\brief Defines the #ExaEpi::Utils namespace
*/

#ifndef UTILS_H_
#define UTILS_H_
#ifndef RUNTIME_PARAMS_H_
#define RUNTIME_PARAMS_H_

#include <AMReX_Geometry.H>
#include <AMReX_IntVect.H>
Expand Down
4 changes: 2 additions & 2 deletions src/Utils.cpp → src/init/RuntimeParams.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! @file Utils.cpp
/*! @file RuntimeParams.cpp
\brief Contains function implementations for the #ExaEpi::Utils namespace
*/

Expand All @@ -11,7 +11,7 @@
#include <AMReX_RealBox.H>

#include "DemographicData.H"
#include "Utils.H"
#include "RuntimeParams.H"

#include <cmath>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/CensusData.H → src/init/census/CensusData.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "AgentContainer.H"
#include "CaseData.H"
#include "DemographicData.H"
#include "Utils.H"
#include "RuntimeParams.H"

/*! \brief A class encapsulating all data relevant to the ICType Census */
struct CensusData {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "AgentContainer.H"
#include "CaseData.H"
#include "DemographicData.H"
#include "Utils.H"
#include "RuntimeParams.H"

void setInitialCasesFromFile(AgentContainer& pc, CaseData& cases, const std::string& name, int d_idx,
const Vector<int>& FIPS_codes, const Vector<int>& unit_community_start, iMultiFab& comm_mf,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/UrbanPopData.H → src/init/urbanpop/UrbanPopData.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "CaseData.H"
#include "UrbanPopAgentStruct.H"
#include "Utils.H"
#include "RuntimeParams.H"

struct AgentExtras {
amrex::IntVect home_xy;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ template <typename PCType, /*!< agent container type */
class InteractionModel {
public:
/*! \brief null constructor */
InteractionModel<PCType, PTDType, PType>(bool _fast_bin) : fast_bin(_fast_bin) {}
InteractionModel(bool _fast_bin) : fast_bin(_fast_bin) {}

/*! \brief default destructor */
virtual ~InteractionModel<PCType, PTDType, PType>() = default;
virtual ~InteractionModel() = default;

/*! \brief Interact agents for a model */
virtual void interactAgents(PCType&, MultiFab&) = 0;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "DemographicData.H"
#include "IO.H"
#include "InitializeInfections.H"
#include "RuntimeParams.H"
#include "UrbanPopData.H"
#include "Utils.H"

#include "version.h"

Expand Down
File renamed without changes.
File renamed without changes.