#include <SpectralMesh.hpp>


Public Types | |
| enum | { family = Mesh::volume } |
| typedef CartesianHexahedron | CellType |
| typedef Quadrangle | FaceType |
| typedef MeshOfHexahedra | Transformed |
| typedef SurfaceMeshOfQuadrangles | BorderMeshType |
| typedef Mesh::T_iterator < SpectralMesh, CartesianHexahedron > | iterator |
| typedef Mesh::T_iterator < const SpectralMesh, 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 |
| const TinyVector< 3, size_t > & | degrees () const |
| size_t | degree (const size_t &i) const |
| size_t | dofNumber (const size_t &i, const size_t &j, const size_t &k) 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 |
| SpectralMesh::const_iterator | find (const double &x, const double &y, const double &z) const |
| SpectralMesh::const_iterator | find (const TinyVector< 3 > &X) const |
| 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 < SpectralMesh > & | connectivity () const |
| Connectivity< SpectralMesh > & | connectivity () |
| const CartesianHexahedron & | cell (const size_t &i) const |
| Read-only access to the Cell i of the mesh. | |
| const Structured3DMeshShape & | shape () const |
| Access to the shape 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. | |
| SpectralMesh (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 | |
| SpectralMesh (const SpectralMesh &) | |
Private Attributes | |
| const TinyVector< 3, size_t > | __degrees |
| degree | |
| 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< SpectralMesh > | __connectivity |
Definition at line 42 of file SpectralMesh.hpp.
Definition at line 46 of file SpectralMesh.hpp.
| typedef Quadrangle SpectralMesh::FaceType |
Definition at line 47 of file SpectralMesh.hpp.
If a transformation is applied the new mesh type will be MeshOfHexahedra
Definition at line 53 of file SpectralMesh.hpp.
Definition at line 54 of file SpectralMesh.hpp.
Definition at line 180 of file SpectralMesh.hpp.
| typedef Mesh::T_iterator<const SpectralMesh, const CartesianHexahedron> SpectralMesh::const_iterator |
Definition at line 181 of file SpectralMesh.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] |
| SpectralMesh::SpectralMesh | ( | const SpectralMesh & | ) | [private] |
Copy constructor is forbidden
| SpectralMesh::SpectralMesh | ( | const Structured3DMeshShape & | degrees, | |
| 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 SpectralMesh 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 60 of file SpectralMesh.cpp.
References __borderMesh, __cells, __cellShape, Mesh::__verticesCorrespondance, Mesh::__verticesSet, __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::b(), cell(), GaussLobattoManager::get(), StaticBase< GaussLobattoManager >::instance(), Array3DShape::nx(), Structured3DMeshShape::nx(), Array3DShape::ny(), Structured3DMeshShape::ny(), Array3DShape::nz(), Structured3DMeshShape::nz(), SurfElem::setMother(), vertex(), Vertex::x(), Vertex::y(), and Vertex::z().
00062 : Mesh(Mesh::spectralMesh, 00063 Mesh::volume, 00064 new VerticesSet((degrees.shape().nx()+2)*(degrees.shape().ny()+2)*(degrees.shape().nz()+2)), 00065 correspondances), 00066 __degrees(TinyVector<3,size_t>(degrees.shape().nx(),degrees.shape().ny(),degrees.shape().nz())), 00067 __verticesShape(TinyVector<3,size_t>(degrees.shape().nx()+2,degrees.shape().ny()+2,degrees.shape().nz()+2), degrees.a(), degrees.b()), 00068 __cellShape(TinyVector<3,size_t>(degrees.shape().nx()+1,degrees.shape().ny()+1,degrees.shape().nz()+1)), 00069 __cells((degrees.shape().nx()+1)*(degrees.shape().ny()+1)*(degrees.shape().nz()+1)), 00070 __facesSet(0), 00071 __connectivity(*this) 00072 { 00073 // w[ijk][01] variable respresent the coefficient needed to 00074 // compute vertices position between a and b. 00075 // for example wj1 is the weight computed for the jth point in the 00076 // 'y' direction for v1 00077 // const size_t degreeX = degrees.shape().nx(); 00078 // const size_t degreeY = degrees.shape().ny(); 00079 // const size_t degreeZ = degrees.shape().nz(); 00080 00081 const size_t degreeX = degrees.nx(); 00082 const size_t degreeY = degrees.ny(); 00083 const size_t degreeZ = degrees.nz(); 00084 00085 const size_t nx_1 = __cellShape.nx(); 00086 const size_t ny_1 = __cellShape.ny(); 00087 const size_t nz_1 = __cellShape.nz(); 00088 Interval intervalX(__verticesShape.a()[0],__verticesShape.b()[0]) ; 00089 Interval intervalY(__verticesShape.a()[1],__verticesShape.b()[1]) ; 00090 Interval intervalZ(__verticesShape.a()[2],__verticesShape.b()[2]) ; 00091 const GaussLobatto& gaussLobattoX = GaussLobattoManager::instance().get(degreeX+1); 00092 const GaussLobatto& gaussLobattoY = GaussLobattoManager::instance().get(degreeY+1); 00093 const GaussLobatto& gaussLobattoZ = GaussLobattoManager::instance().get(degreeZ+1); 00094 00095 SpectralConformTransformation transformationX(intervalX); 00096 SpectralConformTransformation transformationY(intervalY); 00097 SpectralConformTransformation transformationZ(intervalZ); 00098 for (size_t i=0; i<__verticesShape.nx(); i++) { 00099 for (size_t j=0; j<__verticesShape.ny(); j++) { 00100 for (size_t k=0; k<__verticesShape.nz(); k++) { 00101 Vertex& v = vertex(i,j,k); 00102 00103 v.x() = transformationX(gaussLobattoX(i)); 00104 v.y() = transformationY(gaussLobattoY(j)); 00105 v.z() = transformationZ(gaussLobattoZ(k)); 00106 } 00107 } 00108 } 00109 00110 // Generating Mesh's cells. 00111 // As Cells generation needs Vertices's references 00112 // This must be done after. 00113 00114 size_t n=0; 00115 for (size_t i=0; i<nx_1; i++) { 00116 for (size_t j=0; j<ny_1; j++) { 00117 for (size_t k=0; k<nz_1; k++) { 00118 __cells[n] = CartesianHexahedron(vertex( i, j, k), 00119 vertex(i+1, j, k), 00120 vertex(i+1,j+1, k), 00121 vertex( i,j+1, k), 00122 vertex( i, j,k+1), 00123 vertex(i+1, j,k+1), 00124 vertex(i+1,j+1,k+1), 00125 vertex( i,j+1,k+1)); 00126 n++; 00127 } 00128 } 00129 } 00130 00135 Vector<Quadrangle>* pQuadrangles 00136 = new Vector<Quadrangle>(2*ny_1*nz_1+2*nx_1*nz_1+2*nx_1*ny_1); 00137 Vector<Quadrangle>& quadrangles = *pQuadrangles; 00138 00139 size_t currentCell = 0; 00141 for (size_t j=0; j<ny_1; j++) { 00142 for (size_t k=0; k<nz_1; k++) { 00143 const Vertex& V0 = vertex(0, j, k); 00144 const Vertex& V1 = vertex(0, j,k+1); 00145 const Vertex& V2 = vertex(0,j+1,k+1); 00146 const Vertex& V3 = vertex(0,j+1, k); 00147 Quadrangle& Q = quadrangles[currentCell]; 00148 00149 Q = Quadrangle(V0, V1, V2, V3, 0); 00150 Q.setMother(&(cell(0,j,k)),4); 00151 00152 currentCell++; 00153 } 00154 } 00155 00157 for (size_t j=0; j<ny_1; j++) { 00158 for (size_t k=0; k<nz_1; k++) { 00159 const Vertex& V0 = vertex(nx_1, j, k); 00160 const Vertex& V1 = vertex(nx_1,j+1, k); 00161 const Vertex& V2 = vertex(nx_1,j+1,k+1); 00162 const Vertex& V3 = vertex(nx_1, j,k+1); 00163 Quadrangle& Q = quadrangles[currentCell]; 00164 00165 Q = Quadrangle(V0, V1, V2, V3, 1); 00166 Q.setMother(&(cell(nx_1-1,j,k)),2); 00167 00168 currentCell++; 00169 } 00170 } 00171 00173 for (size_t i=0; i<nx_1; i++) { 00174 for (size_t k=0; k<nz_1; k++) { 00175 const Vertex& V0 = vertex( i,0, k); 00176 const Vertex& V1 = vertex(i+1,0, k); 00177 const Vertex& V2 = vertex(i+1,0,k+1); 00178 const Vertex& V3 = vertex( i,0,k+1); 00179 Quadrangle& Q = quadrangles[currentCell]; 00180 00181 Q = Quadrangle(V0, V1, V2, V3, 2); 00182 Q.setMother(&(cell(i,0,k)),1); 00183 00184 currentCell++; 00185 } 00186 } 00187 00189 for (size_t i=0; i<nx_1; i++) { 00190 for (size_t k=0; k<nz_1; k++) { 00191 const Vertex& V0 = vertex( i,ny_1, k); 00192 const Vertex& V1 = vertex( i,ny_1,k+1); 00193 const Vertex& V2 = vertex(i+1,ny_1,k+1); 00194 const Vertex& V3 = vertex(i+1,ny_1, k); 00195 Quadrangle& Q = quadrangles[currentCell]; 00196 00197 Q = Quadrangle(V0, V1, V2, V3, 3); 00198 Q.setMother(&(cell(i,ny_1-1,k)),3); 00199 00200 currentCell++; 00201 } 00202 } 00203 00205 for (size_t i=0; i<nx_1; i++) { 00206 for (size_t j=0; j<ny_1; j++) { 00207 const Vertex& V0 = vertex( i, j,0); 00208 const Vertex& V1 = vertex( i,j+1,0); 00209 const Vertex& V2 = vertex(i+1,j+1,0); 00210 const Vertex& V3 = vertex(i+1, j,0); 00211 Quadrangle& Q = quadrangles[currentCell]; 00212 00213 Q = Quadrangle(V0, V1, V2, V3, 4); 00214 Q.setMother(&(cell(i,j,0)),0); 00215 00216 currentCell++; 00217 } 00218 } 00219 00220 00222 for (size_t i=0; i<nx_1; i++) { 00223 for (size_t j=0; j<ny_1; j++) { 00224 const Vertex& V0 = vertex( i, j,nz_1); 00225 const Vertex& V1 = vertex(i+1, j,nz_1); 00226 const Vertex& V2 = vertex(i+1,j+1,nz_1); 00227 const Vertex& V3 = vertex( i,j+1,nz_1); 00228 Quadrangle& Q = quadrangles[currentCell]; 00229 00230 Q = Quadrangle(V0, V1, V2, V3, 5); 00231 Q.setMother(&(cell(i,j,nz_1-1)),5); 00232 currentCell++; 00233 } 00234 } 00235 __borderMesh = new SurfaceMeshOfQuadrangles(__verticesSet, 00236 __verticesCorrespondance, 00237 pQuadrangles); 00238 __borderMesh->setBackgroundMesh(this); 00239 }

| std::string SpectralMesh::typeName | ( | ) | const [inline, virtual] |
Returns the typename of the mesh
Implements Mesh.
Definition at line 87 of file SpectralMesh.hpp.
| const TinyVector<3,size_t>& SpectralMesh::degrees | ( | ) | const [inline] |
Definition at line 92 of file SpectralMesh.hpp.
References __degrees.
00093 { 00094 return __degrees; 00095 }
| size_t SpectralMesh::degree | ( | const size_t & | i | ) | const [inline] |
Definition at line 97 of file SpectralMesh.hpp.
References __degrees.
Referenced by RealExpressionIntegrate::execute().
00098 { 00099 return __degrees[i]; 00100 }
| size_t SpectralMesh::dofNumber | ( | const size_t & | i, | |
| const size_t & | j, | |||
| const size_t & | k | |||
| ) | const [inline] |
Definition at line 102 of file SpectralMesh.hpp.
References __cellShape.
00105 { 00106 return __cellShape(i, j, k); 00107 }
| void SpectralMesh::buildEdges | ( | ) | [virtual] |
Builds the mesh internal edges
Implements Mesh.
Definition at line 40 of file SpectralMesh.cpp.
References Mesh::__edgesSet, and EdgesBuilder< MeshType >::edgesSet().
00041 { 00042 EdgesBuilder<SpectralMesh> edgesBuilder(*this); 00043 __edgesSet = edgesBuilder.edgesSet(); 00044 }

| bool SpectralMesh::hasBorderMesh | ( | ) | const [inline, virtual] |
Implements Mesh.
Definition at line 115 of file SpectralMesh.hpp.
References __borderMesh.
Referenced by WriterMedit::__proceedMesh().
00116 { 00117 return (__borderMesh != 0); 00118 }
| ConstReferenceCounting<BorderMeshType> SpectralMesh::borderMesh | ( | ) | const [inline] |
Definition at line 120 of file SpectralMesh.hpp.
References __borderMesh.
Referenced by WriterMedit::__proceedMesh().
00121 { 00122 return __borderMesh; 00123 }
| ConstReferenceCounting<Mesh> SpectralMesh::borderBaseMesh | ( | ) | const [inline, virtual] |
Implements Mesh.
Definition at line 125 of file SpectralMesh.hpp.
References __borderMesh.
00126 { 00127 return static_cast<const BorderMeshType*>(__borderMesh); 00128 }
| void SpectralMesh::buildFaces | ( | ) | [virtual] |
Builds the mesh internal faces
Implements Mesh.
Definition at line 47 of file SpectralMesh.cpp.
References __facesSet, and FacesBuilder< MeshType >::facesSet().
00048 { 00049 FacesBuilder<SpectralMesh> facesBuilder(*this); 00050 __facesSet = facesBuilder.facesSet(); 00051 }

| bool SpectralMesh::hasFaces | ( | ) | const [inline, virtual] |
Returns true if the faces set has been built
Implements Mesh.
Definition at line 141 of file SpectralMesh.hpp.
References __facesSet.
00142 { 00143 return __facesSet != 0; 00144 }
| const FaceType& SpectralMesh::face | ( | const size_t & | i | ) | const [inline] |
Read-only access to a face
| i | the face number |
Definition at line 153 of file SpectralMesh.hpp.
References __facesSet.
00154 { 00155 return (*__facesSet)[i]; 00156 }
| size_t SpectralMesh::faceNumber | ( | const FaceType & | f | ) | const [inline] |
| const size_t& SpectralMesh::numberOfFaces | ( | ) | const [inline] |
| const size_t& SpectralMesh::numberOfCells | ( | ) | const [inline, virtual] |
Read-only access to the number of cells.
Implements Mesh.
Definition at line 170 of file SpectralMesh.hpp.
References __cells, and Vector< T >::size().

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

| SpectralMesh::const_iterator SpectralMesh::find | ( | const double & | x, | |
| const double & | y, | |||
| const double & | z | |||
| ) | const [inline] |
Definition at line 441 of file SpectralMesh.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 find().
00444 { 00445 bool foundCell = inside(x,y,z); 00446 00447 if (!foundCell) 00448 return SpectralMesh::const_iterator(*this, 00449 SpectralMesh::const_iterator::End); 00450 00451 const real_t& x0 = __verticesShape.a(0); 00452 const real_t& y0 = __verticesShape.a(1); 00453 const real_t& z0 = __verticesShape.a(2); 00454 00455 int i = int(std::floor((x - x0)/__verticesShape.hx())); 00456 int j = int(std::floor((y - y0)/__verticesShape.hy())); 00457 int k = int(std::floor((z - z0)/__verticesShape.hz())); 00458 00459 { 00460 int nx_1 = __cellShape.nx() - 1; 00461 int ny_1 = __cellShape.ny() - 1; 00462 int nz_1 = __cellShape.nz() - 1; 00463 00464 // this transformation is to operate if the (x,y,z) is a point on 00465 // one of the faces of the box. 00466 00467 i = (i>nx_1) ? nx_1 : i; 00468 j = (j>ny_1) ? ny_1 : j; 00469 k = (k>nz_1) ? nz_1 : k; 00470 } 00471 00472 return SpectralMesh::const_iterator(*this, 00473 __cellShape(i, j, k)); 00474 }

| SpectralMesh::const_iterator SpectralMesh::find | ( | const TinyVector< 3 > & | X | ) | const [inline] |
Definition at line 187 of file SpectralMesh.hpp.
References find().
00188 { 00189 return find(X[0],X[1],X[2]); 00190 }

| Vertex & SpectralMesh::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 323 of file SpectralMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
Referenced by SpectralMesh().
00326 { 00327 return (*__verticesSet)[__verticesShape(i, j, k)]; 00328 }
| const Vertex & SpectralMesh::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 331 of file SpectralMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00334 { 00335 return (*__verticesSet)[__verticesShape(i, j, k)]; 00336 }
| CartesianHexahedron & SpectralMesh::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 339 of file SpectralMesh.hpp.
References __cells, and __cellShape.
Referenced by SpectralMesh().
00342 { 00343 return (__cells[__cellShape(i, j, k)]); 00344 }
| const CartesianHexahedron & SpectralMesh::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 347 of file SpectralMesh.hpp.
References __cells, and __cellShape.
00350 { 00351 return (__cells[__cellShape(i, j, k)]); 00352 }
| CartesianHexahedron& SpectralMesh::cell | ( | const size_t & | i | ) | [inline] |
Access to the Cell i of the mesh.
Definition at line 213 of file SpectralMesh.hpp.
References __cells.
00214 { 00215 return __cells[i]; 00216 }
| const Connectivity<SpectralMesh>& SpectralMesh::connectivity | ( | ) | const [inline] |
Read only access to the mesh connectivity
Definition at line 223 of file SpectralMesh.hpp.
References __connectivity.
00224 { 00225 return __connectivity; 00226 }
| Connectivity<SpectralMesh>& SpectralMesh::connectivity | ( | ) | [inline] |
Access to the mesh connectivity
Definition at line 233 of file SpectralMesh.hpp.
References __connectivity.
00234 { 00235 return __connectivity; 00236 }
| const CartesianHexahedron& SpectralMesh::cell | ( | const size_t & | i | ) | const [inline] |
Read-only access to the Cell i of the mesh.
Definition at line 239 of file SpectralMesh.hpp.
References __cells.
00240 { 00241 return __cells[i]; 00242 }
| const Structured3DMeshShape& SpectralMesh::shape | ( | ) | const [inline] |
Access to the shape of the mesh.
Definition at line 245 of file SpectralMesh.hpp.
References __verticesShape.
Referenced by RealExpressionIntegrate::execute(), BoundaryConditionDiscretizationSpectralConform::getDiagonal(), MultiGrid::MultiGrid(), MeshExpressionSpectral::put(), BoundaryConditionDiscretizationSpectralConform::setSecondMember(), BoundaryConditionDiscretizationSpectralConform::timesX(), and BoundaryConditionDiscretizationSpectralConform::transposedTimesX().
00246 { 00247 return __verticesShape; 00248 }
| Vertex& SpectralMesh::vertex | ( | const size_t & | i | ) | [inline] |
Access to the ith Vertex.
Reimplemented from Mesh.
Definition at line 254 of file SpectralMesh.hpp.
References Mesh::vertex().
00255 { 00256 return Mesh::vertex(i); 00257 }

| const Vertex& SpectralMesh::vertex | ( | const size_t & | i | ) | const [inline] |
Read-only access to the ith Vertex.
Reimplemented from Mesh.
Definition at line 263 of file SpectralMesh.hpp.
References Mesh::vertex().
00264 { 00265 return Mesh::vertex(i); 00266 }

Access to the Vertex indexed by I.
Definition at line 354 of file SpectralMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00355 { 00356 return (*__verticesSet)[__verticesShape(I[0], I[1], I[2])]; 00357 }
Read-only access to the Vertex indexed by I.
Definition at line 360 of file SpectralMesh.hpp.
References Mesh::__verticesSet, and __verticesShape.
00361 { 00362 return (*__verticesSet)[__verticesShape(I[0], I[1], I[2])]; 00363 }
| CartesianHexahedron & SpectralMesh::cell | ( | const Index & | I | ) | [inline] |
Access to the Cell indexed by I.
Definition at line 366 of file SpectralMesh.hpp.
References __cells, and __cellShape.
00367 { 00368 return (__cells[__cellShape(I[0], I[1], I[2])]); 00369 }
| const CartesianHexahedron & SpectralMesh::cell | ( | const Index & | I | ) | const [inline] |
Read-only access to the Cell indexed by I.
Definition at line 372 of file SpectralMesh.hpp.
References __cells, and __cellShape.
00373 { 00374 return (__cells[__cellShape(I[0], I[1], I[2])]); 00375 }
| Index SpectralMesh::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 380 of file SpectralMesh.hpp.
References __cellShape, __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::hx(), Structured3DMeshShape::hy(), Structured3DMeshShape::hz(), Array3DShape::nx(), Array3DShape::ny(), and Array3DShape::nz().
00381 { 00382 const real_t& x = V[0]; 00383 const real_t& y = V[1]; 00384 const real_t& z = V[2]; 00385 00386 const real_t& x0 = __verticesShape.a(0); 00387 const real_t& y0 = __verticesShape.a(1); 00388 const real_t& z0 = __verticesShape.a(2); 00389 00390 int i = int(std::floor((x - x0)/__verticesShape.hx())); 00391 int j = int(std::floor((y - y0)/__verticesShape.hy())); 00392 int k = int(std::floor((z - z0)/__verticesShape.hz())); 00393 00394 i = (i<0) ? 0 : i; 00395 j = (j<0) ? 0 : j; 00396 k = (k<0) ? 0 : k; 00397 00398 int nx_1 = __cellShape.nx() - 1; 00399 int ny_1 = __cellShape.ny() - 1; 00400 int nz_1 = __cellShape.nz() - 1; 00401 00402 i = (i>nx_1) ? nx_1 : i; 00403 j = (j>ny_1) ? ny_1 : j; 00404 k = (k>nz_1) ? nz_1 : k; 00405 00406 Index I(i,j,k); 00407 00408 return I; 00409 }

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 414 of file SpectralMesh.hpp.
References __verticesShape, Structured3DMeshShape::a(), Structured3DMeshShape::hx(), Structured3DMeshShape::hy(), Structured3DMeshShape::hz(), Structured3DMeshShape::nx(), Structured3DMeshShape::ny(), Structured3DMeshShape::nz(), Vertex::x(), Vertex::y(), and Vertex::z().
00415 { 00416 const real_t& x = V.x(); 00417 const real_t& y = V.y(); 00418 const real_t& z = V.z(); 00419 00420 const real_t& x0 = __verticesShape.a(0); 00421 const real_t& y0 = __verticesShape.a(1); 00422 const real_t& z0 = __verticesShape.a(2); 00423 00424 int i = int((x - x0)/__verticesShape.hx()+0.5); 00425 int j = int((y - y0)/__verticesShape.hy()+0.5); 00426 int k = int((z - z0)/__verticesShape.hz()+0.5); 00427 00428 bool foundCell = true; 00429 if (((i<0)||(i>static_cast<int>(__verticesShape.nx()-1))) 00430 &&((j<0)||(j>static_cast<int>(__verticesShape.ny()-1))) 00431 &&((k<0)||(k>static_cast<int>(__verticesShape.nz()-1)))) { 00432 foundCell = false; 00433 } 00434 00435 Index I(i,j,k); 00436 00437 return I; 00438 }

| bool SpectralMesh::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 296 of file SpectralMesh.hpp.
References __verticesShape, Structured3DMeshShape::a(), and Structured3DMeshShape::b().
Referenced by find(), and inside().
00297 { 00298 return ((x>=__verticesShape.a(0))&& 00299 (x<=__verticesShape.b(0))&& 00300 (y>=__verticesShape.a(1))&& 00301 (y<=__verticesShape.b(1))&& 00302 (z>=__verticesShape.a(2))&& 00303 (z<=__verticesShape.b(2))); 00304 }

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

| 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 TinyVector<3,size_t> SpectralMesh::__degrees [private] |
const Structured3DMeshShape SpectralMesh::__verticesShape [private] |
The shape of the vertices' set.
Definition at line 64 of file SpectralMesh.hpp.
Referenced by cellIndex(), find(), inside(), shape(), SpectralMesh(), vertex(), and vertexIndex().
const Array3DShape SpectralMesh::__cellShape [private] |
The shape of the cells' set only the array3dshape is needed.
Definition at line 67 of file SpectralMesh.hpp.
Referenced by cell(), cellIndex(), dofNumber(), find(), and SpectralMesh().
Vector<CartesianHexahedron> SpectralMesh::__cells [private] |
The cells set.
Definition at line 70 of file SpectralMesh.hpp.
Referenced by cell(), cellNumber(), numberOfCells(), and SpectralMesh().
The various border lists
Definition at line 73 of file SpectralMesh.hpp.
Referenced by borderBaseMesh(), borderMesh(), hasBorderMesh(), and SpectralMesh().
ReferenceCounting<FacesSet<FaceType> > SpectralMesh::__facesSet [private] |
internal and external quadrangles set
Definition at line 76 of file SpectralMesh.hpp.
Referenced by buildFaces(), face(), and hasFaces().
Connectivity<SpectralMesh> SpectralMesh::__connectivity [private] |
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(), Structured3DMesh::Structured3DMesh(), Structured3DMesh::vertex(), 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(), Structured3DMesh::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(), Structured3DMesh::buildEdges(), 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