modularize domain decomposition (#244)
The domain decomposition, whereby cells were partitioned across domains/MPI ranks and then grouped together, was performed in an ad-hoc manner. This PR modularizes the domain decomposition. * A `domain_decomposition` class performs the cell partitioning given the recipe and some parameters. * This implementation has a single `domain_decomposition` class and flags are provided in a `group_rules` struct * The `domain_decomposition` could be specialized, or the simple rules struct could provide some sort of policy implementation in the future when the need arises * The domain_decomposition class is initialized inside the model constructor and is maintained as state of the model. * The cell model constructor interface has been simplified to a single constructor that takes a recipe and a reference to a `domain_decomposition`. * In the future we might pass in only a moveable subset of the `domain_decomposition` information required to build the model. fixes #242.
Showing
- miniapp/miniapp.cpp 9 additions, 30 deletionsminiapp/miniapp.cpp
- src/domain_decomposition.hpp 155 additions, 0 deletionssrc/domain_decomposition.hpp
- src/model.hpp 24 additions, 35 deletionssrc/model.hpp
- src/recipe.hpp 2 additions, 0 deletionssrc/recipe.hpp
- src/util/meta.hpp 0 additions, 4 deletionssrc/util/meta.hpp
- tests/global_communication/CMakeLists.txt 1 addition, 0 deletionstests/global_communication/CMakeLists.txt
- tests/global_communication/test_communicator.cpp 1 addition, 1 deletiontests/global_communication/test_communicator.cpp
- tests/global_communication/test_domain_decomposition.cpp 30 additions, 0 deletionstests/global_communication/test_domain_decomposition.cpp
- tests/unit/CMakeLists.txt 1 addition, 0 deletionstests/unit/CMakeLists.txt
- tests/unit/test_domain_decomposition.cpp 118 additions, 0 deletionstests/unit/test_domain_decomposition.cpp
- tests/validation/validate_ball_and_stick.hpp 2 additions, 1 deletiontests/validation/validate_ball_and_stick.hpp
- tests/validation/validate_kinetic.hpp 2 additions, 1 deletiontests/validation/validate_kinetic.hpp
- tests/validation/validate_soma.hpp 4 additions, 3 deletionstests/validation/validate_soma.hpp
- tests/validation/validate_synapses.hpp 2 additions, 1 deletiontests/validation/validate_synapses.hpp
Please register or sign in to comment