restrict_to_subspace()

restrict_to_subspace()#

InputOperator.restrict_to_subspace(indices_trial, indices_test=None)[source]#

Creates a new operator of type InputOperator for the reduced (test) dimension len(indices_test) (Petrov-Galerkin setting). The new operator is constructed by restricting testing in \(span{\mathbf{v}_i: i \in indices_test}\).

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:
indices_triallist of integers

indices of the (trial) basis vectors onto which the operator shall be restricted. Needs to be in increasing order and not contain dubplicates.

indices_testlist of integers

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

Returns:
InputOperator

Operator for test dimension len(indices_test), and polynomial order self.polynomial_order.