63 if (
dim==1) { MFEM_ABORT(
"Not supported yet... stay tuned!"); }
68 const bool const_c = coeff.
Size() == 1;
72 const auto C = const_c ?
Reshape(coeff.
Read(), 1,1,1) :
77 MFEM_FOREACH_THREAD(qx,x,Q1D)
79 MFEM_FOREACH_THREAD(qy,y,Q1D)
81 const real_t detJ = J(qx,qy,e);
82 const real_t coeff = const_c ? C(0,0,0) : C(qx,qy,e);
83 v(qx,qy,e) = W(qx,qy) * coeff * (by_val ? detJ : 1.0/detJ);
92 const bool const_c = coeff.
Size() == 1;
96 const auto C = const_c ?
Reshape(coeff.
Read(), 1,1,1,1) :
101 MFEM_FOREACH_THREAD(qx,x,Q1D)
103 MFEM_FOREACH_THREAD(qy,y,Q1D)
105 MFEM_FOREACH_THREAD(qz,z,Q1D)
107 const real_t detJ = J(qx,qy,qz,e);
108 const real_t coeff = const_c ? C(0,0,0,0) : C(qx,qy,qz,e);
109 v(qx,qy,qz,e) = W(qx,qy,qz) * coeff * (by_val ? detJ : 1.0/detJ);
126 if (
ne == 0) {
return; }
146 const bool const_c = coeff.
Size() == 1;
152 const auto C = const_c ?
Reshape(coeff.
Read(), 1, 1) :
157 MFEM_FOREACH_THREAD(qx,x,Q1D)
159 const real_t detJ = J(qx,e);
160 const real_t coeff = const_c ? C(0,0) : C(qx,e);
161 v(qx,e) = W(qx) * coeff * (by_val ? detJ : 1.0/detJ);
169 const auto C = const_c ?
Reshape(coeff.
Read(), 1,1,1) :
174 MFEM_FOREACH_THREAD(qx,x,Q1D)
176 MFEM_FOREACH_THREAD(qy,y,Q1D)
178 const real_t detJ = J(qx,qy,e);
179 const real_t coeff = const_c ? C(0,0,0) : C(qx,qy,e);
180 v(qx,qy,e) = W(qx,qy) * coeff * (by_val ? detJ : 1.0/detJ);
187 MFEM_ABORT(
"Not supported.");
222 return internal::OccaPAMassApply2D(D1D,Q1D,
ne,B,Bt,D,x,y);
226 return internal::OccaPAMassApply3D(D1D,Q1D,
ne,B,Bt,D,x,y);
228 MFEM_ABORT(
"OCCA PA Mass Apply unknown kernel!");
231 ApplyPAKernels::Run(
dim, D1D, Q1D,
ne, B, Bt, D, x, y, D1D, Q1D);
const T * Read(bool on_dev=true) const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev).
Class to represent a coefficient evaluated at quadrature points.
static MemoryType GetDeviceMemoryType()
Get the current Device MemoryType. This is the MemoryType used by most MFEM classes when allocating m...
@ 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.
Array< real_t > Bt
Transpose of B.
Vector detJ
Determinants of the Jacobians at all quadrature points.
Class representing the storage layout of a FaceQuadratureFunction.
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.
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th boundary fac...
Mesh * GetMesh() const
Returns the mesh.
const FiniteElement * GetTypicalFE() const
Return GetFE(0) if the local mesh is not empty; otherwise return a typical FE based on the Geometry t...
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...
int GetDim() const
Returns the reference space dimension for the finite element.
int GetMapType() const
Returns the FiniteElement::MapType of the element describing how reference functions are mapped to ph...
Vector detJ
Determinants of the Jacobians at all quadrature points.
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
const Array< real_t > & GetWeights() const
Return the quadrature weights in a contiguous array.
const IntegrationRule * IntRule
const FiniteElementSpace * fespace
const FaceGeometricFactors * face_geom
Not owned.
const DofToQuad * maps
Not owned.
static const IntegrationRule & GetRule(const FiniteElement &trial_fe, const FiniteElement &test_fe, const ElementTransformation &Trans)
void AddMultPA(const Vector &, Vector &) const override
Method for partially assembled action.
void AssemblePABoundary(const FiniteElementSpace &fes) override
virtual void AssembleDiagonalPA(Vector &diag) override
Assemble diagonal and add it to Vector diag.
void AssemblePA(const FiniteElementSpace &fes) override
Method defining partial assembly.
const GeometricFactors * geom
Not owned.
void AddMultTransposePA(const Vector &, Vector &) const override
Method for partially assembled transposed action.
virtual int GetNFbyType(FaceType type) const
Returns the number of faces according to the requested type, does not count master nonconforming face...
const FaceGeometricFactors * GetFaceGeometricFactors(const IntegrationRule &ir, const int flags, FaceType type, MemoryType d_mt=MemoryType::DEFAULT)
Return the mesh geometric factors for the faces corresponding to the given integration rule.
int GetNE() const
Returns number of elements.
int Dimension() const
Dimension of the reference space used within the elements.
ElementTransformation * GetTypicalElementTransformation()
If the local mesh is not empty return GetElementTransformation(0); otherwise, return the identity tra...
ElementTransformation * GetBdrElementTransformation(int i)
Returns a pointer to the transformation defining the i-th boundary element.
const GeometricFactors * GetGeometricFactors(const IntegrationRule &ir, const int flags, MemoryType d_mt=MemoryType::DEFAULT)
Return the mesh geometric factors corresponding to the given integration rule.
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
Class representing the storage layout of a QuadratureFunction.
virtual const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
int Size() const
Returns the size of the vector.
void SetSize(int s)
Resize the vector to size s.
virtual real_t * Write(bool on_dev=true)
Shortcut for mfem::Write(vec.GetMemory(), vec.Size(), on_dev).
void GetDiagonal(mfem::Vector &diag) const
void AddMult(const mfem::Vector &x, mfem::Vector &y, const real_t a=1.0) const override
Operator application: y+=A(x) (default) or y+=a*A(x).
Represent a MassIntegrator with AssemblyLevel::Partial using libCEED.
MFEM_HOST_DEVICE DeviceTensor< sizeof...(Dims), T > Reshape(T *ptr, Dims... dims)
Wrap a pointer as a DeviceTensor with automatically deduced template parameters.
bool DeviceCanUseCeed()
Function that determines if a CEED kernel should be used, based on the current mfem::Device configura...
@ COMPRESSED
Enable all above compressions.
void forall_2D(int N, int X, int Y, lambda &&body)
void forall_3D(int N, int X, int Y, int Z, lambda &&body)
bool DeviceCanUseOcca()
Function that determines if an OCCA kernel should be used, based on the current mfem::Device configur...
MemoryType
Memory types supported by MFEM.