12#ifndef MFEM_ELTRANS_BASIS
13#define MFEM_ELTRANS_BASIS
33 static constexpr MFEM_HOST_DEVICE
int Dimension() {
return 1; }
36 static bool MFEM_HOST_DEVICE
inside(
real_t x) {
return x >= 0 && x <= 1; }
63 static constexpr MFEM_HOST_DEVICE
int Dimension() {
return 2; }
67 return (x >= 0) && (x <= 1) && (y >= 0) && (y <= 1);
79 return x_cond || y_cond;
85 static constexpr MFEM_HOST_DEVICE
int Dimension() {
return 3; }
89 return (x >= 0) && (x <= 1) && (y >= 0) && (y <= 1) && (z >= 0) && (z <= 1);
103 return x_cond || y_cond || z_cond;
122 for (
int j = 0; j <
pN; ++j)
128 den *= (
z[i] -
z[j]);
142 for (
int j = 0; j <
pN; ++j)
149 den *= (
z[i] -
z[j]);
166 for (
int j = 0; j <
pN; ++j)
174 den *= (
z[i] -
z[j]);
1D Lagrange basis from [0, 1]
real_t MFEM_HOST_DEVICE eval(real_t x, int i) const
Evaluates the i'th Lagrange polynomial at x
const real_t * z
interpolant node locations, in reference space
void MFEM_HOST_DEVICE eval_d2(real_t &p, real_t &d1, real_t &d2, real_t x, int i) const
void MFEM_HOST_DEVICE eval_d1(real_t &p, real_t &d1, real_t x, int i) const
real_t p(const Vector &x, real_t t)
static bool MFEM_HOST_DEVICE inside(real_t x, real_t y, real_t z)
true if the given point (x,y,z) in ref space is inside the element
static constexpr MFEM_HOST_DEVICE int Dimension()
static bool MFEM_HOST_DEVICE project(real_t &x, real_t &y, real_t &z, real_t &dx, real_t &dy, real_t &dz)
static constexpr MFEM_HOST_DEVICE int Dimension()
static bool MFEM_HOST_DEVICE project(real_t &x, real_t &dx)
static bool MFEM_HOST_DEVICE inside(real_t x)
true if the given point x in ref space is inside the element
static constexpr MFEM_HOST_DEVICE int Dimension()
static bool MFEM_HOST_DEVICE inside(real_t x, real_t y)
true if the given point (x,y) in ref space is inside the element
static bool MFEM_HOST_DEVICE project(real_t &x, real_t &y, real_t &dx, real_t &dy)
Various utilities for working with different element geometries.