parstream.H File Reference

#include <iostream>
#include <string>
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"

Include dependency graph for parstream.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::ostream & pout ()
 Use this in place of std::cout for program output.
void setPoutBaseName (const std::string &a_Name)
 Changes the base part of the filename for pout() files.
const std::string & poutFileName ()
 Accesses the filename for the local pout() file.


Function Documentation

std::ostream& pout (  ) 

Use this in place of std::cout for program output.

Replaces std::cout in most of the Chombo code. In serial this just returns std::cout. In parallel, this creates a separate file for each proc called <basename>.n where n is the procID and <basename> defaults to "pout" but can be set by calling setPoutBaseName(). Output is then directed to these files. This keeps the output from different processors from getting all jumbled up.

Referenced by LSProblem< dim >::computeBounds(), IFData< dim >::dump(), CutCellMoments< dim >::dump(), BaseIVFAB< T >::linearIn(), BaseIVFAB< T >::linearOut(), AMRTGA< T >::oneStep(), LSProblem< dim >::outputMatrix(), LSProblem< dim >::outputRhs(), LSProblem< dim >::outputUnknowns(), IntVectSet::p(), IndexTM< T, N >::p(), LSProblem< dim >::print(), CutCellMoments< dim >::printBdMoments(), CutCellMoments< dim >::printMoments(), AMRMultiGrid< T >::relaxOnlyHomogeneous(), AMRTGA< T >::setMu(), MiniIFFAB< T >::size(), BaseIVFAB< T >::size(), BaseIFFAB< T >::size(), RelaxSolver< T >::solve(), MultiGrid< T >::solve(), BiCGStabSolver< T >::solve(), BaseLevelTGA< T, TFlux, TFR >::solveHelm(), AMRTGA< T >::solveHelm(), and AMRMultiGrid< T >::solveNoInit().

void setPoutBaseName ( const std::string &  a_Name  ) 

Changes the base part of the filename for pout() files.

When in parallel, changes the base name of the pout() files. If pout() has already been called, it closes the current output file and opens a new one (unless the name is the same, in which case it does nothing). In serial, ignores the argument and does nothing.

const std::string& poutFileName (  ) 

Accesses the filename for the local pout() file.

Returns the name used for the local pout() file. In parallel this is "<pout_basename>.<procID>", where <pout_basename> defaults to "pout" and can be modified by calling setPoutBaseName(), and <procID> is the local proc number. In serial, this always returns the string "cout". It is an error (exit code 111) to call this in parallel before MPI_Initialize().


Generated on Tue Apr 14 14:22:22 2009 for Chombo + EB by  doxygen 1.5.5