CashOrthoFaceAccessor Class Reference

#include <cashorthofaceaccessor.h>

Collaboration diagram for CashOrthoFaceAccessor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~CashOrthoFaceAccessor ()
bool isValid () const
bool at_boundary () const
void getAdjCellIndices (unsigned &index1, unsigned &index2) const
void getValidCellIndices (unsigned &index1, unsigned &index2)
double normal_multiply (double *v) const
OrthoMesh::NORMAL_AXIS getNormalOrientation () const
unsigned getNormalNonZeroComponent () const
bool hasPosCell () const
bool hasNegCell () const
unsigned getPosCell () const
unsigned getNegCell () const
void operator++ (int)
bool operator!= (const CashOrthoFaceAccessor &face) const
unsigned index () const
const OrthoMeshgetMesh () const
double area () const
double areaPerCellVol () const

Private Member Functions

 CashOrthoFaceAccessor (const OrthoMesh &mesh, OrthoMesh::FaceCellsTbl_It m_cash)

Private Attributes

const OrthoMeshm_mesh
OrthoMesh::FaceCellsTbl_It m_cash
unsigned m_index

Friends

class OrthoMesh

Detailed Description

CashOrthoFaceAccessor

Definition at line 9 of file cashorthofaceaccessor.h.


Constructor & Destructor Documentation

CashOrthoFaceAccessor::CashOrthoFaceAccessor ( const OrthoMesh mesh,
OrthoMesh::FaceCellsTbl_It  m_cash 
) [private]

These constructors are private. The only way to construct a CashOrthoFaceAccessor is to use the copy constructor, making the variable to receive a value during its initialization like the code above

CashOrthoFace It = mesh.begin(); //Good
CashOrthoFAce It; //Error ,the default constructor is private.

Definition at line 4 of file cashorthofaceaccessor.cpp.

00005    :m_mesh(mesh),m_cash(cash)
00006 {
00007    m_index = cash - mesh.m_vFCash.begin();
00008 }

CashOrthoFaceAccessor::~CashOrthoFaceAccessor (  )  [inline]

Definition at line 33 of file cashorthofaceaccessor.h.

00033 {}


Member Function Documentation

double CashOrthoFaceAccessor::area (  )  const [inline]

Definition at line 95 of file cashorthofaceaccessor.h.

00096   {
00097     assert(this->isValid());
00098     assert(m_index < m_mesh.numFaces());
00099     return m_mesh._faceArea[static_cast<unsigned>(m_cash->normal)];
00100   }

double CashOrthoFaceAccessor::areaPerCellVol (  )  const [inline]

Definition at line 101 of file cashorthofaceaccessor.h.

00102   {
00103     assert(this->isValid());
00104     assert(m_index < m_mesh.numFaces());
00105     return m_mesh._faceAreaPerCellVol[static_cast<unsigned>(m_cash->normal)];
00106   }

bool CashOrthoFaceAccessor::at_boundary (  )  const [inline]

Definition at line 37 of file cashorthofaceaccessor.h.

00038   {
00039     return m_cash->c1 == OrthoMesh::INVALID_INDEX || m_cash->c2 == OrthoMesh::INVALID_INDEX;
00040   }

void CashOrthoFaceAccessor::getAdjCellIndices ( unsigned &  index1,
unsigned &  index2 
) const [inline]

Definition at line 41 of file cashorthofaceaccessor.h.

00042   {
00043     index1=m_cash->c1;index2=m_cash->c2;
00044   } 

const OrthoMesh& CashOrthoFaceAccessor::getMesh (  )  const [inline]

Definition at line 93 of file cashorthofaceaccessor.h.

00093 {return m_mesh;}

unsigned CashOrthoFaceAccessor::getNegCell (  )  const [inline]

Definition at line 82 of file cashorthofaceaccessor.h.

00083   {
00084     return m_cash->c2;
00085   }

unsigned CashOrthoFaceAccessor::getNormalNonZeroComponent (  )  const [inline]

Definition at line 66 of file cashorthofaceaccessor.h.

00067   {
00068     return m_cash->normal;
00069   }

OrthoMesh::NORMAL_AXIS CashOrthoFaceAccessor::getNormalOrientation (  )  const [inline]

Definition at line 62 of file cashorthofaceaccessor.h.

00063   {
00064     return static_cast<OrthoMesh::NORMAL_AXIS>(m_cash->normal);
00065   }

unsigned CashOrthoFaceAccessor::getPosCell (  )  const [inline]

Definition at line 78 of file cashorthofaceaccessor.h.

00079   {
00080     return m_cash->c1;
00081   }

void CashOrthoFaceAccessor::getValidCellIndices ( unsigned &  index1,
unsigned &  index2 
) [inline]

Definition at line 45 of file cashorthofaceaccessor.h.

00046   {
00047     assert(isValid());
00048     index1=m_cash->c1;
00049     index2=m_cash->c2;
00050     if (index1 == OrthoMesh::INVALID_INDEX)
00051       index1=index2;
00052     if (index2 == OrthoMesh::INVALID_INDEX)
00053       index2=index1;
00054   }

bool CashOrthoFaceAccessor::hasNegCell (  )  const [inline]

Definition at line 74 of file cashorthofaceaccessor.h.

00075   {
00076     return m_cash->c1!=OrthoMesh::INVALID_INDEX;
00077   }

bool CashOrthoFaceAccessor::hasPosCell (  )  const [inline]

Definition at line 70 of file cashorthofaceaccessor.h.

00071   {
00072     return m_cash->c2!=OrthoMesh::INVALID_INDEX;
00073   }

unsigned CashOrthoFaceAccessor::index (  )  const [inline]

Definition at line 92 of file cashorthofaceaccessor.h.

00092 {return m_index;}

bool CashOrthoFaceAccessor::isValid (  )  const

Definition at line 11 of file cashorthofaceaccessor.cpp.

00012 {
00013   return (m_cash->c1 != OrthoMesh::INVALID_INDEX ||
00014           m_cash->c2 != OrthoMesh::INVALID_INDEX);
00015 }

double CashOrthoFaceAccessor::normal_multiply ( double *  v  )  const [inline]

Definition at line 58 of file cashorthofaceaccessor.h.

00059   {
00060     return v[static_cast<int>(m_cash->normal)];
00061   }

bool CashOrthoFaceAccessor::operator!= ( const CashOrthoFaceAccessor face  )  const

Definition at line 21 of file cashorthofaceaccessor.cpp.

00022 {
00023   assert(&m_mesh == &face.m_mesh);
00024   return m_cash != face.m_cash; 
00025 }

void CashOrthoFaceAccessor::operator++ ( int   )  [inline]

Definition at line 86 of file cashorthofaceaccessor.h.

00087   {
00088     m_cash++;
00089     m_index++;
00090   }


Friends And Related Function Documentation

friend class OrthoMesh [friend]

Definition at line 14 of file cashorthofaceaccessor.h.


Member Data Documentation

Definition at line 16 of file cashorthofaceaccessor.h.

unsigned CashOrthoFaceAccessor::m_index [private]

Definition at line 17 of file cashorthofaceaccessor.h.

Definition at line 15 of file cashorthofaceaccessor.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:12:58 2012 for CO2INJECTION by  doxygen 1.6.3