19VectorFEMassIntegrator::ApplyPAKernels::Fallback(
21 int dim,
int,
int,
int)
30 if (trial_curl && test_curl)
32 return internal::PAHcurlMassApply3D;
34 else if (trial_div && test_div)
36 return internal::PAHdivMassApply3D;
38 else if (trial_curl && test_div)
40 return internal::PAHdivHcurlMassApply3D;
42 else if (trial_div && test_curl)
44 return internal::PAHcurlHdivMassApply3D;
49 if (trial_curl && test_curl)
51 return internal::PAHcurlMassApply2D;
53 else if (trial_div && test_div)
55 return internal::PAHdivMassApply2D;
57 else if (trial_curl && test_div)
59 return internal::PAHdivHcurlMassApply2D;
61 else if (trial_div && test_curl)
63 return internal::PAHcurlHdivMassApply2D;
66 MFEM_ABORT(
"Unknown kernel.");
70VectorFEMassIntegrator::Kernels::Kernels()
145 MFEM_VERIFY(trial_el != NULL,
"Only VectorTensorFiniteElement is supported!");
150 MFEM_VERIFY(test_el != NULL,
"Only VectorTensorFiniteElement is supported!");
155 const int dims = trial_el->
GetDim();
156 MFEM_VERIFY(dims == 2 || dims == 3,
"");
158 const int symmDims = (dims * (dims + 1)) / 2;
161 MFEM_VERIFY(
dim == 2 ||
dim == 3,
"");
164 MFEM_VERIFY(
ne == test_fes.
GetNE(),
165 "Different meshes for test and trial spaces");
193 const int coeff_dim = coeff.
GetVDim();
196 if ((trial_curl && test_div) || (trial_div && test_curl))
206 if (trial_curl && test_curl &&
dim == 3)
211 else if (trial_curl && test_curl &&
dim == 2)
216 else if (trial_div && test_div &&
dim == 3)
221 else if (trial_div && test_div &&
dim == 2)
226 else if (((trial_curl && test_div) || (trial_div && test_curl)) &&
235 const bool tr = (trial_div && test_curl);
250 MFEM_ABORT(
"Unknown kernel.");
266 return internal::SmemPAHcurlMassAssembleDiagonal3D<2,3>(
270 return internal::SmemPAHcurlMassAssembleDiagonal3D<3,4>(
274 return internal::SmemPAHcurlMassAssembleDiagonal3D<4,5>(
278 return internal::SmemPAHcurlMassAssembleDiagonal3D<5,6>(
282 return internal::SmemPAHcurlMassAssembleDiagonal3D(
301 MFEM_ABORT(
"Unknown kernel.");
319 MFEM_ABORT(
"Unknown kernel.");
326 const bool scalar_coeff = !(
DQ ||
MQ);
335 const bool scalar_coeff = !(
DQ ||
MQ);
352 absBto_t, absBtc_t, abs_pa_data, x, y,
dofs1D,
364 bool symmetricSpaces =
true;
365 if (
dim == 3 && ((trial_div && test_curl) || (trial_curl && test_div)))
367 const bool scalarCoeff = !(
DQ ||
MQ);
371 symmetricSpaces =
false;
373 else if (
dim == 2 && ((trial_curl && test_div) || (trial_div && test_curl)))
375 const bool scalarCoeff = !(
DQ ||
MQ);
379 symmetricSpaces =
false;
385 MFEM_ABORT(
"VectorFEMassIntegrator transpose not implemented for asymmetric MatrixCoefficient");
void Abs()
Replace each entry of the array with its absolute value.
Class to represent a coefficient evaluated at quadrature points.
void SetConstant(real_t constant)
Set this vector to the given constant.
void Project(Coefficient &coeff)
Evaluate the given Coefficient at the quadrature points defined by qs.
int GetVDim() const
Return the number of values per quadrature point.
void ProjectTranspose(MatrixCoefficient &coeff)
Project the transpose of coeff.
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
static MemoryType GetMemoryType()
(DEPRECATED) Equivalent to GetDeviceMemoryType().
static bool Allows(unsigned long b_mask)
Return true if any of the backends in the backend mask, b_mask, are allowed.
@ 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.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetNE() const
Returns number of elements in the mesh.
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.
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
int GetDerivType() const
Returns the FiniteElement::DerivType of the element describing the spatial derivative method implemen...
int GetDim() const
Returns the reference space dimension for the finite element.
DerivType
Enumeration for DerivType: defines which derivative method is implemented.
@ DIV
Implements CalcDivShape methods.
@ CURL
Implements CalcCurlShape methods.
Vector J
Jacobians of the element transformations 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
static const IntegrationRule & GetRule(const FiniteElement &trial_fe, const FiniteElement &test_fe, const ElementTransformation &Trans, const bool stroud=false)
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...
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.
Class representing the storage layout of a QuadratureFunction.
Base class for symmetric matrix coefficients that optionally depend on time and space.
Base class for vector Coefficients that optionally depend on time and space.
void AddMultPA(const Vector &x, Vector &y) const override
Method for partially assembled action.
void AssembleDiagonalPA(Vector &diag) override
Assemble diagonal and add it to Vector diag.
static void AddSpecialization()
FiniteElement::DerivType trial_fetype
void AddAbsMultPA(const Vector &x, Vector &y) const override
void(*)(const int NE, bool symmetric, const bool scalar_coeff, const Array< real_t > &trialBO, const Array< real_t > &trialBC, const Array< real_t > &testBOt, const Array< real_t > &testBCt, const Vector &pa_data, const Vector &x, Vector &y, const int triald1d, const int testd1d, const int q1d) ApplyKernelType
const DofToQuad * mapsO
Not owned. DOF-to-quad map, open.
const DofToQuad * mapsOtest
Not owned. DOF-to-quad map, open.
void AssemblePA(const FiniteElementSpace &fes) override
Method defining partial assembly.
FiniteElement::DerivType test_fetype
bool symmetric
False if using a nonsymmetric matrix coefficient.
void AddMultTransposePA(const Vector &x, Vector &y) const override
Method for partially assembled transposed action.
DiagonalMatrixCoefficient * DQ
const DofToQuad * mapsCtest
Not owned. DOF-to-quad map, closed.
const GeometricFactors * geom
Not owned.
const DofToQuad * mapsC
Not owned. DOF-to-quad map, closed.
const DofToQuad & GetDofToQuadOpen(const IntegrationRule &ir, DofToQuad::Mode mode) const
const DofToQuad & GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const override
Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mo...
void Abs()
(*this)(i) = abs((*this)(i))
void SetSize(int s)
Resize the vector to size s.
@ SYMMETRIC
Store the triangular part of symmetric matrices.
@ DEVICE_MASK
Biwise-OR of all device backends.