66 edgeNodalBasis.
Eval(x, nodalX);
67 edgeNodalBasis.
Eval(y, nodalY);
71 for (
int i = 0; i <
p-1; i++)
73 shape(4 + 0*(
p-1) + i) = (nodalX(i+1))*(1.-y);
74 shape(4 + 1*(
p-1) + i) = (nodalY(i+1))*x;
75 shape(4 + 3*(
p-1) - i - 1) = (nodalX(i+1)) * y;
76 shape(4 + 4*(
p-1) - i - 1) = (nodalY(i+1)) * (1. - x);
94 for (
int i = 0; i<
p-1; i++)
96 vtx0fix += (1-edgePts[i+1])*(shape(4 + i) +
97 shape(4 + 4*(
p-1) - i - 1));
98 vtx1fix += (1-edgePts[i+1])*(shape(4 + 1*(
p-1) + i) +
100 vtx2fix += (1-edgePts[i+1])*(shape(4 + 2*(
p-1) + i) +
102 vtx3fix += (1-edgePts[i+1])*(shape(4 + 3*(
p-1) + i) +
105 shape(0) = bilinearsAtIP(0) - vtx0fix;
106 shape(1) = bilinearsAtIP(1) - vtx1fix;
107 shape(2) = bilinearsAtIP(2) - vtx2fix;
108 shape(3) = bilinearsAtIP(3) - vtx3fix;
120 int interior_total = 0;
121 for (
int j = 4; j <
p + 1; j++)
123 for (
int k = 0; k < j-3; k++)
125 shape(4 + 4*(
p-1) + interior_total)
126 = legX[k] * legY[j-4-k] * x * (1. - x) * y * (1. - y);
148 edgeNodalBasis.
Eval(x, nodalX, DnodalX);
149 edgeNodalBasis.
Eval(y, nodalY, DnodalY);
151 for (
int i = 0; i <
p-1; i++)
153 dshape(4 + 0*(
p-1) + i,0) = DnodalX(i+1) * (1.-y);
154 dshape(4 + 0*(
p-1) + i,1) = -nodalX(i+1);
155 dshape(4 + 1*(
p-1) + i,0) = nodalY(i+1);
156 dshape(4 + 1*(
p-1) + i,1) = DnodalY(i+1)*x;
157 dshape(4 + 3*(
p-1) - i - 1,0) = DnodalX(i+1)*y;
158 dshape(4 + 3*(
p-1) - i - 1,1) = nodalX(i+1);
159 dshape(4 + 4*(
p-1) - i - 1,0) = -nodalY(i+1);
160 dshape(4 + 4*(
p-1) - i - 1,1) = DnodalY(i+1) * (1.-x);
169 dshape(0,0) = DbilinearsAtIP(0,0);
170 dshape(0,1) = DbilinearsAtIP(0,1);
171 dshape(1,0) = DbilinearsAtIP(1,0);
172 dshape(1,1) = DbilinearsAtIP(1,1);
173 dshape(2,0) = DbilinearsAtIP(2,0);
174 dshape(2,1) = DbilinearsAtIP(2,1);
175 dshape(3,0) = DbilinearsAtIP(3,0);
176 dshape(3,1) = DbilinearsAtIP(3,1);
178 for (
int i = 0; i<
p-1; i++)
180 dshape(0,0) -= (1-edgePts[i+1])*(dshape(4 + 0*(
p-1) + i, 0) +
181 dshape(4 + 4*(
p-1) - i - 1,0));
182 dshape(0,1) -= (1-edgePts[i+1])*(dshape(4 + 0*(
p-1) + i, 1) +
183 dshape(4 + 4*(
p-1) - i - 1,1));
184 dshape(1,0) -= (1-edgePts[i+1])*(dshape(4 + 1*(
p-1) + i, 0) +
185 dshape(4 + (
p-2)-i, 0));
186 dshape(1,1) -= (1-edgePts[i+1])*(dshape(4 + 1*(
p-1) + i, 1) +
187 dshape(4 + (
p-2)-i, 1));
188 dshape(2,0) -= (1-edgePts[i+1])*(dshape(4 + 2*(
p-1) + i, 0) +
189 dshape(1 + 2*
p-i, 0));
190 dshape(2,1) -= (1-edgePts[i+1])*(dshape(4 + 2*(
p-1) + i, 1) +
191 dshape(1 + 2*
p-i, 1));
192 dshape(3,0) -= (1-edgePts[i+1])*(dshape(4 + 3*(
p-1) + i, 0) +
194 dshape(3,1) -= (1-edgePts[i+1])*(dshape(4 + 3*(
p-1) + i, 1) +
208 int interior_total = 0;
209 for (
int j = 4; j <
p + 1; j++)
211 for (
int k = 0; k < j-3; k++)
213 dshape(4 + 4*(
p-1) + interior_total, 0) =
214 legY[j-4-k]*y*(1-y) * (DlegX[k]*x*(1-x) + legX[k]*(1-2*x));
215 dshape(4 + 4*(
p-1) + interior_total, 1) =
216 legX[k]*x*(1-x) * (DlegY[j-4-k]*y*(1-y) + legY[j-4-k]*(1-2*y));
void NodalLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I, const ScalarFiniteElement &fine_fe) const
Get the matrix I that defines nodal interpolation between this element and the refined element fine_f...
void ScalarLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I, const ScalarFiniteElement &fine_fe) const
Get matrix I "Interpolation" defined through local L2-projection in the space defined by the fine_fe.