class FluxBox

A FArrayBox-like container for edge-centered fluxes

Inheritance:

FluxBox


public members:

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)
void clear()
this function returns the FluxBox to the undefined state

access functions
int nComp() const
number of components
const Box& box() const
returns cell-centered box which defines fluxBox
FArrayBox & getFlux(const int dir)
returns edge-centered flux in direction dir
const FArrayBox & getFlux(const int dir) const
FArrayBox & operator[] (const int dir)
returns FArrayBox in direction dir
const FArrayBox & operator[] (const int dir) const
constant version

data modification functions
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 edges 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 -- sets fluxes on edges surrounding cell-centered box bx
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. 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 copy (const Box& srcbox, const Interval& srccomps, const Box& destbox, const FluxBox & src, const Interval& destcomps)
FluxBox & shift (const IntVect& v)

Linearization Functions
int size(const Box& bx, const Interval& comps) const
returns size, in number of bytes, of a flat linear representation of data in components comps in edges around cell-centered box R
void linearOut(void*buf, const Box& R, const Interval& comps) const
Write a linear representaion of the internal data for the edges surrounding cell-centered box R. Assumes that sufficient memory for the buffer has already been allocated by the caller
void linearIn(void* buf)
void linearIn(void*buf, const Box& R, const Interval& comps)
static int preAllocatable()

protected members:

Box m_bx
int m_nvar
Vector < FArrayBox *> m_fluxes
BL_SPACEDIM FArrayBoxes which hold fluxes

Documentation

This is a class to contain edge-centered fluxes on a box.
void copy (const Box& srcbox, const Interval& srccomps, const Box& destbox, const FluxBox & src, const Interval& destcomps)
Modifies this FluxBox by coping the contents of the argument FluxBox 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.

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


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.