SurfaceMeshOfQuadrangles Class Reference

#include <SurfaceMeshOfQuadrangles.hpp>

Inheritance diagram for SurfaceMeshOfQuadrangles:

Inheritance graph
[legend]
Collaboration diagram for SurfaceMeshOfQuadrangles:

Collaboration graph
[legend]

List of all members.

Public Types

typedef Quadrangle CellType
typedef Edge FaceType
typedef SurfaceMeshOfQuadrangles Transformed
enum  { family = Mesh::surface }
enum  Type {
  cartesianHexahedraMesh, hexahedraMesh, octreeMesh, tetrahedraMesh,
  trianglesMesh, spectralMesh, surfaceMeshTriangles, surfaceMeshQuadrangles
}
enum  Family { volume, surface, plane }
 Family. More...

Public Member Functions

bool hasBorderMesh () const
ConstReferenceCounting< MeshborderBaseMesh () const
std::string typeName () const
void buildEdges ()
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.
void computesFictitiousCells () const
Quadranglecell (size_t i)
const Quadranglecell (size_t i) const
size_t cellNumber (const Quadrangle &c) const
void setNumberOfCells (const int n)
 Reserves storage for n SurfElem.
const size_t & numberOfCells () const
 Read-only access to the number of cells.
const FaceTypeface (const size_t &i) const
 SurfaceMeshOfQuadrangles (const size_t theNumberOfCells)
 SurfaceMeshOfQuadrangles (ReferenceCounting< VerticesSet > vertices, ReferenceCounting< VerticesCorrespondance > correspondances, ReferenceCounting< Vector< Quadrangle > > quadrangles)
 SurfaceMeshOfQuadrangles ()
 ~SurfaceMeshOfQuadrangles ()
const Mesh::Familyfamily () const
void buildFaces ()
bool isAssociatedTo (const Mesh &m) const
void setBackgroundMesh (const Mesh *m)
const MeshbackgroundMesh () const
bool hasFaces () const
const size_t & numberOfFaces () const
virtual bool isPeriodic () const
virtual bool inside (const TinyVector< 3, real_t > &p) const =0
const Mesh::Typetype () 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 Member Functions

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

Protected Attributes

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

Private Attributes

ReferenceCounting< Vector
< Quadrangle > > 
__cells

Classes

struct  BorderMeshType
class  const_iterator
class  iterator


Detailed Description

Definition at line 32 of file SurfaceMeshOfQuadrangles.hpp.


Member Typedef Documentation

Definition at line 36 of file SurfaceMeshOfQuadrangles.hpp.

Definition at line 37 of file SurfaceMeshOfQuadrangles.hpp.

Definition at line 39 of file SurfaceMeshOfQuadrangles.hpp.


Member Enumeration Documentation

anonymous enum [inherited]

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

SurfaceMeshOfQuadrangles::SurfaceMeshOfQuadrangles ( const size_t  theNumberOfCells  )  [inline]

Definition at line 262 of file SurfaceMeshOfQuadrangles.hpp.

00263     : SurfaceMesh(Mesh::surfaceMeshQuadrangles),
00264       __cells(new Vector<Quadrangle>(theNumberOfCells))
00265   {
00266     ;
00267   }

SurfaceMeshOfQuadrangles::SurfaceMeshOfQuadrangles ( ReferenceCounting< VerticesSet vertices,
ReferenceCounting< VerticesCorrespondance correspondances,
ReferenceCounting< Vector< Quadrangle > >  quadrangles 
) [inline]

Definition at line 269 of file SurfaceMeshOfQuadrangles.hpp.

00272     : SurfaceMesh(Mesh::surfaceMeshQuadrangles,
00273                   vertices,
00274                   correspondances),
00275       __cells(quadrangles)
00276   {
00277     ;
00278   }

SurfaceMeshOfQuadrangles::SurfaceMeshOfQuadrangles (  )  [inline]

Definition at line 280 of file SurfaceMeshOfQuadrangles.hpp.

00281     : SurfaceMesh(Mesh::surfaceMeshQuadrangles)
00282   {
00283     ;
00284   }

SurfaceMeshOfQuadrangles::~SurfaceMeshOfQuadrangles (  )  [inline]

Definition at line 286 of file SurfaceMeshOfQuadrangles.hpp.

00287   {
00288     ;
00289   }


Member Function Documentation

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

Implements Mesh.

Definition at line 177 of file SurfaceMeshOfQuadrangles.hpp.

00178   {
00179     return false;
00180   }

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

Implements Mesh.

Definition at line 182 of file SurfaceMeshOfQuadrangles.hpp.

References ErrorHandler::unexpected.

00183   {
00184     throw ErrorHandler(__FILE__,__LINE__,
00185                        "not implemented yet",
00186                        ErrorHandler::unexpected);
00187 
00188     return 0;
00189   }

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

Returns the typename of the mesh

Returns:
type name of the mesh

Implements Mesh.

Definition at line 191 of file SurfaceMeshOfQuadrangles.hpp.

00192   {
00193     return "surface mesh of quadrilaterals";
00194   }

void SurfaceMeshOfQuadrangles::buildEdges (  )  [inline, virtual]

builds the edges of a mesh

Implements Mesh.

Definition at line 197 of file SurfaceMeshOfQuadrangles.hpp.

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

00198   {
00199     EdgesBuilder<SurfaceMeshOfQuadrangles> edgesBuilder(*this);
00200     __edgesSet = edgesBuilder.edgesSet();
00201   }

Here is the call graph for this function:

bool SurfaceMeshOfQuadrangles::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 204 of file SurfaceMeshOfQuadrangles.hpp.

References ErrorHandler::normal.

Referenced by inside().

00205   {
00206     throw ErrorHandler(__FILE__,__LINE__,
00207                        "Trying to find 3d point on a surface mesh",
00208                        ErrorHandler::normal);
00209     return false;
00210   }

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

Returns true if the point p is inside the mesh.

Definition at line 213 of file SurfaceMeshOfQuadrangles.hpp.

References inside().

00214   {
00215     return this->inside(p[0], p[1], p[2]);
00216   }  

Here is the call graph for this function:

void SurfaceMeshOfQuadrangles::computesFictitiousCells (  )  const [inline, virtual]

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

Implements SurfaceMesh.

Definition at line 218 of file SurfaceMeshOfQuadrangles.hpp.

00219   {
00220     this->__computesFictitiousCells<Quadrangle>(*__cells);
00221   }

Quadrangle& SurfaceMeshOfQuadrangles::cell ( size_t  i  )  [inline]

Definition at line 223 of file SurfaceMeshOfQuadrangles.hpp.

References __cells.

00224   {
00225     return (*__cells)[i];
00226   }

const Quadrangle& SurfaceMeshOfQuadrangles::cell ( size_t  i  )  const [inline]

Definition at line 228 of file SurfaceMeshOfQuadrangles.hpp.

References __cells.

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

size_t SurfaceMeshOfQuadrangles::cellNumber ( const Quadrangle c  )  const [inline]

Definition at line 233 of file SurfaceMeshOfQuadrangles.hpp.

00234   {
00235     return (*__cells).number(c);
00236   }

void SurfaceMeshOfQuadrangles::setNumberOfCells ( const int  n  )  [inline]

Reserves storage for n SurfElem.

Definition at line 239 of file SurfaceMeshOfQuadrangles.hpp.

00240   {
00241     (*__cells).resize(n);
00242   }

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

Read-only access to the number of cells.

Implements Mesh.

Definition at line 245 of file SurfaceMeshOfQuadrangles.hpp.

00246   {
00247     return (*__cells).size();
00248   }

const FaceType& SurfaceMeshOfQuadrangles::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 257 of file SurfaceMeshOfQuadrangles.hpp.

References Mesh::__edgesSet.

00258   {
00259     return (*__edgesSet)[i];
00260   }

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   }

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

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, inherited]

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:

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

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 SurfaceMesh::__backgroundMesh.

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

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

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

Sets the background mesh

Parameters:
m a pointer to a given background mesh

Definition at line 89 of file SurfaceMesh.hpp.

References SurfaceMesh::__backgroundMesh.

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

00090   {
00091     __backgroundMesh = m;
00092   }

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

gets the pointer to the background mesh

Returns:
__backgroundMesh

Definition at line 99 of file SurfaceMesh.hpp.

References SurfaceMesh::__backgroundMesh.

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

00100   {
00101     return __backgroundMesh;
00102   }

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

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, inherited]

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

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

Definition at line 174 of file SurfaceMeshOfQuadrangles.hpp.

Referenced by cell().

const Mesh* SurfaceMesh::__backgroundMesh [protected, inherited]

Sets which is background mesh

Definition at line 43 of file SurfaceMesh.hpp.

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

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


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

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