25class Rotated2DVectorCoefficient :
public VectorCoefficient
28 explicit Rotated2DVectorCoefficient(VectorCoefficient &coeff)
29 : VectorCoefficient(2), coeff_(&coeff), value_(2) { }
31 void SetTime(
real_t t)
override { coeff_->SetTime(t); }
34 void Eval(Vector &V, ElementTransformation &T,
35 const IntegrationPoint &ip)
override
37 coeff_->Eval(value_, T, ip);
44 VectorCoefficient *coeff_;
45 mutable Vector value_;
48void PAHcurlDotSetup2D(
const int q1d,
50 const bool test_map_integral,
51 const Array<real_t> &w,
52 const Vector &jacobians,
56 auto W =
Reshape(w.Read(), q1d, q1d);
57 auto J =
Reshape(jacobians.Read(), q1d, q1d, 2, 2, ne);
58 auto C =
Reshape(coeff.Read(), 2, q1d, q1d, ne);
59 auto O =
Reshape(op.Write(), 2, q1d, q1d, ne);
63 MFEM_FOREACH_THREAD(qy, y, q1d)
65 MFEM_FOREACH_THREAD(qx, x, q1d)
67 const real_t J11 = J(qx, qy, 0, 0, e);
68 const real_t J12 = J(qx, qy, 0, 1, e);
69 const real_t J21 = J(qx, qy, 1, 0, e);
70 const real_t J22 = J(qx, qy, 1, 1, e);
71 const real_t detJ = (J11 * J22) - (J21 * J12);
72 const real_t scale = W(qx, qy) * (test_map_integral ? 1.0 / detJ : 1.0);
73 const real_t Vx = C(0, qx, qy, e);
74 const real_t Vy = C(1, qx, qy, e);
76 O(0, qx, qy, e) = scale * ( J22 * Vx - J12 * Vy);
77 O(1, qx, qy, e) = scale * (-J21 * Vx + J11 * Vy);
83void PAHcurlDotSetup3D(
const int q1d,
85 const bool test_map_integral,
86 const Array<real_t> &w,
87 const Vector &jacobians,
91 auto W =
Reshape(w.Read(), q1d, q1d, q1d);
92 auto J =
Reshape(jacobians.Read(), q1d, q1d, q1d, 3, 3, ne);
93 auto C =
Reshape(coeff.Read(), 3, q1d, q1d, q1d, ne);
94 auto O =
Reshape(op.Write(), 3, q1d, q1d, q1d, ne);
98 MFEM_FOREACH_THREAD(qz, z, q1d)
100 MFEM_FOREACH_THREAD(qy, y, q1d)
102 MFEM_FOREACH_THREAD(qx, x, q1d)
104 const real_t J11 = J(qx, qy, qz, 0, 0, e);
105 const real_t J12 = J(qx, qy, qz, 0, 1, e);
106 const real_t J13 = J(qx, qy, qz, 0, 2, e);
107 const real_t J21 = J(qx, qy, qz, 1, 0, e);
108 const real_t J22 = J(qx, qy, qz, 1, 1, e);
109 const real_t J23 = J(qx, qy, qz, 1, 2, e);
110 const real_t J31 = J(qx, qy, qz, 2, 0, e);
111 const real_t J32 = J(qx, qy, qz, 2, 1, e);
112 const real_t J33 = J(qx, qy, qz, 2, 2, e);
113 const real_t detJ = J11 * (J22 * J33 - J32 * J23)
114 - J21 * (J12 * J33 - J32 * J13)
115 + J31 * (J12 * J23 - J22 * J13);
116 const real_t scale = W(qx, qy, qz) *
117 (test_map_integral ? 1.0 / detJ : 1.0);
118 const real_t Vx = C(0, qx, qy, qz, e);
119 const real_t Vy = C(1, qx, qy, qz, e);
120 const real_t Vz = C(2, qx, qy, qz, e);
122 O(0, qx, qy, qz, e) = scale *
123 ((J22 * J33 - J23 * J32) * Vx +
124 (J13 * J32 - J12 * J33) * Vy +
125 (J12 * J23 - J13 * J22) * Vz);
126 O(1, qx, qy, qz, e) = scale *
127 ((J23 * J31 - J21 * J33) * Vx +
128 (J11 * J33 - J13 * J31) * Vy +
129 (J13 * J21 - J11 * J23) * Vz);
130 O(2, qx, qy, qz, e) = scale *
131 ((J21 * J32 - J22 * J31) * Vx +
132 (J12 * J31 - J11 * J32) * Vy +
133 (J11 * J22 - J12 * J21) * Vz);
140void PAHcurlDotApply2D(
const int d1d,
144 const Array<real_t> &bo,
145 const Array<real_t> &bc,
146 const Array<real_t> &bt,
147 const Vector &pa_data,
155 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
156 auto Bc =
Reshape(bc.Read(), q1d, d1d);
157 auto Bt =
Reshape(bt.Read(), d1d_test, q1d);
158 auto O =
Reshape(pa_data.Read(), 2, q1d, q1d, ne);
159 auto X =
Reshape(x.Read(), 2 * (d1d - 1) * d1d, ne);
160 auto Y =
Reshape(y.ReadWrite(), d1d_test, d1d_test, ne);
164 constexpr int MAX_D1D = DofQuadLimits::MAX_D1D;
165 constexpr int MAX_Q1D = DofQuadLimits::HCURL_MAX_Q1D;
167 real_t u0[MAX_Q1D][MAX_Q1D];
168 real_t u1[MAX_Q1D][MAX_Q1D];
170 for (
int qy = 0; qy < q1d; ++qy)
172 for (
int qx = 0; qx < q1d; ++qx)
180 for (
int dy = 0; dy < d1d; ++dy)
183 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
184 for (
int dx = 0; dx < d1d - 1; ++dx)
186 const real_t t = X(dx + (dy * (d1d - 1)) + osc, e);
187 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bo(qx, dx); }
189 for (
int qy = 0; qy < q1d; ++qy)
191 const real_t wy = Bc(qy, dy);
192 for (
int qx = 0; qx < q1d; ++qx) { u0[qy][qx] += mass_x[qx] * wy; }
196 osc += (d1d - 1) * d1d;
197 for (
int dy = 0; dy < d1d - 1; ++dy)
200 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
201 for (
int dx = 0; dx < d1d; ++dx)
203 const real_t t = X(dx + (dy * d1d) + osc, e);
204 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bc(qx, dx); }
206 for (
int qy = 0; qy < q1d; ++qy)
208 const real_t wy = Bo(qy, dy);
209 for (
int qx = 0; qx < q1d; ++qx) { u1[qy][qx] += mass_x[qx] * wy; }
213 for (
int qy = 0; qy < q1d; ++qy)
216 for (
int dx = 0; dx < d1d_test; ++dx) { sol_x[dx] = 0.0; }
217 for (
int qx = 0; qx < q1d; ++qx)
219 const real_t s = O(0, qx, qy, e) * u0[qy][qx]
220 + O(1, qx, qy, e) * u1[qy][qx];
221 for (
int dx = 0; dx < d1d_test; ++dx)
223 sol_x[dx] += s * Bt(dx, qx);
226 for (
int dy = 0; dy < d1d_test; ++dy)
228 const real_t wy = Bt(dy, qy);
229 for (
int dx = 0; dx < d1d_test; ++dx)
231 Y(dx, dy, e) += sol_x[dx] * wy;
238void PAHcurlDotApplyTranspose2D(
const int d1d,
242 const Array<real_t> &bo,
243 const Array<real_t> &bc,
244 const Array<real_t> &
b,
245 const Vector &pa_data,
253 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
254 auto Bc =
Reshape(bc.Read(), q1d, d1d);
255 auto B =
Reshape(
b.Read(), q1d, d1d_test);
256 auto O =
Reshape(pa_data.Read(), 2, q1d, q1d, ne);
257 auto X =
Reshape(x.Read(), d1d_test, d1d_test, ne);
258 auto Y =
Reshape(y.ReadWrite(), 2 * (d1d - 1) * d1d, ne);
262 constexpr int MAX_D1D = DofQuadLimits::MAX_D1D;
263 constexpr int MAX_Q1D = DofQuadLimits::HCURL_MAX_Q1D;
266 for (
int qy = 0; qy < q1d; ++qy)
268 for (
int qx = 0; qx < q1d; ++qx)
274 for (
int dy = 0; dy < d1d_test; ++dy)
277 for (
int qx = 0; qx < q1d; ++qx) { sol_x[qx] = 0.0; }
278 for (
int dx = 0; dx < d1d_test; ++dx)
280 const real_t t = X(dx, dy, e);
281 for (
int qx = 0; qx < q1d; ++qx) { sol_x[qx] += t * B(qx, dx); }
283 for (
int qy = 0; qy < q1d; ++qy)
285 const real_t wy = B(qy, dy);
286 for (
int qx = 0; qx < q1d; ++qx) {
mass[qy][qx] += sol_x[qx] * wy; }
291 for (
int qy = 0; qy < q1d; ++qy)
294 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_x[dx] = 0.0; }
295 for (
int qx = 0; qx < q1d; ++qx)
297 const real_t s = O(0, qx, qy, e) *
mass[qy][qx];
298 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_x[dx] += s * Bo(qx, dx); }
300 for (
int dy = 0; dy < d1d; ++dy)
302 const real_t wy = Bc(qy, dy);
303 for (
int dx = 0; dx < d1d - 1; ++dx)
305 Y(dx + (dy * (d1d - 1)) + osc, e) += mass_x[dx] * wy;
310 osc += (d1d - 1) * d1d;
311 for (
int qy = 0; qy < q1d; ++qy)
314 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] = 0.0; }
315 for (
int qx = 0; qx < q1d; ++qx)
317 const real_t s = O(1, qx, qy, e) *
mass[qy][qx];
318 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] += s * Bc(qx, dx); }
320 for (
int dy = 0; dy < d1d - 1; ++dy)
322 const real_t wy = Bo(qy, dy);
323 for (
int dx = 0; dx < d1d; ++dx)
325 Y(dx + (dy * d1d) + osc, e) += mass_x[dx] * wy;
332void PAHdivDotSetup2D(
const int q1d,
334 const bool test_map_integral,
335 const Array<real_t> &w,
336 const Vector &jacobians,
340 auto W =
Reshape(w.Read(), q1d, q1d);
341 auto J =
Reshape(jacobians.Read(), q1d, q1d, 2, 2, ne);
342 auto C =
Reshape(coeff.Read(), 2, q1d, q1d, ne);
343 auto O =
Reshape(op.Write(), 2, q1d, q1d, ne);
347 MFEM_FOREACH_THREAD(qy, y, q1d)
349 MFEM_FOREACH_THREAD(qx, x, q1d)
351 const real_t J11 = J(qx, qy, 0, 0, e);
352 const real_t J12 = J(qx, qy, 0, 1, e);
353 const real_t J21 = J(qx, qy, 1, 0, e);
354 const real_t J22 = J(qx, qy, 1, 1, e);
355 const real_t detJ = (J11 * J22) - (J21 * J12);
356 const real_t scale = W(qx, qy) * (test_map_integral ? 1.0 / detJ : 1.0);
357 const real_t Vx = C(0, qx, qy, e);
358 const real_t Vy = C(1, qx, qy, e);
360 O(0, qx, qy, e) = scale * (J11 * Vx + J21 * Vy);
361 O(1, qx, qy, e) = scale * (J12 * Vx + J22 * Vy);
367void PAHdivDotApply2D(
const int d1d,
371 const Array<real_t> &bo,
372 const Array<real_t> &bc,
373 const Array<real_t> &bt,
374 const Vector &pa_data,
382 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
383 auto Bc =
Reshape(bc.Read(), q1d, d1d);
384 auto Bt =
Reshape(bt.Read(), d1d_test, q1d);
385 auto O =
Reshape(pa_data.Read(), 2, q1d, q1d, ne);
386 auto X =
Reshape(x.Read(), 2 * (d1d - 1) * d1d, ne);
387 auto Y =
Reshape(y.ReadWrite(), d1d_test, d1d_test, ne);
391 constexpr int MAX_D1D = DofQuadLimits::MAX_D1D;
392 constexpr int MAX_Q1D = DofQuadLimits::HDIV_MAX_Q1D;
395 for (
int qy = 0; qy < q1d; ++qy)
397 for (
int qx = 0; qx < q1d; ++qx)
399 mass[qy][qx][0] = 0.0;
400 mass[qy][qx][1] = 0.0;
405 for (
int dy = 0; dy < d1d - 1; ++dy)
408 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
409 for (
int dx = 0; dx < d1d; ++dx)
411 const real_t t = X(dx + (dy * d1d) + osc, e);
412 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bc(qx, dx); }
414 for (
int qy = 0; qy < q1d; ++qy)
416 const real_t wy = Bo(qy, dy);
417 for (
int qx = 0; qx < q1d; ++qx) {
mass[qy][qx][0] += mass_x[qx] * wy; }
421 osc += d1d * (d1d - 1);
422 for (
int dy = 0; dy < d1d; ++dy)
425 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
426 for (
int dx = 0; dx < d1d - 1; ++dx)
428 const real_t t = X(dx + (dy * (d1d - 1)) + osc, e);
429 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bo(qx, dx); }
431 for (
int qy = 0; qy < q1d; ++qy)
433 const real_t wy = Bc(qy, dy);
434 for (
int qx = 0; qx < q1d; ++qx) {
mass[qy][qx][1] += mass_x[qx] * wy; }
438 for (
int qy = 0; qy < q1d; ++qy)
441 for (
int dx = 0; dx < d1d_test; ++dx) { sol_x[dx] = 0.0; }
442 for (
int qx = 0; qx < q1d; ++qx)
444 const real_t s = O(0, qx, qy, e) *
mass[qy][qx][0]
445 + O(1, qx, qy, e) *
mass[qy][qx][1];
446 for (
int dx = 0; dx < d1d_test; ++dx)
448 sol_x[dx] += s * Bt(dx, qx);
451 for (
int dy = 0; dy < d1d_test; ++dy)
453 const real_t wy = Bt(dy, qy);
454 for (
int dx = 0; dx < d1d_test; ++dx)
456 Y(dx, dy, e) += sol_x[dx] * wy;
463void PAHdivDotApplyTranspose2D(
const int d1d,
467 const Array<real_t> &bo,
468 const Array<real_t> &bc,
469 const Array<real_t> &
b,
470 const Vector &pa_data,
478 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
479 auto Bc =
Reshape(bc.Read(), q1d, d1d);
480 auto B =
Reshape(
b.Read(), q1d, d1d_test);
481 auto O =
Reshape(pa_data.Read(), 2, q1d, q1d, ne);
482 auto X =
Reshape(x.Read(), d1d_test, d1d_test, ne);
483 auto Y =
Reshape(y.ReadWrite(), 2 * (d1d - 1) * d1d, ne);
487 constexpr int MAX_Q1D = DofQuadLimits::HDIV_MAX_Q1D;
490 for (
int qy = 0; qy < q1d; ++qy)
492 for (
int qx = 0; qx < q1d; ++qx)
498 for (
int dy = 0; dy < d1d_test; ++dy)
501 for (
int qx = 0; qx < q1d; ++qx) { sol_x[qx] = 0.0; }
502 for (
int dx = 0; dx < d1d_test; ++dx)
504 const real_t t = X(dx, dy, e);
505 for (
int qx = 0; qx < q1d; ++qx) { sol_x[qx] += t * B(qx, dx); }
507 for (
int qy = 0; qy < q1d; ++qy)
509 const real_t wy = B(qy, dy);
510 for (
int qx = 0; qx < q1d; ++qx) {
mass[qy][qx] += sol_x[qx] * wy; }
515 for (
int dy = 0; dy < d1d - 1; ++dy)
518 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
519 for (
int qy = 0; qy < q1d; ++qy)
521 const real_t wy = Bo(qy, dy);
522 for (
int qx = 0; qx < q1d; ++qx)
524 mass_x[qx] += (O(0, qx, qy, e) *
mass[qy][qx]) * wy;
527 for (
int dx = 0; dx < d1d; ++dx)
530 for (
int qx = 0; qx < q1d; ++qx) { sum += mass_x[qx] * Bc(qx, dx); }
531 Y(dx + (dy * d1d) + osc, e) += sum;
535 osc += d1d * (d1d - 1);
536 for (
int dy = 0; dy < d1d; ++dy)
539 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
540 for (
int qy = 0; qy < q1d; ++qy)
542 const real_t wy = Bc(qy, dy);
543 for (
int qx = 0; qx < q1d; ++qx)
545 mass_x[qx] += (O(1, qx, qy, e) *
mass[qy][qx]) * wy;
548 for (
int dx = 0; dx < d1d - 1; ++dx)
551 for (
int qx = 0; qx < q1d; ++qx) { sum += mass_x[qx] * Bo(qx, dx); }
552 Y(dx + (dy * (d1d - 1)) + osc, e) += sum;
558void PAHcurlDotApply3D(
const int d1d,
562 const Array<real_t> &bo,
563 const Array<real_t> &bc,
564 const Array<real_t> &bt,
565 const Vector &pa_data,
573 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
574 auto Bc =
Reshape(bc.Read(), q1d, d1d);
575 auto Bt =
Reshape(bt.Read(), d1d_test, q1d);
576 auto O =
Reshape(pa_data.Read(), 3, q1d, q1d, q1d, ne);
577 auto X =
Reshape(x.Read(), 3 * (d1d - 1) * d1d * d1d, ne);
578 auto Y =
Reshape(y.ReadWrite(), d1d_test, d1d_test, d1d_test, ne);
582 constexpr int MAX_D1D = DofQuadLimits::MAX_D1D;
583 constexpr int MAX_Q1D = DofQuadLimits::HCURL_MAX_Q1D;
585 real_t u[MAX_Q1D][MAX_Q1D][MAX_Q1D][3];
586 for (
int qz = 0; qz < q1d; ++qz)
588 for (
int qy = 0; qy < q1d; ++qy)
590 for (
int qx = 0; qx < q1d; ++qx)
592 for (
int c = 0; c < 3; ++c) {
u[qz][qy][qx][c] = 0.0; }
598 for (
int dz = 0; dz < d1d; ++dz)
600 real_t mass_xy[MAX_Q1D][MAX_Q1D];
601 for (
int qy = 0; qy < q1d; ++qy)
603 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] = 0.0; }
606 for (
int dy = 0; dy < d1d; ++dy)
609 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
610 for (
int dx = 0; dx < d1d - 1; ++dx)
612 const real_t t = X(dx + ((dy + (dz * d1d)) * (d1d - 1)) + osc, e);
613 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bo(qx, dx); }
615 for (
int qy = 0; qy < q1d; ++qy)
617 const real_t wy = Bc(qy, dy);
618 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] += mass_x[qx] * wy; }
622 for (
int qz = 0; qz < q1d; ++qz)
624 const real_t wz = Bc(qz, dz);
625 for (
int qy = 0; qy < q1d; ++qy)
627 for (
int qx = 0; qx < q1d; ++qx) {
u[qz][qy][qx][0] += mass_xy[qy][qx] * wz; }
632 osc += (d1d - 1) * d1d * d1d;
633 for (
int dz = 0; dz < d1d; ++dz)
635 real_t mass_xy[MAX_Q1D][MAX_Q1D];
636 for (
int qy = 0; qy < q1d; ++qy)
638 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] = 0.0; }
641 for (
int dy = 0; dy < d1d - 1; ++dy)
644 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
645 for (
int dx = 0; dx < d1d; ++dx)
647 const real_t t = X(dx + ((dy + (dz * (d1d - 1))) * d1d) + osc, e);
648 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bc(qx, dx); }
650 for (
int qy = 0; qy < q1d; ++qy)
652 const real_t wy = Bo(qy, dy);
653 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] += mass_x[qx] * wy; }
657 for (
int qz = 0; qz < q1d; ++qz)
659 const real_t wz = Bc(qz, dz);
660 for (
int qy = 0; qy < q1d; ++qy)
662 for (
int qx = 0; qx < q1d; ++qx) {
u[qz][qy][qx][1] += mass_xy[qy][qx] * wz; }
667 osc += (d1d - 1) * d1d * d1d;
668 for (
int dz = 0; dz < d1d - 1; ++dz)
670 real_t mass_xy[MAX_Q1D][MAX_Q1D];
671 for (
int qy = 0; qy < q1d; ++qy)
673 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] = 0.0; }
676 for (
int dy = 0; dy < d1d; ++dy)
679 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
680 for (
int dx = 0; dx < d1d; ++dx)
682 const real_t t = X(dx + ((dy + (dz * d1d)) * d1d) + osc, e);
683 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * Bc(qx, dx); }
685 for (
int qy = 0; qy < q1d; ++qy)
687 const real_t wy = Bc(qy, dy);
688 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] += mass_x[qx] * wy; }
692 for (
int qz = 0; qz < q1d; ++qz)
694 const real_t wz = Bo(qz, dz);
695 for (
int qy = 0; qy < q1d; ++qy)
697 for (
int qx = 0; qx < q1d; ++qx) {
u[qz][qy][qx][2] += mass_xy[qy][qx] * wz; }
702 for (
int qz = 0; qz < q1d; ++qz)
704 real_t mass_xy[MAX_D1D][MAX_D1D];
705 for (
int dy = 0; dy < d1d_test; ++dy)
707 for (
int dx = 0; dx < d1d_test; ++dx) { mass_xy[dy][dx] = 0.0; }
710 for (
int qy = 0; qy < q1d; ++qy)
713 for (
int dx = 0; dx < d1d_test; ++dx) { mass_x[dx] = 0.0; }
714 for (
int qx = 0; qx < q1d; ++qx)
716 const real_t s = O(0, qx, qy, qz, e) *
u[qz][qy][qx][0]
717 + O(1, qx, qy, qz, e) *
u[qz][qy][qx][1]
718 + O(2, qx, qy, qz, e) *
u[qz][qy][qx][2];
719 for (
int dx = 0; dx < d1d_test; ++dx) { mass_x[dx] += s * Bt(dx, qx); }
721 for (
int dy = 0; dy < d1d_test; ++dy)
723 const real_t wy = Bt(dy, qy);
724 for (
int dx = 0; dx < d1d_test; ++dx) { mass_xy[dy][dx] += mass_x[dx] * wy; }
728 for (
int dz = 0; dz < d1d_test; ++dz)
730 const real_t wz = Bt(dz, qz);
731 for (
int dy = 0; dy < d1d_test; ++dy)
733 for (
int dx = 0; dx < d1d_test; ++dx)
735 Y(dx, dy, dz, e) += mass_xy[dy][dx] * wz;
743void PAHcurlDotApplyTranspose3D(
const int d1d,
747 const Array<real_t> &bo,
748 const Array<real_t> &bc,
749 const Array<real_t> &
b,
750 const Vector &pa_data,
758 auto Bo =
Reshape(bo.Read(), q1d, d1d - 1);
759 auto Bc =
Reshape(bc.Read(), q1d, d1d);
760 auto B =
Reshape(
b.Read(), q1d, d1d_test);
761 auto O =
Reshape(pa_data.Read(), 3, q1d, q1d, q1d, ne);
762 auto X =
Reshape(x.Read(), d1d_test, d1d_test, d1d_test, ne);
763 auto Y =
Reshape(y.ReadWrite(), 3 * (d1d - 1) * d1d * d1d, ne);
767 constexpr int MAX_D1D = DofQuadLimits::MAX_D1D;
768 constexpr int MAX_Q1D = DofQuadLimits::HCURL_MAX_Q1D;
771 for (
int qz = 0; qz < q1d; ++qz)
773 for (
int qy = 0; qy < q1d; ++qy)
775 for (
int qx = 0; qx < q1d; ++qx) {
mass[qz][qy][qx] = 0.0; }
779 for (
int dz = 0; dz < d1d_test; ++dz)
781 real_t mass_xy[MAX_Q1D][MAX_Q1D];
782 for (
int qy = 0; qy < q1d; ++qy)
784 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] = 0.0; }
787 for (
int dy = 0; dy < d1d_test; ++dy)
790 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] = 0.0; }
791 for (
int dx = 0; dx < d1d_test; ++dx)
793 const real_t t = X(dx, dy, dz, e);
794 for (
int qx = 0; qx < q1d; ++qx) { mass_x[qx] += t * B(qx, dx); }
796 for (
int qy = 0; qy < q1d; ++qy)
798 const real_t wy = B(qy, dy);
799 for (
int qx = 0; qx < q1d; ++qx) { mass_xy[qy][qx] += mass_x[qx] * wy; }
803 for (
int qz = 0; qz < q1d; ++qz)
805 const real_t wz = B(qz, dz);
806 for (
int qy = 0; qy < q1d; ++qy)
808 for (
int qx = 0; qx < q1d; ++qx) {
mass[qz][qy][qx] += mass_xy[qy][qx] * wz; }
814 for (
int qz = 0; qz < q1d; ++qz)
816 real_t mass_xy[MAX_D1D][MAX_D1D];
817 for (
int dy = 0; dy < d1d; ++dy)
819 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_xy[dy][dx] = 0.0; }
822 for (
int qy = 0; qy < q1d; ++qy)
825 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_x[dx] = 0.0; }
826 for (
int qx = 0; qx < q1d; ++qx)
828 const real_t s = O(0, qx, qy, qz, e) *
mass[qz][qy][qx];
829 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_x[dx] += s * Bo(qx, dx); }
831 for (
int dy = 0; dy < d1d; ++dy)
833 const real_t wy = Bc(qy, dy);
834 for (
int dx = 0; dx < d1d - 1; ++dx) { mass_xy[dy][dx] += mass_x[dx] * wy; }
838 for (
int dz = 0; dz < d1d; ++dz)
840 const real_t wz = Bc(qz, dz);
841 for (
int dy = 0; dy < d1d; ++dy)
843 for (
int dx = 0; dx < d1d - 1; ++dx)
845 Y(dx + ((dy + (dz * d1d)) * (d1d - 1)) + osc, e) += mass_xy[dy][dx] * wz;
851 osc += (d1d - 1) * d1d * d1d;
852 for (
int qz = 0; qz < q1d; ++qz)
854 real_t mass_xy[MAX_D1D][MAX_D1D];
855 for (
int dy = 0; dy < d1d - 1; ++dy)
857 for (
int dx = 0; dx < d1d; ++dx) { mass_xy[dy][dx] = 0.0; }
860 for (
int qy = 0; qy < q1d; ++qy)
863 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] = 0.0; }
864 for (
int qx = 0; qx < q1d; ++qx)
866 const real_t s = O(1, qx, qy, qz, e) *
mass[qz][qy][qx];
867 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] += s * Bc(qx, dx); }
869 for (
int dy = 0; dy < d1d - 1; ++dy)
871 const real_t wy = Bo(qy, dy);
872 for (
int dx = 0; dx < d1d; ++dx) { mass_xy[dy][dx] += mass_x[dx] * wy; }
876 for (
int dz = 0; dz < d1d; ++dz)
878 const real_t wz = Bc(qz, dz);
879 for (
int dy = 0; dy < d1d - 1; ++dy)
881 for (
int dx = 0; dx < d1d; ++dx)
883 Y(dx + ((dy + (dz * (d1d - 1))) * d1d) + osc, e) += mass_xy[dy][dx] * wz;
889 osc += (d1d - 1) * d1d * d1d;
890 for (
int qz = 0; qz < q1d; ++qz)
892 real_t mass_xy[MAX_D1D][MAX_D1D];
893 for (
int dy = 0; dy < d1d; ++dy)
895 for (
int dx = 0; dx < d1d; ++dx) { mass_xy[dy][dx] = 0.0; }
898 for (
int qy = 0; qy < q1d; ++qy)
901 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] = 0.0; }
902 for (
int qx = 0; qx < q1d; ++qx)
904 const real_t s = O(2, qx, qy, qz, e) *
mass[qz][qy][qx];
905 for (
int dx = 0; dx < d1d; ++dx) { mass_x[dx] += s * Bc(qx, dx); }
907 for (
int dy = 0; dy < d1d; ++dy)
909 const real_t wy = Bc(qy, dy);
910 for (
int dx = 0; dx < d1d; ++dx) { mass_xy[dy][dx] += mass_x[dx] * wy; }
914 for (
int dz = 0; dz < d1d - 1; ++dz)
916 const real_t wz = Bo(qz, dz);
917 for (
int dy = 0; dy < d1d; ++dy)
919 for (
int dx = 0; dx < d1d; ++dx)
921 Y(dx + ((dy + (dz * d1d)) * d1d) + osc, e) += mass_xy[dy][dx] * wz;
940 MFEM_VERIFY(trial_el != NULL,
"Only VectorTensorFiniteElement is supported!");
944 MFEM_VERIFY(test_tensor_el != NULL,
945 "Only tensor-product scalar test elements are supported!");
948 "Only H(curl) trial spaces are supported!");
959 MFEM_VERIFY(dim == 2 || dim == 3,
"Unsupported dimension!");
960 MFEM_VERIFY(trial_el->
GetDim() == dim && test_fel->
GetDim() == dim,
961 "Trial/test dimension mismatch.");
963 ne = trial_fes.
GetNE();
964 MFEM_VERIFY(ne == test_fes.
GetNE(),
965 "Different meshes for test and trial spaces");
972 dofs1D = mapsC->
ndof;
973 dofs1Dtest = mapsTest->
ndof;
974 quad1D = mapsC->
nqpt;
977 MFEM_VERIFY(dofs1D == mapsO->
ndof + 1 && quad1D == mapsO->
nqpt,
"");
978 MFEM_VERIFY(quad1D == mapsTest->
nqpt,
"Trial/test quadrature mismatch");
984 if (dim == 2) { MFEM_VERIFY(nq == quad1D * quad1D,
""); }
985 else { MFEM_VERIFY(nq == quad1D * quad1D * quad1D,
""); }
989 MFEM_VERIFY(coeff.
GetVDim() == dim,
"Vector coefficient dimension mismatch.");
995 PAHcurlDotSetup2D(quad1D, ne, test_map_integral, ir->
GetWeights(),
996 geom->
J, coeff, pa_data);
1000 PAHcurlDotSetup3D(quad1D, ne, test_map_integral, ir->
GetWeights(),
1001 geom->
J, coeff, pa_data);
1009 PAHcurlDotApply2D(dofs1D, dofs1Dtest, quad1D, ne,
1010 mapsO->
B, mapsC->
B, mapsTest->
Bt, pa_data, x, y);
1014 PAHcurlDotApply3D(dofs1D, dofs1Dtest, quad1D, ne,
1015 mapsO->
B, mapsC->
B, mapsTest->
Bt, pa_data, x, y);
1019 MFEM_ABORT(
"Unsupported dimension!");
1028 PAHcurlDotApplyTranspose2D(dofs1D, dofs1Dtest, quad1D, ne,
1029 mapsO->
B, mapsC->
B, mapsTest->
B,
1034 PAHcurlDotApplyTranspose3D(dofs1D, dofs1Dtest, quad1D, ne,
1035 mapsO->
B, mapsC->
B, mapsTest->
B,
1040 MFEM_ABORT(
"Unsupported dimension!");
1054 MFEM_VERIFY(el != NULL,
"Only VectorTensorFiniteElement is supported!");
1058 MFEM_ABORT(
"Unknown kernel.");
1075 const int dims = el->
GetDim();
1076 MFEM_VERIFY(dims == 2,
"");
1080 MFEM_VERIFY(
dim == 2,
"");
1121 MFEM_ABORT(
"Unsupported map type");
1126 MFEM_ABORT(
"Unsupported dimension!");
1140 MFEM_ABORT(
"Unsupported dimension!");
1155 MFEM_ABORT(
"Unsupported dimension!");
1169 MFEM_VERIFY(trial_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1173 MFEM_VERIFY(test_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1178 const int dims = trial_el->
GetDim();
1179 MFEM_VERIFY(dims == 3,
"");
1183 MFEM_VERIFY(dim == 3,
"");
1187 ne = trial_fes.
GetNE();
1193 dofs1D = mapsC->
ndof;
1194 quad1D = mapsC->
nqpt;
1195 dofs1Dtest = mapsCtest->
ndof;
1197 MFEM_VERIFY(dofs1D == mapsO->
ndof + 1 && quad1D == mapsO->
nqpt,
"");
1202 const int symmDims = (dims * (dims + 1)) / 2;
1203 coeffDim = (
DQ ? 3 : 1);
1208 const int ndata = curlSpaces ? (coeffDim == 1 ? 1 : 9) : symmDims;
1222 internal::PAHcurlL2Setup3D(nq, coeffDim, ne, ir->
GetWeights(), coeff, pa_data);
1226 internal::PAHcurlHdivMassSetup3D(quad1D, coeffDim, ne,
false, ir->
GetWeights(),
1227 geom->
J, coeff, pa_data);
1234 internal::PACurlCurlSetup3D(quad1D, coeffDim, ne, ir->
GetWeights(), geom->
J,
1239 MFEM_ABORT(
"Unknown kernel.");
1248 const int ndata = coeffDim == 1 ? 1 : 9;
1252 const int ID = (dofs1D << 4) | quad1D;
1256 return internal::SmemPAHcurlL2Apply3D<2,3>(
1257 dofs1D, quad1D, ndata, ne,
1258 mapsO->
B, mapsC->
B, mapsC->
G,
1261 return internal::SmemPAHcurlL2Apply3D<3,4>(
1262 dofs1D, quad1D, ndata, ne,
1263 mapsO->
B, mapsC->
B, mapsC->
G,
1266 return internal::SmemPAHcurlL2Apply3D<4,5>(
1267 dofs1D, quad1D, ndata, ne,
1268 mapsO->
B, mapsC->
B, mapsC->
G,
1271 return internal::SmemPAHcurlL2Apply3D<5,6>(
1272 dofs1D, quad1D, ndata, ne,
1273 mapsO->
B, mapsC->
B, mapsC->
G,
1276 return internal::SmemPAHcurlL2Apply3D(
1277 dofs1D, quad1D, ndata, ne,
1278 mapsO->
B, mapsC->
B, mapsC->
G,
1284 internal::PAHcurlL2Apply3D(dofs1D, quad1D, ndata, ne, mapsO->
B, mapsC->
B,
1285 mapsO->
Bt, mapsC->
Bt, mapsC->
G, pa_data, x, y);
1291 internal::PAHcurlHdivApply3D(dofs1D, dofs1Dtest, quad1D, ne, mapsO->
B,
1292 mapsC->
B, mapsOtest->
Bt, mapsCtest->
Bt, mapsC->
G,
1297 MFEM_ABORT(
"Unsupported dimension or space!");
1307 internal::PAHcurlHdivApplyTranspose3D(dofs1D, dofs1Dtest, quad1D, ne, mapsO->
B,
1308 mapsC->
B, mapsOtest->
Bt, mapsCtest->
Bt,
1309 mapsC->
Gt, pa_data, x, y);
1313 MFEM_ABORT(
"Unsupported dimension or space!");
1328 MFEM_VERIFY(trial_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1332 MFEM_VERIFY(test_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1337 const int dims = trial_el->
GetDim();
1338 MFEM_VERIFY(dims == 3,
"");
1342 MFEM_VERIFY(dim == 3,
"");
1346 ne = trial_fes.
GetNE();
1350 dofs1D = mapsC->
ndof;
1351 quad1D = mapsC->
nqpt;
1353 MFEM_VERIFY(dofs1D == mapsO->
ndof + 1 && quad1D == mapsO->
nqpt,
"");
1361 const int symmDims = (dims * (dims + 1)) / 2;
1363 coeffDim =
DQ ? 3 : 1;
1364 const int ndata = curlSpaces ? (
DQ ? 9 : 1) : symmDims;
1372 else if (
MQ) { MFEM_ABORT(
"Not implemented."); }
1379 internal::PAHcurlL2Setup3D(nq, coeffDim, ne, ir->
GetWeights(), coeff, pa_data);
1383 internal::PAHcurlHdivMassSetup3D(quad1D, coeffDim, ne,
false, ir->
GetWeights(),
1384 geom->
J, coeff, pa_data);
1390 internal::PACurlCurlSetup3D(quad1D, coeffDim, ne, ir->
GetWeights(), geom->
J,
1395 MFEM_ABORT(
"Unknown kernel.");
1404 const int ndata = coeffDim == 1 ? 1 : 9;
1407 const int ID = (dofs1D << 4) | quad1D;
1411 return internal::SmemPAHcurlL2ApplyTranspose3D<2,3>(
1412 dofs1D, quad1D, ndata,
1413 ne, mapsO->
B, mapsC->
B,
1414 mapsC->
G, pa_data, x, y);
1416 return internal::SmemPAHcurlL2ApplyTranspose3D<3,4>(
1417 dofs1D, quad1D, ndata,
1418 ne, mapsO->
B, mapsC->
B,
1419 mapsC->
G, pa_data, x, y);
1421 return internal::SmemPAHcurlL2ApplyTranspose3D<4,5>(
1422 dofs1D, quad1D, ndata,
1423 ne, mapsO->
B, mapsC->
B,
1424 mapsC->
G, pa_data, x, y);
1426 return internal::SmemPAHcurlL2ApplyTranspose3D<5,6>(
1427 dofs1D, quad1D, ndata,
1428 ne, mapsO->
B, mapsC->
B,
1429 mapsC->
G, pa_data, x, y);
1431 return internal::SmemPAHcurlL2ApplyTranspose3D(
1432 dofs1D, quad1D, ndata, ne,
1434 mapsC->
G, pa_data, x, y);
1439 internal::PAHcurlL2ApplyTranspose3D(dofs1D, quad1D, ndata, ne, mapsO->
B,
1440 mapsC->
B, mapsO->
Bt, mapsC->
Bt, mapsC->
Gt,
1447 internal::PAHcurlHdivApplyTranspose3D(dofs1D, dofs1D, quad1D, ne, mapsO->
B,
1448 mapsC->
B, mapsO->
Bt, mapsC->
Bt,
1449 mapsC->
Gt, pa_data, x, y);
1453 MFEM_ABORT(
"Unsupported dimension or space!");
1463 internal::PAHcurlHdivApply3D(dofs1D, dofs1D, quad1D, ne, mapsO->
B,
1464 mapsC->
B, mapsO->
Bt, mapsC->
Bt, mapsC->
G,
1469 MFEM_ABORT(
"Unsupported dimension or space!");
1483 MFEM_VERIFY(trial_tensor_el != NULL,
1484 "Only tensor-product scalar trial elements are supported!");
1488 MFEM_VERIFY(test_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1490 "Only H(div) test spaces are supported!");
1493 *trial_fel, *test_fel,
1496 const int dims = test_el->
GetDim();
1497 MFEM_VERIFY(dims == 2 || dims == 3,
"");
1501 MFEM_VERIFY(
dim == 2 ||
dim == 3,
"");
1504 MFEM_VERIFY(
ne == test_fes.
GetNE(),
1505 "Different meshes for test and trial spaces");
1558 MFEM_ABORT(
"Unsupported dimension!");
1577 MFEM_ABORT(
"Unsupported dimension!");
1591 MFEM_VERIFY(trial_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1593 "Only H(div) trial spaces are supported!");
1597 MFEM_VERIFY(test_tensor_el != NULL,
1598 "Only tensor-product scalar test elements are supported!");
1609 MFEM_VERIFY(dim == 2,
"Only 2D is supported.");
1610 MFEM_VERIFY(trial_el->
GetDim() == dim && test_fel->
GetDim() == dim,
1611 "Trial/test dimension mismatch.");
1613 ne = trial_fes.
GetNE();
1614 MFEM_VERIFY(ne == test_fes.
GetNE(),
1615 "Different meshes for test and trial spaces");
1622 dofs1D = mapsC->
ndof;
1623 dofs1Dtest = mapsTest->
ndof;
1624 quad1D = mapsC->
nqpt;
1627 MFEM_VERIFY(dofs1D == mapsO->
ndof + 1 && quad1D == mapsO->
nqpt,
"");
1628 MFEM_VERIFY(quad1D == mapsTest->
nqpt,
"Trial/test quadrature mismatch");
1634 MFEM_VERIFY(nq == quad1D * quad1D,
"");
1636 Rotated2DVectorCoefficient rotated(*
VQ);
1641 PAHdivDotSetup2D(quad1D, ne, test_map_integral, ir->
GetWeights(),
1642 geom->
J, coeff, pa_data);
1648 PAHdivDotApply2D(dofs1D, dofs1Dtest, quad1D, ne,
1649 mapsO->
B, mapsC->
B, mapsTest->
Bt,
1656 PAHdivDotApplyTranspose2D(dofs1D, dofs1Dtest, quad1D, ne,
1657 mapsO->
B, mapsC->
B, mapsTest->
B,
1671 MFEM_VERIFY(trial_tensor_el != NULL,
1672 "Only tensor-product scalar trial elements are supported!");
1676 MFEM_VERIFY(test_el != NULL,
"Only VectorTensorFiniteElement is supported!");
1678 "Only H(curl) test spaces are supported!");
1689 MFEM_VERIFY(dim == 2,
"Only 2D is supported.");
1690 MFEM_VERIFY(test_el->
GetDim() == dim && trial_fel->
GetDim() == dim,
1691 "Trial/test dimension mismatch.");
1693 ne = trial_fes.
GetNE();
1694 MFEM_VERIFY(ne == test_fes.
GetNE(),
1695 "Different meshes for test and trial spaces");
1702 dofs1D = mapsC->
ndof;
1703 dofs1Dtrial = mapsTrial->
ndof;
1704 quad1D = mapsC->
nqpt;
1707 MFEM_VERIFY(dofs1D == mapsO->
ndof + 1 && quad1D == mapsO->
nqpt,
"");
1708 MFEM_VERIFY(quad1D == mapsTrial->
nqpt,
"Trial/test quadrature mismatch");
1714 MFEM_VERIFY(nq == quad1D * quad1D,
"");
1716 Rotated2DVectorCoefficient rotated(*
VQ);
1721 PAHcurlDotSetup2D(quad1D, ne, trial_map_integral, ir->
GetWeights(),
1722 geom->
J, coeff, pa_data);
1731 PAHcurlDotApplyTranspose2D(dofs1D, dofs1Dtrial, quad1D, ne,
1732 mapsO->
B, mapsC->
B, mapsTrial->
B,
1739 PAHcurlDotApply2D(dofs1D, dofs1Dtrial, quad1D, ne,
1740 mapsO->
B, mapsC->
B, mapsTrial->
Bt,
Class to represent a coefficient evaluated at quadrature points.
void SetConstant(real_t constant)
Set this vector to the given constant.
void Project(Coefficient &coeff)
Evaluate the given Coefficient at the quadrature points defined by qs.
int GetVDim() const
Return the number of values per quadrature point.
static MemoryType GetMemoryType()
(DEPRECATED) Equivalent to GetDeviceMemoryType().
static bool Allows(unsigned long b_mask)
Return true if any of the backends in the backend mask, b_mask, are allowed.
static MemoryType GetDeviceMemoryType()
Get the current Device MemoryType. This is the MemoryType used by most MFEM classes when allocating m...
Array< real_t > G
Gradients/divergences/curls of basis functions evaluated at quadrature points.
@ TENSOR
Tensor product representation using 1D matrices/tensors with dimensions using 1D number of quadrature...
Array< real_t > B
Basis functions evaluated at quadrature points.
int ndof
Number of degrees of freedom = number of basis functions. When mode is TENSOR, this is the 1D number.
Array< real_t > Gt
Transpose of G.
int nqpt
Number of quadrature points. When mode is TENSOR, this is the 1D number.
Array< real_t > Bt
Transpose of B.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetNE() const
Returns number of elements in the mesh.
Mesh * GetMesh() const
Returns the mesh.
const FiniteElement * GetTypicalFE() const
Return GetFE(0) if the local mesh is not empty; otherwise return a typical FE based on the Geometry t...
Abstract class for all finite elements.
virtual const DofToQuad & GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const
Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mo...
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
int GetDerivType() const
Returns the FiniteElement::DerivType of the element describing the spatial derivative method implemen...
int GetDim() const
Returns the reference space dimension for the finite element.
int GetMapType() const
Returns the FiniteElement::MapType of the element describing how reference functions are mapped to ph...
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
@ DIV
Implements CalcDivShape methods.
@ CURL
Implements CalcCurlShape methods.
Structure for storing mesh geometric factors: coordinates, Jacobians, and determinants of the Jacobia...
Vector J
Jacobians of the element transformations at all quadrature points.
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
const Array< real_t > & GetWeights() const
Return the quadrature weights in a contiguous array.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
const IntegrationRule * GetIntegrationRule() const
Equivalent to GetIntRule, but retained for backward compatibility with applications.
const IntegrationRule * IntRule
static const IntegrationRule & GetRule(const FiniteElement &trial_fe, const FiniteElement &test_fe, const ElementTransformation &Trans, const bool stroud=false)
int Dimension() const
Dimension of the reference space used within the elements.
ElementTransformation * GetTypicalElementTransformation()
If the local mesh is not empty return GetElementTransformation(0); otherwise, return the identity tra...
const GeometricFactors * GetGeometricFactors(const IntegrationRule &ir, const int flags, MemoryType d_mt=MemoryType::DEFAULT)
Return the mesh geometric factors corresponding to the given integration rule.
void AddMultTransposePA(const Vector &, Vector &) const override
Method for partially assembled transposed action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
void AddMultPA(const Vector &, Vector &) const override
Method for partially assembled action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
void AddMultPA(const Vector &x, Vector &y) const override
Method for partially assembled action.
void AddMultTransposePA(const Vector &x, Vector &y) const override
Method for partially assembled transposed action.
const DofToQuad * mapsO
Not owned. DOF-to-quad map, open.
const DofToQuad * mapsC
Not owned. DOF-to-quad map, closed.
int GetIntegrationOrder(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans) override
void AddMultTransposePA(const Vector &x, Vector &y) const override
Method for partially assembled transposed action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
void AddMultPA(const Vector &, Vector &) const override
Method for partially assembled action.
void AddMultTransposePA(const Vector &x, Vector &y) const override
Method for partially assembled transposed action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
void AddMultPA(const Vector &x, Vector &y) const override
Method for partially assembled action.
const DofToQuad * L2mapsO
Not owned. Scalar open/closed map.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
const DofToQuad * mapsO
Not owned. HDiv open map.
void AddMultPA(const Vector &x, Vector &y) const override
Method for partially assembled action.
const DofToQuad * mapsC
Not owned. HDiv closed map.
void AddMultTransposePA(const Vector &x, Vector &y) const override
Method for partially assembled transposed action.
void AddMultTransposePA(const Vector &, Vector &) const override
Method for partially assembled transposed action.
void AddMultPA(const Vector &, Vector &) const override
Method for partially assembled action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
DiagonalMatrixCoefficient * DQ
void AddMultPA(const Vector &, Vector &) const override
Method for partially assembled action.
void AddMultTransposePA(const Vector &, Vector &) const override
Method for partially assembled transposed action.
void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes) override
Class representing the storage layout of a QuadratureFunction.
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 ...
const DofToQuad & GetDofToQuadOpen(const IntegrationRule &ir, DofToQuad::Mode mode) const
const DofToQuad & GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const override
Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mo...
void SetSize(int s)
Resize the vector to size s.
real_t u(const Vector &xvec)
MFEM_HOST_DEVICE DeviceTensor< sizeof...(Dims), T > Reshape(T *ptr, Dims... dims)
Wrap a pointer as a DeviceTensor with automatically deduced template parameters.
@ FULL
Store the coefficient as a full QuadratureFunction.
void forall_2D(int N, int X, int Y, lambda &&body)
void forall_3D(int N, int X, int Y, int Z, lambda &&body)
MemoryType
Memory types supported by MFEM.
void forall(int N, lambda &&body)
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
@ DEVICE_MASK
Biwise-OR of all device backends.
static const DeviceDofQuadLimits & Get()
Return a const reference to the DeviceDofQuadLimits singleton.