19#ifndef LIBMESH_FE_LAGRANGE_GLL_SHAPE_H
20#define LIBMESH_FE_LAGRANGE_GLL_SHAPE_H
23#include "libmesh/enum_fe_family.h"
24#include "libmesh/enum_order.h"
25#include "libmesh/fe_lagrange_gll_shape_1D.h"
26#include "libmesh/int_range.h"
54template <
unsigned int Dim>
57 return Dim * (Dim + 1) / 2;
71 const unsigned int dim,
73 unsigned int * indices);
86 const unsigned int dim,
88 unsigned int * indices)
90 const unsigned int n =
static_cast<unsigned int>(order) + 1;
92 unsigned int stride = 1;
96 indices[d] = (i / stride) % n;
100 libmesh_assert_less (i, stride);
112template <FEFamily T,
unsigned int Dim>
115 const unsigned int i,
117 const unsigned int *
const deriv_coords,
118 const unsigned int n_deriv_coords)
120 unsigned int indices[3];
122 fe_lagrange_gll_tensor_index<T>(elem, order, Dim, i, indices);
128 unsigned int deriv_order = 0;
129 for (
const auto k :
make_range(n_deriv_coords))
130 if (deriv_coords[k] == d)
143#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
150 libmesh_error_msg(
"Invalid derivative order " << deriv_order <<
".");
This is the base class from which all geometric element types are derived.
A Point defines a location in LIBMESH_DIM dimensional Real space.
The libMesh namespace provides an interface to certain functionality in the library.
void fe_lagrange_gll_tensor_index< L2_LAGRANGE_GLL >(const Elem *, const Order order, const unsigned int dim, const unsigned int i, unsigned int *indices)
All L2_LAGRANGE_GLL degrees of freedom belong to the element.
constexpr unsigned int fe_lagrange_gll_n_second_derivs()
constexpr unsigned int fe_lagrange_gll_second_deriv_pairs[6][2]
The pair of coordinates differentiated by each second derivative index j of FE::shape_second_deriv().
Real fe_lagrange_gll_tensor_product(const Elem *elem, const Order order, const unsigned int i, const Point &p, const unsigned int *const deriv_coords, const unsigned int n_deriv_coords)
void fe_lagrange_gll_tensor_index(const Elem *elem, const Order order, const unsigned int dim, const unsigned int i, unsigned int *indices)
Writes the tensor index of shape function i of order order into the first dim entries of indices.
Real fe_lagrange_gll_1D_shape_deriv(const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Real xi)
Real fe_lagrange_gll_1D_shape_second_deriv(const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Real xi)
Real fe_lagrange_gll_1D_shape(const Order order, const unsigned int i, const Real xi)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...