PFASST++
pfasst::IStatus Class Referenceabstract

Abstract interface for the current status of the algorithm. More...

#include <interfaces.hpp>

+ Inheritance diagram for pfasst::IStatus:
+ Collaboration diagram for pfasst::IStatus:

Public Member Functions

virtual ~IStatus ()
 
virtual void clear ()=0
 Resetting status. More...
 
virtual void set_converged (bool converged)=0
 sets a new converged state. More...
 
virtual bool get_converged (int rank)=0
 Retreive converged state for specific processor. More...
 
virtual void set_comm (ICommunicator *comm)
 Set new communicator to use. More...
 
virtual bool previous_is_iterating ()
 Check whether previous processor is still iterating. More...
 
virtual bool keep_iterating ()
 Check whether this processor should keep iterating. More...
 
virtual void post (int tag)=0
 
virtual void send (int tag)=0
 
virtual void recv (int tag)=0
 

Static Public Attributes

static const int NOT_CONVERGED = 0
 
static const int CONVERGED = 1
 

Protected Attributes

ICommunicatorcomm
 

Detailed Description

Abstract interface for the current status of the algorithm.

The status requires a communicator to enable sending and receiving stati of other processors.

Definition at line 87 of file interfaces.hpp.

Constructor & Destructor Documentation

pfasst::IStatus::~IStatus ( )
virtual

Definition at line 48 of file interfaces_impl.hpp.

Member Function Documentation

virtual void pfasst::IStatus::clear ( )
pure virtual

Resetting status.

Note
Logic is implementation defined.

Implemented in pfasst::mpi::MPIStatus.

virtual bool pfasst::IStatus::get_converged ( int  rank)
pure virtual

Retreive converged state for specific processor.

Parameters
[in]rankID of processor to check converged state for
Returns
true if processor with ID rank has converged; false otherwise
Note
Inspection logic is implementation defined.

Implemented in pfasst::mpi::MPIStatus.

Referenced by keep_iterating(), and previous_is_iterating().

+ Here is the caller graph for this function:

bool pfasst::IStatus::keep_iterating ( )
virtual

Check whether this processor should keep iterating.

Returns
true if this processor should keep iterating; false if it should switch to converged state
Todo:
Consider asserting presence of valid communicator.

Definition at line 77 of file interfaces_impl.hpp.

References comm, get_converged(), ML_CLOG, and pfasst::ICommunicator::rank().

+ Here is the call graph for this function:

virtual void pfasst::IStatus::post ( int  tag)
pure virtual

Implemented in pfasst::mpi::MPIStatus.

bool pfasst::IStatus::previous_is_iterating ( )
virtual

Check whether previous processor is still iterating.

Returns
true if previous processor has converged; false if it is still iterating
Todo:
Consider asserting presence of valid communicator.

Definition at line 58 of file interfaces_impl.hpp.

References comm, get_converged(), and pfasst::ICommunicator::rank().

+ Here is the call graph for this function:

virtual void pfasst::IStatus::recv ( int  tag)
pure virtual

Implemented in pfasst::mpi::MPIStatus.

virtual void pfasst::IStatus::send ( int  tag)
pure virtual

Implemented in pfasst::mpi::MPIStatus.

void pfasst::IStatus::set_comm ( ICommunicator comm)
virtual

Set new communicator to use.

Todo:
Consider asserting validity of the given pointer to the communicator.

Reimplemented in pfasst::mpi::MPIStatus.

Definition at line 52 of file interfaces_impl.hpp.

References comm.

virtual void pfasst::IStatus::set_converged ( bool  converged)
pure virtual

sets a new converged state.

Implemented in pfasst::mpi::MPIStatus.

Member Data Documentation

const int pfasst::IStatus::CONVERGED = 1
static

Definition at line 91 of file interfaces.hpp.

Referenced by pfasst::mpi::MPIStatus::recv(), and pfasst::mpi::MPIStatus::send().

const int pfasst::IStatus::NOT_CONVERGED = 0
static

Definition at line 90 of file interfaces.hpp.

Referenced by pfasst::mpi::MPIStatus::recv(), and pfasst::mpi::MPIStatus::send().


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