Public Member Functions | Private Attributes | List of all members
oomph::MPIOutputModifier Class Reference

MPI output modifier: Precedes every output by specification of the processor ID. Output can be restricted to a single processor. More...

#include <oomph_utilities.h>

+ Inheritance diagram for oomph::MPIOutputModifier:

Public Member Functions

 MPIOutputModifier ()
 Constructor – initialise flags for output from all processors. More...
 
OomphCommunicator *& communicator_pt ()
 Return pointer to communicator. More...
 
virtual bool operator() (std::ostream &stream)
 Precede the output by the processor ID but output everything. More...
 
void restrict_output_to_single_processor (const unsigned &output_rank=0)
 Switch to ensure output is only produced from a single processor (default: Master node, i.e. rank 0) More...
 
void allow_output_from_all_processors ()
 Switch to ensure output is only produced from a single processor (default: Master node, i.e. rank 0) More...
 
- Public Member Functions inherited from oomph::OutputModifier
 OutputModifier ()
 Empty constructor. More...
 
virtual ~OutputModifier ()
 Empty virtual destructor. More...
 

Private Attributes

unsigned Output_rank
 Rank of single processor that produces output (only used if Output_from_single_processor=true. More...
 
bool Output_from_single_processor
 Boolean to control if output is performed only on a single processor (default: false) More...
 
OomphCommunicatorCommunicator_pt
 Communicator. More...
 

Detailed Description

MPI output modifier: Precedes every output by specification of the processor ID. Output can be restricted to a single processor.

Definition at line 763 of file oomph_utilities.h.

Constructor & Destructor Documentation

◆ MPIOutputModifier()

oomph::MPIOutputModifier::MPIOutputModifier ( )
inline

Constructor – initialise flags for output from all processors.

Definition at line 779 of file oomph_utilities.h.

Member Function Documentation

◆ allow_output_from_all_processors()

void oomph::MPIOutputModifier::allow_output_from_all_processors ( )
inline

Switch to ensure output is only produced from a single processor (default: Master node, i.e. rank 0)

Definition at line 801 of file oomph_utilities.h.

◆ communicator_pt()

OomphCommunicator*& oomph::MPIOutputModifier::communicator_pt ( )
inline

Return pointer to communicator.

Definition at line 782 of file oomph_utilities.h.

Referenced by oomph::MPI_Helpers::init().

◆ operator()()

bool oomph::MPIOutputModifier::operator() ( std::ostream &  stream)
virtual

Precede the output by the processor ID but output everything.

Reimplemented from oomph::OutputModifier.

Definition at line 952 of file oomph_utilities.cc.

References Communicator_pt, Output_from_single_processor, and Output_rank.

◆ restrict_output_to_single_processor()

void oomph::MPIOutputModifier::restrict_output_to_single_processor ( const unsigned &  output_rank = 0)
inline

Switch to ensure output is only produced from a single processor (default: Master node, i.e. rank 0)

Definition at line 792 of file oomph_utilities.h.

Member Data Documentation

◆ Communicator_pt

OomphCommunicator* oomph::MPIOutputModifier::Communicator_pt
private

Communicator.

Definition at line 775 of file oomph_utilities.h.

Referenced by operator()().

◆ Output_from_single_processor

bool oomph::MPIOutputModifier::Output_from_single_processor
private

Boolean to control if output is performed only on a single processor (default: false)

Definition at line 772 of file oomph_utilities.h.

Referenced by operator()().

◆ Output_rank

unsigned oomph::MPIOutputModifier::Output_rank
private

Rank of single processor that produces output (only used if Output_from_single_processor=true.

Definition at line 768 of file oomph_utilities.h.

Referenced by operator()().


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