hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
farfield.hpp
Go to the documentation of this file.
1#pragma once
14
15#include <vector>
16
18#include "hpfem/core/types.hpp"
20#include "hpfem/mesh/mesh.hpp"
22
23namespace hpfem::physics {
24
29template <int Dim>
30class FarField {
31 public:
33 FarField(const mesh::Mesh<Dim>& mesh, const Surface<Dim>& surface, const SurfaceField<Dim>& field,
34 Real omega, const materials::Material& background, int order);
35
38 [[nodiscard]] assembly::ComplexVector<Dim> pattern(const Point<Dim>& direction) const;
39
43 [[nodiscard]] Real radiated_power(int resolution = 180) const;
46 [[nodiscard]] Real scattering_cross_section(Real incident_amplitude, int resolution = 180) const;
47
48 [[nodiscard]] Real wavenumber() const noexcept { return k_; }
49 [[nodiscard]] Real impedance() const noexcept { return impedance_; }
50
51 private:
52 struct Sample {
53 Point<Dim> x;
54 Point<Dim> normal;
55 Real weight;
58 };
59 std::vector<Sample> samples_;
60 Real k_ = 0;
61 Real impedance_ = 0;
62};
63
64extern template class FarField<2>;
65extern template class FarField<3>;
66
67} // namespace hpfem::physics
Definition material.hpp:31
Definition mesh.hpp:61
Definition farfield.hpp:30
FarField(const mesh::Mesh< Dim > &mesh, const Surface< Dim > &surface, const SurfaceField< Dim > &field, Real omega, const materials::Material &background, int order)
Samples E and H = curl E / (iωμ0 μr) on the surface with a rule of the given degree.
Real radiated_power(int resolution=180) const
assembly::ComplexVector< Dim > pattern(const Point< Dim > &direction) const
Real impedance() const noexcept
Definition farfield.hpp:49
Real scattering_cross_section(Real incident_amplitude, int resolution=180) const
Real wavenumber() const noexcept
Definition farfield.hpp:48
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
Definition absorption.hpp:21
std::function< void(const SurfacePoint< Dim > &, assembly::ComplexVector< Dim > &, assembly::ComplexCurl< Dim > &)> SurfaceField
Field sampler: value and curl of a field at a surface point.
Definition postprocess.hpp:78
double Real
Definition types.hpp:15
Eigen::Matrix< Real, Dim, 1 > Point
Definition types.hpp:27
Definition postprocess.hpp:28