10#define IPPL_FEMSPACE_H
14#include "Utility/IpplException.h"
16#include "FEM/Elements/Element.h"
17#include "FEM/Quadrature/Quadrature.h"
18#include "Meshes/UniformCartesian.h"
22 constexpr unsigned calculateNumElementVertices(
unsigned Dim) {
38 template <
typename T,
unsigned Dim,
unsigned NumElementDOFs,
typename ElementType,
39 typename QuadratureType,
typename FieldLHS,
typename FieldRHS>
43 static constexpr unsigned dim = Dim;
47 static constexpr unsigned numElementVertices = calculateNumElementVertices(Dim);
48 static constexpr unsigned numElementDOFs = NumElementDOFs;
75 const QuadratureType& quadrature);
190 const size_t& globalDOFIndex)
const = 0;
201 const size_t& localDOFIndex)
const = 0;
220 const size_t& elementIndex)
const = 0;
228 ElementType ref_element_m;
229 const QuadratureType& quadrature_m;
237#include "FEM/FiniteElementSpace.hpp"
The FiniteElementSpace class handles the mesh index mapping to vertices and elements and is the base ...
Definition FiniteElementSpace.h:41
virtual KOKKOS_FUNCTION Vector< size_t, NumElementDOFs > getGlobalDOFIndices(const size_t &elementIndex) const =0
Get the global DOF indices (vector of global DOF indices) of an element.
virtual KOKKOS_FUNCTION size_t numGlobalDOFs() const =0
Degree of Freedom operations //////////////////////////////////////.
KOKKOS_FUNCTION vertex_indices_t getElementMeshVertexIndices(const indices_t &elementNDIndex) const
Get all the global vertex indices of an element (given by its NDIndex).
Definition FiniteElementSpace.hpp:179
KOKKOS_FUNCTION size_t getElementIndex(const indices_t &ndindex) const
Get the global index of a mesh element given the NDIndex.
Definition FiniteElementSpace.hpp:155
virtual KOKKOS_FUNCTION Vector< size_t, NumElementDOFs > getLocalDOFIndices() const =0
Get the local DOF indices (vector of local DOF indices) They are independent of the specific element ...
KOKKOS_FUNCTION indices_list_t getElementMeshVertexNDIndices(const indices_t &elementNDIndex) const
Get all the NDIndices of the vertices of an element (given by its NDIndex).
Definition FiniteElementSpace.hpp:231
KOKKOS_FUNCTION size_t numElementsInDim(const size_t &dim) const
Get the number of elements in a given dimension.
Definition FiniteElementSpace.hpp:59
virtual KOKKOS_FUNCTION size_t getLocalDOFIndex(const size_t &elementIndex, const size_t &globalDOFIndex) const =0
Get the elements local DOF from the element index and global DOF index.
KOKKOS_FUNCTION indices_t getMeshVertexNDIndex(const size_t &vertex_index) const
Get the NDIndex of a mesh vertex.
Definition FiniteElementSpace.hpp:68
virtual KOKKOS_FUNCTION size_t getGlobalDOFIndex(const size_t &elementIndex, const size_t &localDOFIndex) const =0
Get the global DOF index from the element index and local DOF.
KOKKOS_FUNCTION vertex_points_t getElementMeshVertexPoints(const indices_t &elementNDIndex) const
Get all the global vertex points of an element (given by its NDIndex).
Definition FiniteElementSpace.hpp:271
UniformCartesian< T, Dim > & mesh_m
Member variables //////////////////////////////////////////////////.
Definition FiniteElementSpace.h:227
KOKKOS_FUNCTION size_t getMeshVertexIndex(const indices_t &vertex_nd_index) const
Get the global index of a mesh vertex given its NDIndex.
Definition FiniteElementSpace.hpp:100
KOKKOS_FUNCTION indices_t getElementNDIndex(const size_t &elementIndex) const
Get the NDIndex (vector of indices for each dimension) of a mesh element.
Definition FiniteElementSpace.hpp:121
KOKKOS_FUNCTION size_t numElements() const
Mesh and Element operations ///////////////////////////////////////.
Definition FiniteElementSpace.hpp:44