#include <Structured3DMesh.hpp>


Public Types | |
| enum | { family = Mesh::volume } |
| typedef CartesianHexahedron | CellType |
| typedef Quadrangle | FaceType |
| typedef MeshOfHexahedra | Transformed |
| typedef SurfaceMeshOfQuadrangles | BorderMeshType |
| typedef Mesh::T_iterator < Structured3DMesh, CartesianHexahedron > | iterator |
| typedef Mesh::T_iterator < const Structured3DMesh, const CartesianHexahedron > | const_iterator |
| enum | Type { cartesianHexahedraMesh, hexahedraMesh, octreeMesh, tetrahedraMesh, trianglesMesh, spectralMesh, surfaceMeshTriangles, surfaceMeshQuadrangles } |
| enum | Family { volume, surface, plane } |
| Family. More... | |
Public Member Functions | |
| std::string | typeName () const |
| void | buildEdges () |
| bool | hasBorderMesh () const |
| ConstReferenceCounting < BorderMeshType > | borderMesh () const |
| ConstReferenceCounting< Mesh > | borderBaseMesh () const |
| void | buildFaces () |
| bool | hasFaces () const |
| const FaceType & | face (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 size_t & | numberOfCells () const |
| Read-only access to the number of cells. | |
| size_t | cellNumber (const CartesianHexahedron &h) const |
| Structured3DMesh::const_iterator | find (const double &x, const double &y, const double &z) const |
| Structured3DMesh::const_iterator | find (const TinyVector< 3 > &X) const |
| const Structured3DMeshShape & | shape () const |
| Access to the shape of the mesh. | |
| Vertex & | vertex (const size_t &i, const size_t &j, const size_t &k) |
| Access to the Vertex (i,j,k) of the mesh. | |
| const Vertex & | vertex (const size_t &i, const size_t &j, const size_t &k) const |
| Read-only access to the Vertex (i,j,k) of the mesh. | |
| CartesianHexahedron & | cell (const size_t &i, const size_t &j, const size_t &k) |
| Access to the Cell (i,j,k) of the mesh. | |
| const CartesianHexahedron & | cell (const size_t &i, const size_t &j, const size_t &k) const |
| Read-only access to the Cell (i,j,k) of the mesh. | |
| CartesianHexahedron & | cell (const size_t &i) |
| Access to the Cell i of the mesh. | |
| const Connectivity < Structured3DMesh > & | connectivity () const |
| Connectivity< Structured3DMesh > & | connectivity () |
| const CartesianHexahedron & | cell (const size_t &i) const |
| Read-only access to the Cell i of the mesh. | |
| Vertex & | vertex (const size_t &i) |
| const Vertex & | vertex (const size_t &i) const |
| Vertex & | vertex (const Index &I) |
| Access to the Vertex indexed by I. | |
| const Vertex & | vertex (const Index &I) const |
| Read-only access to the Vertex indexed by I. | |
| CartesianHexahedron & | cell (const Index &I) |
| Access to the Cell indexed by I. | |
| const CartesianHexahedron & | cell (const Index &I) const |
| Read-only access to the Cell indexed by I. | |
| Index | cellIndex (const Vertex &V) const |
| Index | cellIndex (const TinyVector< 3 > &V) const |
| Index | vertexIndex (const Vertex &V) const |
| 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. | |
| Structured3DMesh (const Structured3DMeshShape &s3dM, ReferenceCounting< VerticesCorrespondance > correspondance) | |
| virtual bool | isPeriodic () const |
| virtual bool | inside (const TinyVector< 3, real_t > &p) const =0 |
| const Mesh::Type & | type () const |
| const Mesh::Family & | family () 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< VerticesSet > | verticesSet () |
| ConstReferenceCounting < VerticesSet > | verticesSet () const |
| ReferenceCounting < VerticesCorrespondance > | verticesCorrespondance () |
| ConstReferenceCounting < VerticesCorrespondance > | verticesCorrespondance () const |
| const size_t & | correspondance (const size_t &i) const |
| const Edge & | edge (const size_t &i) const |
| Edge & | edge (const size_t &i) |
Protected Attributes | |
| ReferenceCounting< VerticesSet > | __verticesSet |
| ReferenceCounting < VerticesCorrespondance > | __verticesCorrespondance |
| ReferenceCounting< EdgesSet > | __edgesSet |
Private Member Functions | |
| Structured3DMesh (const Structured3DMesh &M) | |
Private Attributes | |
| const Structured3DMeshShape | __verticesShape |
| The shape of the vertices' set. | |
| const Array3DShape | __cellShape |
| The shape of the cells' set only the array3dshape is needed. | |
| Vector< CartesianHexahedron > | __cells |
| The cells set. | |
| ReferenceCounting< BorderMeshType > | __borderMesh |
| ReferenceCounting< FacesSet < FaceType > > | __facesSet |
| Connectivity< Structured3DMesh > | __connectivity |
Definition at line 51 of file Structured3DMesh.hpp.
Definition at line 55 of file Structured3DMesh.hpp.
| typedef Quadrangle Structured3DMesh::FaceType |
Definition at line 56 of file Structured3DMesh.hpp.
If a transformation is applied the new mesh type will be MeshOfHexahedra
Definition at line 62 of file Structured3DMesh.hpp.
Definition at line 63 of file Structured3DMesh.hpp.
Definition at line 169 of file Structured3DMesh.hpp.
| typedef Mesh::T_iterator<const Structured3DMesh, const CartesianHexahedron> Structured3DMesh::const_iterator |
Definition at line 170 of file Structured3DMesh.hpp.
| anonymous enum |
enum Mesh::Type [inherited] |
| cartesianHexahedraMesh | |
| hexahedraMesh | |
| octreeMesh | |
| tetrahedraMesh | |
| trianglesMesh | |
| spectralMesh | |
| surfaceMeshTriangles | |
| surfaceMeshQuadrangles |
Definition at line 43 of file Mesh.hpp.
00043 { 00044 cartesianHexahedraMesh, 00045 hexahedraMesh, 00046 octreeMesh, 00047 tetrahedraMesh, 00048 trianglesMesh, 00049 spectralMesh, 00050 surfaceMeshTriangles, 00051 surfaceMeshQuadrangles, 00052 } Type;
enum Mesh::Family [inherited] |
| Structured3DMesh::Structured3DMesh | ( | const Structured3DMesh & | M | ) | [private] |
Copy constructor must not be called, so it is private and generate an error if called. This is implemented so that the compiler does not generates one automagicaly.
| Structured3DMesh::Structured3DMesh | ( | const Structured3DMeshShape & | SMShape, | |
| ReferenceCounting< VerticesCorrespondance > | correspondances | |||
| ) |
Constructs a Structured3DMesh using n0 along the X-axis, n1 along the Y-axis and n2 along the Z-axis. The vertices v0 and v1 are two opposed corners of the mesh, and the edges of the mesh are parallel to the axis.
Constructs a Structured3DMesh using n0 along the X-axis, n1 along the Y-axis and n2 along the Z-axis. The vertices v0 and v1 are two opposed corners of the mesh, and the edges of the mesh are parallel to the axis.
Now generates boundary meshes
x=xmin
x=xmax
y=ymin
y=ymax
z=zmin
z=zmax
Definition at line 56 of file Structured3DMesh.cpp.
References __borderMesh, __cells, __cellShape, Mesh::__verticesCorrespondance, Mesh::__verticesSet, __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::b(), cell(), Array3DShape::nx(), Structured3DMeshShape::nx(), Array3DShape::ny(), Structured3DMeshShape::ny(), Array3DShape::nz(), Structured3DMeshShape::nz(), SurfElem::setMother(), vertex(), Vertex::x(), Vertex::y(), and Vertex::z().
00058 : Mesh(Mesh::cartesianHexahedraMesh, 00059 Mesh::volume, 00060 new VerticesSet(SMShape.numberOfVertices()), 00061 correspondances), 00062 __verticesShape(SMShape), 00063 __cellShape(__verticesShape.shape()-1), 00064 __cells(SMShape.numberOfCells()), 00065 __facesSet(0), 00066 __connectivity(*this) 00067 { 00068 // w[ijk][01] variable respresent the coefficient needed to 00069 // compute vertices position between a and b. 00070 // for example wj1 is the weight computed for the jth point in the 00071 // 'y' direction for v1 00072 00073 const size_t nx = __verticesShape.nx(); 00074 const size_t ny = __verticesShape.ny(); 00075 const size_t nz = __verticesShape.nz(); 00076 00077 const size_t nx_1 = __cellShape.nx(); 00078 const size_t ny_1 = __cellShape.ny(); 00079 const size_t nz_1 = __cellShape.nz(); 00080 00081 for (size_t i=0; i<nx; i++) { 00082 real_t wi0 = static_cast<real_t>(i) / static_cast<real_t>(nx_1); 00083 real_t wi1 = static_cast<real_t>(nx_1-i) / static_cast<real_t>(nx_1);; 00084 for (size_t j=0; j<ny; j++) { 00085 real_t wj0 = static_cast<real_t>(j) / static_cast<real_t>(ny_1); 00086 real_t wj1 = static_cast<real_t>(ny_1-j) / static_cast<real_t>(ny_1); 00087 for (size_t k=0; k<nz; k++) { 00088 real_t wk0 = static_cast<real_t>(k) / static_cast<real_t>(nz_1); 00089 real_t wk1 = static_cast<real_t>(nz_1-k)/static_cast<real_t>(nz_1); 00090 Vertex& v = vertex(i,j,k); 00091 v.x() = wi0 * __verticesShape.b(0) + wi1 * __verticesShape.a(0); 00092 v.y() = wj0 * __verticesShape.b(1) + wj1 * __verticesShape.a(1); 00093 v.z() = wk0 * __verticesShape.b(2) + wk1 * __verticesShape.a(2); 00094 } 00095 } 00096 } 00097 00098 // Generating Mesh's cells. 00099 // As Cells generation needs Vertices's references 00100 // This must be done after. 00101 00102 size_t n=0; 00103 for (size_t i=0; i<nx_1; i++) { 00104 for (size_t j=0; j<ny_1; j++) { 00105 for (size_t k=0; k<nz_1; k++) { 00106 __cells[n] = CartesianHexahedron(vertex( i, j, k), 00107 vertex(i+1, j, k), 00108 vertex(i+1,j+1, k), 00109 vertex( i,j+1, k), 00110 vertex( i, j,k+1), 00111 vertex(i+1, j,k+1), 00112 vertex(i+1,j+1,k+1), 00113 vertex( i,j+1,k+1)); 00114 n++; 00115 } 00116 } 00117 } 00118 00123 Vector<Quadrangle>* pQuadrangles 00124 = new Vector<Quadrangle>(2*ny_1*nz_1+2*nx_1*nz_1+2*nx_1*ny_1); 00125 Vector<Quadrangle>& quadrangles = *pQuadrangles; 00126 00127 size_t currentCell = 0; 00129 for (size_t j=0; j<ny_1; j++) { 00130 for (size_t k=0; k<nz_1; k++) { 00131 const Vertex& V0 = vertex(0, j, k); 00132 const Vertex& V1 = vertex(0, j,k+1); 00133 const Vertex& V2 = vertex(0,j+1,k+1); 00134 const Vertex& V3 = vertex(0,j+1, k); 00135 Quadrangle& Q = quadrangles[currentCell]; 00136 00137 Q = Quadrangle(V0, V1, V2, V3, 0); 00138 Q.setMother(&(cell(0,j,k)),4); 00139 00140 currentCell++; 00141 } 00142 } 00143 00145 for (size_t j=0; j<ny_1; j++) { 00146 for (size_t k=0; k<nz_1; k++) { 00147 const Vertex& V0 = vertex(nx_1, j, k); 00148 const Vertex& V1 = vertex(nx_1,j+1, k); 00149 const Vertex& V2 = vertex(nx_1,j+1,k+1); 00150 const Vertex& V3 = vertex(nx_1, j,k+1); 00151 Quadrangle& Q = quadrangles[currentCell]; 00152 00153 Q = Quadrangle(V0, V1, V2, V3, 1); 00154 Q.setMother(&(cell(nx_1-1,j,k)),2); 00155 00156 currentCell++; 00157 } 00158 } 00159 00161 for (size_t i=0; i<nx_1; i++) { 00162 for (size_t k=0; k<nz_1; k++) { 00163 const Vertex& V0 = vertex( i,0, k); 00164 const Vertex& V1 = vertex(i+1,0, k); 00165 const Vertex& V2 = vertex(i+1,0,k+1); 00166 const Vertex& V3 = vertex( i,0,k+1); 00167 Quadrangle& Q = quadrangles[currentCell]; 00168 00169 Q = Quadrangle(V0, V1, V2, V3, 2); 00170 Q.setMother(&(cell(i,0,k)),1); 00171 00172 currentCell++; 00173 } 00174 } 00175 00177 for (size_t i=0; i<nx_1; i++) { 00178 for (size_t k=0; k<nz_1; k++) { 00179 const Vertex& V0 = vertex( i,ny_1, k); 00180 const Vertex& V1 = vertex( i,ny_1,k+1); 00181 const Vertex& V2 = vertex(i+1,ny_1,k+1); 00182 const Vertex& V3 = vertex(i+1,ny_1, k); 00183 Quadrangle& Q = quadrangles[currentCell]; 00184 00185 Q = Quadrangle(V0, V1, V2, V3, 3); 00186 Q.setMother(&(cell(i,ny_1-1,k)),3); 00187 00188 currentCell++; 00189 } 00190 } 00191 00193 for (size_t i=0; i<nx_1; i++) { 00194 for (size_t j=0; j<ny_1; j++) { 00195 const Vertex& V0 = vertex( i, j,0); 00196 const Vertex& V1 = vertex( i,j+1,0); 00197 const Vertex& V2 = vertex(i+1,j+1,0); 00198 const Vertex& V3 = vertex(i+1, j,0); 00199 Quadrangle& Q = quadrangles[currentCell]; 00200 00201 Q = Quadrangle(V0, V1, V2, V3, 4); 00202 Q.setMother(&(cell(i,j,0)),0); 00203 00204 currentCell++; 00205 } 00206 } 00207 00208 00210 for (size_t i=0; i<nx_1; i++) { 00211 for (size_t j=0; j<ny_1; j++) { 00212 const Vertex& V0 = vertex( i, j,nz_1); 00213 const Vertex& V1 = vertex(i+1, j,nz_1); 00214 const Vertex& V2 = vertex(i+1,j+1,nz_1); 00215 const Vertex& V3 = vertex( i,j+1,nz_1); 00216 Quadrangle& Q = quadrangles[currentCell]; 00217 00218 Q = Quadrangle(V0, V1, V2, V3, 5); 00219 Q.setMother(&(cell(i,j,nz_1-1)),5); 00220 currentCell++; 00221 } 00222 } 00223 __borderMesh = new SurfaceMeshOfQuadrangles(__verticesSet, 00224 __verticesCorrespondance, 00225 pQuadrangles); 00226 __borderMesh->setBackgroundMesh(this); 00227 }

| std::string Structured3DMesh::typeName | ( | ) | const [inline, virtual] |
Returns the typename of the mesh
Implements Mesh.
Definition at line 93 of file Structured3DMesh.hpp.
| void Structured3DMesh::buildEdges | ( | ) | [virtual] |
Builds the mesh internal edges
Implements Mesh.
Definition at line 36 of file Structured3DMesh.cpp.
References Mesh::__edgesSet, and EdgesBuilder< MeshType >::edgesSet().
00037 { 00038 EdgesBuilder<Structured3DMesh> edgesBuilder(*this); 00039 __edgesSet = edgesBuilder.edgesSet(); 00040 }

| bool Structured3DMesh::hasBorderMesh | ( | ) | const [inline, virtual] |
Implements Mesh.
Definition at line 104 of file Structured3DMesh.hpp.
References __borderMesh.
Referenced by WriterMedit::__proceedMesh().
00105 { 00106 return (__borderMesh != 0); 00107 }
| ConstReferenceCounting<BorderMeshType> Structured3DMesh::borderMesh | ( | ) | const [inline] |
Definition at line 109 of file Structured3DMesh.hpp.
References __borderMesh.
Referenced by WriterMedit::__proceedMesh(), and BoundaryExpressionSurfaceMesh::execute().
00110 { 00111 return __borderMesh; 00112 }
| ConstReferenceCounting<Mesh> Structured3DMesh::borderBaseMesh | ( | ) | const [inline, virtual] |
Implements Mesh.
Definition at line 114 of file Structured3DMesh.hpp.
References __borderMesh.
00115 { 00116 return static_cast<const BorderMeshType*>(__borderMesh); 00117 }
| void Structured3DMesh::buildFaces | ( | ) | [virtual] |
Builds the mesh internal faces
Implements Mesh.
Definition at line 43 of file Structured3DMesh.cpp.
References __facesSet, and FacesBuilder< MeshType >::facesSet().
00044 { 00045 FacesBuilder<Structured3DMesh> facesBuilder(*this); 00046 __facesSet = facesBuilder.facesSet(); 00047 }

| bool Structured3DMesh::hasFaces | ( | ) | const [inline, virtual] |
Returns true if the faces set has been built
Implements Mesh.
Definition at line 130 of file Structured3DMesh.hpp.
References __facesSet.
00131 { 00132 return __facesSet != 0; 00133 }
| const FaceType& Structured3DMesh::face | ( | const size_t & | i | ) | const [inline] |
Read-only access to a face
| i | the face number |
Definition at line 142 of file Structured3DMesh.hpp.
References __facesSet.
00143 { 00144 return (*__facesSet)[i]; 00145 }
| size_t Structured3DMesh::faceNumber | ( | const FaceType & | f | ) | const [inline] |
| const size_t& Structured3DMesh::numberOfFaces | ( | ) | const [inline] |
| const size_t& Structured3DMesh::numberOfCells | ( | ) | const [inline, virtual] |
Read-only access to the number of cells.
Implements Mesh.
Definition at line 159 of file Structured3DMesh.hpp.
References __cells, and Vector< T >::size().
Referenced by FictitiousDomainMethod::Compute().

| size_t Structured3DMesh::cellNumber | ( | const CartesianHexahedron & | h | ) | const [inline] |
Definition at line 164 of file Structured3DMesh.hpp.
References __cells, and Vector< T >::number().

| Structured3DMesh::const_iterator Structured3DMesh::find | ( | const double & | x, | |
| const double & | y, | |||
| const double & | z | |||
| ) | const [inline] |
Definition at line 427 of file Structured3DMesh.hpp.
References __cellShape, __verticesShape, Structured3DMeshShape::a(), Mesh::T_iterator< MeshType, CellType >::End, Structured3DMeshShape::hx(), Structured3DMeshShape::hy(), Structured3DMeshShape::hz(), inside(), Array3DShape::nx(), Array3DShape::ny(), and Array3DShape::nz().
Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), and find().
00430 { 00431 bool foundCell = inside(x,y,z); 00432 00433 if (!foundCell) 00434 return Structured3DMesh::const_iterator(*this, 00435 Structured3DMesh::const_iterator::End); 00436 00437 const real_t& x0 = __verticesShape.a(0); 00438 const real_t& y0 = __verticesShape.a(1); 00439 const real_t& z0 = __verticesShape.a(2); 00440 00441 int i = int(std::floor((x - x0)/__verticesShape.hx())); 00442 int j = int(std::floor((y - y0)/__verticesShape.hy())); 00443 int k = int(std::floor((z - z0)/__verticesShape.hz())); 00444 00445 { 00446 int nx_1 = __cellShape.nx() - 1; 00447 int ny_1 = __cellShape.ny() - 1; 00448 int nz_1 = __cellShape.nz() - 1; 00449 00450 // this transformation is to operate if the (x,y,z) is a point on 00451 // one of the faces of the box. 00452 00453 i = (i>nx_1) ? nx_1 : i; 00454 j = (j>ny_1) ? ny_1 : j; 00455 k = (k>nz_1) ? nz_1 : k; 00456 } 00457 00458 return Structured3DMesh::const_iterator(*this, 00459 __cellShape(i, j, k)); 00460 }

| Structured3DMesh::const_iterator Structured3DMesh::find | ( | const TinyVector< 3 > & | X | ) | const [inline] |
Definition at line 176 of file Structured3DMesh.hpp.
References find().
00177 { 00178 return find(X[0],X[1],X[2]); 00179 }

| const Structured3DMeshShape& Structured3DMesh::shape | ( | ) | const [inline] |
Access to the shape of the mesh.
Definition at line 182 of file Structured3DMesh.hpp.
References __verticesShape.
Referenced by WriterVTK::__fillCrossedComponent(), OctreeMeshBuilder::buildMesh(), ScalarFunctionReaderVTK::getFunction(), MultiGrid::MultiGrid(), and MeshExpressionStructured::put().
00183 { 00184 return __verticesShape; 00185 }
| Vertex & Structured3DMesh::vertex | ( | const size_t & | i, | |
| const size_t & | j, | |||
| const size_t & | k | |||
| ) | [inline] |
Access to the Vertex (i,j,k) of the mesh.
Definition at line 312 of file Structured3DMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
Referenced by WriterVTK::__fillCrossedComponent(), OctreeMeshBuilder::buildMesh(), and Structured3DMesh().
00315 { 00316 return (*__verticesSet)[__verticesShape(i, j, k)]; 00317 }
| const Vertex & Structured3DMesh::vertex | ( | const size_t & | i, | |
| const size_t & | j, | |||
| const size_t & | k | |||
| ) | const [inline] |
Read-only access to the Vertex (i,j,k) of the mesh.
Definition at line 320 of file Structured3DMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00323 { 00324 return (*__verticesSet)[__verticesShape(i, j, k)]; 00325 }
| CartesianHexahedron & Structured3DMesh::cell | ( | const size_t & | i, | |
| const size_t & | j, | |||
| const size_t & | k | |||
| ) | [inline] |
Access to the Cell (i,j,k) of the mesh.
Access to the Cell (i, j, k).
Definition at line 328 of file Structured3DMesh.hpp.
References __cells, and __cellShape.
Referenced by OctreeMeshBuilder::buildMesh(), FictitiousDomainMethod::Compute(), and Structured3DMesh().
00331 { 00332 return (__cells[__cellShape(i, j, k)]); 00333 }
| const CartesianHexahedron & Structured3DMesh::cell | ( | const size_t & | i, | |
| const size_t & | j, | |||
| const size_t & | k | |||
| ) | const [inline] |
Read-only access to the Cell (i,j,k) of the mesh.
Read-only access to the Cell (i, j, k).
Definition at line 336 of file Structured3DMesh.hpp.
References __cells, and __cellShape.
00339 { 00340 return (__cells[__cellShape(i, j, k)]); 00341 }
| CartesianHexahedron& Structured3DMesh::cell | ( | const size_t & | i | ) | [inline] |
Access to the Cell i of the mesh.
Definition at line 208 of file Structured3DMesh.hpp.
References __cells.
00209 { 00210 return __cells[i]; 00211 }
| const Connectivity<Structured3DMesh>& Structured3DMesh::connectivity | ( | ) | const [inline] |
Read only access to the mesh connectivity
Definition at line 218 of file Structured3DMesh.hpp.
References __connectivity.
00219 { 00220 return __connectivity; 00221 }
| Connectivity<Structured3DMesh>& Structured3DMesh::connectivity | ( | ) | [inline] |
Access to the mesh connectivity
Definition at line 228 of file Structured3DMesh.hpp.
References __connectivity.
00229 { 00230 return __connectivity; 00231 }
| const CartesianHexahedron& Structured3DMesh::cell | ( | const size_t & | i | ) | const [inline] |
Read-only access to the Cell i of the mesh.
Definition at line 234 of file Structured3DMesh.hpp.
References __cells.
00235 { 00236 return __cells[i]; 00237 }
| Vertex& Structured3DMesh::vertex | ( | const size_t & | i | ) | [inline] |
Access to the ith Vertex.
Reimplemented from Mesh.
Definition at line 243 of file Structured3DMesh.hpp.
References Mesh::vertex().
00244 { 00245 return Mesh::vertex(i); 00246 }

| const Vertex& Structured3DMesh::vertex | ( | const size_t & | i | ) | const [inline] |
Read-only access to the ith Vertex.
Reimplemented from Mesh.
Definition at line 252 of file Structured3DMesh.hpp.
References Mesh::vertex().
00253 { 00254 return Mesh::vertex(i); 00255 }

Access to the Vertex indexed by I.
Definition at line 343 of file Structured3DMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00344 { 00345 return (*__verticesSet)[__verticesShape(I[0], I[1], I[2])]; 00346 }
Read-only access to the Vertex indexed by I.
Definition at line 349 of file Structured3DMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00350 { 00351 return (*__verticesSet)[__verticesShape(I[0], I[1], I[2])]; 00352 }
| CartesianHexahedron & Structured3DMesh::cell | ( | const Index & | I | ) | [inline] |
Access to the Cell indexed by I.
Definition at line 355 of file Structured3DMesh.hpp.
References __cells, and __cellShape.
00356 { 00357 return (__cells[__cellShape(I[0], I[1], I[2])]); 00358 }
| const CartesianHexahedron & Structured3DMesh::cell | ( | const Index & | I | ) | const [inline] |
Read-only access to the Cell indexed by I.
Definition at line 361 of file Structured3DMesh.hpp.
References __cells, and __cellShape.
00362 { 00363 return (__cells[__cellShape(I[0], I[1], I[2])]); 00364 }
| Index Structured3DMesh::cellIndex | ( | const TinyVector< 3 > & | V | ) | const [inline] |
Returns the Index of the Cell contaning the point P if none, returns error!
Returns the Index of the Cell contaning the point P if none, returns error!
Definition at line 369 of file Structured3DMesh.hpp.
References __cellShape, __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::hx(), Structured3DMeshShape::hy(), Structured3DMeshShape::hz(), inside(), Array3DShape::nx(), Array3DShape::ny(), and Array3DShape::nz().
00370 { 00371 const real_t& x = V[0]; 00372 const real_t& y = V[1]; 00373 const real_t& z = V[2]; 00374 00375 const real_t& x0 = __verticesShape.a(0); 00376 const real_t& y0 = __verticesShape.a(1); 00377 const real_t& z0 = __verticesShape.a(2); 00378 00379 int i = int(std::floor((x - x0)/__verticesShape.hx())); 00380 int j = int(std::floor((y - y0)/__verticesShape.hy())); 00381 int k = int(std::floor((z - z0)/__verticesShape.hz())); 00382 00383 bool foundCell = inside(x,y,z); 00384 00385 if (!foundCell) { 00386 i = (i<0) ? 0 : i; 00387 j = (j<0) ? 0 : j; 00388 k = (k<0) ? 0 : k; 00389 } 00390 00391 int nx_1 = __cellShape.nx() - 1; 00392 int ny_1 = __cellShape.ny() - 1; 00393 int nz_1 = __cellShape.nz() - 1; 00394 00395 i = (i>nx_1) ? nx_1 : i; 00396 j = (j>ny_1) ? ny_1 : j; 00397 k = (k>nz_1) ? nz_1 : k; 00398 00399 Index I(i,j,k); 00400 00401 return I; 00402 }

Return the Index of V's closest Vertex in SMesh if none, return error!
Return the Index of V's closest Vertex in SMesh if none, return error!
Definition at line 407 of file Structured3DMesh.hpp.
References __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::hx(), Structured3DMeshShape::hy(), Structured3DMeshShape::hz(), Vertex::x(), Vertex::y(), and Vertex::z().
Referenced by OctreeMeshBuilder::buildMesh().
00408 { 00409 const real_t& x = V.x(); 00410 const real_t& y = V.y(); 00411 const real_t& z = V.z(); 00412 00413 const real_t& x0 = __verticesShape.a(0); 00414 const real_t& y0 = __verticesShape.a(1); 00415 const real_t& z0 = __verticesShape.a(2); 00416 00417 int i = int((x - x0)/__verticesShape.hx()+0.5); 00418 int j = int((y - y0)/__verticesShape.hy()+0.5); 00419 int k = int((z - z0)/__verticesShape.hz()+0.5); 00420 00421 Index I(i,j,k); 00422 00423 return I; 00424 }

| bool Structured3DMesh::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 285 of file Structured3DMesh.hpp.
References __verticesShape, Structured3DMeshShape::a(), and Structured3DMeshShape::b().
Referenced by cellIndex(), find(), and inside().
00286 { 00287 return ((x>=__verticesShape.a(0))&& 00288 (x<=__verticesShape.b(0))&& 00289 (y>=__verticesShape.a(1))&& 00290 (y<=__verticesShape.b(1))&& 00291 (z>=__verticesShape.a(2))&& 00292 (z<=__verticesShape.b(2))); 00293 }

| bool Structured3DMesh::inside | ( | const TinyVector< 3 > & | p | ) | const [inline] |
Returns true if the point p is inside the mesh.
Definition at line 296 of file Structured3DMesh.hpp.
References inside().
00297 { 00298 return this->inside(p[0], p[1], p[2]); 00299 }

| virtual bool Mesh::isPeriodic | ( | ) | const [inline, virtual, inherited] |
Checks if a mesh has a periodic topology
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
| p | the point to localize |
| const Mesh::Type& Mesh::type | ( | ) | const [inline, inherited] |
Read-only access to the type of the mesh
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
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
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
| v | a vertex |
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
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
| e | an Edge |
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] |
Read-only access to the number of vertices
Definition at line 364 of file Mesh.hpp.
References Mesh::__verticesSet.
Referenced by FictitiousDomainMethod::__computesDegreesOfFreedom(), SurfaceMeshGenerator::Internals::__constructionFinalMesh(), SurfaceMeshGenerator::Internals::__createSurface(), MeshOfTriangles::buildLocalizationTools(), MeshOfTetrahedra::buildLocalizationTools(), MeshOfHexahedra::buildLocalizationTools(), OctreeMeshBuilder::buildMesh(), FunctionExpressionMeshReferences::execute(), ScalarFunctionReaderRaw::getFunction(), ScalarFunctionReaderMedit::getFunction(), MeshDomainTetrahedrizor::run(), ScalarFunctionMaxComputer::ScalarFunctionMaxComputer(), and ScalarFunctionMinComputer::ScalarFunctionMinComputer().
00365 { 00366 return __verticesSet->numberOfVertices(); 00367 }
| void Mesh::setNumberOfVertices | ( | const size_t & | size | ) | [inline, inherited] |
Changes the size of the vertices container.
| size | vertices set new size |
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
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
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
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
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
Definition at line 439 of file Mesh.hpp.
References Mesh::__verticesCorrespondance.
00440 { 00441 return __verticesCorrespondance; 00442 }
| 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)
| i | the number of the vertex |
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
| i | the number of the 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
| i | the number of the edge |
Definition at line 501 of file Mesh.hpp.
References Mesh::__edgesSet.
00502 { 00503 return (*__edgesSet)[i]; 00504 }
const Structured3DMeshShape Structured3DMesh::__verticesShape [private] |
The shape of the vertices' set.
Definition at line 70 of file Structured3DMesh.hpp.
Referenced by cellIndex(), find(), inside(), shape(), Structured3DMesh(), vertex(), and vertexIndex().
const Array3DShape Structured3DMesh::__cellShape [private] |
The shape of the cells' set only the array3dshape is needed.
Definition at line 73 of file Structured3DMesh.hpp.
Referenced by cell(), cellIndex(), find(), and Structured3DMesh().
Vector<CartesianHexahedron> Structured3DMesh::__cells [private] |
The cells set.
Definition at line 76 of file Structured3DMesh.hpp.
Referenced by cell(), cellNumber(), numberOfCells(), and Structured3DMesh().
The various border lists
Definition at line 79 of file Structured3DMesh.hpp.
Referenced by borderBaseMesh(), borderMesh(), hasBorderMesh(), and Structured3DMesh().
ReferenceCounting<FacesSet<FaceType> > Structured3DMesh::__facesSet [private] |
internal and external quadrangles set
Definition at line 82 of file Structured3DMesh.hpp.
Referenced by buildFaces(), face(), and hasFaces().
ReferenceCounting<VerticesSet> Mesh::__verticesSet [protected, inherited] |
Container for vertices
Definition at line 201 of file Mesh.hpp.
Referenced by Mesh::isPeriodic(), Mesh::numberOfVertices(), Mesh::setNumberOfVertices(), SpectralMesh::SpectralMesh(), Structured3DMesh(), vertex(), SpectralMesh::vertex(), Mesh::vertex(), Mesh::vertexNumber(), and Mesh::verticesSet().
ReferenceCounting<VerticesCorrespondance> Mesh::__verticesCorrespondance [protected, inherited] |
Container for vertices correspondances
Definition at line 204 of file Mesh.hpp.
Referenced by Mesh::correspondance(), Mesh::isPeriodic(), Mesh::setNumberOfVertices(), SpectralMesh::SpectralMesh(), Structured3DMesh(), and Mesh::verticesCorrespondance().
ReferenceCounting<EdgesSet> Mesh::__edgesSet [protected, inherited] |
Container for edges
Definition at line 208 of file Mesh.hpp.
Referenced by SurfaceMeshOfTriangles::buildEdges(), SurfaceMeshOfQuadrangles::buildEdges(), buildEdges(), SpectralMesh::buildEdges(), MeshOfTriangles::buildEdges(), MeshOfTetrahedra::buildEdges(), MeshOfHexahedra::buildEdges(), Mesh::edge(), Mesh::edgeNumber(), SurfaceMeshOfTriangles::face(), SurfaceMeshOfQuadrangles::face(), MeshOfTriangles::face(), MeshOfTriangles::faceNumber(), Mesh::hasEdges(), SurfaceMesh::hasFaces(), MeshOfTriangles::hasFaces(), Mesh::numberOfEdges(), SurfaceMesh::numberOfFaces(), and MeshOfTriangles::numberOfFaces().
1.5.6