galerkin()#

InterpolatedStateInputOperator.galerkin(Vr, Wr=None)#

Project this operator to a low-dimensional linear space.

Consider an interpolatory operator

\[\f_\ell(\q,\u;\bfmu) = \textrm{interpolate}( (\bfmu_1,\f_{\ell}^{(1)}(\q,\u)),\ldots, (\bfmu_s,\f_{\ell}^{(s)}(\q,\u)); \bfmu),\]

where

  • \(\q\in\RR^n\) is the full-order state,

  • \(\u\in\RR^m\) is the input,

  • \(\bfmu_1,\ldots,\bfmu_s\in\RR^p\) are the (fixed) training parameter values,

  • \(\f_{\ell}^{(i)}(\q,\u) = \f_{\ell}(\q,\u;\bfmu_i)\) is the operators evaluated at the \(i\)-th training parameter values, \(i=1,\ldots,s\), and

  • \(\bfmu\in\RR^p\) is a new parameter value at which to evaluate the operator.

Given a trial basis \(\Vr\in\RR^{n\times r}\) and a test basis \(\Wr\in\RR^{n\times r}\), the corresponding intrusive projection of \(\f\) is the interpolatory operator

\[\fhat_{\ell}(\qhat,\u;\bfmu) = \textrm{interpolate}( (\bfmu_1,\Wr\trp\f_{\ell}^{(1)}(\Vr\qhat,\u)),\ldots, (\bfmu_s,\Wr\trp\f_{\ell}^{(s)}(\Vr\qhat,\u)); \bfmu),\]

Here, \(\qhat\in\RR^r\) is the reduced-order state, which enables the low-dimensional state approximation \(\q = \Vr\qhat\). If \(\Wr = \Vr\), the result is called a Galerkin projection. If \(\Wr \neq \Vr\), it is called a Petrov-Galerkin projection.

Parameters
Vr(n, r) ndarray

Basis for the trial space.

Wr(n, r) ndarray or None

Basis for the test space. If None, defaults to Vr.

Returns
opoperator

New object of the same class as self.