OctreeMesh Class Reference

#include <OctreeMesh.hpp>

Inheritance diagram for OctreeMesh:

Inheritance graph
[legend]
Collaboration diagram for OctreeMesh:

Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

bool isPeriodic () const
bool hasBorderMesh () const
ConstReferenceCounting< MeshborderBaseMesh () const
ConstReferenceCounting
< BorderMeshType
borderMesh () const
CartesianHexahedroncell (const size_t &i)
const CartesianHexahedroncell (const size_t &i) const
std::string typeName () const
bool inside (const real_t &x, const real_t &y, const real_t &z) const
bool inside (const TinyVector< 3u, real_t > &p) const
void buildFaces ()
void buildEdges ()
bool hasFaces () const
const size_t & numberOfCells () const
size_t cellNumber (const CartesianHexahedron &h) const
const FaceTypeface (const size_t &i) const
size_t faceNumber (const FaceType &f) const
const size_t & numberOfFaces () const
 Read-only access to the number of cells.
const Connectivity< OctreeMesh > & connectivity () const
Connectivity< OctreeMesh > & connectivity ()
 OctreeMesh (ReferenceCounting< VerticesSet > vertices, ReferenceCounting< VerticesCorrespondance > correspondance, ReferenceCounting< Vector< CartesianHexahedron > > hexahedra)
 ~OctreeMesh ()
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

 OctreeMesh (const OctreeMesh &)

Private Attributes

ReferenceCounting< Vector
< CartesianHexahedron > > 
__cells
Connectivity< OctreeMesh__connectivity


Detailed Description

Definition at line 41 of file OctreeMesh.hpp.


Member Typedef Documentation

Definition at line 45 of file OctreeMesh.hpp.

Definition at line 46 of file OctreeMesh.hpp.

Definition at line 52 of file OctreeMesh.hpp.

Definition at line 67 of file OctreeMesh.hpp.

Definition at line 68 of file OctreeMesh.hpp.


Member Enumeration Documentation

anonymous enum

Enumerator:
family 

Definition at line 48 of file OctreeMesh.hpp.

00048        {
00049     family = Mesh::volume
00050   };

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

OctreeMesh::OctreeMesh ( const OctreeMesh  )  [private]

Copy constructor is forbidden

OctreeMesh::OctreeMesh ( ReferenceCounting< VerticesSet vertices,
ReferenceCounting< VerticesCorrespondance correspondance,
ReferenceCounting< Vector< CartesianHexahedron > >  hexahedra 
) [inline]

Constructor

Parameters:
vertices the set of vertices
correspondance the vertices corresponcance vector
hexahedra the list of cells

Definition at line 264 of file OctreeMesh.hpp.

00267     :  Mesh(Mesh::octreeMesh,
00268             Mesh::volume,
00269             vertices,
00270             correspondance),
00271        __cells(hexahedra),
00272        __connectivity(*this)
00273   {
00274     ;
00275   }

OctreeMesh::~OctreeMesh (  )  [inline]

Destructor

Definition at line 281 of file OctreeMesh.hpp.

00282   {
00283     ;
00284   }


Member Function Documentation

bool OctreeMesh::isPeriodic (  )  const [inline, virtual]

Checks if a mesh has a periodic topology

Returns:
true if the mesh is periodic

Reimplemented from Mesh.

Definition at line 75 of file OctreeMesh.hpp.

00076   {
00077     return false;
00078   }

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

Checks if the mesh has a surface mesh

Returns:
true if a surface mesh has been built

Implements Mesh.

Definition at line 85 of file OctreeMesh.hpp.

Referenced by WriterMedit::__proceedMesh().

00086   {
00087     return false;
00088   }

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

Implements Mesh.

Definition at line 90 of file OctreeMesh.hpp.

References ErrorHandler::unexpected.

00091   {
00092     throw ErrorHandler(__FILE__,__LINE__,
00093                        "not implemented yet",
00094                        ErrorHandler::unexpected);
00095 
00096     return 0;
00097   }

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

Read only access to the surface mesh

Returns:
the surface mesh

Definition at line 104 of file OctreeMesh.hpp.

References ErrorHandler::unexpected.

Referenced by WriterMedit::__proceedMesh().

00105   {
00106     throw ErrorHandler(__FILE__,__LINE__,
00107                        "not implemented",
00108                        ErrorHandler::unexpected);
00109     return 0;
00110   }

CartesianHexahedron& OctreeMesh::cell ( const size_t &  i  )  [inline]

Access to the i th cell of the mesh

Parameters:
i cell number
Returns:
i th cell

Definition at line 119 of file OctreeMesh.hpp.

References __cells.

00120   {
00121     return (*__cells)[i];
00122   }

const CartesianHexahedron& OctreeMesh::cell ( const size_t &  i  )  const [inline]

Read-only access to the i th cell of the mesh

Parameters:
i cell number
Returns:
i th cell

Definition at line 131 of file OctreeMesh.hpp.

References __cells.

00132   {
00133     return (*__cells)[i];
00134   }

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

Name of the mesh type

Returns:
type name of the mesh

Implements Mesh.

Definition at line 141 of file OctreeMesh.hpp.

00142   {
00143     return "non conforming octree-mesh";
00144   }

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

Checks if the point $ (x,y,z) $

Parameters:
x $ x $
y $ y $
z $ z $
Returns:
true if the point is inside the mesh

Implements Mesh.

Definition at line 155 of file OctreeMesh.hpp.

References ErrorHandler::unexpected.

Referenced by inside().

00156   {
00157     throw ErrorHandler(__FILE__,__LINE__,
00158                        "cannot check if a vertex is inside an octree mesh",
00159                        ErrorHandler::unexpected);
00160     return false;
00161   }

bool OctreeMesh::inside ( const TinyVector< 3u, real_t > &  p  )  const [inline]

Checks if the point $ P $

Parameters:
p $ P $
Returns:
true if the point is inside the mesh

Definition at line 170 of file OctreeMesh.hpp.

References inside().

00171   {
00172     return this->inside(p[0],p[1],p[2]);
00173   }

Here is the call graph for this function:

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

Creates faces of the mesh

Implements Mesh.

Definition at line 179 of file OctreeMesh.hpp.

References ErrorHandler::unexpected.

00180   {
00181     throw ErrorHandler(__FILE__,__LINE__,
00182                        "not implemented",
00183                        ErrorHandler::unexpected);
00184   }

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

Creates edges of the mesh

Implements Mesh.

Definition at line 190 of file OctreeMesh.hpp.

References ErrorHandler::unexpected.

00191   {
00192     throw ErrorHandler(__FILE__,__LINE__,
00193                        "not implemented",
00194                        ErrorHandler::unexpected);
00195   }

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

Checks if the mesh has faces

Returns:
true if the mesh has faces

Implements Mesh.

Definition at line 202 of file OctreeMesh.hpp.

00203   {
00204     return false;
00205   }

const size_t & OctreeMesh::numberOfCells (  )  const [virtual]

Read-only access to the number of cells

Returns:
the number of cells of the mesh

Implements Mesh.

Definition at line 24 of file OctreeMesh.cpp.

References __cells.

00025 {
00026   return __cells->size();
00027 }

size_t OctreeMesh::cellNumber ( const CartesianHexahedron h  )  const [inline]

Definition at line 214 of file OctreeMesh.hpp.

References __cells.

00215   {
00216     return __cells->number(h);
00217   }

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

Definition at line 219 of file OctreeMesh.hpp.

00220   {
00221     static FaceType badFace;
00222     return badFace;
00223   }

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

Definition at line 225 of file OctreeMesh.hpp.

00226   {
00227     return std::numeric_limits<size_t>::max();
00228   }

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

Read-only access to the number of cells.

Definition at line 231 of file OctreeMesh.hpp.

00232   {
00233     static size_t badValue;
00234     return badValue;
00235   }

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

Read only access to the mesh connectivity

Returns:
the connectivity

Definition at line 242 of file OctreeMesh.hpp.

References __connectivity.

00243   {
00244     return __connectivity;
00245   }

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

Access to the mesh connectivity

Returns:
the connectivity

Definition at line 252 of file OctreeMesh.hpp.

References __connectivity.

00253   {
00254     return __connectivity;
00255   }

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   }

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

set of cells

Definition at line 56 of file OctreeMesh.hpp.

Referenced by cell(), cellNumber(), and numberOfCells().

Connectivity

Definition at line 58 of file OctreeMesh.hpp.

Referenced by connectivity().

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


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

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