35 #include <lifev/core/fem/DOFLocalPattern.hpp> 46 const UInt& nbDofPerEdge,
const UInt& nbDofPerFace,
52 M_nbDofPerDimEntity[0] = nbDofPerVertex;
53 M_nbDofPerDimEntity[1] = nbDofPerEdge;
54 M_nbDofPerDimEntity[2] = nbDofPerFace;
55 M_nbDofPerDimEntity[3] = nbDofPerVolume;
67 std::ostringstream errorMessage;
68 errorMessage <<
"Pattern " << M_patternType <<
" not available for " << M_dim <<
"D. ";
95 output <<
" Size of the pattern : " << M_nbPattern << std::endl;
96 output <<
" Diag: " << M_nbDiag <<
" Upper: " << M_nbUpper << std::endl;
97 output <<
" Pattern type: " << M_patternType << std::endl;
101 output << iter <<
" : " << M_pattern[iter].first <<
" - " << M_pattern[iter].second << std::endl;
121 M_pattern = std::vector< std::pair< UInt, UInt > > (M_nbPattern);
126 M_pattern[i] = std::pair<UInt, UInt> (i, i);
135 M_pattern[ip] = std::pair<UInt, UInt> (i, j);
143 for (
UInt j = 0; j < i; j++ )
145 M_pattern[ip] = std::pair<UInt, UInt> (i, j);
155 ASSERT (M_nbDofPerDimEntity[0] == 1,
" Inconsistent P1 iso P2 (Vertices)");
156 ASSERT (M_nbDofPerDimEntity[1] == 1,
" Inconsistent P1 iso P2 (Edges)");
157 ASSERT (M_nbDofPerDimEntity[2] == 0,
" Inconsistent P1 iso P2 (Faces)");
162 M_pattern = std::vector< std::pair < UInt, UInt > > (M_nbPattern);
165 for (
UInt diag (0); diag < 3; ++diag)
167 M_pattern[diag] = std::pair<UInt, UInt> (diag, diag);
171 M_pattern[3] = std::pair<UInt, UInt> (0, 2);
172 M_pattern[4] = std::pair<UInt, UInt> (1, 2);
175 M_pattern[5] = std::pair<UInt, UInt> (2, 0);
176 M_pattern[6] = std::pair<UInt, UInt> (2, 1);
183 ASSERT (M_nbDofPerDimEntity[0] == 1,
" Inconsistent P1 iso P2 (Vertices)");
184 ASSERT (M_nbDofPerDimEntity[1] == 1,
" Inconsistent P1 iso P2 (Edges)");
185 ASSERT (M_nbDofPerDimEntity[2] == 0,
" Inconsistent P1 iso P2 (Faces)");
190 M_pattern = std::vector< std::pair < UInt, UInt > > (M_nbPattern);
193 for (
UInt diag (0); diag < 6; ++diag)
195 M_pattern[diag] = std::pair<UInt, UInt> (diag, diag);
199 M_pattern[6] = std::pair<UInt, UInt> (0, 3);
200 M_pattern[7] = std::pair<UInt, UInt> (0, 5);
201 M_pattern[8] = std::pair<UInt, UInt> (1, 3);
202 M_pattern[9] = std::pair<UInt, UInt> (1, 4);
203 M_pattern[10] = std::pair<UInt, UInt> (2, 4);
204 M_pattern[11] = std::pair<UInt, UInt> (2, 5);
205 M_pattern[12] = std::pair<UInt, UInt> (3, 4);
206 M_pattern[13] = std::pair<UInt, UInt> (3, 5);
207 M_pattern[14] = std::pair<UInt, UInt> (4, 5);
210 M_pattern[15] = std::pair<UInt, UInt> (3, 0);
211 M_pattern[16] = std::pair<UInt, UInt> (3, 1);
212 M_pattern[17] = std::pair<UInt, UInt> (4, 1);
213 M_pattern[18] = std::pair<UInt, UInt> (4, 2);
214 M_pattern[19] = std::pair<UInt, UInt> (4, 3);
215 M_pattern[20] = std::pair<UInt, UInt> (5, 0);
216 M_pattern[21] = std::pair<UInt, UInt> (5, 2);
217 M_pattern[22] = std::pair<UInt, UInt> (5, 3);
218 M_pattern[23] = std::pair<UInt, UInt> (5, 4);
UInt M_nbDiag
Number of diagonal terms in the element matrix.
DofPatternType M_patternType
Type of the pattern stored.
UInt M_dim
dimension of the element (3 for a tetrahedra for example).
DofPatternType
Local pattern type.
DOFLocalPattern(const UInt &nbLocalDof, const UInt &nbDofPerVertex, const UInt &nbDofPerEdge, const UInt &nbDofPerFace, const UInt &nbDofPerVolume, const DofPatternType &patternType, UInt nbLocalCoor)
Full constructor.
void showMe(std::ostream &output=std::cout) const
The showMe method for the pattern.
void updateInverseJacobian(const UInt &iQuadPt)
void setupP1isoP2SegPattern()
Method for the P1isoP2 pattern for the segments (1D)
void setupStandardPattern()
Method to setup the standard pattern, i.e. with all degrees of freedom coupled.
DOFLocalPattern - A class to store the "couplings" between the basis functions.
void setupP1isoP2TriaPattern()
Method for the P1isoP2 pattern for the triangles (2D)
UInt M_nbLocalDof
Total number of degrees of freedom (equal to refEle::nbDof)
UInt M_nbUpper
Number of upper terms in the element matrix.
DOFLocalPattern(const DOFLocalPattern &localDofPattern)
Simple copy constructor.
UInt M_nbPattern
Number of non-zero terms in the element matrix.
uint32_type UInt
generic unsigned integer (used mainly for addressing)