#include <Cell.hpp>


Public Types | |
| enum | Type { hexahedron, cartesianHexahedron, hexahedronByEdge, tetrahedron, triangle3d, quadrangle3d } |
Public Member Functions | |
| bool | find (const Vertex *P) |
| const real_t & | volume () const |
| void | replace (Vertex *v0, Vertex *v1) |
| const bool & | isFictitious () const |
| void | setFictitious (const bool &b) const |
| virtual size_t | numberOfVertices () const =0 |
| virtual Cell::Type | type () const =0 |
| const size_t & | reference () const |
| size_t & | reference () |
| Vertex & | operator() (const size_t &i) |
| const Vertex & | operator() (const size_t &i) const |
| const Cell & | operator= (const Cell &C) |
| Cell (const size_t &numberOfVertices) | |
| Cell (const size_t &numberOfVertices, const size_t &reference) | |
| Cell (const Cell &C) | |
| virtual | ~Cell () |
Protected Attributes | |
| size_t | __reference |
| Reference of the Cell. | |
| real_t | __volume |
| Volume or surface of the cell. | |
| Vertex ** | __vertices |
| Pointers on vertices of the cell. | |
| bool | __isFictitious |
| indicates if the cell is to be taken into accounts for computations | |
Definition at line 38 of file Cell.hpp.
| enum Cell::Type |
Definition at line 40 of file Cell.hpp.
00040 { 00041 hexahedron, 00042 cartesianHexahedron, 00043 hexahedronByEdge, 00044 tetrahedron, 00045 triangle3d, 00046 quadrangle3d 00047 };
| Cell::Cell | ( | const size_t & | numberOfVertices | ) | [inline] |
Constructs a cell with a given number of vertices
| numberOfVertices | the number of vertices |
Definition at line 215 of file Cell.hpp.
References __vertices, and ASSERT.
00216 : __reference(0), 00217 __volume(0), 00218 __isFictitious(false) 00219 { 00220 ASSERT(numberOfVertices > 0); 00221 __vertices = new Vertex*[numberOfVertices]; 00222 }
| Cell::Cell | ( | const size_t & | numberOfVertices, | |
| const size_t & | reference | |||
| ) | [inline] |
Constructs a cell with a given number of vertices and a given reference
| numberOfVertices | the number of vertices | |
| reference | the given reference |
Definition at line 231 of file Cell.hpp.
References __vertices, and ASSERT.
00232 : __reference(reference), 00233 __volume(0), 00234 __isFictitious(false) 00235 { 00236 ASSERT(numberOfVertices > 0); 00237 __vertices = new Vertex*[numberOfVertices]; 00238 }
| Cell::Cell | ( | const Cell & | C | ) | [inline] |
Copies a given cell
| C | the given cell |
Definition at line 245 of file Cell.hpp.
References __vertices, and numberOfVertices().
00246 : __reference(C.__reference), 00247 __volume(C.__volume), 00248 __isFictitious(C.__isFictitious) 00249 { 00250 __vertices = new Vertex*[C.numberOfVertices()]; 00251 for (size_t i=0; i<C.numberOfVertices(); ++i) 00252 __vertices[i] = C.__vertices[i]; 00253 }

| virtual Cell::~Cell | ( | ) | [inline, virtual] |
The destructor
Definition at line 259 of file Cell.hpp.
References __vertices.
00260 { 00261 delete [] __vertices; 00262 }
| bool Cell::find | ( | const Vertex * | P | ) | [inline] |
Find the vertex P in the cell
Definition at line 69 of file Cell.hpp.
References __vertices, and numberOfVertices().
Referenced by Triangulation::__checkLine().
00069 { 00070 for(size_t i=0 ; i<numberOfVertices() ; ++i) { 00071 if(__vertices[i]==P) { 00072 return true; 00073 } 00074 } 00075 return false; 00076 }

| const real_t& Cell::volume | ( | ) | const [inline] |
Read-only access to the volume of the cell
Definition at line 83 of file Cell.hpp.
References __volume.
Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), ConformTransformationP1TriangleJacobian::ConformTransformationP1TriangleJacobian(), ConformTransformationQ1QuadrangleJacobian::ConformTransformationQ1QuadrangleJacobian(), BoundaryConditionDiscretizationSpectralNonConform::getDiagonal(), BoundaryConditionDiscretizationSpectralNonConform::setSecondMember(), BoundaryConditionDiscretizationSpectralNonConform::timesX(), and BoundaryConditionDiscretizationSpectralNonConform::transposedTimesX().
00084 { 00085 return __volume; 00086 }
Replaces a vertex by another
| v0 | the vertex to replace | |
| v1 | the new vertex |
Definition at line 94 of file Cell.hpp.
References __vertices, numberOfVertices(), stringify(), and ErrorHandler::unexpected.
00095 { 00096 for (size_t i = 0; i<numberOfVertices(); ++i) { 00097 if (__vertices[i] == v0) { 00098 __vertices[i] = v1; 00099 return; 00100 } 00101 } 00102 00103 const std::string errorMsg 00104 = "vertex "+stringify(v0)+" was not found while replacing "+stringify(v1); 00105 00106 throw ErrorHandler(__FILE__,__LINE__, 00107 errorMsg, 00108 ErrorHandler::unexpected); 00109 }

| const bool& Cell::isFictitious | ( | ) | const [inline] |
Read-only access to the fictitious state of the cell
Definition at line 116 of file Cell.hpp.
References __isFictitious.
Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember().
00117 { 00118 return __isFictitious; 00119 }
| void Cell::setFictitious | ( | const bool & | b | ) | const [inline] |
Sets fictitious state of the cell
Definition at line 127 of file Cell.hpp.
References __isFictitious.
Referenced by FictitiousDomainMethod::Compute().
00128 { 00129 __isFictitious = b; 00130 }
| virtual size_t Cell::numberOfVertices | ( | ) | const [pure virtual] |
Read-only ccess to the number of vertices
Implemented in CartesianHexahedron, Hexahedron, Quadrangle, Tetrahedron, and Triangle.
Referenced by SurfaceMeshGenerator::Internals::__createTrianglesIntersection(), Cell(), SurfaceMeshGenerator::Internals::UnionTest::compute(), SurfaceMeshGenerator::Internals::IntersectionTest::compute(), find(), operator()(), operator=(), and replace().
| virtual Cell::Type Cell::type | ( | ) | const [pure virtual] |
Access to the type of the cell
Implemented in CartesianHexahedron, Hexahedron, Quadrangle, Tetrahedron, and Triangle.
| const size_t& Cell::reference | ( | ) | const [inline] |
Read-only access to the reference of the Cell.
Definition at line 151 of file Cell.hpp.
References __reference.
Referenced by SurfaceMeshGenerator::Internals::__constructionFinalMesh(), SurfaceMeshGenerator::Internals::__createGeneral(), SurfaceMeshGenerator::Internals::__createSurface(), SurfaceMeshGenerator::Internals::__createTriangle(), SurfaceMeshGenerator::Internals::__createTrianglesIntersection(), SurfaceMeshGenerator::Internals::__generateMesh(), SurfaceMeshGenerator::Internals::__putRefByFront(), SurfaceMeshGenerator::Internals::UnionTest::compute(), SurfaceMeshGenerator::Internals::IntersectionTest::compute(), SurfaceMeshGenerator::generateSurfacicMesh(), and MeshDomainTetrahedrizor::run().
00152 { 00153 return __reference; 00154 }
| size_t& Cell::reference | ( | ) | [inline] |
Access to the reference of the Cell.
Definition at line 161 of file Cell.hpp.
References __reference.
00162 { 00163 return __reference; 00164 }
| Vertex& Cell::operator() | ( | const size_t & | i | ) | [inline] |
Access to the ith Vertex of the Cell.
| i | the local number of the vertex |
Definition at line 173 of file Cell.hpp.
References __vertices, ASSERT, and numberOfVertices().
00174 { 00175 ASSERT (i<numberOfVertices()); 00176 return *__vertices[i]; 00177 }

| const Vertex& Cell::operator() | ( | const size_t & | i | ) | const [inline] |
Read-only access to the ith Vertex of the Cell.
| i | the local number of the vertex |
Definition at line 186 of file Cell.hpp.
References __vertices, ASSERT, and numberOfVertices().
00187 { 00188 ASSERT (i<numberOfVertices()); 00189 return *(__vertices[i]); 00190 }

Sets the cell to a given one
| C | the given cell |
Definition at line 199 of file Cell.hpp.
References __reference, __vertices, __volume, and numberOfVertices().
Referenced by Tetrahedron::operator=(), SurfElem::operator=(), Hexahedron::operator=(), and CartesianHexahedron::operator=().
00200 { 00201 __reference = C.__reference; 00202 __volume = C.__volume; 00203 00204 for (size_t i=0; i<C.numberOfVertices(); ++i) 00205 __vertices[i] = C.__vertices[i]; 00206 00207 return *this; 00208 }

size_t Cell::__reference [protected] |
real_t Cell::__volume [protected] |
Volume or surface of the cell.
Definition at line 54 of file Cell.hpp.
Referenced by Triangle::__computeVolume(), Quadrangle::__computeVolume(), CartesianHexahedron::CartesianHexahedron(), Hexahedron::Hexahedron(), operator=(), Quadrangle::Quadrangle(), Tetrahedron::Tetrahedron(), and volume().
Vertex** Cell::__vertices [protected] |
Pointers on vertices of the cell.
Definition at line 57 of file Cell.hpp.
Referenced by Triangle::__computeVolume(), Quadrangle::__computeVolume(), ConnectedTriangle::base(), CartesianHexahedron::CartesianHexahedron(), Cell(), Triangle::edge(), find(), CartesianHexahedron::getLocalCoordinates(), Hexahedron::Hexahedron(), Triangle::normal(), Quadrangle::normal(), operator()(), operator=(), Quadrangle::Quadrangle(), replace(), ConnectedTriangle::setVertices(), Tetrahedron::Tetrahedron(), Triangle::Triangle(), and ~Cell().
bool Cell::__isFictitious [mutable, protected] |
indicates if the cell is to be taken into accounts for computations
Definition at line 60 of file Cell.hpp.
Referenced by isFictitious(), and setFictitious().
1.5.6