fpmas 1.6
Public Member Functions | List of all members
fpmas::api::model::EndCondition< CellType > Class Template Referenceabstract

#include <spatial_model.h>

Inheritance diagram for fpmas::api::model::EndCondition< CellType >:
Inheritance graph
[legend]

Public Member Functions

virtual void init (api::communication::MpiCommunicator &comm, std::vector< api::model::SpatialAgent< CellType > * > agents, std::vector< CellType * > cells)=0
 
virtual void step ()=0
 
virtual bool end ()=0
 

Detailed Description

template<typename CellType>
class fpmas::api::model::EndCondition< CellType >

Generic EndCondition that can be used by a DistributedMoveAlgorithm.

Member Function Documentation

◆ init()

template<typename CellType >
virtual void fpmas::api::model::EndCondition< CellType >::init ( api::communication::MpiCommunicator comm,
std::vector< api::model::SpatialAgent< CellType > * >  agents,
std::vector< CellType * >  cells 
)
pure virtual

Initializes the end condition.

Since this method is synchronously called by the DistributedMoveAlgorithm on each process, it is possible to perform collective communications using the provided MpiCommunicator.

The provided agents list contains all the LOCAL SpatialAgents on which the DistributedMoveAlgorithm will be applied.

The cells contains LOCAL cells of the current Cell network, within which agents are moving.

Parameters
commMPI communicator
agentsLOCAL agents on which the DistributedMoveAlgorithm is applied
cellsLOCAL cells of the current Cell network

◆ step()

template<typename CellType >
virtual void fpmas::api::model::EndCondition< CellType >::step ( )
pure virtual

◆ end()

template<typename CellType >
virtual bool fpmas::api::model::EndCondition< CellType >::end ( )
pure virtual

Returns true if and only if the end condition has been reached.

Returns
true iff the end condition has been reached

Implemented in fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >, fpmas::model::DynamicEndCondition< CellType >, and fpmas::model::DynamicEndCondition< api::model::Cell >.


The documentation for this class was generated from the following file: