17 #define snprintf _snprintf_s
37 MFEM_ABORT(
"unknown geometry type");
44 MFEM_ABORT(
"this method is not implemented in this derived class!");
52 if (!strcmp(name,
"Linear"))
56 else if (!strcmp(name,
"Quadratic"))
60 else if (!strcmp(name,
"QuadraticPos"))
64 else if (!strcmp(name,
"Cubic"))
68 else if (!strcmp(name,
"Const3D"))
72 else if (!strcmp(name,
"Const2D"))
76 else if (!strcmp(name,
"LinearDiscont2D"))
80 else if (!strcmp(name,
"GaussLinearDiscont2D"))
84 else if (!strcmp(name,
"P1OnQuad"))
88 else if (!strcmp(name,
"QuadraticDiscont2D"))
92 else if (!strcmp(name,
"QuadraticPosDiscont2D"))
96 else if (!strcmp(name,
"GaussQuadraticDiscont2D"))
100 else if (!strcmp(name,
"CubicDiscont2D"))
104 else if (!strcmp(name,
"LinearDiscont3D"))
108 else if (!strcmp(name,
"QuadraticDiscont3D"))
112 else if (!strcmp(name,
"LinearNonConf3D"))
116 else if (!strcmp(name,
"CrouzeixRaviart"))
120 else if (!strcmp(name,
"ND1_3D"))
124 else if (!strcmp(name,
"RT0_2D"))
128 else if (!strcmp(name,
"RT1_2D"))
132 else if (!strcmp(name,
"RT2_2D"))
136 else if (!strcmp(name,
"RT0_3D"))
140 else if (!strcmp(name,
"RT1_3D"))
144 else if (!strncmp(name,
"H1_Trace_", 9))
148 else if (!strncmp(name,
"H1_Trace@", 9))
153 else if (!strncmp(name,
"H1_", 3))
157 else if (!strncmp(name,
"H1Pos_Trace_", 12))
162 else if (!strncmp(name,
"H1Pos_", 6))
166 else if (!strncmp(name,
"H1Ser_", 6))
170 else if (!strncmp(name,
"H1@", 3))
175 else if (!strncmp(name,
"L2_T", 4))
178 else if (!strncmp(name,
"L2_", 3))
182 else if (!strncmp(name,
"L2Int_T", 7))
187 else if (!strncmp(name,
"L2Int_", 6))
193 else if (!strncmp(name,
"RT_Trace_", 9))
197 else if (!strncmp(name,
"RT_ValTrace_", 12))
202 else if (!strncmp(name,
"RT_Trace@", 9))
208 else if (!strncmp(name,
"RT_ValTrace@", 12))
214 else if (!strncmp(name,
"DG_Iface_", 9))
218 else if (!strncmp(name,
"DG_Iface@", 9))
224 else if (!strncmp(name,
"DG_IntIface_", 12))
229 else if (!strncmp(name,
"DG_IntIface@", 12))
235 else if (!strncmp(name,
"RT_", 3))
239 else if (!strncmp(name,
"RT@", 3))
245 else if (!strncmp(name,
"ND_Trace_", 9))
249 else if (!strncmp(name,
"ND_Trace@", 9))
255 else if (!strncmp(name,
"ND_", 3))
259 else if (!strncmp(name,
"ND@", 3))
265 else if (!strncmp(name,
"Local_", 6))
269 else if (!strncmp(name,
"NURBS", 5))
284 MFEM_ABORT(
"unknown FiniteElementCollection: " << name);
286 MFEM_VERIFY(!strcmp(fec->
Name(), name),
"input name: \"" << name
287 <<
"\" does not match the created collection name: \""
288 << fec->
Name() <<
'"');
296 MFEM_ABORT(
"Collection " << Name() <<
" does not support variable orders.");
303 if (p >= var_orders.Size())
305 var_orders.SetSize(p+1, NULL);
307 var_orders[
p] = Clone(p);
312 for (
int i = 0; i < var_orders.Size(); i++)
314 delete var_orders[i];
318 template <Geometry::Type geom>
323 nv = g_consts::NumVert;
324 ne = g_consts::NumEdges;
327 template <Geometry::Type geom,
typename v_t>
329 GetEdge(
int &nv, v_t &v,
int &ne,
int &e,
int &eo,
const int edge_info)
334 nv = e_consts::NumVert;
338 MFEM_ASSERT(0 <= e && e < g_consts::NumEdges,
"");
339 MFEM_ASSERT(0 <= eo && eo < e_consts::NumOrient,
"");
340 v[0] = e_consts::Orient[eo][0];
341 v[1] = e_consts::Orient[eo][1];
342 v[0] = g_consts::Edges[e][v[0]];
343 v[1] = g_consts::Edges[e][v[1]];
347 typename v_t,
typename e_t,
typename eo_t>
349 GetFace(
int &nv, v_t &v,
int &ne, e_t &e, eo_t &eo,
355 nv = f_consts::NumVert;
360 MFEM_ASSERT(0 <= f && f < g_consts::NumFaces,
"");
361 MFEM_ASSERT(0 <= fo && fo < f_consts::NumOrient,
"");
362 for (
int i = 0; i < f_consts::NumVert; i++)
364 v[i] = f_consts::Orient[fo][i];
365 v[i] = g_consts::FaceVert[
f][v[i]];
367 ne = f_consts::NumEdges;
368 for (
int i = 0; i < f_consts::NumEdges; i++)
370 int v0 = v[f_consts::Edges[i][0]];
371 int v1 = v[f_consts::Edges[i][1]];
373 if (v0 > v1) { swap(v0, v1); eor = 1; }
374 for (
int j = g_consts::VertToVert::I[v0];
true; j++)
376 MFEM_ASSERT(j < g_consts::VertToVert::I[v0+1],
377 "internal error, edge not found");
378 if (v1 == g_consts::VertToVert::J[j][0])
380 int en = g_consts::VertToVert::J[j][1];
400 "invalid Geom = " << Geom);
402 "invalid SDim = " << SDim <<
408 const int off = nvd*(Info/64);
410 for (
int i = 0; i < nvd; i++)
417 int v[4], e[4], eo[4],
f[1], fo[1];
418 int av = 0, nv = 0, ae = 0, ne = 0, nf = 0;
425 GetNVE<Geometry::SEGMENT>(av, ae);
426 GetEdge<Geometry::SEGMENT>(nv, v, ne, e[0], eo[0], Info);
432 GetNVE<Geometry::TRIANGLE>(av, ae);
436 GetEdge<Geometry::TRIANGLE>(nv, v, ne, e[0], eo[0], Info);
439 GetFace<Geometry::TRIANGLE,Geometry::TRIANGLE>(
440 nv, v, ne, e, eo, nf, f[0], fg[0], fo[0], Info);
450 GetNVE<Geometry::SQUARE>(av, ae);
454 GetEdge<Geometry::SQUARE>(nv, v, ne, e[0], eo[0], Info);
457 GetFace<Geometry::SQUARE,Geometry::SQUARE>(
458 nv, v, ne, e, eo, nf, f[0], fg[0], fo[0], Info);
468 GetNVE<Geometry::TETRAHEDRON>(av, ae);
472 GetEdge<Geometry::TETRAHEDRON>(nv, v, ne, e[0], eo[0], Info);
475 GetFace<Geometry::TETRAHEDRON,Geometry::TRIANGLE>(
476 nv, v, ne, e, eo, nf, f[0], fg[0], fo[0], Info);
486 GetNVE<Geometry::CUBE>(av, ae);
490 GetEdge<Geometry::CUBE>(nv, v, ne, e[0], eo[0], Info);
493 GetFace<Geometry::CUBE,Geometry::SQUARE>(
494 nv, v, ne, e, eo, nf, f[0], fg[0], fo[0], Info);
503 MFEM_ABORT(
"invalid Geom = " << Geom);
510 for (
int i = 0; i < nv; i++)
512 for (
int j = 0; j < nvd; j++)
514 dofs[i*nvd+j] = v[i]*nvd+j;
517 int l_off = nv*nvd, g_off = av*nvd;
522 for (
int i = 0; i < ne; i++)
526 for (
int j = 0; j < ned; j++)
528 dofs[l_off+i*ned+j] =
530 g_off+e[i]*ned+ed[j] :
531 -1-(g_off+e[i]*ned+(-1-ed[j]));
541 const int nfd = DofForGeometry(fg[0]);
543 for (
int i = 0; i < nf; i++)
545 const int *fd = DofOrderForOrientation(fg[i], fo[i]);
546 for (
int j = 0; j < nfd; j++)
548 dofs[l_off+i*nfd+j] =
550 g_off+f[i]*nfd+fd[j] :
551 -1-(g_off+f[i]*nfd+(-1-fd[j]));
562 ", SDim = " << SDim <<
" is not supported");
578 mfem_error (
"LinearFECollection: unknown geometry type.");
595 mfem_error (
"LinearFECollection: unknown geometry type.");
620 mfem_error (
"QuadraticFECollection: unknown geometry type.");
637 mfem_error (
"QuadraticFECollection: unknown geometry type.");
645 static int indexes[] = { 0 };
660 mfem_error (
"QuadraticPosFECollection: unknown geometry type.");
673 mfem_error (
"QuadraticPosFECollection: unknown geometry type.");
681 static int indexes[] = { 0 };
700 mfem_error (
"CubicFECollection: unknown geometry type.");
717 mfem_error (
"CubicFECollection: unknown geometry type.");
727 static int ind_pos[] = { 0, 1 };
728 static int ind_neg[] = { 1, 0 };
738 static int indexes[] = { 0 };
744 static int sq_ind[8][4] = {{0, 1, 2, 3}, {0, 2, 1, 3},
745 {2, 0, 3, 1}, {1, 0, 3, 2},
746 {3, 2, 1, 0}, {3, 1, 2, 0},
747 {1, 3, 0, 2}, {2, 3, 0, 1}
766 mfem_error (
"CrouzeixRaviartFECollection: unknown geometry type.");
780 mfem_error (
"CrouzeixRaviartFECollection: unknown geometry type.");
788 static int indexes[] = { 0 };
803 mfem_error (
"RT0_2DFECollection: unknown geometry type.");
817 mfem_error (
"RT0_2DFECollection: unknown geometry type.");
825 static int ind_pos[] = { 0 };
826 static int ind_neg[] = { -1 };
845 mfem_error (
"RT1_2DFECollection: unknown geometry type.");
859 mfem_error (
"RT1_2DFECollection: unknown geometry type.");
867 static int ind_pos[] = { 0, 1 };
868 static int ind_neg[] = { -2, -1 };
886 mfem_error (
"RT2_2DFECollection: unknown geometry type.");
900 mfem_error (
"RT2_2DFECollection: unknown geometry type.");
908 static int ind_pos[] = { 0, 1, 2 };
909 static int ind_neg[] = { -3, -2, -1 };
927 mfem_error (
"Const2DFECollection: unknown geometry type.");
941 mfem_error (
"Const2DFECollection: unknown geometry type.");
962 mfem_error (
"LinearDiscont2DFECollection: unknown geometry type.");
976 mfem_error (
"LinearDiscont2DFECollection: unknown geometry type.");
997 mfem_error (
"GaussLinearDiscont2DFECollection:"
998 " unknown geometry type.");
1013 mfem_error (
"GaussLinearDiscont2DFECollection:"
1014 " unknown geometry type.");
1031 mfem_error (
"P1OnQuadFECollection: unknown geometry type.");
1044 mfem_error (
"P1OnQuadFECollection: unknown geometry type.");
1065 mfem_error (
"QuadraticDiscont2DFECollection: unknown geometry type.");
1080 mfem_error (
"QuadraticDiscont2DFECollection: unknown geometry type.");
1100 mfem_error (
"QuadraticPosDiscont2DFECollection: unknown geometry type.");
1114 mfem_error (
"QuadraticPosDiscont2DFECollection: unknown geometry type.");
1130 mfem_error (
"GaussQuadraticDiscont2DFECollection:"
1131 " unknown geometry type.");
1146 mfem_error (
"GaussQuadraticDiscont2DFECollection:"
1147 " unknown geometry type.");
1168 mfem_error (
"CubicDiscont2DFECollection: unknown geometry type.");
1182 mfem_error (
"CubicDiscont2DFECollection: unknown geometry type.");
1205 mfem_error (
"LinearNonConf3DFECollection: unknown geometry type.");
1221 mfem_error (
"LinearNonConf3DFECollection: unknown geometry type.");
1229 static int indexes[] = { 0 };
1244 mfem_error (
"Const3DFECollection: unknown geometry type.");
1261 mfem_error (
"Const3DFECollection: unknown geometry type.");
1282 mfem_error (
"LinearDiscont3DFECollection: unknown geometry type.");
1298 mfem_error (
"LinearDiscont3DFECollection: unknown geometry type.");
1319 mfem_error (
"QuadraticDiscont3DFECollection: unknown geometry type.");
1336 mfem_error (
"QuadraticDiscont3DFECollection: unknown geometry type.");
1360 mfem_error (
"RefinedLinearFECollection: unknown geometry type.");
1376 mfem_error (
"RefinedLinearFECollection: unknown geometry type.");
1384 static int indexes[] = { 0 };
1398 mfem_error (
"ND1_3DFECollection: unknown geometry type.");
1414 mfem_error (
"ND1_3DFECollection: unknown geometry type.");
1422 static int ind_pos[] = { 0 };
1423 static int ind_neg[] = { -1 };
1443 mfem_error (
"RT0_3DFECollection: unknown geometry type.");
1459 mfem_error (
"RT0_3DFECollection: unknown geometry type.");
1467 static int ind_pos[] = { 0 };
1468 static int ind_neg[] = { -1 };
1490 mfem_error (
"RT1_3DFECollection: unknown geometry type.");
1505 mfem_error (
"RT1_3DFECollection: unknown geometry type.");
1515 static int sq_ind[8][4] =
1517 {0, 1, 2, 3}, {-1, -3, -2, -4},
1518 {2, 0, 3, 1}, {-2, -1, -4, -3},
1519 {3, 2, 1, 0}, {-4, -2, -3, -1},
1520 {1, 3, 0, 2}, {-3, -4, -1, -2}
1536 MFEM_VERIFY(p >= 1,
"H1_FECollection requires order >= 1.");
1537 MFEM_VERIFY(dim >= 0 && dim <= 3,
"H1_FECollection requires 0 <= dim <= 3.");
1539 const int pm1 = p - 1, pm2 = pm1 - 1, pm3 = pm2 - 1, pm4 = pm3 - 1;
1547 snprintf(
h1_name, 32,
"H1_%dD_P%d", dim, p);
1552 snprintf(
h1_name, 32,
"H1Pos_%dD_P%d", dim, p);
1557 snprintf(
h1_name, 32,
"H1Ser_%dD_P%d", dim, p);
1566 snprintf(
h1_name, 32,
"H1@%c_%dD_P%d",
1576 for (
int i = 0; i < 2; i++)
1580 for (
int i = 0; i < 6; i++)
1584 for (
int i = 0; i < 8; i++)
1588 for (
int i = 0; i < 24; i++)
1610 for (
int i = 0; i < pm1; i++)
1647 for (
int i = 1; i < 6; i++)
1652 for (
int j = 0; j < pm2; j++)
1654 for (
int i = 0; i + j < pm2; i++)
1656 int o = TriDof - ((pm1 - j)*(pm2 - j))/2 + i;
1657 int k = pm3 - j - i;
1659 TriDofOrd[1][o] = TriDof - ((pm1-j)*(pm2-j))/2 + k;
1660 TriDofOrd[2][o] = TriDof - ((pm1-i)*(pm2-i))/2 + k;
1661 TriDofOrd[3][o] = TriDof - ((pm1-k)*(pm2-k))/2 + i;
1662 TriDofOrd[4][o] = TriDof - ((pm1-k)*(pm2-k))/2 + j;
1663 TriDofOrd[5][o] = TriDof - ((pm1-i)*(pm2-i))/2 + j;
1668 for (
int i = 1; i < 8; i++)
1691 for (
int j = 0; j < pm3; j++)
1693 for (
int i = 0; i < pm3; i++)
1700 QuadDofOrd[4][o] = (pm4 - i) + (pm4 - j)*pm3;
1701 QuadDofOrd[5][o] = (pm4 - j) + (pm4 - i)*pm3;
1702 QuadDofOrd[6][o] = (pm4 - j) + i*pm3;
1703 QuadDofOrd[7][o] = i + (pm4 - j)*pm3;
1711 for (
int j = 0; j < pm1; j++)
1713 for (
int i = 0; i < pm1; i++)
1720 QuadDofOrd[4][o] = (pm2 - i) + (pm2 - j)*pm1;
1721 QuadDofOrd[5][o] = (pm2 - j) + (pm2 - i)*pm1;
1722 QuadDofOrd[6][o] = (pm2 - j) + i*pm1;
1723 QuadDofOrd[7][o] = i + (pm2 - j)*pm1;
1749 for (
int i = 1; i < 24; i++)
1754 for (
int k = 0; k < pm3; k++)
1756 for (
int j = 0; j + k < pm3; j++)
1758 for (
int i = 0; i + j + k < pm3; i++)
1760 int l = pm4 - k - j - i;
1761 int o = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1762 + (j * (2 * p - 5 - j - 2 * k)) / 2 + i;
1763 int o1 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1764 + (k * (2 * p - 5 - k - 2 * j)) / 2 + i;
1765 int o2 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1766 + (k * (2 * p - 5 - k - 2 * i)) / 2 + j;
1767 int o3 = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1768 + (i * (2 * p - 5 - i - 2 * k)) / 2 + j;
1769 int o4 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1770 + (i * (2 * p - 5 - i - 2 * j)) / 2 + k;
1771 int o5 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1772 + (j * (2 * p - 5 - j - 2 * i)) / 2 + k;
1773 int o6 = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1774 + (l * (2 * p - 5 - l - 2 * k)) / 2 + j;
1775 int o7 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1776 + (k * (2 * p - 5 - k - 2 * l)) / 2 + j;
1777 int o8 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1778 + (j * (2 * p - 5 - j - 2 * l)) / 2 + k;
1779 int o9 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1780 + (l * (2 * p - 5 - l - 2 * j)) / 2 + k;
1781 int o10 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1782 + (k * (2 * p - 5 - k - 2 * j)) / 2 + l;
1783 int o11 = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1784 + (j * (2 * p - 5 - j - 2 * k)) / 2 + l;
1785 int o12 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1786 + (l * (2 * p - 5 - l - 2 * i)) / 2 + k;
1787 int o13 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1788 + (i * (2 * p - 5 - i - 2 * l)) / 2 + k;
1789 int o14 = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1790 + (i * (2 * p - 5 - i - 2 * k)) / 2 + l;
1791 int o15 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1792 + (k * (2 * p - 5 - k - 2 * i)) / 2 + l;
1793 int o16 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1794 + (k * (2 * p - 5 - k - 2 * l)) / 2 + i;
1795 int o17 = TetDof - ((pm1 - k) * (pm2 - k) * (pm3 - k)) / 6
1796 + (l * (2 * p - 5 - l - 2 * k)) / 2 + i;
1797 int o18 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1798 + (j * (2 * p - 5 - j - 2 * i)) / 2 + l;
1799 int o19 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1800 + (i * (2 * p - 5 - i - 2 * j)) / 2 + l;
1801 int o20 = TetDof - ((pm1 - j) * (pm2 - j) * (pm3 - j)) / 6
1802 + (l * (2 * p - 5 - l - 2 * j)) / 2 + i;
1803 int o21 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1804 + (j * (2 * p - 5 - j - 2 * l)) / 2 + i;
1805 int o22 = TetDof - ((pm1 - l) * (pm2 - l) * (pm3 - l)) / 6
1806 + (i * (2 * p - 5 - i - 2 * l)) / 2 + j;
1807 int o23 = TetDof - ((pm1 - i) * (pm2 - i) * (pm3 - i)) / 6
1808 + (l * (2 * p - 5 - l - 2 * i)) / 2 + j;
1866 if (!strncmp(
h1_name,
"H1_", 3))
1870 else if (!strncmp(
h1_name,
"H1Pos_", 6))
1874 else if (!strncmp(
h1_name,
"H1@", 3))
1883 const int *dof_map = NULL;
1893 MFEM_ABORT(
"Geometry type " <<
Geometry::Name[GeomType] <<
" is not "
1925 snprintf(
h1_name, 32,
"H1_Trace_%dD_P%d", dim, p);
1929 snprintf(
h1_name, 32,
"H1Pos_Trace_%dD_P%d", dim, p);
1933 snprintf(
h1_name, 32,
"H1_Trace@%c_%dD_P%d",
1945 MFEM_VERIFY(p >= 0,
"L2_FECollection requires order >= 0.");
1948 const char *prefix = NULL;
1954 MFEM_ABORT(
"invalid map_type: " << map_type);
1959 snprintf(d_name, 32,
"%s_%dD_P%d", prefix, dim, p);
1962 snprintf(d_name, 32,
"%s_T%d_%dD_P%d", prefix, btype, dim, p);
1967 L2_Elements[g] = NULL;
1968 Tr_Elements[g] = NULL;
1970 for (
int i = 0; i < 2; i++)
1972 SegDofOrd[i] = NULL;
1974 for (
int i = 0; i < 6; i++)
1976 TriDofOrd[i] = NULL;
1978 for (
int i = 0; i < 24; i++)
1980 TetDofOrd[i] = NULL;
2003 const int pp1 = p + 1;
2004 SegDofOrd[0] =
new int[2*pp1];
2005 SegDofOrd[1] = SegDofOrd[0] + pp1;
2006 for (
int i = 0; i <=
p; i++)
2008 SegDofOrd[0][i] = i;
2009 SegDofOrd[1][i] = p - i;
2037 TriDofOrd[0] =
new int[6*TriDof];
2038 for (
int i = 1; i < 6; i++)
2040 TriDofOrd[i] = TriDofOrd[i-1] + TriDof;
2042 const int pp1 = p + 1, pp2 = pp1 + 1;
2043 for (
int j = 0; j <=
p; j++)
2045 for (
int i = 0; i + j <=
p; i++)
2047 int o = TriDof - ((pp2 - j)*(pp1 - j))/2 + i;
2049 TriDofOrd[0][o] = o;
2050 TriDofOrd[1][o] = TriDof - ((pp2-j)*(pp1-j))/2 + k;
2051 TriDofOrd[2][o] = TriDof - ((pp2-i)*(pp1-i))/2 + k;
2052 TriDofOrd[3][o] = TriDof - ((pp2-k)*(pp1-k))/2 + i;
2053 TriDofOrd[4][o] = TriDof - ((pp2-k)*(pp1-k))/2 + j;
2054 TriDofOrd[5][o] = TriDof - ((pp2-i)*(pp1-i))/2 + j;
2058 OtherDofOrd =
new int[QuadDof];
2059 for (
int j = 0; j < QuadDof; j++)
2097 const int MaxDof = std::max(TetDof, std::max(PriDof, HexDof));
2099 TetDofOrd[0] =
new int[24*TetDof];
2100 for (
int i = 1; i < 24; i++)
2102 TetDofOrd[i] = TetDofOrd[i-1] + TetDof;
2105 const int pp1 = p + 1, pp2 = pp1 + 1, pp3 = pp2 + 1;
2106 for (
int k = 0; k <=
p; k++)
2108 for (
int j = 0; j + k <=
p; j++)
2110 for (
int i = 0; i + j + k <=
p; i++)
2112 int l = p - k - j - i;
2113 int o = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2114 + (j * (2 * p + 3 - j - 2 * k)) / 2 + i;
2115 int o1 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2116 + (k * (2 * p + 3 - k - 2 * j)) / 2 + i;
2117 int o2 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2118 + (k * (2 * p + 3 - k - 2 * i)) / 2 + j;
2119 int o3 = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2120 + (i * (2 * p + 3 - i - 2 * k)) / 2 + j;
2121 int o4 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2122 + (i * (2 * p + 3 - i - 2 * j)) / 2 + k;
2123 int o5 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2124 + (j * (2 * p + 3 - j - 2 * i)) / 2 + k;
2125 int o6 = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2126 + (l * (2 * p + 3 - l - 2 * k)) / 2 + j;
2127 int o7 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2128 + (k * (2 * p + 3 - k - 2 * l)) / 2 + j;
2129 int o8 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2130 + (j * (2 * p + 3 - j - 2 * l)) / 2 + k;
2131 int o9 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2132 + (l * (2 * p + 3 - l - 2 * j)) / 2 + k;
2133 int o10 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2134 + (k * (2 * p + 3 - k - 2 * j)) / 2 + l;
2135 int o11 = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2136 + (j * (2 * p + 3 - j - 2 * k)) / 2 + l;
2137 int o12 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2138 + (l * (2 * p + 3 - l - 2 * i)) / 2 + k;
2139 int o13 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2140 + (i * (2 * p + 3 - i - 2 * l)) / 2 + k;
2141 int o14 = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2142 + (i * (2 * p + 3 - i - 2 * k)) / 2 + l;
2143 int o15 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2144 + (k * (2 * p + 3 - k - 2 * i)) / 2 + l;
2145 int o16 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2146 + (k * (2 * p + 3 - k - 2 * l)) / 2 + i;
2147 int o17 = TetDof - ((pp1 - k) * (pp2 - k) * (pp3 - k)) / 6
2148 + (l * (2 * p + 3 - l - 2 * k)) / 2 + i;
2149 int o18 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2150 + (j * (2 * p + 3 - j - 2 * i)) / 2 + l;
2151 int o19 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2152 + (i * (2 * p + 3 - i - 2 * j)) / 2 + l;
2153 int o20 = TetDof - ((pp1 - j) * (pp2 - j) * (pp3 - j)) / 6
2154 + (l * (2 * p + 3 - l - 2 * j)) / 2 + i;
2155 int o21 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2156 + (j * (2 * p + 3 - j - 2 * l)) / 2 + i;
2157 int o22 = TetDof - ((pp1 - l) * (pp2 - l) * (pp3 - l)) / 6
2158 + (i * (2 * p + 3 - i - 2 * l)) / 2 + j;
2159 int o23 = TetDof - ((pp1 - i) * (pp2 - i) * (pp3 - i)) / 6
2160 + (l * (2 * p + 3 - l - 2 * i)) / 2 + j;
2161 TetDofOrd[ 0][o] = o;
2162 TetDofOrd[ 1][o] = o1;
2163 TetDofOrd[ 2][o] = o2;
2164 TetDofOrd[ 3][o] = o3;
2165 TetDofOrd[ 4][o] = o4;
2166 TetDofOrd[ 5][o] = o5;
2167 TetDofOrd[ 6][o] = o6;
2168 TetDofOrd[ 7][o] = o7;
2169 TetDofOrd[ 8][o] = o8;
2170 TetDofOrd[ 9][o] = o9;
2171 TetDofOrd[10][o] = o10;
2172 TetDofOrd[11][o] = o11;
2173 TetDofOrd[12][o] = o12;
2174 TetDofOrd[13][o] = o13;
2175 TetDofOrd[14][o] = o14;
2176 TetDofOrd[15][o] = o15;
2177 TetDofOrd[16][o] = o16;
2178 TetDofOrd[17][o] = o17;
2179 TetDofOrd[18][o] = o18;
2180 TetDofOrd[19][o] = o19;
2181 TetDofOrd[20][o] = o20;
2182 TetDofOrd[21][o] = o21;
2183 TetDofOrd[22][o] = o22;
2184 TetDofOrd[23][o] = o23;
2188 OtherDofOrd =
new int[MaxDof];
2189 for (
int j = 0; j < MaxDof; j++)
2196 mfem::err <<
"L2_FECollection::L2_FECollection : dim = "
2208 return (Or > 0) ? SegDofOrd[0] : SegDofOrd[1];
2211 return TriDofOrd[Or%6];
2214 return TetDofOrd[Or%24];
2217 return (Or == 0) ? OtherDofOrd : NULL;
2223 delete [] OtherDofOrd;
2224 delete [] SegDofOrd[0];
2225 delete [] TriDofOrd[0];
2226 delete [] TetDofOrd[0];
2229 delete L2_Elements[i];
2230 delete Tr_Elements[i];
2236 const int cb_type,
const int ob_type)
2243 MFEM_VERIFY(p >= 0,
"RT_FECollection requires order >= 0.");
2251 MFEM_ABORT(
"unknown closed BasisType: " << cb_name);
2257 MFEM_ABORT(
"unknown open BasisType: " << ob_name);
2265 snprintf(
rt_name, 32,
"RT_%dD_P%d", dim, p);
2273 const int pp1 = p + 1;
2296 MFEM_ABORT(
"invalid dim = " << dim);
2303 const int map_type,
const bool signs,
2312 MFEM_ABORT(
"Invalid open basis type: " << ob_name);
2324 "invalid open point type");
2326 const int pp1 = p + 1, pp2 = p + 2;
2334 for (
int i = 0; i < 2; i++)
2338 for (
int i = 0; i < 6; i++)
2342 for (
int i = 0; i < 8; i++)
2356 for (
int i = 0; i <=
p; i++)
2359 SegDofOrd[1][i] = signs ? (-1 - (p - i)) : (p - i);
2376 for (
int i = 1; i < 6; i++)
2382 for (
int j = 0; j <=
p; j++)
2384 for (
int i = 0; i + j <=
p; i++)
2386 int o = TriDof - ((pp2 - j)*(pp1 - j))/2 + i;
2389 TriDofOrd[1][o] = -1-(TriDof-((pp2-j)*(pp1-j))/2+k);
2390 TriDofOrd[2][o] = TriDof-((pp2-i)*(pp1-i))/2+k;
2391 TriDofOrd[3][o] = -1-(TriDof-((pp2-k)*(pp1-k))/2+i);
2392 TriDofOrd[4][o] = TriDof-((pp2-k)*(pp1-k))/2+j;
2393 TriDofOrd[5][o] = -1-(TriDof-((pp2-i)*(pp1-i))/2+j);
2396 for (
int k = 1; k < 6; k += 2)
2398 TriDofOrd[k][o] = -1 - TriDofOrd[k][o];
2406 for (
int i = 1; i < 8; i++)
2411 for (
int j = 0; j <=
p; j++)
2413 for (
int i = 0; i <=
p; i++)
2420 QuadDofOrd[4][o] = (p - i) + (p - j)*pp1;
2421 QuadDofOrd[5][o] = -1 - ((p - j) + (p - i)*pp1);
2422 QuadDofOrd[6][o] = (p - j) + i*pp1;
2423 QuadDofOrd[7][o] = -1 - (i + (p - j)*pp1);
2426 for (
int k = 1; k < 8; k += 2)
2428 QuadDofOrd[k][o] = -1 - QuadDofOrd[k][o];
2457 if (!strncmp(
rt_name,
"RT_", 3))
2487 const char *prefix =
2489 char ob_str[3] = {
'\0',
'\0',
'\0' };
2496 snprintf(
rt_name, 32,
"%s%s_%dD_P%d", prefix, ob_str, dim, p);
2498 MFEM_VERIFY(dim == 2 || dim == 3,
"Wrong dimension, dim = " << dim);
2507 MFEM_VERIFY(dim == 2 || dim == 3,
"Wrong dimension, dim = " << dim);
2509 const char *prefix =
2513 snprintf(
rt_name, 32,
"%s_%dD_P%d", prefix, dim, p);
2517 snprintf(
rt_name, 32,
"%s@%c_%dD_P%d", prefix,
2523 const int cb_type,
const int ob_type)
2529 MFEM_VERIFY(p >= 1,
"ND_FECollection requires order >= 1.");
2530 MFEM_VERIFY(dim >= 1 && dim <= 3,
"ND_FECollection requires 1 <= dim <= 3.");
2532 const int pm1 = p - 1, pm2 = p - 2;
2537 snprintf(
nd_name, 32,
"ND_%dD_P%d", dim, p);
2550 for (
int i = 0; i < 2; i++)
2554 for (
int i = 0; i < 6; i++)
2558 for (
int i = 0; i < 8; i++)
2571 MFEM_ABORT(
"Invalid open basis point type: " << ob_name);
2576 MFEM_ABORT(
"Invalid closed basis point type: " << cb_name);
2586 for (
int i = 0; i <
p; i++)
2605 for (
int i = 1; i < 8; i++)
2610 for (
int j = 0; j < pm1; j++)
2612 for (
int i = 0; i <
p; i++)
2615 int d2 = p*pm1 + j + i*pm1;
2625 QuadDofOrd[2][d1] = -1 - (p*pm1 + j + (pm1 - i)*pm1);
2629 QuadDofOrd[3][d2] = p*pm1 + (pm2 - j) + i*pm1;
2631 QuadDofOrd[4][d1] = -1 - ((pm1 - i) + (pm2 - j)*
p);
2632 QuadDofOrd[4][d2] = -1 - (p*pm1 + (pm2 - j) + (pm1 - i)*pm1);
2634 QuadDofOrd[5][d1] = -1 - (p*pm1 + (pm2 - j) + (pm1 - i)*pm1);
2635 QuadDofOrd[5][d2] = -1 - ((pm1 - i) + (pm2 - j)*
p);
2639 QuadDofOrd[6][d1] = p*pm1 + (pm2 - j) + i*pm1;
2640 QuadDofOrd[6][d2] = -1 - ((pm1 - i) + j*p);
2642 QuadDofOrd[7][d1] = i + (pm2 - j)*p;
2643 QuadDofOrd[7][d2] = -1 - (p*pm1 + j + (pm1 - i)*pm1);
2649 for (
int i = 1; i < 6; i++)
2655 for (
int j = 0; j <= pm2; j++)
2657 for (
int i = 0; i + j <= pm2; i++)
2659 int k1 = p*pm1 - (p - j)*(pm1 - j) + 2*i;
2660 int k2 = p*pm1 - (p - i)*(pm1 - i) + 2*j;
2695 if (Or != 0 && Or != 5)
2697 MFEM_ABORT(
"triangle face orientation " << Or <<
" is not supported! "
2698 "Use Mesh::ReorientTetMesh to fix it.");
2749 snprintf(
nd_name, 32,
"ND_Trace_%dD_P%d", dim, p);
2753 snprintf(
nd_name, 32,
"ND_Trace@%c%c_%dD_P%d",
2762 snprintf(d_name, 32,
"Local_%s", fe_name);
2764 Local_Element = NULL;
2766 if (!strcmp(fe_name,
"BiCubic2DFiniteElement") ||
2767 !strcmp(fe_name,
"Quad_Q3"))
2772 else if (!strcmp(fe_name,
"Nedelec1HexFiniteElement") ||
2773 !strcmp(fe_name,
"Hex_ND1"))
2778 else if (!strncmp(fe_name,
"H1_", 3))
2783 else if (!strncmp(fe_name,
"H1Pos_", 6))
2788 else if (!strncmp(fe_name,
"L2_", 3))
2795 mfem::err <<
"Local_FECollection::Local_FECollection : fe_name = "
2818 snprintf(name, 16,
"NURBS%i", Order);
2822 snprintf(name, 16,
"NURBS");
2828 delete ParallelepipedFE;
2829 delete QuadrilateralFE;
2842 mfem_error (
"NURBSFECollection: unknown geometry type.");
2849 mfem_error(
"NURBSFECollection::DofForGeometry");
2856 mfem_error(
"NURBSFECollection::DofOrderForOrientation");
2862 MFEM_ABORT(
"NURBS finite elements can not be statically condensed!");
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Abstract class for all finite elements.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Arbitrary order non-uniform rational B-splines (NURBS) finite elements.
H1_Trace_FECollection(const int p, const int dim, const int btype=BasisType::GaussLobatto)
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Arbitrary order L2 elements in 3D on a wedge.
Arbitrary order Nedelec elements in 1D on a segment.
int Size() const
Return the logical size of the array.
Piecewise-cubic discontinuous finite elements in 2D. This class is kept only for backward compatibili...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Version of QuadraticDiscont2DFECollection with dofs in the Gaussian points.
int RT_dof[Geometry::NumGeom]
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
FiniteElement * ND_Elements[Geometry::NumGeom]
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
static int Check(int b_type)
If the input does not represents a valid BasisType, abort with an error; otherwise return the input...
Arbitrary order L2 elements in 2D utilizing the Bernstein basis on a triangle.
virtual FiniteElementCollection * GetTraceCollection() const
virtual ~NURBSFECollection()
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
RT_FECollection(const int p, const int dim, const int map_type, const bool signs, const int ob_type=BasisType::GaussLegendre)
Arbitrary order L2 elements in 2D on a triangle.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
FiniteElementCollection * GetTraceCollection() const
Arbitrary order L2 elements in 3D on a cube.
Integrated GLL indicator functions.
virtual ~L2_FECollection()
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Arbitrary order L2 elements in 1D utilizing the Bernstein basis on a segment.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
T * GetData()
Returns the data.
Arbitrary H1 elements in 2D on a square.
Piecewise-(bi/tri)linear continuous finite elements.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
A 0D point finite element.
virtual int DofForGeometry(Geometry::Type GeomType) const
static int GetQuadrature1D(int b_type)
Get the corresponding Quadrature1D constant, when that makes sense; otherwise return Quadrature1D::In...
Arbitrary order Nedelec elements in 3D on a tetrahedron.
FiniteElementCollection * GetTraceCollection() const
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
const int base_p
Order as returned by GetOrder().
Second order Raviart-Thomas finite elements in 2D. This class is kept only for backward compatibility...
void InitFaces(const int p, const int dim, const int map_type, const bool signs)
FiniteElementCollection * GetTraceCollection() const
DG_Interface_FECollection(const int p, const int dim, const int map_type=FiniteElement::VALUE, const int ob_type=BasisType::GaussLegendre)
static const char * Name(int b_type)
Check and convert a BasisType constant to a string identifier.
A 2D bi-cubic element on a square with uniformly spaces nodes.
Arbitrary order Nedelec elements in 2D on a triangle.
static int GetType(char b_ident)
Convert char basis identifier to a BasisType constant.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
NURBSFECollection(int Order=VariableOrder)
The parameter Order must be either a positive number, for fixed order, or VariableOrder (default)...
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
void SetMapType(int M)
Set the FiniteElement::MapType of the element to either VALUE or INTEGRAL. Also sets the FiniteElemen...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual ~RT_FECollection()
L2_FECollection(const int p, const int dim, const int btype=BasisType::GaussLegendre, const int map_type=FiniteElement::VALUE)
Class for standard nodal finite elements.
Piecewise-(bi)cubic continuous finite elements.
PointFiniteElement PointFE
virtual int DofForGeometry(Geometry::Type GeomType) const
const int * GetDofMap(Geometry::Type GeomType) const
Get the Cartesian to local H1 dof map.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Arbitrary order L2 elements in 2D utilizing the Bernstein basis on a square.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
int HasFaceDofs(Geometry::Type geom, int p) const
int H1_dof[Geometry::NumGeom]
double f(const Vector &xvec)
Arbitrary L2 elements in 1D on a segment.
static void GetFace(int &nv, v_t &v, int &ne, e_t &e, eo_t &eo, int &nf, int &f, Geometry::Type &fg, int &fo, const int face_info)
FiniteElement * RT_Elements[Geometry::NumGeom]
static const int Dimension[NumGeom]
virtual int DofForGeometry(Geometry::Type GeomType) const
static void GetNVE(int &nv, int &ne)
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Piecewise-linear discontinuous finite elements in 2D. This class is kept only for backward compatibil...
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
H1_FECollection(const int p, const int dim=3, const int btype=BasisType::GaussLobatto)
ND_Trace_FECollection(const int p, const int dim, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Arbitrary order "H^{1/2}-conforming" trace finite elements defined on the interface between mesh elem...
ND_FECollection(const int p, const int dim, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Discontinuous collection defined locally by a given finite element.
Arbitrary order H(curl)-trace finite elements defined on the interface between mesh elements (faces...
Version of QuadraticDiscont2DFECollection with positive basis functions.
virtual ~ND_FECollection()
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Array< FiniteElementCollection * > var_orders
Third order Raviart-Thomas finite elements in 2D. This class is kept only for backward compatibility...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
First order Raviart-Thomas finite elements in 3D. This class is kept only for backward compatibility...
virtual int DofForGeometry(Geometry::Type GeomType) const
void SubDofOrder(Geometry::Type Geom, int SDim, int Info, Array< int > &dofs) const
Get the local dofs for a given sub-manifold.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual int DofForGeometry(Geometry::Type GeomType) const
Version of QuadraticFECollection with positive basis functions.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual ~H1_FECollection()
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Piecewise-constant discontinuous finite elements in 3D. This class is kept only for backward compatib...
Arbitrary order H1 elements in 3D on a tetrahedron.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
FiniteElementCollection * GetTraceCollection() const
Piecewise-constant discontinuous finite elements in 2D. This class is kept only for backward compatib...
FiniteElement * H1_Elements[Geometry::NumGeom]
static const char * Name[NumGeom]
Piecewise-linear nonconforming finite elements in 3D.
Arbitrary order H1 elements in 3D utilizing the Bernstein basis on a wedge.
Crouzeix-Raviart nonconforming elements in 2D.
class H1_WedgeElement WedgeFE
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
Arbitrary order H(div)-conforming Raviart-Thomas finite elements.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Arbitrary order L2 elements in 3D on a tetrahedron.
static void GetEdge(int &nv, v_t &v, int &ne, int &e, int &eo, const int edge_info)
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
double p(const Vector &x, double t)
static int CheckClosed(int type)
If the Quadrature1D type is not closed return Invalid; otherwise return type.
Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron.
void SetOrder(int Order) const
Set the order and the name, based on the given Order: either a positive number for fixed order...
virtual int DofForGeometry(Geometry::Type GeomType) const
int GetDof() const
Returns the number of degrees of freedom in the finite element.
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Arbitrary order H1 elements in 3D utilizing the Bernstein basis on a cube.
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
virtual int DofForGeometry(Geometry::Type GeomType) const
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
Piecewise-quadratic discontinuous finite elements in 3D. This class is kept only for backward compati...
Arbitrary order L2 elements in 3D utilizing the Bernstein basis on a wedge.
virtual int DofForGeometry(Geometry::Type GeomType) const
Arbitrary H1 elements in 3D on a cube.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
class Linear3DFiniteElement TetrahedronFE
const Array< int > & GetLexicographicOrdering() const
Get an Array<int> that maps lexicographically ordered indices to the indices of the respective nodes/...
Arbitrary order Raviart-Thomas elements in 2D on a triangle.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Linear2DFiniteElement TriangleFE
static int CheckOpen(int type)
If the Quadrature1D type is not open return Invalid; otherwise return type.
virtual int DofForGeometry(Geometry::Type GeomType) const
Version of LinearDiscont2DFECollection with dofs in the Gaussian points.
static FiniteElementCollection * New(const char *name)
Factory method: return a newly allocated FiniteElementCollection according to the given name...
static char GetChar(int b_type)
Check and convert a BasisType constant to a char basis identifier.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual FiniteElementCollection * Clone(int p) const
Instantiate a new collection of the same type with a different order.
Arbitrary order H1-conforming (continuous) finite elements with positive basis functions.
Lowest order Nedelec finite elements in 3D. This class is kept only for backward compatibility, consider using the new ND_FECollection instead.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual const char * Name() const
Arbitrary order Nedelec elements in 2D on a square.
virtual int DofForGeometry(Geometry::Type GeomType) const
void InitVarOrder(int p) const
Arbitrary order H1 serendipity elements in 2D on a quad.
Arbitrary order Raviart-Thomas elements in 2D on a square.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual int DofForGeometry(Geometry::Type GeomType) const
Arbitrary order H1 elements in 2D on a triangle.
Piecewise-linear discontinuous finite elements in 3D. This class is kept only for backward compatibil...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
Arbitrary order L2 elements in 2D on a square.
Arbitrary H1 elements in 1D.
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
RT_Trace_FECollection(const int p, const int dim, const int map_type=FiniteElement::INTEGRAL, const int ob_type=BasisType::GaussLegendre)
Arbitrary order H1 elements in 1D utilizing the Bernstein basis.
virtual int DofForGeometry(Geometry::Type GeomType) const
Piecewise-(bi)quadratic continuous finite elements.
First order Raviart-Thomas finite elements in 2D. This class is kept only for backward compatibility...
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
Arbitrary order Nedelec elements in 3D on a cube.
Arbitrary order H1 elements in 2D utilizing the Bernstein basis on a square.
Arbitrary order L2 elements in 3D utilizing the Bernstein basis on a cube.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
BiLinear2DFiniteElement QuadrilateralFE
Arbitrary order H(curl)-conforming Nedelec finite elements.
virtual int DofForGeometry(Geometry::Type GeomType) const
Arbitrary order "H^{-1/2}-conforming" face finite elements defined on the interface between mesh elem...
Arbitrary order H1-conforming (continuous) finite elements.
Second order Raviart-Thomas finite elements in 3D. This class is kept only for backward compatibility...
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
virtual int DofForGeometry(Geometry::Type GeomType) const
TriLinear3DFiniteElement HexahedronFE
Arbitrary order H1 elements in 3D on a wedge.
Piecewise-quadratic discontinuous finite elements in 2D. This class is kept only for backward compati...
virtual ~FiniteElementCollection()
Serendipity basis (squares / cubes)
virtual int DofForGeometry(Geometry::Type GeomType) const
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Local_FECollection(const char *fe_name)
Arbitrary order Raviart-Thomas elements in 3D on a cube.
virtual int DofForGeometry(Geometry::Type GeomType) const
Linear (P1) finite elements on quadrilaterals.
Linear1DFiniteElement SegmentFE
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
An arbitrary order 3D NURBS element on a cube.
An arbitrary order 1D NURBS element on a segment.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
int ND_dof[Geometry::NumGeom]
An arbitrary order 2D NURBS element on a square.
Arbitrary order H1 elements in 2D utilizing the Bernstein basis on a triangle.
A 3D 1st order Nedelec element on a cube.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const
Arbitrary order "L2-conforming" discontinuous finite elements.