galerkin()#
- InterpContinuousModel.galerkin(Vr, Wr=None)#
Construct a reduced-order model by taking the (Petrov-)Galerkin projection of each model operator.
Consider a model \(\z = \f(\q, \u)\) where
\(\q\in\RR^n\) is the model state,
\(\u\in\RR^m\) is the input, and
\(\z\in\RR^n\) is the model left-hand side.
Given a trial basis \(\Vr\in\RR^{n\times r}\) and a test basis \(\Wr\in\RR^{n\times r}\), the corresponding intrusive reduced-order model is the model \(\zhat = \fhat(\qhat, \u)\) where
\[\zhat = \Wr\trp\z, \qquad \fhat(\qhat,\u) = (\Wr\trp\Vr)^{-1}\Wr\trp\f(\Vr\qhat,\u).\]Here,
\(\qhat\in\RR^r\) is the reduced-order state,
\(\u\in\RR^m\) is the input (as before), and
\(\zhat\in\RR^r\) is the reduced-order left-hand side.
This approach uses 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:
- reduced_modelModel
Reduced-order model obtained from (Petrov-)Galerkin projection.