LifeV
|
Displayer - This class is used to display messages in parallel simulations. More...
#include <Displayer.hpp>
Protected Attributes | |
commPtr_Type | M_comm |
bool | M_verbose |
Public Types | |
typedef Epetra_Comm | comm_Type |
typedef std::shared_ptr< comm_Type > | commPtr_Type |
Constructors & Destructor | |
Displayer () | |
Constructor. More... | |
Displayer (const commPtr_Type &comm) | |
Displayer (const Displayer &displayer) | |
Copy constructor. More... | |
virtual | ~Displayer () |
Destructor. More... | |
Methods | |
template<typename T1 > | |
void | leaderPrint (const T1 &message1) const |
Print one message. More... | |
template<typename T1 , typename T2 > | |
void | leaderPrint (const T1 &message1, const T2 &message2) const |
Print two messages. More... | |
template<typename T1 , typename T2 , typename T3 > | |
void | leaderPrint (const T1 &message1, const T2 &message2, const T3 &message3) const |
Print three messages. More... | |
template<typename T1 > | |
void | leaderPrintMax (const T1 &message1, const Real &localMax) const |
Print the maximum value among the processors. More... | |
template<typename T1 , typename T2 > | |
void | leaderPrintMax (const T1 &message1, const Real &localMax, const T2 &message2) const |
Print the maximum value among the processors. More... | |
const bool & | isLeader () const |
Determine if it is the leader. More... | |
Set Methods | |
void | setCommunicator (const commPtr_Type &comm) |
Set the communicator. More... | |
Get Methods | |
const commPtr_Type & | comm () const |
Get the communicator. More... | |
Displayer - This class is used to display messages in parallel simulations.
If a communicator is passed to the constructor only one processor (the leader) will print out the message. If no communicator is passed to the constructor every processor prints the messages.
Definition at line 62 of file Displayer.hpp.
typedef Epetra_Comm comm_Type |
Definition at line 69 of file Displayer.hpp.
typedef std::shared_ptr< comm_Type > commPtr_Type |
Definition at line 70 of file Displayer.hpp.
Displayer | ( | ) |
Constructor.
Definition at line 46 of file Displayer.cpp.
|
explicit |
|
inlinevirtual |
Destructor.
Definition at line 90 of file Displayer.hpp.
void leaderPrint | ( | const T1 & | message1 | ) | const |
Print one message.
message1 | message to print out |
Definition at line 187 of file Displayer.hpp.
void leaderPrint | ( | const T1 & | message1, |
const T2 & | message2 | ||
) | const |
Print two messages.
message1 | first message to print out |
message2 | second message to print out |
Definition at line 197 of file Displayer.hpp.
void leaderPrint | ( | const T1 & | message1, |
const T2 & | message2, | ||
const T3 & | message3 | ||
) | const |
Print three messages.
message1 | first message to print out |
message2 | second message to print out |
message3 | third message to print out |
Definition at line 207 of file Displayer.hpp.
void leaderPrintMax | ( | const T1 & | message1, |
const Real & | localMax | ||
) | const |
Print the maximum value among the processors.
Take a Real input value from all processors in the communicator, computes the max, returns the max to all processors of the communicator. Then processor 0 of the communicator prints it.
message1 | message to print out |
localMax | Int or Real local maximum value that we want to print |
Definition at line 217 of file Displayer.hpp.
void leaderPrintMax | ( | const T1 & | message1, |
const Real & | localMax, | ||
const T2 & | message2 | ||
) | const |
Print the maximum value among the processors.
Take a Real input value from all processors in the communicator, computes the max, returns the max to all processors of the communicator. Then processor 0 of the communicator prints it.
message1 | message to print out |
message2 | second message to print out |
localMax | Int or Real local maximum value that we want to print |
Definition at line 238 of file Displayer.hpp.
const bool & isLeader | ( | ) | const |
Determine if it is the leader.
Definition at line 76 of file Displayer.cpp.
void setCommunicator | ( | const commPtr_Type & | comm | ) |
Set the communicator.
comm | the communicator |
Definition at line 86 of file Displayer.cpp.
|
inline |
Get the communicator.
Definition at line 167 of file Displayer.hpp.
|
protected |
Definition at line 176 of file Displayer.hpp.
|
protected |
Definition at line 177 of file Displayer.hpp.