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), useVr
as the test basis.
- Returns:
- op
OperatorTemplate
New operator object whose
state_dimension
attribute equalsr
. If this operator acts on inputs, theinput_dimension
attribute of the new operator should beself.input_dimension
.
- op