extend_to_dimension()

extend_to_dimension()#

InputOperator.extend_to_dimension(new_r, indices_trial=None, indices_test=None, new_r_test=None)[source]#

Creates a new operator of type InputOperator of the same input dimension as this one but for the reduced (test) dimension new_r_test (defaulted to new_r_test = new_r if not provided). The new operator is created by mapping the current test basis vectors \(\mathbf{w}_i\) onto the new test vectors \(\tilde{\mathbf{w}}_j\), \(j=\) indices_test[i] of the new basis, :math`i=1, …, r`. The remaining actions of the new operator (i.e., all actions that involve \(\tilde{\mathbf{v}}_j\) with \(j\notin\) indices_trial or \(\tilde{\mathbf{w}}_j\) with \(j\notin\) indices_test) are defaulted to 0.

If indices_trial is not provided, it is assumed that the current basis is expanded and the current basis vectors are to be mapped onto the first \(r\) basis vectors of the new basis, i.e., we default to indices_trial = [0, ..., r-1].

If indices_test is not provided, defaults to the Galerkin setting indices_test = indices_trial.

Currently, the more general restriction onto combinations of basis vectors (e.g., onto \(span{(v_1+v_2)/2}\)) is not supported.

Parameters:
new_rint

target reduced dimension (trial space). Needs to be at least as large as self.state_dimension

indices_triallist of integers

indices of the (trial) basis vectors to which the previous operator entries shall be mapped in the expanded basis. Needs to be in increasing order and not contain dubplicates.

indices_testlist of integers

indices of the (test) basis vectors onto which the previous operator entries shall be mapped in the expanded basis (Petrov-Galerkin setting only). Needs to be in increasing order and not contain dubplicates.

new_r_testint

target reduced dimension (test space). Defaulted to new_r if not provided.

Returns:
InputOperator

Operator for trial dimension new_r, test dimension new_r_test, and polynomial order self.polynomial_order.