MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
det.cpp
Go to the documentation of this file.
1// Copyright (c) 2010-2026, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#include "det.hpp"
13
14namespace mfem
15{
16
17namespace internal
18{
19namespace quadrature_interpolator
20{
21
22void InitDetKernels()
23{
24 // 2D
34 // 3D
41}
42
43} // namespace quadrature_interpolator
44} // namespace internal
45
46/// @cond Suppress_Doxygen_warnings
47
49QuadratureInterpolator::DetKernels::Fallback(int DIM, int SDIM, int D1D,
50 int Q1D)
51{
52 if (DIM == 1)
53 {
54 if (SDIM == 1) { return internal::quadrature_interpolator::Det1D; }
55 else if (SDIM == 2) { return internal::quadrature_interpolator::Det1DSurface<0,0,2>; }
56 else if (SDIM == 3) { return internal::quadrature_interpolator::Det1DSurface<0,0,3>; }
57 else { MFEM_ABORT(""); }
58 }
59 else if (DIM == 2 && SDIM == 2) { return internal::quadrature_interpolator::Det2D; }
60 else if (DIM == 2 && SDIM == 3) { return internal::quadrature_interpolator::Det2DSurface; }
61 else if (DIM == 3)
62 {
63 const int MD = DeviceDofQuadLimits::Get().MAX_DET_1D;
64 const int MQ = DeviceDofQuadLimits::Get().MAX_DET_1D;
65 if (D1D <= MD && Q1D <= MQ) { return internal::quadrature_interpolator::Det3D<0,0,true>; }
66 else { return internal::quadrature_interpolator::Det3D<0,0,false>; }
67 }
68 else { MFEM_ABORT(""); }
69}
70
71/// @endcond
72
73} // namespace mfem
void(*)(const int NE, const real_t *B, const real_t *G, const real_t *e_vec, real_t *q_det, const int nd, const int nq, Vector *d_buffer) DetKernelType
static void AddDetSpecializations()
Adds specializations for DetKernels.
constexpr int SDIM
constexpr int DIM
static const DeviceDofQuadLimits & Get()
Return a const reference to the DeviceDofQuadLimits singleton.
Definition forall.hpp:138
int MAX_DET_1D
Maximum number of points for determinant computation in QuadratureInterpolator.
Definition forall.hpp:135