Block-Structured AMR Software Framework
amrex::Print Class Reference

This class provides the user with a few print options. More...

#include <AMReX_Print.H>

Inheritance diagram for amrex::Print:
amrex::AllPrint

Public Member Functions

 Print (std::ostream &os_=amrex::OutStream())
 Print on I/O Processor of the default communicator Example: Print() << " x = " << x << '
';. More...
 
 Print (int rank_, std::ostream &os_=amrex::OutStream())
 Print on all processors of the default communicator Example: Print(Print::AllProcs) << " x = " << x << '
';. More...
 
 Print (int rank_, MPI_Comm comm_, std::ostream &os_=amrex::OutStream())
 Print on process rank_ of communicator comm_ Example: Print(rank_, comm_) << " x = " << x << '
';. More...
 
 ~Print ()
 
 Print (Print const &)=delete
 
 Print (Print &&)=delete
 
Printoperator= (Print const &)=delete
 
Printoperator= (Print &&)=delete
 
PrintSetPrecision (int p)
 
template<typename T >
Printoperator<< (const T &x)
 
Printoperator<< (std::basic_ostream< char, std::char_traits< char > > &(*func)(std::basic_ostream< char, std::char_traits< char > > &))
 

Static Public Attributes

static constexpr int AllProcs = -1
 

Private Attributes

int rank
 
MPI_Comm comm
 
std::ostream & os
 
std::ostringstream ss
 

Detailed Description

This class provides the user with a few print options.

Constructor & Destructor Documentation

◆ Print() [1/5]

amrex::Print::Print ( std::ostream &  os_ = amrex::OutStream())
inlineexplicit

Print on I/O Processor of the default communicator Example: Print() << " x = " << x << '
';.

◆ Print() [2/5]

amrex::Print::Print ( int  rank_,
std::ostream &  os_ = amrex::OutStream() 
)
inline

Print on all processors of the default communicator Example: Print(Print::AllProcs) << " x = " << x << '
';.

◆ Print() [3/5]

amrex::Print::Print ( int  rank_,
MPI_Comm  comm_,
std::ostream &  os_ = amrex::OutStream() 
)
inline

Print on process rank_ of communicator comm_ Example: Print(rank_, comm_) << " x = " << x << '
';.

◆ ~Print()

amrex::Print::~Print ( )
inline

◆ Print() [4/5]

amrex::Print::Print ( Print const &  )
delete

◆ Print() [5/5]

amrex::Print::Print ( Print &&  )
delete

Member Function Documentation

◆ operator<<() [1/2]

template<typename T >
Print& amrex::Print::operator<< ( const T &  x)
inline

◆ operator<<() [2/2]

Print& amrex::Print::operator<< ( std::basic_ostream< char, std::char_traits< char > > &(*)(std::basic_ostream< char, std::char_traits< char > > &)  func)
inline

◆ operator=() [1/2]

Print& amrex::Print::operator= ( Print &&  )
delete

◆ operator=() [2/2]

Print& amrex::Print::operator= ( Print const &  )
delete

◆ SetPrecision()

Print& amrex::Print::SetPrecision ( int  p)
inline

Member Data Documentation

◆ AllProcs

constexpr int amrex::Print::AllProcs = -1
staticconstexpr

◆ comm

MPI_Comm amrex::Print::comm
private

◆ os

std::ostream& amrex::Print::os
private

◆ rank

int amrex::Print::rank
private

◆ ss

std::ostringstream amrex::Print::ss
private

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