![]() |
fpmas 1.6
|
#include <dist_move_algo.h>
Public Member Functions | |
StaticEndCondition () | |
void | init (api::communication::MpiCommunicator &, std::vector< api::model::SpatialAgent< CellType > * >, std::vector< CellType * >) override |
void | step () override |
bool | end () override |
![]() | |
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 |
Implements a static api::model::EndCondition for the DistributedMoveAlgorithm, based on the provided range and the maximum range size.
RangeType
requirements:
MaxRangeSize
parameterconst RangeType range(MaxRangeSize)
, range.radius(nullptr)
must return a valid radius. This radius is considered as the "maximum radius of any range of type RangeType in
the simulation". nullptr
is passed as the origin
argument to radius()
, since the static value returned must be independent from the range's origin.A static required number of steps compatible with the DistributedMoveAlgorithm is then determined from the computed maximum radius. Ranges are still allowed to evolve dynamically at runtime, as long as their radius stays less than or equal to the maximum radius.
|
inline |
StaticEndCondition constructor.
The maximum iteration count is computed from the RangeType
radius() and the MaxRangeSize
.
|
inlineoverride |
Initializes the end condition.
|
inlineoverridevirtual |
Increments internal counter.
Implements fpmas::api::model::EndCondition< CellType >.
|
inlineoverridevirtual |
Returns true if and only if the internal counter is greater or equal to the maximum iteration count.
Implements fpmas::api::model::EndCondition< CellType >.