fpmas 1.6
Public Member Functions | List of all members
fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType > Class Template Reference

#include <dist_move_algo.h>

Inheritance diagram for fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >:
Collaboration graph
[legend]

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
 
- Public Member Functions inherited from fpmas::api::model::EndCondition< CellType >
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 RangeType, unsigned int MaxRangeSize, typename CellType>
class fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >

Implements a static api::model::EndCondition for the DistributedMoveAlgorithm, based on the provided range and the maximum range size.

RangeType requirements:

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.

Constructor & Destructor Documentation

◆ StaticEndCondition()

template<typename RangeType , unsigned int MaxRangeSize, typename CellType >
fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >::StaticEndCondition ( )
inline

StaticEndCondition constructor.

The maximum iteration count is computed from the RangeType radius() and the MaxRangeSize.

Member Function Documentation

◆ init()

template<typename RangeType , unsigned int MaxRangeSize, typename CellType >
void fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >::init ( api::communication::MpiCommunicator ,
std::vector< api::model::SpatialAgent< CellType > * >  ,
std::vector< CellType * >   
)
inlineoverride

Initializes the end condition.

◆ step()

template<typename RangeType , unsigned int MaxRangeSize, typename CellType >
void fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >::step ( )
inlineoverridevirtual

Increments internal counter.

Implements fpmas::api::model::EndCondition< CellType >.

◆ end()

template<typename RangeType , unsigned int MaxRangeSize, typename CellType >
bool fpmas::model::StaticEndCondition< RangeType, MaxRangeSize, CellType >::end ( )
inlineoverridevirtual

Returns true if and only if the internal counter is greater or equal to the maximum iteration count.

Returns
true iff the end condition has been reached

Implements fpmas::api::model::EndCondition< CellType >.


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