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

Add a Convergence object that combines others #28844

Open
joshuahansel opened this issue Oct 14, 2024 · 0 comments
Open

Add a Convergence object that combines others #28844

joshuahansel opened this issue Oct 14, 2024 · 0 comments
Assignees
Labels
C: Framework T: task An enhancement to the software.

Comments

@joshuahansel
Copy link
Contributor

Motivation

A desired convergence criteria can be composed of many elements. For example, a user may want to check a residual criteria and a variable step criteria.

Design

Have an object called CombinationConvergence that could do something like this:

[Convergence]
  # define conv1, conv2, conv3 above
  [conv4]
    type = CombinationConvergence
    converged_expression = 'conv1 || (conv2 && conv3)'
  []
[]

which can combine other Convergence objects using and/or statements and parentheses, at a minimum.

Note: if any return "diverged", then this would diverge. Alternatively, this could just be the default behavior and allow the user to specify:

diverged_expression = 'conv1 || conv2'

If we wanted a little more convenience/flexibility, we could ParsedConvergence instead, which would additionally allow boolean expressions instead of just boolean values:

converged_expression = 'conv1 || (ppA < tol)'

Impact

New object.

@joshuahansel joshuahansel added C: Framework T: task An enhancement to the software. labels Oct 14, 2024
@joshuahansel joshuahansel self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework T: task An enhancement to the software.
Projects
Development

No branches or pull requests

1 participant