LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
scalar_fe_space.h
1#ifndef LF_USCALFE_SCALAR_FE_SPACE_H_
2#define LF_USCALFE_SCALAR_FE_SPACE_H_
3/***************************************************************************
4 * LehrFEM++ - A simple C++ finite element libray for teaching
5 * Developed from 2018 at the Seminar of Applied Mathematics of ETH Zurich,
6 * lead developers Dr. R. Casagrande and Prof. R. Hiptmair
7 ***************************************************************************/
8
17#include <lf/assemble/assemble.h>
18
19#include "scalar_reference_finite_element.h"
20
21namespace lf::fe {
22
44template <typename SCALAR>
46 public:
47 using Scalar = SCALAR;
48
49 protected:
52 ScalarFESpace() = default;
53 ScalarFESpace(const ScalarFESpace &) = default;
54 ScalarFESpace(ScalarFESpace &&) noexcept = default;
55 ScalarFESpace &operator=(const ScalarFESpace &) = default;
56 ScalarFESpace &operator=(ScalarFESpace &&) noexcept = default;
57
58 public:
62 [[nodiscard]] virtual std::shared_ptr<const lf::mesh::Mesh> Mesh() const = 0;
67 [[nodiscard]] virtual const lf::assemble::DofHandler &LocGlobMap() const = 0;
68
82 [[nodiscard]] virtual ScalarReferenceFiniteElement<SCALAR> const *
83 ShapeFunctionLayout(const lf::mesh::Entity &entity) const = 0;
84
91 [[nodiscard]] virtual size_type NumRefShapeFunctions(
92 const lf::mesh::Entity &entity) const = 0;
93
95 virtual ~ScalarFESpace() = default;
96}; // end class definition ScalarFESpace
97
99template <typename SCALAR>
100std::ostream &operator<<(std::ostream &o, const ScalarFESpace<SCALAR> &fes) {
101 fes.PrintInfo(o, 0);
102 return o;
103}
104
105} // namespace lf::fe
106
107#endif
Space of scalar valued finite element functions on a hybrid 2D mesh
ScalarFESpace(const ScalarFESpace &)=default
virtual ScalarReferenceFiniteElement< SCALAR > const * ShapeFunctionLayout(const lf::mesh::Entity &entity) const =0
access to shape function layout for mesh entities
ScalarFESpace()=default
default constructor, needed by std::vector
virtual std::shared_ptr< const lf::mesh::Mesh > Mesh() const =0
acess to underlying mesh
virtual size_type NumRefShapeFunctions(const lf::mesh::Entity &entity) const =0
number of interior shape functions associated to a particular mesh entity.
virtual const lf::assemble::DofHandler & LocGlobMap() const =0
access to associated local-to-global map
ScalarFESpace(ScalarFESpace &&) noexcept=default
Interface class for parametric scalar valued finite elements.
Collects data structures and algorithms designed for scalar finite element methods primarily meant fo...
Definition: fe.h:47
lf::assemble::size_type size_type
Definition: fe.h:54
Definition: assemble.h:30