VisMF Class Reference

: File I/O for MultiFabs. More...

#include <VisMF.H>

Collaboration diagram for VisMF:

Collaboration graph
[legend]

List of all members.

Public Types

enum  How { OneFilePerCPU }
 How we write out MultiFabs. More...
enum  { IO_Buffer_Size = 40960 * 32 }
 We try to do I/O with buffers of this size. More...
typedef char Setbuf_Char_Type
typedef Array< Setbuf_Char_TypeIO_Buffer
 A simple character buffer for setbuf() usage.

Public Member Functions

 VisMF (const std::string &mf_name)
 Construct by reading in the on-disk VisMF of the specified name.
int nComp () const
 The number of components in the on-disk MultiFab.
int nGrow () const
 The grow factor of the on-disk MultiFab.
int size () const
 # of FABs in the VisMF. Equal to # of Boxes in the BoxArray.
const BoxArrayboxArray () const
 The BoxArray of the on-disk MultiFab.
Real min (int fabIndex, int nComp) const
 The min of the FAB (in valid region) at specified index and component.
Real max (int fabIndex, int nComp) const
 The max of the FAB (in valid region) at specified index and component.
const FArrayBoxGetFab (int fabIndex, int compIndex) const
 The FAB at the specified index and component.
void clear (int fabIndex, int compIndex)
 Delete()s the FAB at the specified index and component.
void clear (int fabIndex)
 Delete()s the FAB at the specified index (all components).
void clear ()
 Delete()s all the FABs.
FArrayBoxreadFAB (int fabIndex, const std::string &mfName)
 Read the entire fab (all components).
FArrayBoxreadFAB (int fabIndex, int ncomp)
 Read the specified fab component.

Static Public Member Functions

static long Write (const MultiFab &mf, const std::string &name, VisMF::How how=OneFilePerCPU, bool set_ghost=false)
 Write a MultiFab to disk in a "smart" way.
static void Read (MultiFab &mf, const std::string &name)
 Read a MultiFab from disk written using VisMF::Write().
static long FileOffset (std::ostream &os)
 The file offset of the passed ostream.

Classes

struct  FabOnDisk
 A structure containing info regarding an on-disk FAB. More...
struct  Header
 An on-disk MultiFab contains this info in a header file. More...


Detailed Description

: File I/O for MultiFabs.

Wrapper class for reading/writing MultiFabs to disk in various "smart" ways.


Member Typedef Documentation

A simple character buffer for setbuf() usage.


Member Enumeration Documentation

enum VisMF::How

How we write out MultiFabs.

Enumerator:
OneFilePerCPU 

anonymous enum

We try to do I/O with buffers of this size.

Enumerator:
IO_Buffer_Size 


Constructor & Destructor Documentation

VisMF::VisMF ( const std::string &  mf_name  )  [explicit]

Construct by reading in the on-disk VisMF of the specified name.

The MF on-disk is read lazily. The name here is the name of the MF not the name of the on-disk file.

References Array< T >::dataPtr(), BoxLib::FileOpenFailed(), IO_Buffer_Size, nComp(), and Array< T >::size().


Member Function Documentation

int VisMF::nComp (  )  const

The number of components in the on-disk MultiFab.

References VisMF::Header::m_ncomp.

Referenced by VisMF().

int VisMF::nGrow (  )  const

The grow factor of the on-disk MultiFab.

References VisMF::Header::m_ngrow.

int VisMF::size (  )  const

# of FABs in the VisMF. Equal to # of Boxes in the BoxArray.

References VisMF::Header::m_ba, and BoxArray::size().

const BoxArray & VisMF::boxArray (  )  const

The BoxArray of the on-disk MultiFab.

References VisMF::Header::m_ba.

Real VisMF::min ( int  fabIndex,
int  nComp 
) const

The min of the FAB (in valid region) at specified index and component.

References BL_ASSERT, VisMF::Header::m_ba, VisMF::Header::m_min, VisMF::Header::m_ncomp, and BoxArray::size().

Real VisMF::max ( int  fabIndex,
int  nComp 
) const

The max of the FAB (in valid region) at specified index and component.

References BL_ASSERT, VisMF::Header::m_ba, VisMF::Header::m_max, VisMF::Header::m_ncomp, and BoxArray::size().

const FArrayBox & VisMF::GetFab ( int  fabIndex,
int  compIndex 
) const

The FAB at the specified index and component.

Reads it from disk if necessary. This reads only the specified component.

References readFAB().

void VisMF::clear ( int  fabIndex,
int  compIndex 
)

Delete()s the FAB at the specified index and component.

void VisMF::clear ( int  fabIndex  ) 

Delete()s the FAB at the specified index (all components).

References clear(), and Array< T >::size().

void VisMF::clear (  ) 

Delete()s all the FABs.

References Array< T >::size().

Referenced by clear().

long VisMF::Write ( const MultiFab mf,
const std::string &  name,
VisMF::How  how = OneFilePerCPU,
bool  set_ghost = false 
) [static]

void VisMF::Read ( MultiFab mf,
const std::string &  name 
) [static]

long VisMF::FileOffset ( std::ostream &  os  )  [static]

The file offset of the passed ostream.

Referenced by Write().

FArrayBox * VisMF::readFAB ( int  fabIndex,
const std::string &  mfName 
)

Read the entire fab (all components).

Referenced by GetFab(), Read(), and readFAB().

FArrayBox * VisMF::readFAB ( int  fabIndex,
int  ncomp 
)

Read the specified fab component.

References readFAB().


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

Generated on Fri Nov 21 10:11:03 2008 for AMRParticlePaths by  doxygen 1.5.5