31 constexpr int DIM = 2;
32 constexpr int NBZ = 1;
34 const int D1D = T_D1D ? T_D1D : d1d;
35 const int Q1D = T_Q1D ? T_Q1D : q1d;
46 const int D1D = T_D1D ? T_D1D : d1d;
47 const int Q1D = T_Q1D ? T_Q1D : q1d;
48 constexpr int NBZ = 1;
49 constexpr int MQ1 = T_Q1D ? T_Q1D : T_MAX;
50 constexpr int MD1 = T_D1D ? T_D1D : T_MAX;
52 MFEM_SHARED
real_t BG[2][MQ1*MD1];
53 MFEM_SHARED
real_t XY[2][NBZ][MD1*MD1];
54 MFEM_SHARED
real_t DQ[4][NBZ][MD1*MQ1];
55 MFEM_SHARED
real_t QQ[4][NBZ][MQ1*MQ1];
57 kernels::internal::LoadX<MD1,NBZ>(e,D1D,X,XY);
58 kernels::internal::LoadBG<MD1,MQ1>(D1D,Q1D,
b,g,BG);
60 kernels::internal::GradX<MD1,MQ1,NBZ>(D1D,Q1D,BG,XY,DQ);
61 kernels::internal::GradY<MD1,MQ1,NBZ>(D1D,Q1D,BG,DQ,QQ);
63 MFEM_FOREACH_THREAD(qy,y,Q1D)
65 MFEM_FOREACH_THREAD(qx,x,Q1D)
67 const real_t *Jtr = &J(0,0,qx,qy,e);
75 kernels::internal::PullGrad<MQ1,NBZ>(Q1D,qx,qy,QQ,Jpr);
85 for (
int i = 0; i <
DIM; i++)
87 for (
int j = 0; j <
DIM; j++)
90 for (
int r = 0; r <
DIM; r++)
92 for (
int c = 0; c <
DIM; c++)
94 M(i,j) += H(r,c,i,j,qx,qy,e) * J(r,c);
104 kernels::internal::PushGrad<MQ1,NBZ>(Q1D,qx,qy, C, QQ);
108 kernels::internal::LoadBGt<MD1,MQ1>(D1D,Q1D,
b,g,BG);
109 kernels::internal::GradYt<MD1,MQ1,NBZ>(D1D,Q1D,BG,QQ,DQ);
110 kernels::internal::GradXt<MD1,MQ1,NBZ>(D1D,Q1D,BG,DQ,Y,e);
MFEM_HOST_DEVICE void Mult(const int height, const int width, const TA *data, const TX *x, TY *y)
Matrix vector multiplication: y = A x, where the matrix A is of size height x width with given data,...
MFEM_HOST_DEVICE void MultABt(const int Aheight, const int Awidth, const int Bheight, const TA *Adata, const TB *Bdata, TC *ABtdata)
Multiply a matrix of size Aheight x Awidth and data Adata with the transpose of a matrix of size Bhei...
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.