diff --git a/ngsPETSc/ksp.py b/ngsPETSc/ksp.py index 6fc87c8..05d0445 100644 --- a/ngsPETSc/ksp.py +++ b/ngsPETSc/ksp.py @@ -40,7 +40,7 @@ def createFromMatrix(a, freeDofs, solverParameters): mat = Matrix(a, (dofs, freeDofs, None), solverParameters["ngs_mat_type"]) pscMat = mat.mat return (a, pscMat) - elif solverParameters["ngs_mat_type"] == "python": + if solverParameters["ngs_mat_type"] == "python": _, pscMat = createFromAction(a, freeDofs, solverParameters) return (a, pscMat) raise ValueError("ngs_mat_type {} is not supported.".format(solverParameters["ngs_mat_type"]))