12 #include "../general/forall.hpp"
15 #include "libceed/diffusion.hpp"
28 if (mesh->
GetNE() == 0) {
return; }
31 if (DeviceCanUseCeed())
34 ceedDataPtr =
new CeedData;
35 InitCeedCoeff(Q, *mesh, *ir, ceedDataPtr);
36 return CeedMFDiffusionAssemble(fes, *ir, *ceedDataPtr);
39 mfem_error(
"Error: DiffusionIntegrator::AssembleMF only implemented with libCEED");
42 void DiffusionIntegrator::AssembleDiagonalMF(
Vector &diag)
45 if (DeviceCanUseCeed())
47 CeedAssembleDiagonal(ceedDataPtr, diag);
52 mfem_error(
"Error: DiffusionIntegrator::AssembleDiagonalMF only implemented with libCEED");
56 void DiffusionIntegrator::AddMultMF(
const Vector &x,
Vector &y)
const
59 if (DeviceCanUseCeed())
61 CeedAddMult(ceedDataPtr, x, y);
66 mfem_error(
"Error: DiffusionIntegrator::AddMultMF only implemented with libCEED");
Abstract class for all finite elements.
Class for an integration rule - an Array of IntegrationPoint.
int GetNE() const
Returns number of elements.
Mesh * GetMesh() const
Returns the mesh.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...