16 #include "../bilininteg.hpp" 17 #include "../lininteg.hpp" 18 #include "../coefficient.hpp" 28 for (
int i = 0; i < dof; i++)
32 dofs(i) = coeff.
Eval(Trans, ip);
42 for (
int i = 0; i < dof; i++)
46 vc.
Eval (x, Trans, ip);
47 for (
int j = 0; j < x.Size(); j++)
60 if (nfe && dof == nfe->
GetDof())
76 pos_mass_inv.
Mult(mixed_mass, I);
82 const int dims,
const int p,
const DofMapType dmtype)
91 internal::GetTensorFaceMap(
dim,
order, face_id, face_map);
121 double x = ip.
x, y = ip.
y;
122 double l1x, l2x, l3x, l1y, l2y, l3y;
124 l1x = (1. - x) * (1. - x);
125 l2x = 2. * x * (1. - x);
127 l1y = (1. - y) * (1. - y);
128 l2y = 2. * y * (1. - y);
131 shape(0) = l1x * l1y;
132 shape(4) = l2x * l1y;
133 shape(1) = l3x * l1y;
134 shape(7) = l1x * l2y;
135 shape(8) = l2x * l2y;
136 shape(5) = l3x * l2y;
137 shape(3) = l1x * l3y;
138 shape(6) = l2x * l3y;
139 shape(2) = l3x * l3y;
145 double x = ip.
x, y = ip.
y;
146 double l1x, l2x, l3x, l1y, l2y, l3y;
147 double d1x, d2x, d3x, d1y, d2y, d3y;
149 l1x = (1. - x) * (1. - x);
150 l2x = 2. * x * (1. - x);
152 l1y = (1. - y) * (1. - y);
153 l2y = 2. * y * (1. - y);
163 dshape(0,0) = d1x * l1y;
164 dshape(0,1) = l1x * d1y;
166 dshape(4,0) = d2x * l1y;
167 dshape(4,1) = l2x * d1y;
169 dshape(1,0) = d3x * l1y;
170 dshape(1,1) = l3x * d1y;
172 dshape(7,0) = d1x * l2y;
173 dshape(7,1) = l1x * d2y;
175 dshape(8,0) = d2x * l2y;
176 dshape(8,1) = l2x * d2y;
178 dshape(5,0) = d3x * l2y;
179 dshape(5,1) = l3x * d2y;
181 dshape(3,0) = d1x * l3y;
182 dshape(3,1) = l1x * d3y;
184 dshape(6,0) = d2x * l3y;
185 dshape(6,1) = l2x * d3y;
187 dshape(2,0) = d3x * l3y;
188 dshape(2,1) = l3x * d3y;
196 Vector xx(&tr_ip.
x, 2), shape(
s, 9);
198 for (
int i = 0; i < 9; i++)
202 for (
int j = 0; j < 9; j++)
203 if (fabs(I(i,j) =
s[j]) < 1.0e-12)
208 for (
int i = 0; i < 9; i++)
211 d[4] = 2. * d[4] - 0.5 * (d[0] + d[1]);
212 d[5] = 2. * d[5] - 0.5 * (d[1] + d[2]);
213 d[6] = 2. * d[6] - 0.5 * (d[2] + d[3]);
214 d[7] = 2. * d[7] - 0.5 * (d[3] + d[0]);
215 d[8] = 4. * d[8] - 0.5 * (d[4] + d[5] + d[6] + d[7]) -
216 0.25 * (d[0] + d[1] + d[2] + d[3]);
225 for (
int i = 0; i < 9; i++)
229 d[i] = coeff.
Eval(Trans, ip);
231 d[4] = 2. * d[4] - 0.5 * (d[0] + d[1]);
232 d[5] = 2. * d[5] - 0.5 * (d[1] + d[2]);
233 d[6] = 2. * d[6] - 0.5 * (d[2] + d[3]);
234 d[7] = 2. * d[7] - 0.5 * (d[3] + d[0]);
235 d[8] = 4. * d[8] - 0.5 * (d[4] + d[5] + d[6] + d[7]) -
236 0.25 * (d[0] + d[1] + d[2] + d[3]);
246 for (
int i = 0; i < 9; i++)
250 vc.
Eval (x, Trans, ip);
251 for (
int j = 0; j < x.Size(); j++)
256 for (
int j = 0; j < x.Size(); j++)
258 double *d = &dofs(9*j);
260 d[4] = 2. * d[4] - 0.5 * (d[0] + d[1]);
261 d[5] = 2. * d[5] - 0.5 * (d[1] + d[2]);
262 d[6] = 2. * d[6] - 0.5 * (d[2] + d[3]);
263 d[7] = 2. * d[7] - 0.5 * (d[3] + d[0]);
264 d[8] = 4. * d[8] - 0.5 * (d[4] + d[5] + d[6] + d[7]) -
265 0.25 * (d[0] + d[1] + d[2] + d[3]);
281 const double x = ip.
x, x1 = 1. - x;
285 shape(2) = 2. * x * x1;
291 const double x = ip.
x;
293 dshape(0,0) = 2. * x - 2.;
294 dshape(1,0) = 2. * x;
295 dshape(2,0) = 2. - 4. * x;
302 #ifndef MFEM_THREAD_SAFE 311 for (
int i = 1; i <
p; i++)
322 #ifdef MFEM_THREAD_SAFE 329 shape(0) = shape_x(0);
330 shape(1) = shape_x(
p);
331 for (
int i = 1; i <
p; i++)
333 shape(i+1) = shape_x(i);
342 #ifdef MFEM_THREAD_SAFE 349 dshape(0,0) = dshape_x(0);
350 dshape(1,0) = dshape_x(
p);
351 for (
int i = 1; i <
p; i++)
353 dshape(i+1,0) = dshape_x(i);
367 #ifndef MFEM_THREAD_SAFE 368 const int p1 =
p + 1;
377 for (
int j = 0; j <=
p; j++)
378 for (
int i = 0; i <=
p; i++)
389 #ifdef MFEM_THREAD_SAFE 397 for (
int o = 0, j = 0; j <=
p; j++)
398 for (
int i = 0; i <=
p; i++)
400 shape(
dof_map[o++]) = shape_x(i)*shape_y(j);
409 #ifdef MFEM_THREAD_SAFE 410 Vector shape_x(
p+1), shape_y(
p+1), dshape_x(
p+1), dshape_y(
p+1);
417 for (
int o = 0, j = 0; j <=
p; j++)
418 for (
int i = 0; i <=
p; i++)
420 dshape(
dof_map[o],0) = dshape_x(i)* shape_y(j);
421 dshape(
dof_map[o],1) = shape_x(i)*dshape_y(j); o++;
435 #ifndef MFEM_THREAD_SAFE 436 const int p1 =
p + 1;
447 for (
int k = 0; k <=
p; k++)
448 for (
int j = 0; j <=
p; j++)
449 for (
int i = 0; i <=
p; i++)
459 #ifdef MFEM_THREAD_SAFE 460 Vector shape_x(
p+1), shape_y(
p+1), shape_z(
p+1);
467 for (
int o = 0, k = 0; k <=
p; k++)
468 for (
int j = 0; j <=
p; j++)
469 for (
int i = 0; i <=
p; i++)
471 shape(
dof_map[o++]) = shape_x(i)*shape_y(j)*shape_z(k);
480 #ifdef MFEM_THREAD_SAFE 481 Vector shape_x(
p+1), shape_y(
p+1), shape_z(
p+1);
482 Vector dshape_x(
p+1), dshape_y(
p+1), dshape_z(
p+1);
489 for (
int o = 0, k = 0; k <=
p; k++)
490 for (
int j = 0; j <=
p; j++)
491 for (
int i = 0; i <=
p; i++)
493 dshape(
dof_map[o],0) = dshape_x(i)* shape_y(j)* shape_z(k);
494 dshape(
dof_map[o],1) = shape_x(i)*dshape_y(j)* shape_z(k);
495 dshape(
dof_map[o],2) = shape_x(i)* shape_y(j)*dshape_z(k); o++;
510 #ifndef MFEM_THREAD_SAFE 520 Index(
int p) { p2p3 = 2*
p + 3; }
521 int operator()(
int i,
int j) {
return ((p2p3-j)*j)/2+i; }
535 for (
int i = 1; i <
p; i++)
540 for (
int i = 1; i <
p; i++)
545 for (
int i = 1; i <
p; i++)
552 for (
int j = 1; j <
p; j++)
553 for (
int i = 1; i + j <
p; i++)
562 const int p,
const double l1,
const double l2,
double *shape)
564 const double l3 = 1. - l1 - l2;
574 for (
int o = 0, j = 0; j <=
p; j++)
578 for (
int i = 0; i <=
p - j; i++)
588 const int p,
const double l1,
const double l2,
589 double *dshape_1d,
double *dshape)
591 const int dof = ((
p + 1)*(
p + 2))/2;
592 const double l3 = 1. - l1 - l2;
596 for (
int o = 0, j = 0; j <=
p; j++)
600 for (
int i = 0; i <=
p - j; i++)
607 for (
int i = 0; i <=
p; i++)
611 for (
int o = i, j = 0; j <=
p - i; j++)
623 #ifdef MFEM_THREAD_SAFE 627 for (
int i = 0; i <
dof; i++)
636 #ifdef MFEM_THREAD_SAFE 641 for (
int d = 0; d < 2; d++)
643 for (
int i = 0; i <
dof; i++)
655 #ifndef MFEM_THREAD_SAFE 665 int tri(
int k) {
return (k*(k + 1))/2; }
666 int tet(
int k) {
return (k*(k + 1)*(k + 2))/6; }
667 Index(
int p_) {
p = p_;
dof = tet(
p + 1); }
668 int operator()(
int i,
int j,
int k)
669 {
return dof - tet(
p - k) - tri(
p + 1 - k - j) + i; }
685 for (
int i = 1; i <
p; i++)
690 for (
int i = 1; i <
p; i++)
695 for (
int i = 1; i <
p; i++)
700 for (
int i = 1; i <
p; i++)
705 for (
int i = 1; i <
p; i++)
710 for (
int i = 1; i <
p; i++)
717 for (
int j = 1; j <
p; j++)
718 for (
int i = 1; i + j <
p; i++)
723 for (
int j = 1; j <
p; j++)
724 for (
int i = 1; i + j <
p; i++)
729 for (
int j = 1; j <
p; j++)
730 for (
int i = 1; i + j <
p; i++)
735 for (
int j = 1; j <
p; j++)
736 for (
int i = 1; i + j <
p; i++)
743 for (
int k = 1; k <
p; k++)
744 for (
int j = 1; j + k <
p; j++)
745 for (
int i = 1; i + j + k <
p; i++)
754 const int p,
const double l1,
const double l2,
const double l3,
757 const double l4 = 1. - l1 - l2 - l3;
766 for (
int o = 0, k = 0; k <=
p; k++)
769 const double ek = bp[k]*l3k;
771 for (
int j = 0; j <=
p - k; j++)
774 double ekj = ek*bpk[j]*l2j;
775 for (
int i = 0; i <=
p - k - j; i++)
787 const int p,
const double l1,
const double l2,
const double l3,
788 double *dshape_1d,
double *dshape)
790 const int dof = ((
p + 1)*(
p + 2)*(
p + 3))/6;
791 const double l4 = 1. - l1 - l2 - l3;
799 for (
int o = 0, k = 0; k <=
p; k++)
802 const double ek = bp[k]*l3k;
804 for (
int j = 0; j <=
p - k; j++)
807 double ekj = ek*bpk[j]*l2j;
808 for (
int i = 0; i <=
p - k - j; i++)
821 for (
int ok = 0, k = 0; k <=
p; k++)
824 const double ek = bp[k]*l3k;
826 for (
int i = 0; i <=
p - k; i++)
829 double eki = ek*bpk[i]*l1i;
831 for (
int j = 0; j <=
p - k - i; j++)
839 ok += ((
p - k + 2)*(
p - k + 1))/2;
846 for (
int j = 0; j <=
p; j++)
849 const double ej = bp[j]*l2j;
851 for (
int i = 0; i <=
p - j; i++)
854 double eji = ej*bpj[i]*l1i;
855 int m = ((
p + 2)*(
p + 1))/2;
856 int n = ((
p - j + 2)*(
p - j + 1))/2;
857 for (
int o = i, k = 0; k <=
p - j - i; k++)
875 #ifdef MFEM_THREAD_SAFE 879 for (
int i = 0; i <
dof; i++)
888 #ifdef MFEM_THREAD_SAFE 893 for (
int d = 0; d < 3; d++)
895 for (
int i = 0; i <
dof; i++)
909 #ifndef MFEM_THREAD_SAFE 929 for (
int i=1; i<
p; i++)
931 t_dof[5 + 0 * ne + i] = 2 + 0 * ne + i;
s_dof[5 + 0 * ne + i] = 0;
932 t_dof[5 + 1 * ne + i] = 2 + 1 * ne + i;
s_dof[5 + 1 * ne + i] = 0;
933 t_dof[5 + 2 * ne + i] = 2 + 2 * ne + i;
s_dof[5 + 2 * ne + i] = 0;
934 t_dof[5 + 3 * ne + i] = 2 + 0 * ne + i;
s_dof[5 + 3 * ne + i] = 1;
935 t_dof[5 + 4 * ne + i] = 2 + 1 * ne + i;
s_dof[5 + 4 * ne + i] = 1;
936 t_dof[5 + 5 * ne + i] = 2 + 2 * ne + i;
s_dof[5 + 5 * ne + i] = 1;
937 t_dof[5 + 6 * ne + i] = 0;
s_dof[5 + 6 * ne + i] = i + 1;
938 t_dof[5 + 7 * ne + i] = 1;
s_dof[5 + 7 * ne + i] = i + 1;
939 t_dof[5 + 8 * ne + i] = 2;
s_dof[5 + 8 * ne + i] = i + 1;
944 int nt = (
p-1)*(
p-2)/2;
945 for (
int j=1; j<
p; j++)
947 for (
int i=1; i<j; i++)
949 t_dof[6 + 9 * ne + k] = 3 *
p + k;
s_dof[6 + 9 * ne + k] = 0;
950 t_dof[6 + 9 * ne + nt + k] = 3 *
p + k;
s_dof[6 + 9 * ne + nt + k] = 1;
957 int nq = (
p-1)*(
p-1);
958 for (
int j=1; j<
p; j++)
960 for (
int i=1; i<
p; i++)
962 t_dof[6 + 9 * ne + 2 * nt + 0 * nq + k] = 2 + 0 * ne + i;
963 t_dof[6 + 9 * ne + 2 * nt + 1 * nq + k] = 2 + 1 * ne + i;
964 t_dof[6 + 9 * ne + 2 * nt + 2 * nq + k] = 2 + 2 * ne + i;
966 s_dof[6 + 9 * ne + 2 * nt + 0 * nq + k] = 1 + j;
967 s_dof[6 + 9 * ne + 2 * nt + 1 * nq + k] = 1 + j;
968 s_dof[6 + 9 * ne + 2 * nt + 2 * nq + k] = 1 + j;
979 for (
int j=1; j<
p; j++)
981 for (
int i=1; i<j; i++)
983 t_dof[6 + 9 * ne + 2 * nt + 3 * nq + m] = 3 *
p + l;
984 s_dof[6 + 9 * ne + 2 * nt + 3 * nq + m] = 1 + k;
993 for (
int i=0; i<
dof; i++)
1004 #ifdef MFEM_THREAD_SAFE 1014 for (
int i=0; i<
dof; i++)
1023 #ifdef MFEM_THREAD_SAFE 1037 for (
int i=0; i<
dof; i++)
1048 #ifndef MFEM_THREAD_SAFE 1059 for (
int i = 0; i <=
p; i++)
1075 #ifdef MFEM_THREAD_SAFE 1086 dofs[vertex*
order] = 1.0;
1093 #ifndef MFEM_THREAD_SAFE 1106 for (
int o = 0, j = 0; j <=
p; j++)
1107 for (
int i = 0; i <=
p; i++)
1119 #ifdef MFEM_THREAD_SAFE 1126 for (
int o = 0, j = 0; j <=
p; j++)
1127 for (
int i = 0; i <=
p; i++)
1129 shape(o++) = shape_x(i)*shape_y(j);
1138 #ifdef MFEM_THREAD_SAFE 1139 Vector shape_x(
p+1), shape_y(
p+1), dshape_x(
p+1), dshape_y(
p+1);
1145 for (
int o = 0, j = 0; j <=
p; j++)
1146 for (
int i = 0; i <=
p; i++)
1148 dshape(o,0) = dshape_x(i)* shape_y(j);
1149 dshape(o,1) = shape_x(i)*dshape_y(j); o++;
1160 case 0: dofs[0] = 1.0;
break;
1161 case 1: dofs[
p] = 1.0;
break;
1162 case 2: dofs[
p*(
p + 2)] = 1.0;
break;
1163 case 3: dofs[
p*(
p + 1)] = 1.0;
break;
1171 #ifndef MFEM_THREAD_SAFE 1186 for (
int o = 0, k = 0; k <=
p; k++)
1187 for (
int j = 0; j <=
p; j++)
1188 for (
int i = 0; i <=
p; i++)
1200 #ifdef MFEM_THREAD_SAFE 1201 Vector shape_x(
p+1), shape_y(
p+1), shape_z(
p+1);
1208 for (
int o = 0, k = 0; k <=
p; k++)
1209 for (
int j = 0; j <=
p; j++)
1210 for (
int i = 0; i <=
p; i++)
1212 shape(o++) = shape_x(i)*shape_y(j)*shape_z(k);
1221 #ifdef MFEM_THREAD_SAFE 1222 Vector shape_x(
p+1), shape_y(
p+1), shape_z(
p+1);
1223 Vector dshape_x(
p+1), dshape_y(
p+1), dshape_z(
p+1);
1230 for (
int o = 0, k = 0; k <=
p; k++)
1231 for (
int j = 0; j <=
p; j++)
1232 for (
int i = 0; i <=
p; i++)
1234 dshape(o,0) = dshape_x(i)* shape_y(j)* shape_z(k);
1235 dshape(o,1) = shape_x(i)*dshape_y(j)* shape_z(k);
1236 dshape(o,2) = shape_x(i)* shape_y(j)*dshape_z(k); o++;
1247 case 0: dofs[0] = 1.0;
break;
1248 case 1: dofs[
p] = 1.0;
break;
1249 case 2: dofs[
p*(
p + 2)] = 1.0;
break;
1250 case 3: dofs[
p*(
p + 1)] = 1.0;
break;
1251 case 4: dofs[
p*(
p + 1)*(
p + 1)] = 1.0;
break;
1252 case 5: dofs[
p +
p*(
p + 1)*(
p + 1)] = 1.0;
break;
1253 case 6: dofs[
dof - 1] = 1.0;
break;
1254 case 7: dofs[
dof -
p - 1] = 1.0;
break;
1263 #ifndef MFEM_THREAD_SAFE 1273 for (
int o = 0, j = 0; j <=
p; j++)
1274 for (
int i = 0; i + j <=
p; i++)
1290 #ifdef MFEM_THREAD_SAFE 1303 case 0: dofs[0] = 1.0;
break;
1304 case 1: dofs[
order] = 1.0;
break;
1305 case 2: dofs[
dof-1] = 1.0;
break;
1314 #ifndef MFEM_THREAD_SAFE 1324 for (
int o = 0, k = 0; k <=
p; k++)
1325 for (
int j = 0; j + k <=
p; j++)
1326 for (
int i = 0; i + j + k <=
p; i++)
1343 #ifdef MFEM_THREAD_SAFE 1356 case 0: dofs[0] = 1.0;
break;
1357 case 1: dofs[
order] = 1.0;
break;
1358 case 2: dofs[(
order*(
order+3))/2] = 1.0;
break;
1359 case 3: dofs[
dof-1] = 1.0;
break;
1370 #ifndef MFEM_THREAD_SAFE 1382 for (
int k=0; k<=
p; k++)
1385 for (
int j=0; j<=
p; j++)
1387 for (
int i=0; i<=j; i++)
1399 for (
int i=0; i<
dof; i++)
1410 #ifdef MFEM_THREAD_SAFE 1420 for (
int i=0; i<
dof; i++)
1429 #ifdef MFEM_THREAD_SAFE 1443 for (
int i=0; i<
dof; i++)
Abstract class for all finite elements.
Class for an integration rule - an Array of IntegrationPoint.
L2Pos_WedgeElement(const int p)
Construct the L2Pos_WedgeElement of order p.
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
L2Pos_TriangleElement(const int p)
Construct the L2Pos_TriangleElement of order p.
H1Pos_SegmentElement(const int p)
Construct the H1Pos_SegmentElement of order p.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Base class for vector Coefficients that optionally depend on time and space.
Linear1DFiniteElement SegmentFE
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
PositiveTensorFiniteElement(const int dims, const int p, const DofMapType dmtype)
Class for finite elements utilizing the always positive Bernstein basis.
L2Pos_TetrahedronElement(const int p)
Construct the L2Pos_TetrahedronElement of order p.
void Mult(const double *x, double *y) const
Matrix vector multiplication with the inverse of dense matrix.
void SetSize(int s)
Resize the vector to size s.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
H1Pos_SegmentElement SegmentFE
H1Pos_TetrahedronElement(const int p)
Construct the H1Pos_TetrahedronElement of order p.
int dim
Dimension of reference space.
BiQuadPos2DFiniteElement()
Construct the BiQuadPos2DFiniteElement.
int Size() const
Returns the size of the vector.
Data type dense matrix using column-major storage.
double * Data() const
Returns the matrix data array.
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
H1Pos_HexahedronElement(const int p)
Construct the H1Pos_HexahedronElement of order p.
static void CalcShape(const int p, const double x, const double y, const double z, double *shape)
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Possible basis types. Note that not all elements can use all BasisType(s).
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
L2Pos_HexahedronElement(const int p)
Construct the L2Pos_HexahedronElement of order p.
static void CalcDShape(const int p, const double x, const double y, const double z, double *dshape_1d, double *dshape)
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
static void CalcBinomTerms(const int p, const double x, const double y, double *u)
Compute the p terms in the expansion of the binomial (x + y)^p and store them in the already allocate...
H1Pos_TriangleElement(const int p)
Construct the H1Pos_TriangleElement of order p.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Class for standard nodal finite elements.
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
static void CalcShape(const int p, const double x, const double y, double *shape)
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
H1Pos_WedgeElement(const int p)
Construct the H1Pos_WedgeElement of order p.
void Invert()
Replaces the current matrix with its inverse.
L2Pos_QuadrilateralElement(const int p)
Construct the L2Pos_QuadrilateralElement of order p.
static void CalcDShape(const int p, const double x, const double y, double *dshape_1d, double *dshape)
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void Set2(const double x1, const double x2)
int GetVDim()
Returns dimension of the vector.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
double * GetData() const
Return a pointer to the beginning of the Vector data.
void Set3(const double x1, const double x2, const double x3)
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
double p(const Vector &x, double t)
H1Pos_TriangleElement TriangleFE
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
static const int * Binom(const int p)
Get a pointer to an array containing the binomial coefficients "p choose k" for k=0,...,p for the given p.
int GetDof() const
Returns the number of degrees of freedom in the finite element.
L2Pos_TriangleElement TriangleFE
void SetDataAndSize(double *d, int s)
Set the Vector data and size.
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
MFEM_EXPORT Linear2DFiniteElement TriangleFE
H1Pos_QuadrilateralElement(const int p)
Construct the H1Pos_QuadrilateralElement of order p.
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Given a coefficient and a transformation, compute its projection (approximation) in the local finite ...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Class for integration point with weight.
L2Pos_SegmentElement SegmentFE
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Given a coefficient and a transformation, compute its projection (approximation) in the local finite ...
int dof
Number of degrees of freedom.
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
L2Pos_SegmentElement(const int p)
Construct the L2Pos_SegmentElement of order p.
static void CalcBernstein(const int p, const double x, double *u)
Compute the values of the Bernstein basis functions of order p at coordinate x and store the results ...
void GetFaceMap(const int face_id, Array< int > &face_map) const override
Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local fac...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
virtual void ProjectDelta(int vertex, Vector &dofs) const
Project a delta function centered on the given vertex in the local finite dimensional space represent...
Describes the function space on each element.
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const override
Given a coefficient and a transformation, compute its projection (approximation) in the local finite ...
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
QuadPos1DFiniteElement()
Construct the QuadPos1DFiniteElement.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
const IntegrationRule & GetNodes() const
Get a const reference to the nodes of the element.
static void CalcDBinomTerms(const int p, const double x, const double y, double *d)
Compute the derivatives (w.r.t. x) of the terms in the expansion of the binomial (x + y)^p assuming t...
int order
Order/degree of the shape functions.
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...