hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
orthogonal_basis.hpp
Go to the documentation of this file.
1#pragma once
14
15#include <span>
16#include <vector>
17
18#include "hpfem/core/types.hpp"
19
20namespace hpfem::fespace {
21
22template <int Dim>
24 public:
26 explicit DubinerBasis(int order);
27
28 [[nodiscard]] int order() const noexcept { return order_; }
30 [[nodiscard]] Index size() const noexcept { return static_cast<Index>(degrees_.size()); }
32 [[nodiscard]] int degree(Index i) const { return degrees_[as_size(i)]; }
34 void evaluate(const Point<Dim>& xi, std::span<Real> values) const;
35
36 private:
37 int order_;
38 std::vector<int> degrees_;
39 std::vector<std::array<int, 3>> indices_;
40 std::vector<Real> scale_;
41};
42
43extern template class DubinerBasis<2>;
44extern template class DubinerBasis<3>;
45
46} // namespace hpfem::fespace
Definition orthogonal_basis.hpp:23
void evaluate(const Point< Dim > &xi, std::span< Real > values) const
Orthonormal values of all functions at a point of the unit simplex (size() entries).
Index size() const noexcept
Number of functions: (p+1)(p+2)/2 (2D), (p+1)(p+2)(p+3)/6 (3D).
Definition orthogonal_basis.hpp:30
int order() const noexcept
Definition orthogonal_basis.hpp:28
int degree(Index i) const
Total degree of function i.
Definition orthogonal_basis.hpp:32
Definition cell_layout.hpp:13
Eigen::Matrix< Real, Dim, 1 > Point
Definition types.hpp:27
constexpr std::size_t as_size(Index i) noexcept
Converts a non-negative global or local index to a container index.
Definition types.hpp:34
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17