Add coupled_bicgstab on the CPU - #2739
Open
timofeymukha wants to merge 15 commits into
Open
Conversation
Corrected main Neko citation 🐈 and added TSFP14 paper to publications
I thought it would be nice to have ready-made templates for all the possible user-injectable types. This way instead of "cleaning" up a copied existing type in neko, one can start with a fresh, empty, but compilable template. The template compilation is added to the CI. Co-authored-by: Timofey Mukha <timofey.mukha@fau.de>
timofeymukha
requested review from
njansson and
pohm01
and
a lite review from Copilot
August 27, 2026 12:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new coupled (3-component) CPU BiCGStab Krylov solver intended for non-symmetric coupled momentum systems (e.g., full-stress formulation with variable viscosity), wires it into the Krylov solver factory, and updates user-facing documentation and the changelog accordingly.
Changes:
- Added
bicgstab_cpld_t(CPU-only) implementing a coupled 3-component right-preconditioned BiCGStab method. - Registered the new solver type string (
coupled_bicgstab) in the Krylov factory and build system. - Updated the user guide and changelog to document the new solver.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Makefile.am |
Adds the new coupled BiCGStab CPU source file to the build. |
src/krylov/krylov_fctry.f90 |
Registers coupled_bicgstab and allocates the coupled CPU implementation (errors out on device backend). |
src/krylov/bcknd/cpu/bicgstab_coupled.f90 |
Implements the coupled (3-component) CPU BiCGStab solver (bicgstab_cpld_t). |
src/.depends |
Updates build dependencies to include the new solver object. |
doc/pages/user-guide/case-file.md |
Documents coupled_bicgstab and updates the solver-type table entry for velocity. |
CHANGELOG.md |
Notes the addition of the coupled CPU BiCGStab solver. |
Suppressed comments (1)
doc/pages/user-guide/case-file.md:1980
- The case-file table uses
velocity_solver.maxiter/pressure_solver.maxiter, but the implementation (and JSON schema naming elsewhere in this doc) usesmax_iterations(e.g.case.fluid.velocity_solver.max_iterations). This mismatch will mislead users configuring solvers (including the newly documentedcoupled_bicgstab).
| `velocity_solver.type` | Linear solver for the momentum equation. | `cg`, `pipecg`, `bicgstab`, `coupled_bicgstab`, `coupled_cg`, `cacg`, `gmres` | - |
| `velocity_solver.preconditioner.type` | Linear solver preconditioner for the momentum equation. | `ident`, `hsmg`, `jacobi` | - |
| `velocity_solver.absolute_tolerance` | Linear solver convergence criterion for the momentum equation. | Positive real | - |
| `velocity_solver.maxiter` | Linear solver max iteration count for the momentum equation. | Positive real | 800 |
| `velocity_solver.projection_space_size` | Projection space size for the momentum equation. | Positive integer | 0 |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
njansson
approved these changes
Aug 27, 2026
pohm01
approved these changes
Sep 1, 2026
timfelle
reviewed
Sep 1, 2026
njansson
enabled auto-merge
September 2, 2026 19:14
njansson
disabled auto-merge
September 2, 2026 19:14
njansson
reviewed
Sep 3, 2026
| block | ||
| type(host_array_t), pointer :: p_tmp, p_hat_tmp, r_tmp | ||
| type(host_array_t), pointer :: s_hat_tmp, t_tmp, v_tmp | ||
| real(kind=rp), pointer :: p(:), p_hat(:), r(:), s_hat(:), t(:), v(:) |
Collaborator
There was a problem hiding this comment.
can we move these pointers up in the type. As we have done with the other ksp types. (to ease readability for linear solver people)
njansson
enabled auto-merge
September 3, 2026 09:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the coupled version of bicgstab, which should be suitable for the full-stress formulation when the system is non-symmetric.
Implemented by Sol 5.6 High, but looks to me like a reasonable extenstion of the baseline version, similar to coupled_cg.