12 #include "../tmop.hpp"
14 #include "../tmop_tools.hpp"
15 #include "../../general/forall.hpp"
16 #include "../../linalg/kernels.hpp"
30 constexpr
int DIM = 3;
31 const int D1D = T_D1D ? T_D1D : d1d;
32 const int Q1D = T_Q1D ? T_Q1D : q1d;
40 MFEM_FORALL_3D(e, NE, Q1D, Q1D, Q1D,
42 const int D1D = T_D1D ? T_D1D : d1d;
43 const int Q1D = T_Q1D ? T_Q1D : q1d;
44 constexpr
int MQ1 = T_Q1D ? T_Q1D : T_MAX;
45 constexpr
int MD1 = T_D1D ? T_D1D : T_MAX;
47 MFEM_SHARED
double BG[2][MQ1*MD1];
48 MFEM_SHARED
double DDD[3][MD1*MD1*MD1];
49 MFEM_SHARED
double DDQ[6][MD1*MD1*MQ1];
50 MFEM_SHARED
double DQQ[9][MD1*MQ1*MQ1];
51 MFEM_SHARED
double QQQ[9][MQ1*MQ1*MQ1];
53 kernels::internal::LoadX<MD1>(e,D1D,X,DDD);
54 kernels::internal::LoadBG<MD1,MQ1>(D1D,Q1D,
b,g,BG);
56 kernels::internal::GradX<MD1,MQ1>(D1D,Q1D,BG,DDD,DDQ);
57 kernels::internal::GradY<MD1,MQ1>(D1D,Q1D,BG,DDQ,DQQ);
58 kernels::internal::GradZ<MD1,MQ1>(D1D,Q1D,BG,DQQ,QQQ);
60 MFEM_FOREACH_THREAD(qz,z,Q1D)
62 MFEM_FOREACH_THREAD(qy,y,Q1D)
64 MFEM_FOREACH_THREAD(qx,x,Q1D)
67 kernels::internal::PullGrad<MQ1>(Q1D,qx,qy,qz,QQQ,J);
68 E(qx,qy,qz,e) = kernels::Det<3>(J);
89 const int D1D = maps.
ndof;
90 const int Q1D = maps.
nqpt;
91 const int id = (D1D << 4 ) | Q1D;
98 MFEM_LAUNCH_TMOP_KERNEL(MinDetJpr_Kernel_3D,
id,NE,B,G,XE,E);
int GetNPoints() const
Returns the number of the points in the integration rule.
const IntegrationRule & ir
Tensor product representation using 1D matrices/tensors with dimensions using 1D number of quadrature...
int nqpt
Number of quadrature points. When mode is TENSOR, this is the 1D number.
int ndof
Number of degrees of freedom = number of basis functions. When mode is TENSOR, this is the 1D number...
int GetNE() const
Returns number of elements.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
virtual void UseDevice(bool use_dev) const
Enable execution of Vector operations using the mfem::Device.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
Mesh * GetMesh() const
Returns the mesh.
virtual double * Write(bool on_dev=true)
Shortcut for mfem::Write(vec.GetMemory(), vec.Size(), on_dev).
static MemoryType GetDeviceMemoryType()
Get the current Device MemoryType. This is the MemoryType used by most MFEM classes when allocating m...
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)
const T * Read(bool on_dev=true) const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev).
double Min() const
Returns the minimal element of the vector.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Structure representing the matrices/tensors needed to evaluate (in reference space) the values...
Array< double > B
Basis functions evaluated at quadrature points.
virtual const DofToQuad & GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const
Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mo...
double MinDetJpr_3D(const FiniteElementSpace *, const Vector &) const
ElementDofOrdering
Constants describing the possible orderings of the DOFs in one element.
Array< double > G
Gradients/divergences/curls of basis functions evaluated at quadrature points.
virtual const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...
Lexicographic ordering for tensor-product FiniteElements.
const ElementRestrictionOperator * GetElementRestriction(ElementDofOrdering e_ordering) const
Return an Operator that converts L-vectors to E-vectors.
virtual const double * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
MFEM_HOST_DEVICE DeviceTensor< sizeof...(Dims), T > Reshape(T *ptr, Dims...dims)
Wrap a pointer as a DeviceTensor with automatically deduced template parameters.