galerkin()

galerkin()#

OpInfOperator.galerkin(Vr: ndarray, Wr=None)#

Get the (Petrov-)Galerkin projection of this operator.

Consider an operator \(\Op(\q,\u)\), where \(\q\in\RR^n\) is the state and \(\u\in\RR^m\) is the input. Given a trial basis \(\Vr\in\RR^{n\times r}\) and a test basis \(\Wr\in\RR^{n\times r}\), the Petrov-Galerkin projection of \(\Op\) is the operator \(\Ophat:\RR^r\times\RR^m\to\RR^r\) defined by

\[\Ophat(\qhat, \u) = (\Wr\trp\Vr)^{-1}\Wr\trp\Op(\Vr\qhat, \u)\]

where \(\qhat\in\RR^n\) approximates the original state via \(\q \approx \Vr\qhat\).

Parameters:
Vr(n, r) ndarray

Basis for the trial space \(\Vr\).

Wr(n, r) ndarray or None

Basis for the test space \(\Wr\). If None (default), use Vr as the test basis.

Returns:
opOperatorTemplate

New operator object whose state_dimension attribute equals r. If this operator acts on inputs, the input_dimension attribute of the new operator should be self.input_dimension.