Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LA: fix initialization of PETSc KSP #473

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/LA/system_solvers_large.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3169,12 +3169,14 @@ void SystemSolver::prepareKSP()

// Set up
if (setupNeeded) {
// Initialization
KSPSetFromOptions(m_KSP);

// Perform actions before preconditioner set up
prePreconditionerSetupActions();

// Initialize preconditioner from options
PC pc;
KSPGetPC(m_KSP, &pc);
PCSetFromOptions(pc);

// Set up preconditioner
setupPreconditioner();

Expand All @@ -3184,6 +3186,9 @@ void SystemSolver::prepareKSP()
// Perform actions before Krylov subspace method set up set up
preKrylovSetupActions();

// Initialize Krylov subspace from options
KSPSetFromOptions(m_KSP);

// Set up the Krylov subspace method
setupKrylov();

Expand Down