28 constexpr int DIM = 3;
29 const int D1D = T_D1D ? T_D1D : d1d;
30 const int Q1D = T_Q1D ? T_Q1D : q1d;
32 const auto B =
Reshape(
b.Read(), Q1D, D1D);
39 constexpr int DIM = 3;
40 const int D1D = T_D1D ? T_D1D : d1d;
41 const int Q1D = T_Q1D ? T_Q1D : q1d;
42 constexpr int MD1 = T_D1D ? T_D1D : DofQuadLimits::MAX_D1D;
43 constexpr int MQ1 = T_Q1D ? T_Q1D : DofQuadLimits::MAX_Q1D;
45 MFEM_SHARED
real_t qqd[MQ1*MQ1*MD1];
46 MFEM_SHARED
real_t qdd[MQ1*MD1*MD1];
50 for (
int v = 0; v <
DIM; ++v)
53 MFEM_FOREACH_THREAD(qx,x,Q1D)
55 MFEM_FOREACH_THREAD(qy,y,Q1D)
57 MFEM_FOREACH_THREAD(dz,z,D1D)
61 for (
int qz = 0; qz < Q1D; ++qz)
63 const real_t Bz = B(qz,dz);
64 QQD(qx,qy,dz) += Bz * H0(v,v,qx,qy,qz,e) * Bz;
71 MFEM_FOREACH_THREAD(qx,x,Q1D)
73 MFEM_FOREACH_THREAD(dz,z,D1D)
75 MFEM_FOREACH_THREAD(dy,y,D1D)
79 for (
int qy = 0; qy < Q1D; ++qy)
81 const real_t By = B(qy,dy);
82 QDD(qx,dy,dz) += By * QQD(qx,qy,dz) * By;
89 MFEM_FOREACH_THREAD(dz,z,D1D)
91 MFEM_FOREACH_THREAD(dy,y,D1D)
93 MFEM_FOREACH_THREAD(dx,x,D1D)
97 for (
int qx = 0; qx < Q1D; ++qx)
99 const real_t Bx = B(qx,dx);
100 d += Bx * QDD(qx,dy,dz) * Bx;
102 D(dx,dy,dz, v, e) += d;
MFEM_REGISTER_TMOP_KERNELS(void, DatcSize, const int NE, const int ncomp, const int sizeidx, const real_t input_min_size, const DenseMatrix &w_, const Array< real_t > &b_, const Vector &x_, const Vector &nc_reduce, DenseTensor &j_, const int d1d, const int q1d)
MFEM_HOST_DEVICE DeviceTensor< sizeof...(Dims), T > Reshape(T *ptr, Dims... dims)
Wrap a pointer as a DeviceTensor with automatically deduced template parameters.