37 constexpr int DIM = 2;
38 constexpr int NBZ = 1;
39 const int D1D = T_D1D ? T_D1D : d1d;
40 const int Q1D = T_Q1D ? T_Q1D : q1d;
42 const bool const_c0 = c0_.
Size() == 1;
43 const auto C0 = const_c0 ?
46 const auto LD =
Reshape(lim_dist.
Read(), D1D, D1D, NE);
58 const int D1D = T_D1D ? T_D1D : d1d;
59 const int Q1D = T_Q1D ? T_Q1D : q1d;
60 constexpr int NBZ = 1;
61 constexpr int MQ1 = T_Q1D ? T_Q1D : T_MAX;
62 constexpr int MD1 = T_D1D ? T_D1D : T_MAX;
64 MFEM_SHARED
real_t B[MQ1*MD1];
65 MFEM_SHARED
real_t BLD[MQ1*MD1];
67 MFEM_SHARED
real_t XY[NBZ][MD1*MD1];
68 MFEM_SHARED
real_t DQ[NBZ][MD1*MQ1];
69 MFEM_SHARED
real_t QQ[NBZ][MQ1*MQ1];
71 MFEM_SHARED
real_t XY0[2][NBZ][MD1*MD1];
72 MFEM_SHARED
real_t DQ0[2][NBZ][MD1*MQ1];
73 MFEM_SHARED
real_t QQ0[2][NBZ][MQ1*MQ1];
75 MFEM_SHARED
real_t XY1[2][NBZ][MD1*MD1];
76 MFEM_SHARED
real_t DQ1[2][NBZ][MD1*MQ1];
77 MFEM_SHARED
real_t QQ1[2][NBZ][MQ1*MQ1];
79 kernels::internal::LoadX<MD1,NBZ>(e,D1D,LD,XY);
80 kernels::internal::LoadX<MD1,NBZ>(e,D1D,X0,XY0);
81 kernels::internal::LoadX<MD1,NBZ>(e,D1D,X1,XY1);
83 kernels::internal::LoadB<MD1,MQ1>(D1D,Q1D,
b,B);
84 kernels::internal::LoadB<MD1,MQ1>(D1D,Q1D,bld,BLD);
86 kernels::internal::EvalX<MD1,MQ1,NBZ>(D1D,Q1D,BLD,XY,DQ);
87 kernels::internal::EvalY<MD1,MQ1,NBZ>(D1D,Q1D,BLD,DQ,QQ);
89 kernels::internal::EvalX<MD1,MQ1,NBZ>(D1D,Q1D,B,XY0,DQ0);
90 kernels::internal::EvalY<MD1,MQ1,NBZ>(D1D,Q1D,B,DQ0,QQ0);
92 kernels::internal::EvalX<MD1,MQ1,NBZ>(D1D,Q1D,B,XY1,DQ1);
93 kernels::internal::EvalY<MD1,MQ1,NBZ>(D1D,Q1D,B,DQ1,QQ1);
95 MFEM_FOREACH_THREAD(qy,y,Q1D)
97 MFEM_FOREACH_THREAD(qx,x,Q1D)
99 const real_t *Jtr = &J(0,0,qx,qy,e);
101 const real_t weight = W(qx,qy) * detJtr;
102 const real_t coeff0 = const_c0 ? C0(0,0,0) : C0(qx,qy,e);
103 const real_t weight_m = weight * lim_normal * coeff0;
106 kernels::internal::PullEval<MQ1,NBZ>(Q1D,qx,qy,QQ,D);
107 kernels::internal::PullEval<MQ1,NBZ>(Q1D,qx,qy,QQ0,p0);
108 kernels::internal::PullEval<MQ1,NBZ>(Q1D,qx,qy,QQ1,p1);
118 const real_t c = 1.0 / (dist * dist);
126 real_t dist_squared = dist*dist;
127 real_t dist_squared_squared = dist_squared*dist_squared;
128 real_t f = exp(10.0*((dsq / dist_squared)-1.0));
129 grad_grad[0] = ((400.0*tmp[0]*tmp[0]*
f)/dist_squared_squared)+
130 (20.0*
f/dist_squared);
131 grad_grad[1] = (400.0*tmp[0]*tmp[1]*
f)/dist_squared_squared;
132 grad_grad[2] = grad_grad[1];
133 grad_grad[3] = ((400.0*tmp[1]*tmp[1]*
f)/dist_squared_squared)+
134 (20.0*
f/dist_squared);
138 for (
int i = 0; i <
DIM; i++)
140 for (
int j = 0; j <
DIM; j++)
142 H0(i,j,qx,qy,e) = weight_m * gg(i,j);
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)