Functions to iterate throw the mesh using indices

Functions

int DealBase::getAdjCellIndex (unsigned iCell, CellDirection3D dir)
double DealBase::getAdjCellValue (unsigned iCell, CellDirection3D dir, const VecDouble &v)
int DealBase::getFaceIndex (unsigned iCell, FaceDirection3D dir)
double DealBase::getFaceValue (unsigned iCell, FaceDirection3D dir, const VecDouble &v)
bool DealBase::isCellAtBoundary (unsigned iCell)
bool DealBase::hasAdjCell (unsigned iCell, CellDirection3D dir)

Function Documentation

int DealBase::getAdjCellIndex ( unsigned  iCell,
CellDirection3D  dir 
) [inherited]

Get adjacent cell of the current cell with index iCell. If such adjacent cell does not exist, the program return INVALID_INDEX == -1.

Parameters:
iCell Index of the current cell
dir Direction3D of the adjacent cell
Returns:
Index of the cell in the direction dir relative to the current cell (iCell)

Definition at line 675 of file dealbase.cpp.

00676 {
00677   assert(iCell < numCells());
00678   return CellAccessor<3>(&getTriangulation(),0,iCell).neighbor_index(dir);
00679 }

double DealBase::getAdjCellValue ( unsigned  iCell,
CellDirection3D  dir,
const VecDouble v 
) [inherited]

Get the value of the adjacent cell relative to the current cell iCell. This function assumes that the adjacent cell exist.

Parameters:
iCell Index of the current cell
dir Direction3D of the adjacent cell
v Vector of values indexed by cell indices.
Returns:
Value of the cell adjacent to the current cell (iCell)

Definition at line 689 of file dealbase.cpp.

00690 {
00691   assert(getAdjCellIndex(iCell,dir) !=INVALID_INDEX);
00692   assert(v.size() == this->numCells()); //The vector has one entry for each cell.
00693   return v(getAdjCellIndex(iCell,dir));
00694 }

int DealBase::getFaceIndex ( unsigned  iCell,
FaceDirection3D  dir 
) [inherited]

Get the index of the face of the cell iCell.

Parameters:
iCell Index of the cell
dir Direction3D of the face
Returns:
Index of the face.

Definition at line 726 of file dealbase.cpp.

00727 {
00728   return CellAccessor<3>(&getTriangulation(),0,iCell).quad_index(dir);
00729 
00730 }

double DealBase::getFaceValue ( unsigned  iCell,
FaceDirection3D  dir,
const VecDouble v 
) [inherited]

Get the value of the face in direction dir of the cell iCell.

Parameters:
iCell Index of the cell
dir Direction3D of the face
v Vector containing the face values.
Returns:
Value of the face.

Definition at line 740 of file dealbase.cpp.

00741 {
00742   assert(getFaceIndex(iCell,dir) != INVALID_INDEX);
00743   assert(v.size() == numFaces());
00744   return v(getFaceIndex(iCell,dir));
00745 }

bool DealBase::hasAdjCell ( unsigned  iCell,
CellDirection3D  dir 
) [inherited]

Ask if the cell has a neightbor at direction specified in the parameter dir.

Parameters:
iCell Index of the current cell.
dir Direction3D of the adjacent cell relative to the current cell.
Returns:

Definition at line 716 of file dealbase.cpp.

00717 {
00718   return getAdjCellIndex(iCell,dir) == INVALID_INDEX;
00719 }

bool DealBase::isCellAtBoundary ( unsigned  iCell  )  [inherited]

Answer if there Is some face of the cell iCell at boundary.

Parameters:
iCell index of the cell
Returns:
true if cell has some face at boundary

Definition at line 704 of file dealbase.cpp.

00705 {
00706   return CellAccessor<3>(&getTriangulation(),0,iCell).at_boundary();
00707 }

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:12:56 2012 for CO2INJECTION by  doxygen 1.6.3