#include <graph_builder.h>
template<typename CellType>
class fpmas::model::CellNetworkBuilder< CellType >
An fpmas::api::model::CellNetworkBuilder implementation.
The algorithm takes as input a generic fpmas::api::graph::DistributedGraphBuilder instance, and builds a Cell network from it with appropriate AgentGroups and CELL_SUCCESSOR links.
- Template Parameters
-
CellType | type of cells to build |
◆ CellNetworkBuilder() [1/3]
template<typename CellType >
CellNetworkBuilder constructor.
- Parameters
-
graph_builder | DistributedGraphBuilder used to build the Cell graph |
cell_count | size of the Cell network to build. The global network size should be provided on all processes, independently from the distribution. |
cell_allocator | function used to dynamically allocate LOCAL CellType instances |
distant_cell_allocator | function used to dynamically allocate DISTANT CellType instances |
◆ CellNetworkBuilder() [2/3]
template<typename CellType >
CellNetworkBuilder constructor.
- Parameters
-
graph_builder | DistributedGraphBuilder used to build the Cell graph |
cell_count | size of the Cell network to build. The global network size should be provided on all processes, independently from the distribution. |
cell_allocator | function used to dynamically allocate LOCAL and DISTANT CellType instances |
◆ CellNetworkBuilder() [3/3]
template<typename CellType >
CellNetworkBuilder constructor.
LOCAL and DISTANT CellType instances are allocated using the new CellType
instruction.
- Parameters
-
graph_builder | DistributedGraphBuilder used to build the Cell graph |
cell_count | size of the Cell network to build. The global network size should be provided on all processes, independently from the distribution. |
◆ build() [1/2]
template<typename CellType >
Builds a Cell network into the specified spatial_model
.
Built Cells are added to the SpatialModel using the SpatialModel::add() method.
The method also perform synchronizations on the underlying spatial_model
graph to ensure that all links created are properly committed and synchronized upon return.
- Parameters
-
spatial_model | spatial model in which cells will be added |
- Returns
- cells built on the current process
Implements fpmas::api::model::CellNetworkBuilder< CellType >.
◆ build() [2/2]
template<typename CellType >
Same as build(spatial_model)
, but also adds built cells to groups
, in order to assign behaviors to cells.
- Parameters
-
spatial_model | spatial model in which cells will be added |
groups | groups to which built cells will be added |
- Returns
- cells built on the current process
Implements fpmas::api::model::CellNetworkBuilder< CellType >.
The documentation for this class was generated from the following file: