Chombo + EB + MF  3.2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
FaceIndex Class Reference

#include <FaceIndex.H>

Inheritance diagram for FaceIndex:
Inheritance graph
[legend]

Public Member Functions

 FaceIndex (const VolIndex &a_vof1, const VolIndex &a_vof2, const int &a_direction)
 
 FaceIndex (const VolIndex &a_vof1, const VolIndex &a_vof2)
 
void define (const VolIndex &a_vof1, const VolIndex &a_vof2, const int &a_direction)
 
void define (const VolIndex &a_vof1, const VolIndex &a_vof2)
 
 FaceIndex ()
 
 FaceIndex (const FaceIndex &a_facein)
 
void define (const FaceIndex &a_facein)
 
 ~FaceIndex ()
 
FaceIndexoperator= (const FaceIndex &a_facein)
 
bool operator== (const FaceIndex &a_facein) const
 
bool operator!= (const FaceIndex &a_facein) const
 
const int & direction () const
 
const bool & isDefined () const
 
const bool & isBoundary () const
 
const int & cellIndex (const Side::LoHiSide &a_sd) const
 
const IntVectgridIndex (const Side::LoHiSide &a_sd) const
 
VolIndex getVoF (const Side::LoHiSide &a_sd) const
 
int faceSign (const VolIndex &a_vof) const
 
void shift (const IntVect &a_iv)
 for stencil gymnastics More...
 
- Public Member Functions inherited from BaseIndex
 BaseIndex ()
 
virtual ~BaseIndex ()
 

Static Public Member Functions

static int initializeOffsets ()
 

Static Public Attributes

static size_t lo_offset
 
static size_t hi_offset
 
static size_t rest_offset
 

Private Attributes

IntVect m_loiv
 the intvect of the low vof More...
 
IntVect m_hiiv
 the intvect of the high vof More...
 
int m_loIndex
 
int m_hiIndex
 
int m_direction
 direction of the face. More...
 
bool m_isDefined
 
bool m_isBoundary
 

Friends

bool operator< (const FaceIndex &f1, const FaceIndex &f2)
 
ostream & operator<< (ostream &out, const FaceIndex &fi)
 

Detailed Description

FaceIndex is a very lightweight object used to distinguish faces. It has two VolIndex (s) and a direction and a way to access them.

Constructor & Destructor Documentation

◆ FaceIndex() [1/4]

FaceIndex::FaceIndex ( const VolIndex a_vof1,
const VolIndex a_vof2,
const int &  a_direction 
)

if both cellindexes of the vofs are >= 0, then the face is interior. otherwise the face is a boundary face.

◆ FaceIndex() [2/4]

FaceIndex::FaceIndex ( const VolIndex a_vof1,
const VolIndex a_vof2 
)

shorthand constructor.

◆ FaceIndex() [3/4]

FaceIndex::FaceIndex ( )

◆ FaceIndex() [4/4]

FaceIndex::FaceIndex ( const FaceIndex a_facein)

◆ ~FaceIndex()

FaceIndex::~FaceIndex ( )

Member Function Documentation

◆ define() [1/3]

void FaceIndex::define ( const VolIndex a_vof1,
const VolIndex a_vof2,
const int &  a_direction 
)

if both cellindexes of the vofs are >= 0, then the face is interior. otherwise the face is a boundary face.

◆ define() [2/3]

void FaceIndex::define ( const VolIndex a_vof1,
const VolIndex a_vof2 
)

Shorthand define. First determine if they are neighbors then find the direction to pass to full define

◆ define() [3/3]

void FaceIndex::define ( const FaceIndex a_facein)

◆ operator=()

FaceIndex& FaceIndex::operator= ( const FaceIndex a_facein)

◆ operator==()

bool FaceIndex::operator== ( const FaceIndex a_facein) const

◆ operator!=()

bool FaceIndex::operator!= ( const FaceIndex a_facein) const

◆ direction()

const int& FaceIndex::direction ( ) const

◆ isDefined()

const bool& FaceIndex::isDefined ( ) const

◆ isBoundary()

const bool& FaceIndex::isBoundary ( ) const

◆ cellIndex()

const int& FaceIndex::cellIndex ( const Side::LoHiSide a_sd) const

return cell index of the vof on the a_sd side. returns -1 if that side of the face is outside the domain (boundary face case).

Referenced by BaseIFFAB< FaceStencil >::getLocalVecIndex().

◆ gridIndex()

const IntVect& FaceIndex::gridIndex ( const Side::LoHiSide a_sd) const

◆ getVoF()

VolIndex FaceIndex::getVoF ( const Side::LoHiSide a_sd) const

manufactures the appropriate volindex.

◆ faceSign()

int FaceIndex::faceSign ( const VolIndex a_vof) const

a_vof needs to be one of the two vofs connected by this face Standing on a_vof, face opens toward the other vof returns 1 if face opens toward positive axis returns -1 if face opens toward negative axis returns 0 if a_vof is not one of the member vofs.

◆ initializeOffsets()

static int FaceIndex::initializeOffsets ( )
static

◆ shift()

void FaceIndex::shift ( const IntVect a_iv)
inline

for stencil gymnastics

References m_hiiv, and m_loiv.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const FaceIndex f1,
const FaceIndex f2 
)
friend

Lexicographic

Friend of class FaceIndex

◆ operator<<

ostream& operator<< ( ostream &  out,
const FaceIndex fi 
)
friend

Member Data Documentation

◆ lo_offset

size_t FaceIndex::lo_offset
static

◆ hi_offset

size_t FaceIndex::hi_offset
static

◆ rest_offset

size_t FaceIndex::rest_offset
static

◆ m_loiv

IntVect FaceIndex::m_loiv
private

the intvect of the low vof

Referenced by operator<(), and shift().

◆ m_hiiv

IntVect FaceIndex::m_hiiv
private

the intvect of the high vof

Referenced by operator<(), and shift().

◆ m_loIndex

int FaceIndex::m_loIndex
private

The index of the low vof. This = -1 if the face is set to be a boundary face on the low side of the domain.

Referenced by operator<().

◆ m_hiIndex

int FaceIndex::m_hiIndex
private

The index of the high vof. This = -1 if the face is set to be a boundary face on the high side of the domain.

Referenced by operator<().

◆ m_direction

int FaceIndex::m_direction
private

direction of the face.

Referenced by operator<().

◆ m_isDefined

bool FaceIndex::m_isDefined
private

true if one of the define functions has been called.

◆ m_isBoundary

bool FaceIndex::m_isBoundary
private

true if the face is constructed using the boundary face constructor

Referenced by operator<().


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