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

This class prints to a file with a given base name. More...

#include <AMReX_Print.H>

Inheritance diagram for amrex::PrintToFile:
amrex::AllPrintToFile

Public Member Functions

 PrintToFile (std::string file_name_)
 
 PrintToFile (std::string file_name_, int rank_)
 
 PrintToFile (std::string file_name_, int rank_, MPI_Comm comm_)
 
 ~PrintToFile ()
 
 PrintToFile (PrintToFile const &)=delete
 
 PrintToFile (PrintToFile &&)=delete
 
PrintToFileoperator= (PrintToFile const &)=delete
 
PrintToFileoperator= (PrintToFile &&)=delete
 
PrintToFileSetPrecision (int p)
 
template<typename T >
PrintToFileoperator<< (const T &x)
 
PrintToFileoperator<< (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 Member Functions

void Initialize ()
 

Private Attributes

std::string file_name
 
int rank
 
MPI_Comm comm
 
std::ofstream ofs
 
std::ostringstream ss
 

Detailed Description

This class prints to a file with a given base name.

Constructor & Destructor Documentation

◆ PrintToFile() [1/5]

amrex::PrintToFile::PrintToFile ( std::string  file_name_)
inlineexplicit

◆ PrintToFile() [2/5]

amrex::PrintToFile::PrintToFile ( std::string  file_name_,
int  rank_ 
)
inline

◆ PrintToFile() [3/5]

amrex::PrintToFile::PrintToFile ( std::string  file_name_,
int  rank_,
MPI_Comm  comm_ 
)
inline

◆ ~PrintToFile()

amrex::PrintToFile::~PrintToFile ( )
inline

◆ PrintToFile() [4/5]

amrex::PrintToFile::PrintToFile ( PrintToFile const &  )
delete

◆ PrintToFile() [5/5]

amrex::PrintToFile::PrintToFile ( PrintToFile &&  )
delete

Member Function Documentation

◆ Initialize()

void amrex::PrintToFile::Initialize ( )
inlineprivate

◆ operator<<() [1/2]

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

◆ operator<<() [2/2]

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ SetPrecision()

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

Member Data Documentation

◆ AllProcs

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

◆ comm

MPI_Comm amrex::PrintToFile::comm
private

◆ file_name

std::string amrex::PrintToFile::file_name
private

◆ ofs

std::ofstream amrex::PrintToFile::ofs
private

◆ rank

int amrex::PrintToFile::rank
private

◆ ss

std::ostringstream amrex::PrintToFile::ss
private

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