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

#include <reduced_basis.hpp>

Public Member Functions

 ReducedBasis (Index num_dofs, Real tolerance=1e-10)
 
bool add_snapshot (const Vector &snapshot)
 
Index num_dofs () const noexcept
 
Index size () const noexcept
 
const Matrix & basis () const noexcept
 The orthonormal basis V (num_dofs × size).
 
Matrix project (const SparseMatrix &matrix) const
 \( V^H A V \) (size × size).
 
Vector project (const Vector &vector) const
 \( V^H b \).
 
Vector lift (const Vector &reduced) const
 \( V y \).
 

Constructor & Destructor Documentation

◆ ReducedBasis()

hpfem::solvers::ReducedBasis::ReducedBasis ( Index  num_dofs,
Real  tolerance = 1e-10 
)
explicit
Parameters
num_dofssize of the full vectors; tolerance drops snapshots whose component orthogonal to the basis is below tolerance times their norm.

Member Function Documentation

◆ add_snapshot()

bool hpfem::solvers::ReducedBasis::add_snapshot ( const Vector &  snapshot)

Orthonormalises the snapshot against the basis (modified Gram–Schmidt, twice) and appends it; returns false if it was (numerically) in the span already.

Exceptions
InvalidArgumentfor a wrong size.

◆ basis()

const Matrix & hpfem::solvers::ReducedBasis::basis ( ) const
inlinenoexcept

The orthonormal basis V (num_dofs × size).

◆ lift()

Vector hpfem::solvers::ReducedBasis::lift ( const Vector &  reduced) const

\( V y \).

◆ num_dofs()

Index hpfem::solvers::ReducedBasis::num_dofs ( ) const
inlinenoexcept

◆ project() [1/2]

Matrix hpfem::solvers::ReducedBasis::project ( const SparseMatrix &  matrix) const

\( V^H A V \) (size × size).

◆ project() [2/2]

Vector hpfem::solvers::ReducedBasis::project ( const Vector &  vector) const

\( V^H b \).

◆ size()

Index hpfem::solvers::ReducedBasis::size ( ) const
inlinenoexcept

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