SurfaceMesh Class Reference

#include <SurfaceMesh.hpp>

Inheritance diagram for SurfaceMesh:

Inheritance graph
[legend]
Collaboration diagram for SurfaceMesh:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { family = Mesh::surface }
enum  Type {
  cartesianHexahedraMesh, hexahedraMesh, octreeMesh, tetrahedraMesh,
  trianglesMesh, spectralMesh, surfaceMeshTriangles, surfaceMeshQuadrangles
}
enum  Family { volume, surface, plane }
 Family. More...

Public Member Functions

void buildFaces ()
virtual void computesFictitiousCells () const =0
bool isAssociatedTo (const Mesh &m) const
void setBackgroundMesh (const Mesh *m)
const MeshbackgroundMesh () const
 SurfaceMesh (const Mesh::Type t)
bool hasFaces () const
const size_t & numberOfFaces () const
 SurfaceMesh (const Mesh::Type t, ReferenceCounting< VerticesSet > vertices, ReferenceCounting< VerticesCorrespondance > correspondances)
virtual ~SurfaceMesh ()
virtual bool hasBorderMesh () const =0
virtual ConstReferenceCounting
< Mesh
borderBaseMesh () const =0
virtual bool isPeriodic () const
virtual std::string typeName () const =0
virtual bool inside (const real_t &x, const real_t &y, const real_t &z) const =0
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
virtual void buildEdges ()=0
size_t edgeNumber (const Edge &e) const
const size_t & numberOfVertices () const
void setNumberOfVertices (const size_t &size)
virtual const size_t & numberOfCells () const =0
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 Member Functions

template<typename CellType>
void __computesFictitiousCells (const Vector< CellType > &cells) const
 SurfaceMesh (const SurfaceMesh &s)

Protected Attributes

const Mesh__backgroundMesh
ReferenceCounting< VerticesSet__verticesSet
ReferenceCounting
< VerticesCorrespondance
__verticesCorrespondance
ReferenceCounting< EdgesSet__edgesSet


Detailed Description

Definition at line 34 of file SurfaceMesh.hpp.


Member Enumeration Documentation

anonymous enum

Enumerator:
family 

Definition at line 38 of file SurfaceMesh.hpp.

00038        {
00039     family = Mesh::surface
00040   };

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

SurfaceMesh::SurfaceMesh ( const SurfaceMesh s  )  [protected]

Forbids copy constructor

SurfaceMesh::SurfaceMesh ( const Mesh::Type  t  )  [inline]

Creates a surface mesh providing its type

Parameters:
t the surface mesh type

Definition at line 110 of file SurfaceMesh.hpp.

00111     : Mesh(t, Mesh::surface, 0),
00112       __backgroundMesh(0)
00113   {
00114     ;
00115   }

SurfaceMesh::SurfaceMesh ( const Mesh::Type  t,
ReferenceCounting< VerticesSet vertices,
ReferenceCounting< VerticesCorrespondance correspondances 
) [inline]

Creates a surface mesh providing its type and a set of vertices

Parameters:
t the surface mesh type
vertices a set of vertices
correspondances vertices association table

Definition at line 146 of file SurfaceMesh.hpp.

00149     : Mesh(t,
00150            Mesh::surface,
00151            vertices,
00152            correspondances),
00153       __backgroundMesh(0)
00154   {
00155     ;
00156   }

virtual SurfaceMesh::~SurfaceMesh (  )  [inline, virtual]

Destructor

Definition at line 162 of file SurfaceMesh.hpp.

00163   {
00164     ;
00165   }


Member Function Documentation

template<typename CellType>
void SurfaceMesh::__computesFictitiousCells ( const Vector< CellType > &  cells  )  const [inline, protected]

Definition at line 46 of file SurfaceMesh.hpp.

References Vector< T >::size().

00047   {
00048     for (size_t i=0; i<cells.size(); ++i) {
00049       cells[i].setFictitious(cells[i].mother().isFictitious());
00050     }
00051   }

Here is the call graph for this function:

void SurfaceMesh::buildFaces (  )  [inline, virtual]

Faces and edges are treated as the same for surfaces meshes

Implements Mesh.

Definition at line 60 of file SurfaceMesh.hpp.

References Mesh::buildEdges().

00061   {
00062     this->buildEdges();
00063   }

Here is the call graph for this function:

virtual void SurfaceMesh::computesFictitiousCells (  )  const [pure virtual]

Computes fictitious cells (ie: cells that will not be taken into account for computation)

Implemented in SurfaceMeshOfQuadrangles, and SurfaceMeshOfTriangles.

bool SurfaceMesh::isAssociatedTo ( const Mesh m  )  const [inline]

tests if a given mesh is the mesh associated to the surface mesh

Parameters:
m a given mesh
Returns:
true if m is the one!

Definition at line 79 of file SurfaceMesh.hpp.

References __backgroundMesh.

Referenced by BoundaryConditionCommonFEMDiscretization< MeshType, TypeOfDiscretization >::__checkBoundaryMeshAssociation().

00080   {
00081     return &m == __backgroundMesh;
00082   }

void SurfaceMesh::setBackgroundMesh ( const Mesh m  )  [inline]

Sets the background mesh

Parameters:
m a pointer to a given background mesh

Definition at line 89 of file SurfaceMesh.hpp.

References __backgroundMesh.

Referenced by CopyBackgroundMesh< SurfaceMeshOfQuadrangles >::copy(), CopyBackgroundMesh< SurfaceMeshOfTriangles >::copy(), and SurfaceMeshGenerator::generateSurfacicMesh().

00090   {
00091     __backgroundMesh = m;
00092   }

const Mesh* SurfaceMesh::backgroundMesh (  )  const [inline]

gets the pointer to the background mesh

Returns:
__backgroundMesh

Definition at line 99 of file SurfaceMesh.hpp.

References __backgroundMesh.

Referenced by CopyBackgroundMesh< SurfaceMeshOfQuadrangles >::copy(), and CopyBackgroundMesh< SurfaceMeshOfTriangles >::copy().

00100   {
00101     return __backgroundMesh;
00102   }

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

Returns true if the faces set has been built

Returns:
true if __edgesSet is not NULL

Implements Mesh.

Definition at line 122 of file SurfaceMesh.hpp.

References Mesh::__edgesSet.

00123   {
00124     return __edgesSet != 0;
00125   }

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

Returns the number of faces

Returns:
number of faces

Definition at line 133 of file SurfaceMesh.hpp.

References Mesh::__edgesSet.

00134   {
00135     return __edgesSet->numberOfEdges();
00136   }

virtual bool Mesh::hasBorderMesh (  )  const [pure virtual, inherited]

virtual ConstReferenceCounting<Mesh> Mesh::borderBaseMesh (  )  const [pure virtual, inherited]

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 std::string Mesh::typeName (  )  const [pure virtual, inherited]

Returns the typename of the mesh

Returns:
type name of the mesh

Implemented in MeshOfHexahedra, MeshOfTetrahedra, MeshOfTriangles, OctreeMesh, SpectralMesh, Structured3DMesh, SurfaceMeshOfQuadrangles, and SurfaceMeshOfTriangles.

virtual bool Mesh::inside ( const real_t &  x,
const real_t &  y,
const real_t &  z 
) const [pure virtual, inherited]

Checks if $ (x,y,z) $ is inside the mesh

Parameters:
x $ x $
y $ y $
z $ z $
Returns:
true if $ (x,y,z) $ is inside the mesh.

Implemented in MeshOfHexahedra, MeshOfTetrahedra, MeshOfTriangles, OctreeMesh, SpectralMesh, Structured3DMesh, SurfaceMeshOfQuadrangles, and SurfaceMeshOfTriangles.

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 MeshOfTetrahedra::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   }

virtual void Mesh::buildEdges (  )  [pure virtual, inherited]

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   }

virtual const size_t& Mesh::numberOfCells (  )  const [pure virtual, inherited]

Read-only access to the number of cells

Returns:
number of cells

Implemented in MeshOfHexahedra, MeshOfTetrahedra, MeshOfTriangles, OctreeMesh, SpectralMesh, Structured3DMesh, SurfaceMeshOfQuadrangles, and SurfaceMeshOfTriangles.

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

const Mesh* SurfaceMesh::__backgroundMesh [protected]

Sets which is background mesh

Definition at line 43 of file SurfaceMesh.hpp.

Referenced by backgroundMesh(), isAssociatedTo(), and setBackgroundMesh().

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


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

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