hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::physics::ScatteringOperator< Dim > Class Template Reference

The factorised operator of a scattering problem. More...

#include <sweep.hpp>

Public Member Functions

 ScatteringOperator (const Scattering< Dim > &problem)
 
const Scattering< Dim > & problem () const noexcept
 
ScatteringSolution< Dim > solve (const IncidentField< Dim > &incident, const assembly::ComplexVectorField< Dim > &current={}) const
 
ScatteringSolution< Dim > solve () const
 Solution of the problem's own setup.
 
ScatteringSolution< Dim > solve_port (Index port, Index mode) const
 
std::vector< ScatteringSolution< Dim > > solve_many (std::span< const IncidentField< Dim > > incidents, const assembly::ComplexVectorField< Dim > &current={}) const
 

Detailed Description

template<int Dim>
class hpfem::physics::ScatteringOperator< Dim >

The factorised operator of a scattering problem.

Constructor & Destructor Documentation

◆ ScatteringOperator()

template<int Dim>
hpfem::physics::ScatteringOperator< Dim >::ScatteringOperator ( const Scattering< Dim > &  problem)
explicit

Assembles the operator of problem (static condensation, hanging / Bloch constraints, Dirichlet elimination of the problem's PEC and incident facets) and factorises it with the problem's solver backend.

Member Function Documentation

◆ problem()

template<int Dim>
const Scattering< Dim > & hpfem::physics::ScatteringOperator< Dim >::problem ( ) const
inlinenoexcept

◆ solve() [1/2]

template<int Dim>
ScatteringSolution< Dim > hpfem::physics::ScatteringOperator< Dim >::solve ( ) const

Solution of the problem's own setup.

◆ solve() [2/2]

template<int Dim>
ScatteringSolution< Dim > hpfem::physics::ScatteringOperator< Dim >::solve ( const IncidentField< Dim > &  incident,
const assembly::ComplexVectorField< Dim > &  current = {} 
) const

Solution for another incident field (and current) at the same frequency, materials, PML, tags and formulation; the Dirichlet DoF set is that of the problem.

◆ solve_many()

template<int Dim>
std::vector< ScatteringSolution< Dim > > hpfem::physics::ScatteringOperator< Dim >::solve_many ( std::span< const IncidentField< Dim > >  incidents,
const assembly::ComplexVectorField< Dim > &  current = {} 
) const

Solutions for several incident fields (same current) with one batched triangular solve (LinearSolver::solve_many): the loads of all fields are assembled in one pass over the cells (assembly::assemble_maxwell_loads: geometry, quadrature and basis functions once per cell, only the source values per field), their Dirichlet data in one pass over the facets (Scattering::dirichlet_many), each load is eliminated, and the factorisation is applied to all right-hand sides at once (one device round trip on the GPU backend).

◆ solve_port()

template<int Dim>
ScatteringSolution< Dim > hpfem::physics::ScatteringOperator< Dim >::solve_port ( Index  port,
Index  mode 
) const

Solution for the unit excitation of mode mode of port port (and no other port excitation, no incident field, no current): the load is \( 2 q_m \) of that mode on the factorised operator, which already holds the port terms of all modes.

Exceptions
InvalidArgumentif the problem has no such port or mode.

The documentation for this class was generated from the following file: