LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
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
64template <typename SCALAR>
66 public:
67 using Scalar = SCALAR;
68
69 protected:
72 ScalarFESpace() = default;
73 ScalarFESpace(const ScalarFESpace &) = default;
74 ScalarFESpace(ScalarFESpace &&) noexcept = default;
75 ScalarFESpace &operator=(const ScalarFESpace &) = default;
76 ScalarFESpace &operator=(ScalarFESpace &&) noexcept = default;
77
78 public:
82 [[nodiscard]] virtual std::shared_ptr<const lf::mesh::Mesh> Mesh() const = 0;
87 [[nodiscard]] virtual const lf::assemble::DofHandler &LocGlobMap() const = 0;
88
102 [[nodiscard]] virtual ScalarReferenceFiniteElement<SCALAR> const *
103 ShapeFunctionLayout(const lf::mesh::Entity &entity) const = 0;
104
111 [[nodiscard]] virtual size_type NumRefShapeFunctions(
112 const lf::mesh::Entity &entity) const = 0;
113
115 virtual ~ScalarFESpace() = default;
116}; // end class definition ScalarFESpace
117
119template <typename SCALAR>
120std::ostream &operator<<(std::ostream &o, const ScalarFESpace<SCALAR> &fes) {
121 fes.PrintInfo(o, 0);
122 return o;
123}
124
125} // namespace lf::fe
126
128
132template <class SCALAR>
133struct fmt::formatter<lf::fe::ScalarFESpace<SCALAR>> : ostream_formatter {};
134
136
137#endif
Space of scalar valued finite element functions on a 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:31