Class xlifepp::LagrangeHexahedron#

class LagrangeHexahedron : public xlifepp::RefHexahedron#

Inheritence diagram for xlifepp::LagrangeHexahedron:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="xlifepp::LagrangeGLHexahedron" tooltip="xlifepp::LagrangeGLHexahedron"] "1" [label="xlifepp::LagrangeHexahedron" tooltip="xlifepp::LagrangeHexahedron" fillcolor="#BFBFBF"] "5" [label="xlifepp::LagrangeStdHexahedron" tooltip="xlifepp::LagrangeStdHexahedron"] "3" [label="xlifepp::RefElement" tooltip="xlifepp::RefElement"] "2" [label="xlifepp::RefHexahedron" tooltip="xlifepp::RefHexahedron"] "4" -> "1" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::LagrangeHexahedron:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "16" [label="std::list< std::vector< PolynomialT< real_t > > >" tooltip="std::list< std::vector< PolynomialT< real_t > > >"] "19" [label="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >" tooltip="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >"] "21" [label="std::map< xlifepp::Triplet< number_t >, number_t >" tooltip="std::map< xlifepp::Triplet< number_t >, number_t >"] "17" [label="std::list< T >" tooltip="std::list< T >"] "20" [label="std::map< K, T >" tooltip="std::map< K, T >"] "6" [label="std::vector< T >" tooltip="std::vector< T >"] "7" [label="std::vector< ShapeType >" tooltip="std::vector< ShapeType >"] "5" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "9" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "8" [label="std::vector< std::vector< number_t > >" tooltip="std::vector< std::vector< number_t > >"] "10" [label="std::vector< xlifepp::GeomRefElement * >" tooltip="std::vector< xlifepp::GeomRefElement * >"] "12" [label="std::vector< xlifepp::Interpolation * >" tooltip="std::vector< xlifepp::Interpolation * >"] "18" [label="std::vector< xlifepp::PolynomialsBasisT >" tooltip="std::vector< xlifepp::PolynomialsBasisT >"] "13" [label="std::vector< xlifepp::RefDof * >" tooltip="std::vector< xlifepp::RefDof * >"] "14" [label="std::vector< xlifepp::RefElement * >" tooltip="std::vector< xlifepp::RefElement * >"] "22" [label="std::vector< xlifepp::Triplet< number_t > >" tooltip="std::vector< xlifepp::Triplet< number_t > >"] "4" [label="xlifepp::GeomRefElement" tooltip="xlifepp::GeomRefElement"] "11" [label="xlifepp::Interpolation" tooltip="xlifepp::Interpolation"] "1" [label="xlifepp::LagrangeHexahedron" tooltip="xlifepp::LagrangeHexahedron" fillcolor="#BFBFBF"] "15" [label="xlifepp::PolynomialsBasisT< K >" tooltip="xlifepp::PolynomialsBasisT< K >"] "3" [label="xlifepp::RefElement" tooltip="xlifepp::RefElement"] "2" [label="xlifepp::RefHexahedron" tooltip="xlifepp::RefHexahedron"] "16" -> "17" [dir=forward tooltip="template-instance"] "19" -> "20" [dir=forward tooltip="template-instance"] "21" -> "20" [dir=forward tooltip="template-instance"] "7" -> "6" [dir=forward tooltip="template-instance"] "5" -> "6" [dir=forward tooltip="template-instance"] "9" -> "6" [dir=forward tooltip="template-instance"] "8" -> "6" [dir=forward tooltip="template-instance"] "10" -> "6" [dir=forward tooltip="template-instance"] "12" -> "6" [dir=forward tooltip="template-instance"] "18" -> "6" [dir=forward tooltip="template-instance"] "13" -> "6" [dir=forward tooltip="template-instance"] "14" -> "6" [dir=forward tooltip="template-instance"] "22" -> "6" [dir=forward tooltip="template-instance"] "4" -> "5" [dir=forward tooltip="usage"] "4" -> "7" [dir=forward tooltip="usage"] "4" -> "8" [dir=forward tooltip="usage"] "4" -> "9" [dir=forward tooltip="usage"] "4" -> "10" [dir=forward tooltip="usage"] "11" -> "12" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "21" [dir=forward tooltip="usage"] "1" -> "22" [dir=forward tooltip="usage"] "15" -> "16" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="usage"] "3" -> "11" [dir=forward tooltip="usage"] "3" -> "13" [dir=forward tooltip="usage"] "3" -> "14" [dir=forward tooltip="usage"] "3" -> "8" [dir=forward tooltip="usage"] "3" -> "15" [dir=forward tooltip="usage"] "3" -> "18" [dir=forward tooltip="usage"] "3" -> "19" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="public-inheritance"] }

defines Lagrange Reference Element interpolation data on hexahedra

Subclassed by xlifepp::LagrangeGLHexahedron, xlifepp::LagrangeStdHexahedron

Public Functions

LagrangeHexahedron(const Interpolation *int_p)#

constructor by interpolation

virtual ~LagrangeHexahedron()#

destructor

void buildBarycentricSideDof()#

build barycentricSideDofMap

Create the map of internal dofs on a side (face) of a hexahedron, sorted according to their barycentric coordinates with respect to the 4 vertices of the face, numbered (1,2,3,4) below.

The geometric position of the dofs is the same as those of the quadrangle.

  3----2  3---6---2  3--10---6---2  3--14--10---6---2  3--18--14--10---6---2
  |    |  |       |  |           |  |               |  |                   |
  4----1  7   9   5  7  15  14   9  7  19  22  18  13  7  23  30  26  22  17
   k=1    |       |  |           |  |               |  |                   |
          4---8---1 11  16  13   5 11  23  25  21   9 11  27  35  34  29  13
             k=2     |           |  |               |  |                   |
                     4---8--12---1 15  20  24  17   5 15  31  36  33  25   9
                          k=3       |               |  |                   |
                                    4---8--12--16---1 19  24  28  32  21   5
                                           k=4         |                   |
                                                       4---8--12--16--20---1
                                                                k=5
Only the first 3 coordinates are stored since this is sufficient for the objective. Fill the reciprocal vector barycentricSideDofs.
virtual number_t sideDofsMap(const number_t &n, const number_t &i, const number_t &j, const number_t &k = 0) const#

internal side dofs mapping when vertices of side are permuted

internal side dofs mapping when vertices of side are permuted this function returns the number of the n-th internal dof of a face where vertices are permuted if no permutation, it returns n

Given two hexahedra A and B sharing a face called a for A and b for B, the question is to define the same intermediate face from the data related to each the two hexahedra, in order to create the bi-univocal correspondence between the dofs lying inside the two faces.

Each face is defined by the numbers of its 4 vertices and the internal dofs are located using their barycentric coordinates with respect to these vertices. Sorting the vertices according to their numbers in ascending order lead to the same quadruplet for a and b. However, in the definition of a and b, the vertices are given in a specific order, following the boundary of the face and corresponding to a cycle.

After sorting, the sequence of numbers may not correspond anymore to a cycle which would produce barycentric coordinates inconsistant with the original ones. Thus we have to swap some of them in order to recover a cycle and this operation should lead to the same sequence when done from the data related to A and from the data related to B.

Let (i,j,k,l) be the ranks of the vertices after sorting the corresponding vertex numbers. The following table gives the final permutations to be applied to order to recover a cycle that answer the question:

 i j k l   Path   Permutation   Cycle
 1 2 3 4    +       1 2 3 4       +
 1 2 4 3    Z       1 2 3-4       +
 1 3 2 4    X       1 2-3 4       +
 1 3 4 2    X       1 4-3 2       -
 1 4 2 3    Z       1 4 3-2       -
 1 4 3 2    -       1 4 3 2       -
 2 1 3 4    Z       2 1 4-3       -
 2 1 4 3    -       2 1 4 3       -
 2 3 1 4    Z       2 3 4-1       +
 2 3 4 1    +       2 3 4 1       +
 2 4 1 3    X       2 1-4 3       -
 2 4 3 1    X       2 3-4 1       +
 3 1 2 4    X       3 2-1 4       -
 3 1 4 2    X       3 4-1 2       +
 3 2 1 4    -       3 2 1 4       -
 3 2 4 1    Z       3 2 1-4       -
 3 4 1 2    +       3 4 1 2       +
 3 4 2 1    Z       3 4 1-2       +
 4 1 2 3    +       4 1 2 3       +
 4 1 3 2    Z       4 1 2-3       +
 4 2 1 3    X       4 1-2 3       +
 4 2 3 1    X       4 3-2 1       -
 4 3 1 2    Z       4 3 2-1       -
 4 3 2 1    -       4 3 2 1       -
Legend: Column 1: the 24 possible configurations Column 2: shape of the path obtained by drawing a line between two successive vertices (+ and - denote a cycle in a direction and in the opposite direction) Column 3: permutation to be applied to the given configuration to get a cycle Column 4: direction of the cycle (this information does not matter ; it is specified only for clearness)

Applying a permutation to the corresponding configuration leads to a cycle starting from the vertex bearing the smallest number. The sequence obtained from the hexahedron A is the same as the one obtained from the hexahedron B.

Public Members

std::map<Triplet<number_t>, number_t> barycentricSideDofMap#

internal dof on side (face) ordered by barycentric coordinates

std::vector<Triplet<number_t>> barycentricSideDofs#

dof barycentric coordinates