Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

FluxBox Class Reference

A FArrayBox-like container for face-centered fluxes. More...

#include <FluxBox.H>

Collaboration diagram for FluxBox:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FluxBox ()
 Default constructor.

 FluxBox (const Box &bx, int n=1)
 Constructs FluxBox on cell-centered box with n components.

 ~FluxBox ()
 Destructor.

void resize (const Box &bx, int n=1)
 Resize FluxBox similar to BaseFab::resize().

void define (const Box &bx, int n=1)
 Define function.

void clear ()
 Returns the FluxBox to the undefined state.

int nComp () const
 Number of components.

const Boxbox () const
 Returns cell-centered box which defines fluxBox.

FArrayBoxgetFlux (const int dir)
 Returns face-centered flux in direction dir.

const FArrayBoxgetFlux (const int dir) const
 Returns const reference to face-centered flux in direction dir.

FArrayBoxoperator[] (const int dir)
 Returns FArrayBox in direction dir.

const FArrayBoxoperator[] (const int dir) const
 Constant version.

void setVal (const Real val)
 Set all fluxes to val.

void setVal (const Real val, const int dir)
 Set fluxes in direction dir to val.

void setVal (const Real val, const int dir, const int startComp, const int nComp)
 More specific setVal.

void setVal (const Real val, const Box &bx)
 Sets fluxes on faces surrounding cell-centered box bx.

void setVal (const Real val, const Box &bx, const int dir, const int startComp, const int nComp)
 Most specific setVal.

void copy (const FluxBox &src)
 Copy from src to this FluxBox -- sizes must be identical.

void copy (const FluxBox &src, const int srcComp, const int destComp, const int numComp)
 Copy on overlap, for all directions.

void copy (const FluxBox &src, const int dir, const int srcComp, const int destComp, const int numComp)
 Copy on overlap of FluxBoxes, in direction dir.

void copy (const Box &R, const Interval &Cdest, const FluxBox &src, const Interval &Csrc)
 Copies from a subsection of one box into another.

void copy (const Box &srcbox, const Interval &srccomps, const Box &destbox, const FluxBox &src, const Interval &destcomps)
 Modifies this FluxBox by copying the contents of src into it.

FluxBoxshift (const IntVect &v)
 Modifies the domain of this FluxBox by shifting.

int size (const Box &bx, const Interval &comps) const
 Returns size of linearized data over bx.

void linearOut (void *buf, const Box &R, const Interval &comps) const
 Writes a linear representation of this FluxBox.

void linearIn (void *buf, const Box &R, const Interval &comps)
 Read a linear representation of the data over the Box R.


Static Public Member Functions

int preAllocatable ()
 Helper function for linearization.


Protected Attributes

Box m_bx
int m_nvar
Vector< FArrayBox * > m_fluxes

Detailed Description

A FArrayBox-like container for face-centered fluxes.

This is a class to contain face-centered fluxes on a box.


Constructor & Destructor Documentation

FluxBox::FluxBox  ) 
 

Default constructor.

FluxBox::FluxBox const Box bx,
int  n = 1
 

Constructs FluxBox on cell-centered box with n components.

FluxBox::~FluxBox  ) 
 

Destructor.


Member Function Documentation

const Box& FluxBox::box  )  const
 

Returns cell-centered box which defines fluxBox.

void FluxBox::clear  ) 
 

Returns the FluxBox to the undefined state.

void FluxBox::copy const Box srcbox,
const Interval srccomps,
const Box destbox,
const FluxBox src,
const Interval destcomps
 

Modifies this FluxBox by copying the contents of src into it.

This, the most general form of copy, specifies the contents of any sub-box srcbox in `FluxBox' src may be copied into a (possibly different) destbox in the destination `FluxBox'. Note that although the srcbox and the destbox may be disjoint, they must be the same size and shape. If the sizes differ, the copy is undefined and a runtime error results. This copy function is the only one of the copy functions to allow a copy between differing boxes. The user also specifies how many components are copied, starting at component srccomp in src and stored starting at component destcomp. The results are UNDEFINED if the src and dest FluxBoxes are the same and the srcbox and destbox overlap.

void FluxBox::copy const Box R,
const Interval Cdest,
const FluxBox src,
const Interval Csrc
 

Copies from a subsection of one box into another.

Assumes the boxes are both in the same index space, and that box R is completely contained in both the src and destination boxes. This function required by BoxLayoutData

void FluxBox::copy const FluxBox src,
const int  dir,
const int  srcComp,
const int  destComp,
const int  numComp
 

Copy on overlap of FluxBoxes, in direction dir.

void FluxBox::copy const FluxBox src,
const int  srcComp,
const int  destComp,
const int  numComp
 

Copy on overlap, for all directions.

void FluxBox::copy const FluxBox src  ) 
 

Copy from src to this FluxBox -- sizes must be identical.

void FluxBox::define const Box bx,
int  n = 1
 

Define function.

const FArrayBox& FluxBox::getFlux const int  dir  )  const
 

Returns const reference to face-centered flux in direction dir.

FArrayBox& FluxBox::getFlux const int  dir  ) 
 

Returns face-centered flux in direction dir.

void FluxBox::linearIn void *  buf,
const Box R,
const Interval comps
 

Read a linear representation of the data over the Box R.

Reads in the output of linearOut

void FluxBox::linearOut void *  buf,
const Box R,
const Interval comps
const
 

Writes a linear representation of this FluxBox.

Write a linear representaion of the internal data for the faces surrounding cell-centered box R. Assumes that sufficient memory for the buffer has already been allocated by the caller

int FluxBox::nComp  )  const
 

Number of components.

const FArrayBox& FluxBox::operator[] const int  dir  )  const
 

Constant version.

FArrayBox& FluxBox::operator[] const int  dir  ) 
 

Returns FArrayBox in direction dir.

int FluxBox::preAllocatable  )  [inline, static]
 

Helper function for linearization.

void FluxBox::resize const Box bx,
int  n = 1
 

Resize FluxBox similar to BaseFab::resize().

void FluxBox::setVal const Real  val,
const Box bx,
const int  dir,
const int  startComp,
const int  nComp
 

Most specific setVal.

Sets fluxes on faces surrounding cell-centered box bx

void FluxBox::setVal const Real  val,
const Box bx
 

Sets fluxes on faces surrounding cell-centered box bx.

void FluxBox::setVal const Real  val,
const int  dir,
const int  startComp,
const int  nComp
 

More specific setVal.

void FluxBox::setVal const Real  val,
const int  dir
 

Set fluxes in direction dir to val.

void FluxBox::setVal const Real  val  ) 
 

Set all fluxes to val.

FluxBox& FluxBox::shift const IntVect v  ) 
 

Modifies the domain of this FluxBox by shifting.

int FluxBox::size const Box bx,
const Interval comps
const
 

Returns size of linearized data over bx.

Returns size, in number of bytes, of a flat linear representation of data in components comps in faces around cell-centered box R


Member Data Documentation

Box FluxBox::m_bx [protected]
 

Cell-centered Box over which this FluxBox is defined

Vector<FArrayBox*> FluxBox::m_fluxes [protected]
 

BL_SPACEDIM FArrayBoxes which hold fluxes

int FluxBox::m_nvar [protected]
 

Number of variables on each face


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 13:58:36 2004 for Chombo&INSwithParticles by doxygen 1.3.2