hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
functionals.hpp
Go to the documentation of this file.
1#pragma once
9
10#include <span>
11
13#include "hpfem/core/types.hpp"
16
17namespace hpfem::assembly {
18
22template <int Dim>
24 const mesh::PointLocator<Dim>& locator,
25 std::span<const Point<Dim>> points,
26 std::span<const ComplexVector<Dim>> value_weights,
27 std::span<const ComplexCurl<Dim>> curl_weights = {});
28
32template <int Dim>
34 const mesh::PointLocator<Dim>& locator,
35 std::span<const Point<Dim>> points,
36 std::span<const Complex> weights);
37
39[[nodiscard]] inline Complex evaluate_functional(const Vector& q, const Vector& e_h) {
40 return (q.transpose() * e_h)(0);
41}
42
44 std::span<const Point<2>>, std::span<const Complex>);
46 std::span<const Point<3>>, std::span<const Complex>);
48 const mesh::PointLocator<2>&, std::span<const Point<2>>,
49 std::span<const ComplexVector<2>>,
50 std::span<const ComplexCurl<2>>);
52 const mesh::PointLocator<3>&, std::span<const Point<3>>,
53 std::span<const ComplexVector<3>>,
54 std::span<const ComplexCurl<3>>);
55
56} // namespace hpfem::assembly
Definition dof_map.hpp:51
Definition point_location.hpp:34
Definition axisymmetric_forms.hpp:30
template Vector point_functional< 3 >(const fespace::DofMap< 3 > &, const mesh::PointLocator< 3 > &, std::span< const Point< 3 > >, std::span< const Complex >)
Eigen::Matrix< Complex, Dim==2 ? 1 :3, 1 > ComplexCurl
Curl of a physical field: scalar (1-vector) in 2D, 3-vector in 3D.
Definition maxwell_forms.hpp:34
Eigen::Matrix< Complex, Dim, 1 > ComplexVector
Definition maxwell_forms.hpp:31
Vector point_functional(const fespace::NedelecDofMap< Dim > &dofs, const mesh::PointLocator< Dim > &locator, std::span< const Point< Dim > > points, std::span< const ComplexVector< Dim > > value_weights, std::span< const ComplexCurl< Dim > > curl_weights={})
Complex evaluate_functional(const Vector &q, const Vector &e_h)
.
Definition functionals.hpp:39
template Vector point_functional< 2 >(const fespace::DofMap< 2 > &, const mesh::PointLocator< 2 > &, std::span< const Point< 2 > >, std::span< const Complex >)
Eigen::Matrix< Real, Dim, 1 > Point
Definition types.hpp:27
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > Vector
Definition types.hpp:20
std::complex< double > Complex
Definition types.hpp:16