30 constexpr int DIM = 3;
32 const int Q1D = T_Q1D ? T_Q1D : q1d;
39 const int Q1D = T_Q1D ? T_Q1D : q1d;
40 MFEM_FOREACH_THREAD(qy,y,Q1D)
42 MFEM_FOREACH_THREAD(qx,x,Q1D)
44 MFEM_FOREACH_THREAD(qz,z,Q1D)
46 kernels::Set(
DIM,
DIM, 1.0, &W(0,0), &J(0,0,qx,qy,qz,e));
64 constexpr int DIM = 3;
67 const int D1D = T_D1D ? T_D1D : d1d;
68 const int Q1D = T_Q1D ? T_Q1D : q1d;
78 const int D1D = T_D1D ? T_D1D : d1d;
79 const int Q1D = T_Q1D ? T_Q1D : q1d;
81 constexpr int MQ1 = T_Q1D ? T_Q1D : T_MAX;
82 constexpr int MD1 = T_D1D ? T_D1D : T_MAX;
84 MFEM_SHARED
real_t BG[2][MQ1*MD1];
85 MFEM_SHARED
real_t DDD[3][MD1*MD1*MD1];
86 MFEM_SHARED
real_t DDQ[6][MD1*MD1*MQ1];
87 MFEM_SHARED
real_t DQQ[9][MD1*MQ1*MQ1];
88 MFEM_SHARED
real_t QQQ[9][MQ1*MQ1*MQ1];
90 kernels::internal::LoadX<MD1>(e,D1D,X,DDD);
91 kernels::internal::LoadBG<MD1,MQ1>(D1D,Q1D,
b,g,BG);
93 kernels::internal::GradX<MD1,MQ1>(D1D,Q1D,BG,DDD,DDQ);
94 kernels::internal::GradY<MD1,MQ1>(D1D,Q1D,BG,DDQ,DQQ);
95 kernels::internal::GradZ<MD1,MQ1>(D1D,Q1D,BG,DQQ,QQQ);
97 MFEM_FOREACH_THREAD(qz,z,Q1D)
99 MFEM_FOREACH_THREAD(qy,y,Q1D)
101 MFEM_FOREACH_THREAD(qx,x,Q1D)
104 const real_t *Wid = &W(0,0);
105 kernels::internal::PullGrad<MQ1>(Q1D,qx,qy,qz,QQQ,Jtr);
124 const int NE = mesh->
GetNE();
126 if (NE == 0) {
return true; }
129 "mixed meshes are not supported");
130 MFEM_VERIFY(!fes.
IsVariableOrder(),
"variable orders are not supported");
138 const int D1D = maps.
ndof;
139 const int Q1D = maps.
nqpt;
140 const int id = (D1D << 4 ) | Q1D;
146 MFEM_LAUNCH_TMOP_KERNEL(TC_IDEAL_SHAPE_UNIT_SIZE_3D_KERNEL,
152 MFEM_VERIFY(
nodes,
"");
159 MFEM_LAUNCH_TMOP_KERNEL(TC_IDEAL_SHAPE_GIVEN_SIZE_3D_KERNEL,
163 default:
return false;
const T * Read(bool on_dev=true) const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev).
Data type dense matrix using column-major storage.
const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read( GetMemory(), TotalSize(), on_dev).
Rank 3 tensor (array of matrices)
real_t * Write(bool on_dev=true)
Shortcut for mfem::Write(GetMemory(), TotalSize(), on_dev).
static MemoryType GetDeviceMemoryType()
Get the current Device MemoryType. This is the MemoryType used by most MFEM classes when allocating m...
Structure representing the matrices/tensors needed to evaluate (in reference space) the values,...
Array< real_t > G
Gradients/divergences/curls of basis functions evaluated at quadrature points.
Mode
Type of data stored in the arrays B, Bt, G, and Gt.
@ TENSOR
Tensor product representation using 1D matrices/tensors with dimensions using 1D number of quadrature...
Array< real_t > B
Basis functions evaluated at quadrature points.
int ndof
Number of degrees of freedom = number of basis functions. When mode is TENSOR, this is the 1D number.
int nqpt
Number of quadrature points. When mode is TENSOR, this is the 1D number.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
bool IsVariableOrder() const
Returns true if the space contains elements of varying polynomial orders.
virtual const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...
const ElementRestrictionOperator * GetElementRestriction(ElementDofOrdering e_ordering) const
Return an Operator that converts L-vectors to E-vectors.
Mesh * GetMesh() const
Returns the mesh.
int GetVDim() const
Returns vector dimension.
Abstract class for all finite elements.
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...
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
const DenseMatrix & GetGeomToPerfGeomJac(int GeomType) const
FiniteElementSpace * FESpace()
Class for an integration rule - an Array of IntegrationPoint.
int GetNE() const
Returns number of elements.
int Dimension() const
Dimension of the reference space used within the elements.
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
const TargetType target_type
const GridFunction * nodes
bool ComputeAllElementTargets(const FiniteElementSpace &fes, const IntegrationRule &ir, const Vector &xe, DenseTensor &Jtr) const
virtual const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
virtual void UseDevice(bool use_dev) const
Enable execution of Vector operations using the mfem::Device.
MFEM_HOST_DEVICE void Set(const int height, const int width, const real_t alpha, const TA *Adata, TB *Bdata)
Compute B = alpha*A, where the matrices A and B are of size height x width with data Adata and Bdata.
MFEM_HOST_DEVICE T Det(const T *data)
Compute the determinant of a square matrix of size dim with given data.
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.
void forall_3D(int N, int X, int Y, int Z, lambda &&body)
ElementDofOrdering
Constants describing the possible orderings of the DOFs in one element.
@ LEXICOGRAPHIC
Lexicographic ordering for tensor-product FiniteElements.