#include <CartesianHexahedron.hpp>


Public Types | |
| enum | { NumberOfVertices = 8, NumberOfFaces = 6, NumberOfEdges = 12 } |
| typedef Quadrangle | FaceType |
| enum | Type { hexahedron, cartesianHexahedron, hexahedronByEdge, tetrahedron, triangle3d, quadrangle3d } |
Public Member Functions | |
| virtual Cell::Type | type () const |
| void | getLocalCoordinates (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &lambda) const |
| size_t | numberOfVertices () const |
| Number of Vertices. | |
| size_t | numberOfEdges () const |
| Number of Edges. | |
| const CartesianHexahedron & | operator= (const CartesianHexahedron &H) |
| sets equal to a given CartesianHexahedrons. | |
| CartesianHexahedron () | |
| Default constructor does nothing but reserving memory. | |
| CartesianHexahedron (Vertex &x0, Vertex &x1, Vertex &x2, Vertex &x3, Vertex &x4, Vertex &x5, Vertex &x6, Vertex &x7) | |
| ~CartesianHexahedron () | |
| 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 |
| const size_t & | reference () const |
| size_t & | reference () |
| Vertex & | operator() (const size_t &i) |
| const Vertex & | operator() (const size_t &i) const |
Static Public Attributes | |
| static const size_t | faces [NumberOfFaces][FaceType::NumberOfVertices] = {{0,1,2,3},{0,4,5,1},{1,5,6,2},{2,6,7,3},{0,3,7,4},{4,7,6,5}} |
| static const size_t | edges [NumberOfEdges][Edge::NumberOfVertices] = {{0,1},{1,2},{2,3},{3,0},{0,4},{1,5},{2,6},{3,7},{4,5},{5,6},{6,7},{7,4}} |
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 36 of file CartesianHexahedron.hpp.
Definition at line 46 of file CartesianHexahedron.hpp.
| anonymous enum |
| NumberOfVertices | number of vertices |
| NumberOfFaces | number of faces |
| NumberOfEdges | number of edges |
Definition at line 40 of file CartesianHexahedron.hpp.
00040 { 00041 NumberOfVertices = 8, 00042 NumberOfFaces = 6, 00043 NumberOfEdges = 12 00044 };
enum Cell::Type [inherited] |
Definition at line 40 of file Cell.hpp.
00040 { 00041 hexahedron, 00042 cartesianHexahedron, 00043 hexahedronByEdge, 00044 tetrahedron, 00045 triangle3d, 00046 quadrangle3d 00047 };
| CartesianHexahedron::CartesianHexahedron | ( | ) | [inline] |
Default constructor does nothing but reserving memory.
Definition at line 95 of file CartesianHexahedron.hpp.
00096 : Cell(NumberOfVertices) 00097 { 00098 ; 00099 }
| CartesianHexahedron::CartesianHexahedron | ( | Vertex & | x0, | |
| Vertex & | x1, | |||
| Vertex & | x2, | |||
| Vertex & | x3, | |||
| Vertex & | x4, | |||
| Vertex & | x5, | |||
| Vertex & | x6, | |||
| Vertex & | x7 | |||
| ) | [inline] |
Definition at line 101 of file CartesianHexahedron.hpp.
References Cell::__vertices, and Cell::__volume.
00109 : Cell(NumberOfVertices) 00110 { 00111 __vertices[0] = &x0; 00112 __vertices[1] = &x1; 00113 __vertices[2] = &x2; 00114 __vertices[3] = &x3; 00115 __vertices[4] = &x4; 00116 __vertices[5] = &x5; 00117 __vertices[6] = &x6; 00118 __vertices[7] = &x7; 00119 00120 const TinyVector<3>& a = *__vertices[0]; 00121 const TinyVector<3>& b = *__vertices[6]; 00122 00123 const real_t hx = b[0] - a[0]; 00124 const real_t hy = b[1] - a[1]; 00125 const real_t hz = b[2] - a[2]; 00126 00127 __volume = hx*hy*hz; 00128 }
| CartesianHexahedron::~CartesianHexahedron | ( | ) | [inline] |
| virtual Cell::Type CartesianHexahedron::type | ( | ) | const [inline, virtual] |
Access to the type of the cell
Implements Cell.
Definition at line 51 of file CartesianHexahedron.hpp.
References Cell::cartesianHexahedron.
00052 { 00053 return Cell::cartesianHexahedron; 00054 }
| void CartesianHexahedron::getLocalCoordinates | ( | const TinyVector< 3, real_t > & | X, | |
| TinyVector< 3, real_t > & | lambda | |||
| ) | const [inline] |
computes local coordinates in the current hexahedron related to a given X position, in the basis of the reference element.
| X | Cartesian coordinates | |
| lambda | local coordinates |
Definition at line 64 of file CartesianHexahedron.hpp.
References Cell::__vertices.
00066 { 00067 const TinyVector<3>& a = *__vertices[0]; 00068 const TinyVector<3>& b = *__vertices[6]; 00069 lambda = X-a; 00070 for (size_t i=0; i<3; ++i) { 00071 lambda[i] /= b[i]-a[i]; 00072 } 00073 }
| size_t CartesianHexahedron::numberOfVertices | ( | ) | const [inline, virtual] |
Number of Vertices.
Implements Cell.
Definition at line 76 of file CartesianHexahedron.hpp.
References NumberOfVertices.
00077 { 00078 return NumberOfVertices; 00079 }
| size_t CartesianHexahedron::numberOfEdges | ( | ) | const [inline] |
Number of Edges.
Definition at line 82 of file CartesianHexahedron.hpp.
References NumberOfEdges.
00083 { 00084 return NumberOfEdges; 00085 }
| const CartesianHexahedron& CartesianHexahedron::operator= | ( | const CartesianHexahedron & | H | ) | [inline] |
sets equal to a given CartesianHexahedrons.
Definition at line 88 of file CartesianHexahedron.hpp.
References Cell::operator=().
00089 { 00090 Cell::operator=(H); 00091 return *this; 00092 }

| bool Cell::find | ( | const Vertex * | P | ) | [inline, inherited] |
Find the vertex P in the cell
Definition at line 69 of file Cell.hpp.
References Cell::__vertices, and Cell::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, inherited] |
Read-only access to the volume of the cell
Definition at line 83 of file Cell.hpp.
References Cell::__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 Cell::__vertices, Cell::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, inherited] |
Read-only access to the fictitious state of the cell
Definition at line 116 of file Cell.hpp.
References Cell::__isFictitious.
Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember().
00117 { 00118 return __isFictitious; 00119 }
| void Cell::setFictitious | ( | const bool & | b | ) | const [inline, inherited] |
Sets fictitious state of the cell
Definition at line 127 of file Cell.hpp.
References Cell::__isFictitious.
Referenced by FictitiousDomainMethod::Compute().
00128 { 00129 __isFictitious = b; 00130 }
| const size_t& Cell::reference | ( | ) | const [inline, inherited] |
Read-only access to the reference of the Cell.
Definition at line 151 of file Cell.hpp.
References Cell::__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, inherited] |
Access to the reference of the Cell.
Definition at line 161 of file Cell.hpp.
References Cell::__reference.
00162 { 00163 return __reference; 00164 }
| Vertex& Cell::operator() | ( | const size_t & | i | ) | [inline, inherited] |
Access to the ith Vertex of the Cell.
| i | the local number of the vertex |
Definition at line 173 of file Cell.hpp.
References Cell::__vertices, ASSERT, and Cell::numberOfVertices().
00174 { 00175 ASSERT (i<numberOfVertices()); 00176 return *__vertices[i]; 00177 }

| const Vertex& Cell::operator() | ( | const size_t & | i | ) | const [inline, inherited] |
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 Cell::__vertices, ASSERT, and Cell::numberOfVertices().
00187 { 00188 ASSERT (i<numberOfVertices()); 00189 return *(__vertices[i]); 00190 }

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