12#ifndef MFEM_BILININTEG_VECTORFEMASS_KERNELS_HPP
13#define MFEM_BILININTEG_VECTORFEMASS_KERNELS_HPP
30constexpr int NBZ3D(
int d1d,
int q1d)
32 if (d1d <= 1 || q1d <= 0)
38 int tmp = std::min((128 + q1d * q1d * q1d - 1) / (q1d * q1d * q1d), 64);
41 (3 * ((d1d - 1) * d1d * d1d + 2 * q1d * q1d * q1d) * tmp +
42 q1d * (d1d - 1) + q1d * d1d);
44 return std::max(std::min(tmp, (48 * 1024 + smem_req - 1) / smem_req), 1);
50 int DIM,
int TrialD1D,
int TestD1D,
int Q1D>
52VectorFEMassIntegrator::ApplyPAKernels::Kernel()
59 if constexpr (
DIM == 3)
61 if constexpr (trial_curl && test_curl)
66 return internal::SmemPAHcurlMassApply3D<
67 TrialD1D, Q1D, internal::hcurlmass::NBZ3D(TrialD1D, Q1D)>;
71 return internal::PAHcurlMassApply3D;
74 else if constexpr (trial_div && test_div)
77 return internal::SmemPAHdivMassApply3D<TrialD1D, Q1D>;
79 else if constexpr (trial_curl && test_div)
81 return internal::PAHdivHcurlMassApply3D;
83 else if constexpr (trial_div && test_curl)
85 return internal::PAHcurlHdivMassApply3D;
88 else if constexpr (
DIM == 2)
90 if constexpr (trial_curl && test_curl)
92 return internal::PAHcurlMassApply2D;
94 else if constexpr (trial_div && test_div)
97 return internal::SmemPAHdivMassApply2D<TrialD1D, Q1D>;
99 else if constexpr (trial_curl && test_div)
101 return internal::PAHdivHcurlMassApply2D;
103 else if constexpr (trial_div && test_curl)
105 return internal::PAHcurlHdivMassApply2D;
108 MFEM_ABORT(
"Unknown kernel.");
static bool Allows(unsigned long b_mask)
Return true if any of the backends in the backend mask, b_mask, are allowed.
DerivType
Enumeration for DerivType: defines which derivative method is implemented.
@ DIV
Implements CalcDivShape methods.
@ CURL
Implements CalcCurlShape methods.
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
@ DEVICE_MASK
Biwise-OR of all device backends.