MeshOfTetrahedra Class Reference

#include <MeshOfTetrahedra.hpp>

Inheritance diagram for MeshOfTetrahedra:

Inheritance graph
[legend]
Collaboration diagram for MeshOfTetrahedra:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { family = Mesh::volume }
typedef Tetrahedron CellType
typedef Tetrahedron::FaceType FaceType
typedef MeshOfTetrahedra Transformed
typedef SurfaceMeshOfTriangles BorderMeshType
typedef Mesh::T_iterator
< MeshOfTetrahedra,
Tetrahedron
iterator
typedef Mesh::T_iterator
< const MeshOfTetrahedra,
const Tetrahedron
const_iterator
enum  Type {
  cartesianHexahedraMesh, hexahedraMesh, octreeMesh, tetrahedraMesh,
  trianglesMesh, spectralMesh, surfaceMeshTriangles, surfaceMeshQuadrangles
}
enum  Family { volume, surface, plane }
 Family. More...

Public Member Functions

std::string typeName () const
bool inside (const real_t &x, const real_t &y, const real_t &z) const
 Returns true if the point p is inside the mesh.
bool inside (const TinyVector< 3 > &p) const
 Returns true if the point p is inside the mesh.
bool hasBorderMesh () const
ConstReferenceCounting
< BorderMeshType
borderMesh () const
ConstReferenceCounting< MeshborderBaseMesh () const
const size_t & numberOfCells () const
 Read-only access to the number of cells.
void buildEdges ()
bool hasFaces () const
void buildFaces ()
const FaceTypeface (const size_t &i) const
const size_t & numberOfFaces () const
 Read-only access to the number of faces.
size_t cellNumber (const Tetrahedron &h) const
size_t faceNumber (const FaceType &f) const
void buildLocalizationTools ()
MeshOfTetrahedra::const_iterator find (const TinyVector< 3, real_t > &P) const
MeshOfTetrahedra::const_iterator find (const double &x, const double &y, const double &z) const
Tetrahedroncell (const size_t &i)
const Tetrahedroncell (const size_t &i) const
const Connectivity
< MeshOfTetrahedra > & 
connectivity () const
Connectivity< MeshOfTetrahedra > & connectivity ()
 MeshOfTetrahedra (ReferenceCounting< VerticesSet > vertices, ReferenceCounting< VerticesCorrespondance > correspondances, ReferenceCounting< Vector< Tetrahedron > > tetrahedra, ReferenceCounting< BorderMeshType > triangles=0)
 ~MeshOfTetrahedra ()
virtual bool isPeriodic () const
virtual bool inside (const TinyVector< 3, real_t > &p) const =0
const Mesh::Typetype () const
const Mesh::Familyfamily () const
const size_t & id () const
size_t vertexNumber (const Vertex &v) const
bool hasEdges () const
size_t edgeNumber (const Edge &e) const
const size_t & numberOfVertices () const
void setNumberOfVertices (const size_t &size)
size_t numberOfEdges () const
ReferenceCounting< VerticesSetverticesSet ()
ConstReferenceCounting
< VerticesSet
verticesSet () const
ReferenceCounting
< VerticesCorrespondance
verticesCorrespondance ()
ConstReferenceCounting
< VerticesCorrespondance
verticesCorrespondance () const
const Vertexvertex (const size_t &i) const
Vertexvertex (const size_t &i)
const size_t & correspondance (const size_t &i) const
const Edgeedge (const size_t &i) const
Edgeedge (const size_t &i)

Protected Attributes

ReferenceCounting< VerticesSet__verticesSet
ReferenceCounting
< VerticesCorrespondance
__verticesCorrespondance
ReferenceCounting< EdgesSet__edgesSet

Private Member Functions

 MeshOfTetrahedra (const MeshOfTetrahedra &m)

Private Attributes

ReferenceCounting< Vector
< Tetrahedron > > 
__cells
ReferenceCounting< Octree
< size_t, 3 > > 
__octree
TinyVector< 3, real_t > __a
TinyVector< 3, real_t > __b
ReferenceCounting< BorderMeshType__borderMesh
ReferenceCounting< FacesSet
< Triangle > > 
__facesSet
Connectivity< MeshOfTetrahedra__connectivity


Detailed Description

Definition at line 43 of file MeshOfTetrahedra.hpp.


Member Typedef Documentation

Definition at line 47 of file MeshOfTetrahedra.hpp.

Definition at line 48 of file MeshOfTetrahedra.hpp.

Definition at line 50 of file MeshOfTetrahedra.hpp.

Definition at line 52 of file MeshOfTetrahedra.hpp.

Definition at line 172 of file MeshOfTetrahedra.hpp.

Definition at line 173 of file MeshOfTetrahedra.hpp.


Member Enumeration Documentation

anonymous enum

Enumerator:
family 

Definition at line 54 of file MeshOfTetrahedra.hpp.

00054        {
00055     family = Mesh::volume
00056   };

enum Mesh::Type [inherited]

Enumerator:
cartesianHexahedraMesh 
hexahedraMesh 
octreeMesh 
tetrahedraMesh 
trianglesMesh 
spectralMesh 
surfaceMeshTriangles 
surfaceMeshQuadrangles 

Definition at line 43 of file Mesh.hpp.

enum Mesh::Family [inherited]

Family.

Enumerator:
volume 
surface 
plane 

Definition at line 55 of file Mesh.hpp.

00055                {
00056     volume,
00057     surface,
00058     plane
00059   } Family;


Constructor & Destructor Documentation

MeshOfTetrahedra::MeshOfTetrahedra ( const MeshOfTetrahedra m  )  [private]

Forbids copy contructor

Parameters:
m another mesh

MeshOfTetrahedra::MeshOfTetrahedra ( ReferenceCounting< VerticesSet vertices,
ReferenceCounting< VerticesCorrespondance correspondances,
ReferenceCounting< Vector< Tetrahedron > >  tetrahedra,
ReferenceCounting< BorderMeshType triangles = 0 
)

Constructs a Mesh of tetrahedra using a set of vertices, a set of tetrahedra and a given border mesh. Connectivity is computed.

Parameters:
vertices given vertices
correspondances "real" vertices numbers
tetrahedra given tetrahedra
triangles a surface mesh

Definition at line 37 of file MeshOfTetrahedra.cpp.

References __borderMesh, and ConnectivityBuilder< MeshType >::borderMesh().

00041     : Mesh(Mesh::tetrahedraMesh,
00042            Mesh::volume,
00043            vertices,
00044            correspondances),
00045       __cells(tetrahedra),
00046       __octree(0),
00047       __borderMesh(triangles),
00048       __facesSet(0),
00049       __connectivity(*this)
00050 {
00051   // Connects the surface mesh to the volume mesh
00052   if (__borderMesh != 0) {
00053     ConnectivityBuilder<MeshOfTetrahedra> builder(*this);
00054     builder.borderMesh(__borderMesh);
00055     __borderMesh->setBackgroundMesh(this);
00056   }
00057 }

Here is the call graph for this function:

MeshOfTetrahedra::~MeshOfTetrahedra (  )  [inline]

Definition at line 266 of file MeshOfTetrahedra.hpp.

00267   {
00268     ;
00269   }


Member Function Documentation

std::string MeshOfTetrahedra::typeName (  )  const [inline, virtual]

Returns the typename of the mesh

Returns:
type name of the mesh

Implements Mesh.

Definition at line 81 of file MeshOfTetrahedra.hpp.

00082   {
00083     return "mesh of tetrahedra";
00084   }

bool MeshOfTetrahedra::inside ( const real_t &  x,
const real_t &  y,
const real_t &  z 
) const [inline, virtual]

Returns true if the point p is inside the mesh.

Implements Mesh.

Definition at line 87 of file MeshOfTetrahedra.hpp.

References find().

Referenced by inside().

00088   {
00089     return not(this->find(x, y, z).end());
00090 
00091   }

Here is the call graph for this function:

bool MeshOfTetrahedra::inside ( const TinyVector< 3 > &  p  )  const [inline]

Returns true if the point p is inside the mesh.

Definition at line 94 of file MeshOfTetrahedra.hpp.

References inside().

00095   {
00096     return this->inside(p[0], p[1], p[2]);
00097   }

Here is the call graph for this function:

bool MeshOfTetrahedra::hasBorderMesh (  )  const [inline, virtual]

Implements Mesh.

Definition at line 99 of file MeshOfTetrahedra.hpp.

References __borderMesh.

Referenced by WriterMedit::__proceedMesh().

00100   {
00101     return (__borderMesh != 0);
00102   }

ConstReferenceCounting<BorderMeshType> MeshOfTetrahedra::borderMesh (  )  const [inline]

Definition at line 104 of file MeshOfTetrahedra.hpp.

References __borderMesh.

Referenced by WriterMedit::__proceedMesh(), and BoundaryExpressionSurfaceMesh::execute().

00105   {
00106     return __borderMesh;
00107   }

ConstReferenceCounting<Mesh> MeshOfTetrahedra::borderBaseMesh (  )  const [inline, virtual]

Implements Mesh.

Definition at line 109 of file MeshOfTetrahedra.hpp.

References __borderMesh.

00110   {
00111     return static_cast<const BorderMeshType*>(__borderMesh);
00112   }

const size_t& MeshOfTetrahedra::numberOfCells (  )  const [inline, virtual]

Read-only access to the number of cells.

Implements Mesh.

Definition at line 115 of file MeshOfTetrahedra.hpp.

Referenced by buildLocalizationTools(), and MeshDomainTetrahedrizor::run().

00116   {
00117     return (*__cells).size();
00118   }

void MeshOfTetrahedra::buildEdges (  )  [virtual]

Builds internal edges of the mesh

Implements Mesh.

Definition at line 59 of file MeshOfTetrahedra.cpp.

References Mesh::__edgesSet, and EdgesBuilder< MeshType >::edgesSet().

00060 {
00061   EdgesBuilder<MeshOfTetrahedra> edgesBuilder(*this);
00062   __edgesSet = edgesBuilder.edgesSet();
00063 }

Here is the call graph for this function:

bool MeshOfTetrahedra::hasFaces (  )  const [inline, virtual]

Checks if internal faces set is built

Returns:
true if it is built

Implements Mesh.

Definition at line 131 of file MeshOfTetrahedra.hpp.

References __facesSet.

00132   {
00133     return (__facesSet != 0);
00134   }

void MeshOfTetrahedra::buildFaces (  )  [virtual]

Builds internal faces of the mesh

Implements Mesh.

Definition at line 65 of file MeshOfTetrahedra.cpp.

References __facesSet, and FacesBuilder< MeshType >::facesSet().

00066 {
00067   FacesBuilder<MeshOfTetrahedra> facesBuilder(*this);
00068   __facesSet = facesBuilder.facesSet();
00069 }

Here is the call graph for this function:

const FaceType& MeshOfTetrahedra::face ( const size_t &  i  )  const [inline]

Read-only access to a face

Parameters:
i the face number
Returns:
the i th face

Definition at line 148 of file MeshOfTetrahedra.hpp.

References __facesSet, and ASSERT.

00149   {
00150     ASSERT(__facesSet != 0);
00151     return (*__facesSet)[i];
00152   }

const size_t& MeshOfTetrahedra::numberOfFaces (  )  const [inline]

Read-only access to the number of faces.

Definition at line 155 of file MeshOfTetrahedra.hpp.

References __facesSet, and ASSERT.

00156   {
00157     ASSERT(__facesSet != 0);
00158     return (*__facesSet).numberOfFaces();
00159   }

size_t MeshOfTetrahedra::cellNumber ( const Tetrahedron h  )  const [inline]

Definition at line 161 of file MeshOfTetrahedra.hpp.

Referenced by find().

00162   {
00163     return (*__cells).number(h);
00164   }

size_t MeshOfTetrahedra::faceNumber ( const FaceType f  )  const [inline]

Definition at line 166 of file MeshOfTetrahedra.hpp.

References __facesSet, and ASSERT.

00167   {
00168     ASSERT(__facesSet != 0);
00169     return (*__facesSet).number(f);
00170   }

void MeshOfTetrahedra::buildLocalizationTools (  ) 

Definition at line 72 of file MeshOfTetrahedra.cpp.

References __a, __b, __octree, cell(), ffout(), ConnectivityBuilder< MeshType >::generates(), StaticBase< QuadratureFormulaP1Tetrahedron >::instance(), ErrorHandler::normal, numberOfCells(), QuadratureFormulaP1Tetrahedron::numberOfQuadraturePoints, Tetrahedron::NumberOfVertices, Mesh::numberOfVertices(), ConformTransformationP1Tetrahedron::value(), Mesh::vertex(), and Mesh::vertexNumber().

Referenced by find().

00073 {
00074   ffout(3) << "Generating localization in tetrahedra mesh...\n";
00075   if (this->numberOfVertices()==0) {
00076     throw ErrorHandler(__FILE__,__LINE__,
00077                        "the mesh contains no vertices\n",
00078                        ErrorHandler::normal);
00079   }
00080 
00081   {
00082     // Localization inside a tetrahedra mesh requires the cell to cell
00083     // connectivity
00084     ConnectivityBuilder<MeshOfTetrahedra> builder(*this);
00085     builder.generates(Connectivity<MeshOfTetrahedra>::CellToCells);
00086   }
00087 
00088   // getting bounding box size
00089   __a = (this->vertex(0));
00090   __b = __a;
00091   for (size_t i=1; i<this->numberOfVertices(); ++i) {
00092     Vertex& x = this->vertex(i);
00093     for (size_t k=0; k<3; ++k) {
00094       __a[k] = (__a[k]<x[k])?__a[k]:x[k];
00095       __b[k] = (__b[k]>x[k])?__b[k]:x[k];
00096     }
00097   }
00098   ffout(3) << "- Bounding box is " << __a << ',' << __b << '\n';
00099 
00100   __a -= TinyVector<3,real_t>(1,1,1);
00101   __b += TinyVector<3,real_t>(1,1,1);
00102 
00103   ffout(3) << "- Building the octree\n";
00104   __octree = new Octree<size_t, 3>(__a,__b);
00105 
00106   for (size_t i = 0; i < this->numberOfCells(); ++i) {
00107     ConformTransformationP1Tetrahedron T(this->cell(i));
00108 
00109     for (size_t k=0; k<QuadratureFormulaP1Tetrahedron::numberOfQuadraturePoints; ++k) {
00110       TinyVector<3,real_t> X;
00111       T.value(QuadratureFormulaP1Tetrahedron::instance()[k], X);
00112       (*__octree).add(i,X);
00113     }
00114   }
00115 
00116   Vector<bool> usedVertices(this->numberOfVertices());
00117   usedVertices = false;
00118   for (size_t i = 0; i < this->numberOfCells(); ++i) {
00119     for (size_t k=0; k<CellType::NumberOfVertices; ++k) {
00120       const Vertex& x = this->cell(i)(k);
00121       const size_t vertexNumber = this->vertexNumber(x);
00122       if (not usedVertices[vertexNumber]) {
00123         usedVertices[vertexNumber] = true;
00124         (*__octree).add(i,x);
00125       }
00126     }
00127   }
00128 
00129   ffout(3) << "Generating localization in tetrahedra mesh: done\n";
00130 }

Here is the call graph for this function:

MeshOfTetrahedra::const_iterator MeshOfTetrahedra::find ( const TinyVector< 3, real_t > &  P  )  const [inline]

Find the element which contains a point $ P $

Parameters:
P $ P$
Returns:
an iterator on the element if found else returns the end iterator

Definition at line 186 of file MeshOfTetrahedra.hpp.

Referenced by inside().

00187   {
00188     return find(P[0], P[1], P[2]);
00189   }

MeshOfTetrahedra::const_iterator MeshOfTetrahedra::find ( const double &  x,
const double &  y,
const double &  z 
) const

Find the element which contains a point $ P $

Parameters:
x $ P_1$
y $ P_2$
z $ P_3$
Returns:
an iterator on the element if found else returns the end iterator
Bug:
Criteria uses an epsilon that should be relative to the element size

Definition at line 133 of file MeshOfTetrahedra.cpp.

References __connectivity, __octree, buildLocalizationTools(), cellNumber(), Connectivity< MeshType >::cells(), and Tetrahedron::getBarycentricCoordinates().

00136 {
00137   if (__octree == 0) { // Builds the octree "on-demand"
00138     const_cast<MeshOfTetrahedra*>(this)->buildLocalizationTools();
00139   }
00140 
00141   // starts the search
00142   TinyVector<3,real_t> X(x,y,z);
00143   Octree<size_t, 3>::iterator i = (*__octree).fuzzySearch(X);
00144 
00145   size_t guessedCellNumber = (*i).value();
00146   const_iterator t0(*this, guessedCellNumber);
00147 
00148   bool found=false;
00149 
00150   std::set<MeshOfTetrahedra::const_iterator> visited;
00151   std::set<MeshOfTetrahedra::const_iterator> toVisitSet;
00152   std::stack<MeshOfTetrahedra::const_iterator> toVisitStack;
00153 
00154   toVisitSet.insert(t0);
00155   toVisitStack.push(t0);
00156   const_iterator c (*this);
00157 
00158   do {
00159     // treating next cell
00160     c = toVisitStack.top();
00161 
00162     toVisitSet.erase(c);
00163     toVisitStack.pop();
00164     visited.insert(c);
00165 
00166     const Tetrahedron& t = *c;
00167 
00168     TinyVector<4, real_t> lambda;
00169 
00170     t.getBarycentricCoordinates(X, lambda);
00171 
00172     found = true;
00173     for (size_t i=0; i<4; ++i) {
00174 #warning Should use a relevent epsilon here ...
00175       if (lambda[i] < -1E-6) {
00176         found = false;
00177         const Tetrahedron* newT = __connectivity.cells(t)[i];
00178         if (newT != 0) {
00179           const_iterator t1(*this, this->cellNumber(*newT));
00180   
00181           if (visited.find(t1) == visited.end()) {
00182             if (toVisitSet.find(t1) == toVisitSet.end()) {
00183               toVisitSet.insert(t1);
00184               toVisitStack.push(t1);
00185             }
00186           }
00187         }
00188       }
00189     }
00190   } while (not(found) and not(toVisitStack.empty()));
00191 
00192   if (not(found)) {
00193     c = const_iterator(*this,const_iterator::End);
00194   }
00195   return  c;
00196 }

Here is the call graph for this function:

Tetrahedron& MeshOfTetrahedra::cell ( const size_t &  i  )  [inline]

Access to the cell i of the mesh.

Parameters:
i the cell number
Returns:
the i th tetrahedron

Definition at line 215 of file MeshOfTetrahedra.hpp.

References __cells.

Referenced by buildLocalizationTools().

00216   {
00217     return (*__cells)[i];
00218   }

const Tetrahedron& MeshOfTetrahedra::cell ( const size_t &  i  )  const [inline]

Read only access to the cell i of the mesh.

Parameters:
i the cell number
Returns:
the i th tetrahedron

Definition at line 227 of file MeshOfTetrahedra.hpp.

References __cells.

00228   {
00229     return (*__cells)[i];
00230   }

const Connectivity<MeshOfTetrahedra>& MeshOfTetrahedra::connectivity (  )  const [inline]

Read only access to the mesh connectivity

Returns:
the connectivity

Definition at line 237 of file MeshOfTetrahedra.hpp.

References __connectivity.

Referenced by SurfaceMeshGenerator::Internals::__createSurface().

00238   {
00239     return __connectivity;
00240   }

Connectivity<MeshOfTetrahedra>& MeshOfTetrahedra::connectivity (  )  [inline]

Access to the mesh connectivity

Returns:
the connectivity

Definition at line 247 of file MeshOfTetrahedra.hpp.

References __connectivity.

00248   {
00249     return __connectivity;
00250   }

virtual bool Mesh::isPeriodic (  )  const [inline, virtual, inherited]

Checks if a mesh has a periodic topology

Returns:
true if the mesh is periodic

Reimplemented in OctreeMesh.

Definition at line 238 of file Mesh.hpp.

References Mesh::__verticesCorrespondance, and Mesh::__verticesSet.

00239   {
00240     return __verticesSet->numberOfVertices() != __verticesCorrespondance->numberOfCorrespondances();
00241   }

virtual bool Mesh::inside ( const TinyVector< 3, real_t > &  p  )  const [pure virtual, inherited]

Checks if a point is inside the mesh

Parameters:
p the point to localize
Returns:
true if the point p is inside the mesh.

const Mesh::Type& Mesh::type (  )  const [inline, inherited]

Read-only access to the type of the mesh

Returns:
__type

Definition at line 277 of file Mesh.hpp.

References Mesh::__type.

Referenced by BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__meshWrapper(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardDirichletBorderLinearOperator(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardGetDiagonalVariationalBorderBilinearOperator(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardVariationalBorderBilinearOperator(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardVariationalBorderBilinearOperatorTimesX(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardVariationalBorderBilinearOperatorTransposedTimesX(), BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__StandardVariationalBorderLinearOperator(), ScalarDegreeOfFreedomPositionsSet::Builder::build(), FEMFunctionBuilder::build(), DGFunctionBuilder::build(), SpectralFEMPreconditioner::Internal::computes(), SpectralFEMPreconditioner::Internal::computesTransposed(), DegreeOfFreedomSetBuilder::DegreeOfFreedomSetBuilder(), RealExpressionIntegrate::execute(), FunctionExpressionConvection::execute(), BoundaryExpressionSurfaceMesh::execute(), SurfaceMeshGenerator::generateSurfacicMesh(), BoundaryConditionDiscretizationSpectralNonConform::getDiagonal(), MeshSimplifier::MeshSimplifier(), MultiGrid::MultiGrid(), ScalarFunctionIntegrate::operator()(), BoundaryConditionDiscretizationSpectralNonConform::setSecondMember(), BoundaryConditionDiscretizationSpectralNonConform::timesX(), and BoundaryConditionDiscretizationSpectralNonConform::transposedTimesX().

00278   {
00279     return __type;
00280   }

const Mesh::Family& Mesh::family (  )  const [inline, inherited]

Read-only access to the family of the mesh

Returns:
__family

Definition at line 287 of file Mesh.hpp.

References Mesh::__family.

Referenced by RealExpressionIntegrate::execute(), and BoundaryExpressionSurfaceMesh::execute().

00288   {
00289     return __family;
00290   }

const size_t& Mesh::id (  )  const [inline, inherited]

Read-only access to the id of the mesh

Returns:
__meshId

Definition at line 297 of file Mesh.hpp.

References Mesh::__meshId.

00298   {
00299     return __meshId;
00300   }

size_t Mesh::vertexNumber ( const Vertex v  )  const [inline, inherited]

Returns the number of the vertex v in the list

Parameters:
v a vertex
Returns:
the vertex v number
Note:
polymorphism is not used for clarity reason

Definition at line 311 of file Mesh.hpp.

References Mesh::__verticesSet.

Referenced by buildLocalizationTools(), OctreeMeshBuilder::buildMesh(), and MeshDomainTetrahedrizor::run().

00312   {
00313     return __verticesSet->number(v);
00314   }

bool Mesh::hasEdges (  )  const [inline, inherited]

tests if the EdgesSet has been built

Returns:
true if __edgesSet is not NULL

Definition at line 321 of file Mesh.hpp.

References Mesh::__edgesSet.

00322   {
00323     return __edgesSet != 0;
00324   }

size_t Mesh::edgeNumber ( const Edge e  )  const [inline, inherited]

Returns the number of the Edge e in the list

Parameters:
e an Edge
Returns:
the edge E number
Note:
polymorphism is not used for clarity reason

Definition at line 353 of file Mesh.hpp.

References Mesh::__edgesSet, and ASSERT.

00354   {
00355     ASSERT(__edgesSet != 0);
00356     return __edgesSet->number(e);
00357   }

const size_t& Mesh::numberOfVertices (  )  const [inline, inherited]

void Mesh::setNumberOfVertices ( const size_t &  size  )  [inline, inherited]

Changes the size of the vertices container.

Parameters:
size vertices set new size
Bug:
this function should not be allowed!

Definition at line 375 of file Mesh.hpp.

References Mesh::__verticesCorrespondance, and Mesh::__verticesSet.

Referenced by SurfaceMeshGenerator::Internals::__constructionFinalMesh().

00376   {
00377     if (__verticesSet == 0) {
00378       __verticesSet = new VerticesSet(size);
00379       __verticesCorrespondance = new VerticesCorrespondance(size);
00380     } else {
00381       __verticesSet->setNumberOfVertices(size);
00382       __verticesCorrespondance = new VerticesCorrespondance(size);
00383     }
00384   }

size_t Mesh::numberOfEdges (  )  const [inline, inherited]

Read-only access to the number of edges

Returns:
number of edges

Definition at line 398 of file Mesh.hpp.

References Mesh::__edgesSet, and ASSERT.

Referenced by SurfaceMeshGenerator::Internals::__createSurface().

00399   {
00400     ASSERT(__edgesSet != 0);
00401     return __edgesSet->numberOfEdges();
00402   }

ReferenceCounting<VerticesSet> Mesh::verticesSet (  )  [inline, inherited]

Access to the vertices set of the mesh

Returns:
__verticesSet

Definition at line 409 of file Mesh.hpp.

References Mesh::__verticesSet.

00410   {
00411     return __verticesSet;
00412   }

ConstReferenceCounting<VerticesSet> Mesh::verticesSet (  )  const [inline, inherited]

Read only access to the vertices set of the mesh

Returns:
__verticesSet

Definition at line 419 of file Mesh.hpp.

References Mesh::__verticesSet.

00420   {
00421     return __verticesSet;
00422   }

ReferenceCounting<VerticesCorrespondance> Mesh::verticesCorrespondance (  )  [inline, inherited]

Access to the vertices correspondance table

Returns:
__verticesCorrespondance

Definition at line 429 of file Mesh.hpp.

References Mesh::__verticesCorrespondance.

00430   {
00431     return __verticesCorrespondance;
00432   }

ConstReferenceCounting<VerticesCorrespondance> Mesh::verticesCorrespondance (  )  const [inline, inherited]

Read only access to the vertices correspondance table

Returns:
__verticesCorrespondance

Definition at line 439 of file Mesh.hpp.

References Mesh::__verticesCorrespondance.

00440   {
00441     return __verticesCorrespondance;
00442   }

const Vertex& Mesh::vertex ( const size_t &  i  )  const [inline, inherited]

Vertex& Mesh::vertex ( const size_t &  i  )  [inline, inherited]

Access to the ith vertex of the mesh

Parameters:
i the number of the vertex to access
Returns:
the ith vertex

Reimplemented in SpectralMesh, and Structured3DMesh.

Definition at line 463 of file Mesh.hpp.

References Mesh::__verticesSet.

00464   {
00465     return (*__verticesSet)[i];
00466   }

const size_t& Mesh::correspondance ( const size_t &  i  )  const [inline, inherited]

Read only access to the ith vertex "real" number (ie: when dealing with periodic boundaries)

Parameters:
i the number of the vertex
Returns:
the vertex "real" number

Definition at line 476 of file Mesh.hpp.

References Mesh::__verticesCorrespondance.

Referenced by MeshDomainTetrahedrizor::run().

00477   {
00478     return (*__verticesCorrespondance)[i];
00479   }

const Edge& Mesh::edge ( const size_t &  i  )  const [inline, inherited]

read-only access to the ith edge

Parameters:
i the number of the edge
Returns:
ith edge

Definition at line 489 of file Mesh.hpp.

References Mesh::__edgesSet.

Referenced by SurfaceMeshGenerator::Internals::__createSurface().

00490   {
00491     return (*__edgesSet)[i];
00492   }

Edge& Mesh::edge ( const size_t &  i  )  [inline, inherited]

access to the ith edge

Parameters:
i the number of the edge
Returns:
ith edge

Definition at line 501 of file Mesh.hpp.

References Mesh::__edgesSet.

00502   {
00503     return (*__edgesSet)[i];
00504   }


Member Data Documentation

Cells list

Definition at line 59 of file MeshOfTetrahedra.hpp.

Referenced by cell().

Octree refering to the cells

Definition at line 61 of file MeshOfTetrahedra.hpp.

Referenced by buildLocalizationTools(), and find().

TinyVector<3,real_t> MeshOfTetrahedra::__a [private]

bounding box lower corner

Definition at line 63 of file MeshOfTetrahedra.hpp.

Referenced by buildLocalizationTools().

TinyVector<3,real_t> MeshOfTetrahedra::__b [private]

bounding box higher corner

Definition at line 64 of file MeshOfTetrahedra.hpp.

Referenced by buildLocalizationTools().

The various border lists

Definition at line 66 of file MeshOfTetrahedra.hpp.

Referenced by borderBaseMesh(), borderMesh(), hasBorderMesh(), and MeshOfTetrahedra().

internal and external faces set

Definition at line 67 of file MeshOfTetrahedra.hpp.

Referenced by buildFaces(), face(), faceNumber(), hasFaces(), and numberOfFaces().

Connectivity

Definition at line 69 of file MeshOfTetrahedra.hpp.

Referenced by connectivity(), and find().

ReferenceCounting<EdgesSet> Mesh::__edgesSet [protected, inherited]


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

Generated on Wed Nov 19 00:09:58 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6