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

#include <AMReX_FArrayBox.H>

Inheritance diagram for amrex::FABio_binary:
amrex::FABio

Public Member Functions

 FABio_binary (RealDescriptor *rd_)
 
void read (std::istream &is, FArrayBox &fb) const override
 Pure virtual function. Derived classes MUST override this function to read an FArrayBox from the istream, under the assumption that the header has already been read. More...
 
void write (std::ostream &os, const FArrayBox &fb, int comp, int num_comp) const override
 Pure virtual function. Derived classes MUST override this function to write the FArrayBox to the ostream, under the assumption that the header for the FAB has already been written. Write it out as if it only had num_comp components with component comp being the first one. More...
 
void skip (std::istream &is, FArrayBox &f) const override
 Pure virtual function. Derived classes MUST override this function to skip over the next FAB f in the istream, under the assumption that the header for the FAB f has already been skipped over. More...
 
void skip (std::istream &is, FArrayBox &f, int nCompToSkip) const override
 
- Public Member Functions inherited from amrex::FABio
virtual ~FABio ()=default
 The virtual destructor. More...
 

Private Member Functions

void write_header (std::ostream &os, const FArrayBox &f, int nvar) const override
 Write out a header describing FArrayBox f that contains nvar components. It must be the case that nvar <= f.nComp(). More...
 

Private Attributes

std::unique_ptr< RealDescriptorrealDesc
 

Additional Inherited Members

- Public Types inherited from amrex::FABio
enum  Precision { FAB_FLOAT = 0 , FAB_DOUBLE }
 An enum which controls precision of FAB output. Valid values are FAB_FLOAT and FAB_DOUBLE. This is deprecated; i.e. please don't use it except for reading old FABs as it will probably be going away in a later release. More...
 
enum  Format {
  FAB_ASCII , FAB_IEEE , FAB_NATIVE , FAB_8BIT = 4 ,
  FAB_IEEE_32 , FAB_NATIVE_32
}
 An enum which controls format of FAB output. More...
 
enum  Ordering { FAB_NORMAL_ORDER , FAB_REVERSE_ORDER , FAB_REVERSE_ORDER_2 }
 An enum which controls byte ordering of FAB output. Valid values are FAB_NORMAL_ORDER, FAB_REVERSE_ORDER, and FAB_REVERSE_ORDER_2. This is deprecated; i.e. please don't use it except for reading old FABs as it will probably be going away in a later release. These exist solely to describe the ordering of "old" FABs that you want to read. More...
 
- Static Public Member Functions inherited from amrex::FABio
static FABioread_header (std::istream &is, FArrayBox &f)
 Read in the header from the istream. Returns a new'd FABio of the written-out type. Complements write_header. The user is responsible for delete'ing the returned FABio*. The FArrayBox f is resized to be on the Box and number of components read in from the header file. This is in preparation for next doing a read. This is split up so that we can make the read functions virtual, while having all the code for detailing the type of FArrayBox that was written out in one place. More...
 
static FABioread_header (std::istream &is, FArrayBox &f, int compIndex, int &nCompAvailable)
 Same as above except create a single component fab with data from the compIndex component of the istream fab. Return the number of available components in the istream fab. More...
 

Constructor & Destructor Documentation

◆ FABio_binary()

amrex::FABio_binary::FABio_binary ( RealDescriptor rd_)

Member Function Documentation

◆ read()

void amrex::FABio_binary::read ( std::istream &  is,
FArrayBox fb 
) const
overridevirtual

Pure virtual function. Derived classes MUST override this function to read an FArrayBox from the istream, under the assumption that the header has already been read.

Implements amrex::FABio.

◆ skip() [1/2]

void amrex::FABio_binary::skip ( std::istream &  is,
FArrayBox f 
) const
overridevirtual

Pure virtual function. Derived classes MUST override this function to skip over the next FAB f in the istream, under the assumption that the header for the FAB f has already been skipped over.

Implements amrex::FABio.

◆ skip() [2/2]

void amrex::FABio_binary::skip ( std::istream &  is,
FArrayBox f,
int  nCompToSkip 
) const
overridevirtual

Implements amrex::FABio.

◆ write()

void amrex::FABio_binary::write ( std::ostream &  os,
const FArrayBox fb,
int  comp,
int  num_comp 
) const
overridevirtual

Pure virtual function. Derived classes MUST override this function to write the FArrayBox to the ostream, under the assumption that the header for the FAB has already been written. Write it out as if it only had num_comp components with component comp being the first one.

Implements amrex::FABio.

◆ write_header()

void amrex::FABio_binary::write_header ( std::ostream &  os,
const FArrayBox f,
int  nvar 
) const
overrideprivatevirtual

Write out a header describing FArrayBox f that contains nvar components. It must be the case that nvar <= f.nComp().

Reimplemented from amrex::FABio.

Member Data Documentation

◆ realDesc

std::unique_ptr<RealDescriptor> amrex::FABio_binary::realDesc
private

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