diff --git a/Solver/linearSystemPETSc.hpp b/Solver/linearSystemPETSc.hpp index 136daf3d4fac24485c183763780c3b08c0642ea7..3792888c5ad2dbe1ddd0953c2b0a0d4da6d4d9a3 100644 --- a/Solver/linearSystemPETSc.hpp +++ b/Solver/linearSystemPETSc.hpp @@ -18,6 +18,9 @@ int linearSystemPETSc<scalar>::_getBlockSizeFromParameters() const template <class scalar> void linearSystemPETSc<scalar>::_kspCreate() { + // Set option given by the user in its (python script) without using argc,argv or .petscrc + if(this->_parameters.count("petsc_solver_options")) + _try(PetscOptionsInsertString(this->_parameters["petsc_solver_options"].c_str())); _try(KSPCreate(_comm, &_ksp)); PC pc; _try(KSPGetPC(_ksp, &pc));