diff --git a/FunctionSpace/ReferenceSpace.h b/FunctionSpace/ReferenceSpace.h index 3bd4d841a0b8cd4c04040b67786a697211562515..07f9b8afa031075163787b5a8a506535aecf2a15 100644 --- a/FunctionSpace/ReferenceSpace.h +++ b/FunctionSpace/ReferenceSpace.h @@ -16,28 +16,33 @@ A Reference Space is the space where all the mesh elements (of the same geomtrical family) will be mapped. - A given geomtrical family may have mutltiple reference spaces, - depending on how the egdes and faces are oriented. + A given geomtrical family has one reference space. + Howerver, this reference space can be @em oriented in multiple ways. These orientations depend on the global number of the mesh element vertices, and the bigger/smaller relations that exist among them. - This class can generate, and orient, all the reference spaces - of a geomtrical family (see specialized classes). - It can alse compute the jacobian matrices for the mapping between spaces. + This class can orient the reference space of a geomtrical family + (see specialized classes). + It can also compute the jacobian matrices for the mapping + between the physcial and reference spaces, + @em by @em taking @em orientation @em into @em acount. This class can handle three different types of reference spaces: @li The XYZ space, which is the space of the physical (mesh) elements - @li The UVW space, which is the unoriented reference space of the mesh module - @li The ABC spaces, which are the set oriented reference spaces + @li The UVW space, which is the @em unoriented reference space (mesh module) + @li The ABC spaces, which are the set @em oriented UVW spaces - Note that the UVW and ABC spaces are defined on the same domain. - The only difference is how the vertices are indexed (and oriented). + Note that the UVW and ABC spaces are defined on the same domain + (the one of UVW). + The only difference is how the vertices are indexed + (@em i.e. the orientation). Actualy, the ABC spaces are constructed by orienting (that is reindexing) the edges and faces of the UVW space. Also note that a given mesh element can have only one orientation, so it can be mapped on only one of the ABC spaces. - This class is able to find which ABC space corresponds to a mesh element. + This class is able to find which ABC space (orientation) + corresponds to a mesh element. The edges (or faces) are represended by the index of their vertices. For a given edge (or face), this class is able to return these indexes, @@ -224,24 +229,38 @@ class ReferenceSpace{ Deletes this ReferenceSpace ** + @fn ReferenceSpace::getNVertex + @return Returns the number of topological vertices of this ReferenceSpace + ** + + @fn ReferenceSpace::getNEdge + @return Returns the number of topological edges of this ReferenceSpace + ** + + @fn ReferenceSpace::getNFace + @return Returns the number of topological faces of this ReferenceSpace + ** + @fn ReferenceSpace::getNOrientation - @returns Returns the number of orientations + @returns Returns the number of orientations for this ReferenceSpace + (that is the number of ABC spaces for this UVW space) ** @fn ReferenceSpace::getOrientation @param element A MElement @returns - Returns a natural number defining the orientation of the given element + Returns a natural number defining the orientation (that its ABC space) + of the given element - If no space is found (e.g. the given element does not belong - the same geometrical entity as this ReferenceSpace) an Exception is thrown + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::getEdgeNodeIndex @return Returns every oriented edge node index of this ReferenceSpace @li The first vector represents a particular ABC space - (see ReferenceSpace::getReferenceSpace()) + (see ReferenceSpace::getOrientation()) @li The second vector represents a particular edge (for the given ABC space) @li The last vector represents the vertex indexes of the given edge ** @@ -250,7 +269,7 @@ class ReferenceSpace{ @return Returns every oriented face node index of this ReferenceSpace @li The first vector represents a particular ABC space - (see ReferenceSpace::getReferenceSpace()) + (see ReferenceSpace::getOrientation()) @li The second vector represents a particular face (for the given ABC space) @li The last vector represents the vertex indexes of the given face ** @@ -265,6 +284,9 @@ class ReferenceSpace{ Note that this is valid, since ABC spaces and UVW space are defined on the same domain. The only difference between those spaces is the node indexing. + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::mapFromABCtoUVW @@ -276,6 +298,9 @@ class ReferenceSpace{ Fills the given vector with the coordinates of the (a, b, c) point in the UVW space + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::mapFromABCtoXYZ @@ -287,6 +312,9 @@ class ReferenceSpace{ Fills the given vector with the coordinates of the (a, b, c) point in the XYZ space + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::mapFromUVWtoABC @@ -298,6 +326,9 @@ class ReferenceSpace{ Fills the given vector with the coordinates of the (u, v, w) point in the ABC space + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::mapFromXYZtoABC @@ -309,6 +340,9 @@ class ReferenceSpace{ Fills the given vector with the coordinates of the (x, y, z) point in the ABC space + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::getJacobian @@ -322,6 +356,9 @@ class ReferenceSpace{ of the mapping between the ABC space and the XYZ space @return Returns the determinant of the jacobian matrix + + If the given element does not belong to the same geometrical entity + as this ReferenceSpace an Exception is thrown ** @fn ReferenceSpace::toString @@ -345,7 +382,6 @@ class ReferenceSpace{ @param path A file path Serialize this ReferenceSpace into the given file - ** */ ////////////////////// diff --git a/FunctionSpace/ReferenceSpaceManager.h b/FunctionSpace/ReferenceSpaceManager.h index ddf7315af0589f2298a1fb0425adb2c627d6a114..4e6cfdde3af2e0dcddb14ab35400a736369cc78f 100644 --- a/FunctionSpace/ReferenceSpaceManager.h +++ b/FunctionSpace/ReferenceSpaceManager.h @@ -15,7 +15,17 @@ @class ReferenceSpaceManager @brief A way to handel ReferenceSpace%s - This class implements class method to handel and access ReferenceSpace%s + This class implements class method to handel and access ReferenceSpace%s. + + This class uses tags to define the geomtrical type of an element. + These tags are taken from <a href="http://geuz.org/gmsh/">gmsh</a>. + + Finaly, this class will autmoticaly instanciate a ReferenceSpace for a given + element type, once this type is first met. + These instance will remain in memory unless a clear method is used. + + @see + See also the ReferenceSpace documentation */ class ReferenceSpaceManager{ @@ -65,6 +75,152 @@ class ReferenceSpaceManager{ static void init(int elementType); }; +/** + @fn ReferenceSpaceManager::ReferenceSpaceManager + Instanciates a new ReferenceSpaceManager + (not needed since it got only class methods) + ** + + @fn ReferenceSpaceManager::~ReferenceSpaceManager + Deletes this ReferenceSpaceManager + + It is worth mentioning that @em no ReferenceSpaceManager::clear() calls + are done. + ** + + @fn ReferenceSpaceManager::clear + Clears all the ReferenceSpace%s that where instanciated by + ReferenceSpaceManager + + @see + See detailed description for how ReferenceSpace%s are instanciated by + ReferenceSpaceManager + ** + + @fn ReferenceSpaceManager::getReferenceSpace + @param elementType A geometrical tag + @return Returns the ReferenceSpace associated to the given tag + ** + + @fn ReferenceSpaceManager::getNVertex + @param elementType A geometrical tag + @return Returns the number of topological vertices for the given + geomtrical tag + ** + + @fn ReferenceSpaceManager::getNEdge + @param elementType A geometrical tag + @return Returns the number of topological edges for the given geometrical tag + ** + + @fn ReferenceSpaceManager::getNFace + @param elementType A geometrical tag + @return Returns the number of topological faces for the given geometrical tag + ** + + @fn ReferenceSpaceManager::getNOrientation + @param elementType A geometrical tag + @return Returns the number of orientation (that is the number of ABC spaces) + for the given geomtrical tag + ** + + @fn ReferenceSpaceManager::getOrientation + @param element A MElement + @return + Retruns a natural number defining the orientation (that is its ABC space) + of the given element + ** + + @fn ReferenceSpaceManager::getEdgeNodeIndex + @param elementType A geometrical tag + @return Returns every oriented edge node index for the given geomtrical tag + + @li The first vector represents a particular ABC space + (see ReferenceSpaceManager::getOrientation()) + @li The second vector represents a particular edge (for the given ABC space) + @li The last vector represents the vertex indexes of the given edge + ** + + @fn ReferenceSpaceManager::getFaceNodeIndex + @param elementType A geometrical tag + @return Returns every oriented face node index for the given geomtrical tag + + @li The first vector represents a particular ABC space + (see ReferenceSpaceManager::getOrientation()) + @li The second vector represents a particular face (for the given ABC space) + @li The last vector represents the vertex indexes of the given face + ** + + @fn ReferenceSpaceManager::getNodeIndexFromABCtoUVW + @param element A MElement + + We call ABC[i] the ID of the ith node in the ABC space of the given element. + We call UVW[i] the ID of the ith node in the UVW space of the given element. + + @return Returns a vector, called map, such that: ABC[i] = UVW[map[i]] + + Note that this is valid, since ABC spaces and UVW space are defined on the + same domain. The only difference between those spaces is the node indexing. + ** + + @fn ReferenceSpaceManager::mapFromABCtoUVW + @param element A MElement + @param a The 'A' coordinate of a point in the ABC space of the given element + @param b The 'B' coordinate of a point in the ABC space of the given element + @param c The 'C' coordinate of a point in the ABC space of the given element + @param uvw A vector in the UVW space of the given element + + Fills the given vector with the coordinates of the + (a, b, c) point in the UVW space + ** + + @fn ReferenceSpaceManager::mapFromABCtoXYZ + @param element A MElement + @param a The 'A' coordinate of a point in the ABC space of the given element + @param b The 'B' coordinate of a point in the ABC space of the given element + @param c The 'C' coordinate of a point in the ABC space of the given element + @param xyz A vector in the XYZ space of the given element + + Fills the given vector with the coordinates of the + (a, b, c) point in the XYZ space + ** + + @fn ReferenceSpaceManager::mapFromUVWtoABC + @param element A MElement + @param u The 'U' coordinate of a point in the UVW space of the given element + @param v The 'V' coordinate of a point in the UVW space of the given element + @param w The 'W' coordinate of a point in the UVW space of the given element + @param abc A vector in the ABC space of the given element + + Fills the given vector with the coordinates of the + (u, v, w) point in the ABC space + ** + + @fn ReferenceSpaceManager::mapFromXYZtoABC + @param element A MElement + @param x The 'X' coordinate of a point in the XYZ space of the given element + @param y The 'Y' coordinate of a point in the XYZ space of the given element + @param z The 'Z' coordinate of a point in the XYZ space of the given element + @param abc A vector in the ABC space of the given element + + Fills the given vector with the coordinates of the + (x, y, z) point in the ABC space + ** + + @fn ReferenceSpaceManager::getJacobian + @param element A MElement + @param a The 'A' coordinate of a point in the ABC space of the given element + @param b The 'B' coordinate of a point in the ABC space of the given element + @param c The 'C' coordinate of a point in the ABC space of the given element + @param jac A 3 by 3 allocated fullMatrix + + Fills the given matrix with the jacobian, evaluated at (a, b, c), + of the mapping between the ABC space and the XYZ space + + @return Returns the determinant of the jacobian matrix + ** + */ + //////////////////// // Inline Methods // ////////////////////