galerkin()#
- InterpCubicOperator.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_0,\f_{\ell}^{(0)}(\q,\u)),\ldots, (\bfmu_{s-1},\f_{\ell}^{(s-1)}(\q,\u)); \bfmu),\]where
\(\q\in\RR^n\) is the full-order state,
\(\u\in\RR^m\) is the input,
\(\bfmu_0,\ldots,\bfmu_{s-1}\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_0,\Wr\trp\f_{\ell}^{(0)}(\Vr\qhat,\u)),\ldots, (\bfmu_{s-1},\Wr\trp\f_{\ell}^{(s-1)}(\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 toVr
.
- Returns:
- opoperator
New object of the same class as
self
.