def test_SpInv_shell(self, create_simple_saddle_point_problem): """Test :math:`S_{p}` shell has correct behavior. """ fixture_data = create_simple_saddle_point_problem self.petsc_options.setValue('innerSpsolver_ksp_type', 'preonly') self.petsc_options.setValue('innerSpsolver_pc_type', 'hypre') self.petsc_options.setValue('innerSpsolver_pc_hypre_type', 'boomeramg') SpInv_shell = LAT.SpInv_shell(fixture_data.petsc_matF, fixture_data.petsc_matC, fixture_data.petsc_matBt, fixture_data.petsc_matB, constNullSpace=False) SpInv_shell.apply(None, fixture_data.x_vec, fixture_data.y_vec) true_solu = np.mat('[1.0655362, -0.30354183]') assert np.allclose(fixture_data.y_vec.getArray(), true_solu)