hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
discrete_gradient.hpp
Go to the documentation of this file.
1#pragma once
7
8#include <span>
9#include <vector>
10
11#include "hpfem/core/types.hpp"
13
14namespace hpfem::assembly {
15
19template <int Dim>
21 const fespace::NedelecDofMap<Dim>& nedelec);
22
24[[nodiscard]] SparseMatrix extract(const SparseMatrix& matrix, std::span<const Index> rows,
25 std::span<const Index> cols);
26
28[[nodiscard]] std::vector<Index> free_dofs(Index n, std::span<const Index> constrained);
29
34
35} // namespace hpfem::assembly
Definition dof_map.hpp:51
Definition axisymmetric_forms.hpp:30
SparseMatrix discrete_gradient(const fespace::DofMap< Dim > &h1, const fespace::NedelecDofMap< Dim > &nedelec)
template SparseMatrix discrete_gradient< 3 >(const fespace::DofMap< 3 > &, const fespace::NedelecDofMap< 3 > &)
template SparseMatrix discrete_gradient< 2 >(const fespace::DofMap< 2 > &, const fespace::NedelecDofMap< 2 > &)
SparseMatrix extract(const SparseMatrix &matrix, std::span< const Index > rows, std::span< const Index > cols)
Rows rows and columns cols of a sparse matrix as a new compressed matrix.
std::vector< Index > free_dofs(Index n, std::span< const Index > constrained)
Complement of a sorted list of constrained DoFs in 0..n-1, ascending.
Eigen::SparseMatrix< Complex, Eigen::RowMajor, Index > SparseMatrix
Definition types.hpp:24
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17