12 #include "../tmop.hpp" 14 #include "../../general/forall.hpp" 15 #include "../../linalg/kernels.hpp" 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);
37 MFEM_FORALL_3D(e, NE, Q1D, Q1D, Q1D,
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 :
MAX_D1D;
43 constexpr
int MQ1 = T_Q1D ? T_Q1D :
MAX_Q1D;
45 MFEM_SHARED
double qqd[MQ1*MQ1*MD1];
46 MFEM_SHARED
double 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 double 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 double 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 double Bx = B(qx,dx);
100 d += Bx * QDD(qx,dy,dz) * Bx;
102 D(dx,dy,dz, v, e) += d;
114 const int D1D =
PA.maps->ndof;
115 const int Q1D =
PA.maps->nqpt;
116 const int id = (D1D << 4 ) | Q1D;
120 MFEM_LAUNCH_TMOP_KERNEL(AssembleDiagonalPA_Kernel_C0_3D,
id,N,B,
H0,D);
struct mfem::TMOP_Integrator::@23 PA
virtual const double * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
MFEM_REGISTER_TMOP_KERNELS(void, DatcSize, const int NE, const int ncomp, const int sizeidx, const DenseMatrix &w_, const Array< double > &b_, const Vector &x_, DenseTensor &j_, const int d1d, const int q1d)
A basic generic Tensor class, appropriate for use on the GPU.
virtual double * ReadWrite(bool on_dev=true)
Shortcut for mfem::ReadWrite(vec.GetMemory(), vec.Size(), on_dev).
void AssembleDiagonalPA_C0_3D(Vector &) const
MFEM_HOST_DEVICE DeviceTensor< sizeof...(Dims), T > Reshape(T *ptr, Dims... dims)
Wrap a pointer as a DeviceTensor with automatically deduced template parameters.