37 constexpr int DIM = 3;
38 const int D1D = T_D1D ? T_D1D : d1d;
39 const int Q1D = T_Q1D ? T_Q1D : q1d;
41 const bool const_c0 = c0_.
Size() == 1;
42 const auto C0 = const_c0 ?
45 const auto LD =
Reshape(lim_dist.
Read(), D1D, D1D, D1D, NE);
57 constexpr int DIM = 3;
58 const int D1D = T_D1D ? T_D1D : d1d;
59 const int Q1D = T_Q1D ? T_Q1D : q1d;
60 constexpr int MQ1 = T_Q1D ? T_Q1D : T_MAX;
61 constexpr int MD1 = T_D1D ? T_D1D : T_MAX;
62 constexpr int MDQ = (MQ1 > MD1) ? MQ1 : MD1;
64 MFEM_SHARED
real_t B[MQ1*MD1];
65 MFEM_SHARED
real_t sBLD[MQ1*MD1];
66 kernels::internal::LoadB<MD1,MQ1>(D1D,Q1D,bld,sBLD);
69 MFEM_SHARED
real_t sm0[MDQ*MDQ*MDQ];
70 MFEM_SHARED
real_t sm1[MDQ*MDQ*MDQ];
76 MFEM_SHARED
real_t DDD0[3][MD1*MD1*MD1];
77 MFEM_SHARED
real_t DDQ0[3][MD1*MD1*MQ1];
78 MFEM_SHARED
real_t DQQ0[3][MD1*MQ1*MQ1];
79 MFEM_SHARED
real_t QQQ0[3][MQ1*MQ1*MQ1];
81 MFEM_SHARED
real_t DDD1[3][MD1*MD1*MD1];
82 MFEM_SHARED
real_t DDQ1[3][MD1*MD1*MQ1];
83 MFEM_SHARED
real_t DQQ1[3][MD1*MQ1*MQ1];
84 MFEM_SHARED
real_t QQQ1[3][MQ1*MQ1*MQ1];
86 kernels::internal::LoadX(e,D1D,LD,DDD);
87 kernels::internal::LoadX<MD1>(e,D1D,X0,DDD0);
88 kernels::internal::LoadX<MD1>(e,D1D,X1,DDD1);
90 kernels::internal::LoadB<MD1,MQ1>(D1D,Q1D,
b,B);
92 kernels::internal::EvalX(D1D,Q1D,BLD,DDD,DDQ);
93 kernels::internal::EvalY(D1D,Q1D,BLD,DDQ,DQQ);
94 kernels::internal::EvalZ(D1D,Q1D,BLD,DQQ,QQQ);
96 kernels::internal::EvalX<MD1,MQ1>(D1D,Q1D,B,DDD0,DDQ0);
97 kernels::internal::EvalY<MD1,MQ1>(D1D,Q1D,B,DDQ0,DQQ0);
98 kernels::internal::EvalZ<MD1,MQ1>(D1D,Q1D,B,DQQ0,QQQ0);
100 kernels::internal::EvalX<MD1,MQ1>(D1D,Q1D,B,DDD1,DDQ1);
101 kernels::internal::EvalY<MD1,MQ1>(D1D,Q1D,B,DDQ1,DQQ1);
102 kernels::internal::EvalZ<MD1,MQ1>(D1D,Q1D,B,DQQ1,QQQ1);
104 MFEM_FOREACH_THREAD(qz,z,Q1D)
106 MFEM_FOREACH_THREAD(qy,y,Q1D)
108 MFEM_FOREACH_THREAD(qx,x,Q1D)
110 const real_t *Jtr = &J(0,0,qx,qy,qz,e);
112 const real_t weight = W(qx,qy,qz) * detJtr;
113 const real_t coeff0 = const_c0 ? C0(0,0,0,0) : C0(qx,qy,qz,e);
114 const real_t weight_m = weight * lim_normal * coeff0;
117 kernels::internal::PullEval(qx,qy,qz,QQQ,D);
118 kernels::internal::PullEval<MQ1>(Q1D,qx,qy,qz,QQQ0,p0);
119 kernels::internal::PullEval<MQ1>(Q1D,qx,qy,qz,QQQ1,p1);
130 const real_t c = 1.0 / (dist * dist);
138 real_t dist_squared = dist*dist;
139 real_t dist_squared_squared = dist_squared*dist_squared;
140 real_t f = exp(10.0*((dsq / dist_squared)-1.0));
141 grad_grad[0] = ((400.0*tmp[0]*tmp[0]*
f)/dist_squared_squared)+
142 (20.0*
f/dist_squared);
143 grad_grad[1] = (400.0*tmp[0]*tmp[1]*
f)/dist_squared_squared;
144 grad_grad[2] = (400.0*tmp[0]*tmp[2]*
f)/dist_squared_squared;
145 grad_grad[3] = grad_grad[1];
146 grad_grad[4] = ((400.0*tmp[1]*tmp[1]*
f)/dist_squared_squared)+
147 (20.0*
f/dist_squared);
148 grad_grad[5] = (400.0*tmp[1]*tmp[2]*
f)/dist_squared_squared;
149 grad_grad[6] = grad_grad[2];
150 grad_grad[7] = grad_grad[5];
151 grad_grad[8] = ((400.0*tmp[2]*tmp[2]*
f)/dist_squared_squared)+
152 (20.0*
f/dist_squared);
156 for (
int i = 0; i <
DIM; i++)
158 for (
int j = 0; j <
DIM; j++)
160 H0(i,j,qx,qy,qz,e) = weight_m * gg(i,j);