Functions to iterate throw the mesh using deal native classes

Functions

Cell DealBase::getCell (int index)
Cell DealBase::endCell () const
Cell DealBase::beginCell () const
Face DealBase::beginFace ()
Face DealBase::endFace ()
void DealBase::getFaceBarycenter (Face &face, Point3D &p)
Point3D DealBase::getFaceBarycenter (Face &face)
double DealBase::getCentralValue (const Cell &cell, const VecDouble &values) const
double DealBase::getFaceValue (const Face &face, const VecDouble &values)
double DealBase::getFaceValue (const Cell &cell, FaceDirection3D dir, const VecDouble &values)
unsigned DealBase::getFaceValueIndex (const Cell &cell, FaceDirection3D dir)
bool DealBase::getFaceFlag (const Face &face, const VecBool &values)
Cell DealBase::getCellAtPoint (const Point< DIM > &p)
double DealBase::getNeighborValue (const Cell &cell, CellDirection3D dir, const VecDouble &cValues)
double DealBase::getVerticeValue (const Cell &cell, VertexDirection3D vertex, const VecDouble &values)
double DealBase::getVerticeValue (unsigned vIndex, const VecDouble &values)
unsigned DealBase::getCentralPointIndex (Cell &cell)
void DealBase::getVerticePoint (unsigned vIndex, Point< DIM > &X) const
Cell DealBase::getEndCell ()
Cell DealBase::getAdjCell (Cell &cell, CellDirection3D dir)
Cell DealBase::getAdjCell (Cell &cell, CellDirection3D dir1, CellDirection3D dir2)
bool DealBase::getCellFlag (const Cell &cell, const VecBool &cVFlags) const
bool DealBase::getVerticeFlag (const Cell &cell, VertexDirection3D dir, const VecBool &vVFlags) const
void DealBase::setCentralValue (const Cell &cell, double dd, VecDouble &values)
void DealBase::setCentralValue (DoFCell &cell, double dd, VecDouble &values)
void DealBase::setFaceValue (const Face &face, double dd, VecDouble &values)
void DealBase::setFaceValue (const Cell &cell, FaceDirection3D dir, double dd, VecDouble &values)
void DealBase::setFaceFlag (const Face &face, bool b, VecBool &values)
void DealBase::setCellFlag (const Cell &cell, const bool flag, VecBool &cVFlags) const
void DealBase::setVerticeFlag (const Cell &cell, VertexDirection3D dir, const bool flag, VecBool &vVFlags) const

Function Documentation

Cell DealBase::beginCell (  )  const [inline, inherited]

Definition at line 50 of file dealbase.h.

00050 {return getTriangulation().begin_active();} 

Face DealBase::beginFace (  )  [inline, inherited]

Definition at line 51 of file dealbase.h.

00051 {return getTriangulation().begin_active_face();}

Cell DealBase::endCell (  )  const [inline, inherited]

Definition at line 49 of file dealbase.h.

00049 {return getTriangulation().end();}

Face DealBase::endFace (  )  [inline, inherited]

Definition at line 52 of file dealbase.h.

00052 {return getTriangulation().end_face();}

Cell DealBase::getAdjCell ( Cell cell,
CellDirection3D  dir1,
CellDirection3D  dir2 
) [inherited]

Objetivo: Obter a celula vizinha na direcao dir1 e depois em dir2. Se tal celula nao existir retorna getTriangulation().end();

Parametros: cell = Celula corrente dir1 = Primeira direcao. dir2 = Segunda direcao.

Retorno:

Definition at line 578 of file dealbase.cpp.

00579 {
00580   static Cell auxCell;
00581   if (cell->face(dir1)->at_boundary())
00582     return getEndCell();
00583   else
00584   {
00585       auxCell = cell->neighbor(dir1);
00586       if (auxCell->face(dir2)->at_boundary())
00587         return getEndCell();
00588       else
00589         return auxCell->neighbor(dir2);
00590   }
00591 }

Cell DealBase::getAdjCell ( Cell cell,
CellDirection3D  dir 
) [inherited]

Objetivo: Obter a celula vizinha na direcao dir. Se tal celula nao existir retorna getTriangulation().end();

Parametros:

Retorno:

Definition at line 559 of file dealbase.cpp.

00560 {
00561   if (cell->face(dir)->at_boundary())
00562     return getEndCell();
00563   else
00564     return cell->neighbor(dir);
00565 }

Cell DealBase::getCell ( int  index  )  [inherited]

Definition at line 960 of file dealbase.cpp.

00961 {
00962   return Cell(&getTriangulation(),beginCell()->level(),index);
00963 }

Cell DealBase::getCellAtPoint ( const Point< DIM > &  p  )  [inherited]

Objetivo: Retornar a celula que possui o ponto p.

Parametros: p = Ponto que pertence a celula retornada

Retorno:

Definition at line 354 of file dealbase.cpp.

00355 {
00356   Cell cell = beginCell();
00357   Cell endc = endCell();
00358   for (;cell!= endc;cell++)
00359   {
00360     if (NumericMethods::isInCube(p,cell->vertex(VERTEX_000),cell->vertex(VERTEX_111)))
00361     {
00362       return cell;
00363     }
00364   }
00365   return Cell();
00366   
00367 }

bool DealBase::getCellFlag ( const Cell cell,
const VecBool cVFlags 
) const [inherited]

Definition at line 303 of file dealbase.cpp.

00304 {
00305   assert(cVFlags.size() == numCells());
00306   return cVFlags[cell->index()];
00307   
00308 }

unsigned DealBase::getCentralPointIndex ( Cell cell  )  [inherited]

Objetivo: Obter o indice que o valor no ponto central da celula tem no vetor solucao.

Parametros: cell

Retorno: indice

Definition at line 59 of file dealbase.cpp.

00060 {
00061   return cell->index();
00062 }

double DealBase::getCentralValue ( const Cell cell,
const VecDouble values 
) const [inherited]

Objetivo: Obtem o valor de uma celula

Parametros:

Retorno:

Definition at line 29 of file dealbase.cpp.

00030 {
00031   assert(values.size() == numCells());
00032   return values(cell->index());
00033 }

Cell DealBase::getEndCell (  )  [inline, inherited]

Definition at line 66 of file dealbase.h.

00066 {return END_CELL;}

Point3D DealBase::getFaceBarycenter ( Face face  )  [inherited]

Definition at line 925 of file dealbase.cpp.

00926 {
00927   Point3D p;
00928   getFaceBarycenter(face,p);
00929   return p;
00930 }

void DealBase::getFaceBarycenter ( Face face,
Point3D p 
) [inherited]

Definition at line 912 of file dealbase.cpp.

00913 {
00914   p[0]=0;
00915   p[1]=0;
00916   p[2]=0;
00917   
00918   p+=face->vertex(0);
00919   p+=face->vertex(1);
00920   p+=face->vertex(2);
00921   p+=face->vertex(3);
00922   p/=4.0;
00923 }

bool DealBase::getFaceFlag ( const Face face,
const VecBool values 
) [inherited]

Definition at line 421 of file dealbase.cpp.

00422 {
00423   assert(values.size() == numFaces());
00424   return values[face->index()];
00425 }

double DealBase::getFaceValue ( const Cell cell,
FaceDirection3D  dir,
const VecDouble values 
) [inherited]

Definition at line 383 of file dealbase.cpp.

00384 {
00385   assert(values.size() == numFaces());
00386   return values(cell->face(dir)->index());
00387 }

double DealBase::getFaceValue ( const Face face,
const VecDouble values 
) [inherited]

Definition at line 370 of file dealbase.cpp.

00371 {
00372   assert(values.size() == numFaces());
00373   return values(face->index());
00374 }

unsigned DealBase::getFaceValueIndex ( const Cell cell,
FaceDirection3D  dir 
) [inherited]

Definition at line 389 of file dealbase.cpp.

00390 {
00391   return cell->face(dir)->index();
00392 }

double DealBase::getNeighborValue ( const Cell cell,
CellDirection3D  dir,
const VecDouble cValues 
) [inherited]

Objetivo: Obter o valor da celula vizinha

Parametros: cell = Celula corrente. dir = Direcao da celula vizinha a partir de cell. cValues = Vetor dos valores centrais. Retorno:

Definition at line 339 of file dealbase.cpp.

00340 {
00341   assert(cell->neighbor_index(dir)!=INVALID_INDEX);
00342   assert(cValues.size() == numCells());
00343   return cValues(cell->neighbor_index(dir));
00344 }

bool DealBase::getVerticeFlag ( const Cell cell,
VertexDirection3D  dir,
const VecBool vVFlags 
) const [inherited]

Definition at line 317 of file dealbase.cpp.

00318 {
00319   assert(vVFlags.size() == numVertices());
00320   return vVFlags[cell->vertex_index(dir)];
00321 }

void DealBase::getVerticePoint ( unsigned  vIndex,
Point< DIM > &  X 
) const [inherited]

Objetivo: Obter o ponto do vertice de indice vIndex

Definition at line 94 of file dealbase.cpp.

00095 {
00096   assert(vIndex < getTriangulation().n_vertices());
00097   X = getTriangulation().get_vertices()[vIndex];
00098 }

double DealBase::getVerticeValue ( unsigned  vIndex,
const VecDouble values 
) [inline, inherited]

Definition at line 63 of file dealbase.h.

00063 {return values(vIndex);}

double DealBase::getVerticeValue ( const Cell cell,
VertexDirection3D  vertex,
const VecDouble values 
) [inherited]

Objetivo: Obter o valor de um vertice.

Parametros: cell = Celula que possui o vertice vertex = Qual o vertice a ser obtido o valor values = Valor da solucao sobre os vertices.

Retorno: Valor do vertice

Definition at line 45 of file dealbase.cpp.

00046 {
00047   assert(values.size() == numVertices());
00048   return values(cell->vertex_index(vertex));
00049 }       

void DealBase::setCellFlag ( const Cell cell,
const bool  flag,
VecBool cVFlags 
) const [inherited]

Definition at line 297 of file dealbase.cpp.

00298 {
00299   assert(cVFlags.size() == numCells());
00300   cVFlags[cell->index()] = flag;
00301 }

void DealBase::setCentralValue ( DoFCell cell,
double  dd,
VecDouble values 
) [inherited]

Definition at line 71 of file dealbase.cpp.

00072 {
00073   values(cell->index()) = dd;
00074 }

void DealBase::setCentralValue ( const Cell cell,
double  dd,
VecDouble values 
) [inherited]

Definition at line 66 of file dealbase.cpp.

00067 {
00068   values(cell->index()) = dd;
00069 }

void DealBase::setFaceFlag ( const Face face,
bool  b,
VecBool values 
) [inherited]

Definition at line 415 of file dealbase.cpp.

00416 {
00417   assert(values.size() == numFaces());
00418   values[face->index()]=b;
00419   
00420 }

void DealBase::setFaceValue ( const Cell cell,
FaceDirection3D  dir,
double  dd,
VecDouble values 
) [inherited]

Definition at line 394 of file dealbase.cpp.

00395 {
00396   assert(values.size() == numFaces());
00397   values(cell->face(dir)->index())=dd;
00398 }

void DealBase::setFaceValue ( const Face face,
double  dd,
VecDouble values 
) [inherited]

Definition at line 377 of file dealbase.cpp.

00378 {
00379   assert(values.size() == numFaces());
00380   values(face->index())=dd;
00381 }

void DealBase::setVerticeFlag ( const Cell cell,
VertexDirection3D  dir,
const bool  flag,
VecBool vVFlags 
) const [inherited]

Definition at line 311 of file dealbase.cpp.

00312 {
00313   assert(vVFlags.size() == numVertices());
00314   vVFlags[cell->vertex_index(dir)] = flag;
00315 }

 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