Skip to content

CVODE precon auto by default, improve setting deprecation error#3426

Open
mikekryjak wants to merge 1 commit into
nextfrom
cvode-precon-settings
Open

CVODE precon auto by default, improve setting deprecation error#3426
mikekryjak wants to merge 1 commit into
nextfrom
cvode-precon-settings

Conversation

@mikekryjak

Copy link
Copy Markdown
Contributor

In #3382, the setting controlling CVODE preconditioning was changed. Instead of:

[solver]
use_precon = true

The equivalent is:

[solver]
cvode_precon_method = auto

The vast majority of CVODE users will have use_precon = true in their input file because it's false by default, and most applications are impossible to run without preconditioning. If they have it, they will see this error message:

if ((*options)["use_precon"].isSet()) {
throw BoutException("solver:use_precon is deprecated for CVODE and is now "
"ignored. Use solver:cvode_precon_method=none to disable "
"preconditioning.\n");
}

But since the default is to have the preconditioner disabled, it would be more useful to tell the user how to turn it on, not to turn it off.

This PR changes the default setting to auto on the assumption that this is preferred by the vast majority of users (let me know if this is not the case...) and also changes the error message to tell the user how to turn it on or off.

@mikekryjak mikekryjak force-pushed the cvode-precon-settings branch from 6033591 to 0e89e9d Compare July 9, 2026 09:14

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/solver/impls/cvode/cvode.cxx Outdated
"auto prefers user (if supplied), then petsc (if available), "
"then bbd.")
.withDefault(CvodePreconMethod::none)),
.withDefault(CvodePreconMethod::auto)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: expected unqualified-id [clang-diagnostic-error]

              .withDefault(CvodePreconMethod::auto)),
                                              ^

@mikekryjak mikekryjak force-pushed the cvode-precon-settings branch from 0e89e9d to 4b34adf Compare July 9, 2026 09:50
@mikekryjak mikekryjak force-pushed the cvode-precon-settings branch from 4b34adf to 6a928ba Compare July 9, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant