hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
hpfem::physics::KeptFactorisation Class Reference

#include <kept_factorisation.hpp>

Classes

struct  Parts
 What the solve hands over. More...
 

Public Member Functions

 KeptFactorisation (Parts parts)
 
Vector solve (const Vector &load) const
 
Matrix solve_many (const Matrix &loads) const
 Several loads at once (one per column, one multi-rhs solve).
 
Matrix solve_many (const Matrix &loads, const Matrix &system_loads) const
 
Vector solve_adjoint (const Vector &functional) const
 
Matrix solve_adjoint_many (const Matrix &functionals) const
 Several functionals at once (one per column, one multi-rhs transposed solve).
 
Index num_dofs () const noexcept
 Size of the full vectors.
 
Index size () const noexcept
 Unknowns of the factorised system.
 
const solvers::LinearSolver & solver () const noexcept
 

Detailed Description

Factorisation and reduction steps of a solve (ScatteringSetup::keep_factorisation, ConicalScatteringSetup::keep_factorisation); shared by the solution and its copies.

Constructor & Destructor Documentation

◆ KeptFactorisation()

hpfem::physics::KeptFactorisation::KeptFactorisation ( Parts  parts)
explicit
Exceptions
InvalidArgumentif the solver is missing or the parts do not fit together.

Member Function Documentation

◆ num_dofs()

Index hpfem::physics::KeptFactorisation::num_dofs ( ) const
inlinenoexcept

Size of the full vectors.

◆ size()

Index hpfem::physics::KeptFactorisation::size ( ) const
inlinenoexcept

Unknowns of the factorised system.

◆ solve()

Vector hpfem::physics::KeptFactorisation::solve ( const Vector &  load) const

\( s = A^{-1} r \) for a full-size load with homogeneous Dirichlet data: the solution change of a perturbation with residual r.

Exceptions
InvalidArgumentif the size does not match.

◆ solve_adjoint()

Vector hpfem::physics::KeptFactorisation::solve_adjoint ( const Vector &  functional) const

\( z = A^{-\top} q \) for a full-size functional vector: the adjoint of \( Q = q^\top e \), zero on the Dirichlet DoFs, in the test space of the constraints.

Exceptions
InvalidArgumentif the size does not match.

◆ solve_adjoint_many()

Matrix hpfem::physics::KeptFactorisation::solve_adjoint_many ( const Matrix &  functionals) const

Several functionals at once (one per column, one multi-rhs transposed solve).

◆ solve_many() [1/2]

Matrix hpfem::physics::KeptFactorisation::solve_many ( const Matrix &  loads) const

Several loads at once (one per column, one multi-rhs solve).

◆ solve_many() [2/2]

Matrix hpfem::physics::KeptFactorisation::solve_many ( const Matrix &  loads,
const Matrix &  system_loads 
) const

Tangent solves with an additional load on the factorised unknowns, added after the constraints: \( P^H A P x = P^H r + g \), \( s = P x \). The extra term carries the derivative of the constraints, \( g = (\partial_\theta P)^H \rho_0 \), when a parameter changes them (the Bloch phases under a change of frequency or angle, conical_parameter_tangent). Entries of eliminated Dirichlet unknowns are ignored.

Exceptions
InvalidArgumentif the sizes do not match (system_loads: size() rows, the columns of loads).

◆ solver()

const solvers::LinearSolver & hpfem::physics::KeptFactorisation::solver ( ) const
inlinenoexcept

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