|
Neko 1.99.11
A portable framework for high-order spectral element flow simulations
|
Provides a CPU implementation of the BiCGStab method.
Data Types | |
| type | bicgstab_t |
| CPU implementation of the right-preconditioned BiCGStab method. More... | |
Functions/Subroutines | |
| subroutine | bicgstab_init (this, n, max_iter, m, rel_tol, abs_tol, monitor) |
| Initialise a CPU BiCGStab solver. | |
| subroutine | bicgstab_free (this) |
| Free a CPU BiCGStab solver. | |
| type(ksp_monitor_t) function | bicgstab_solve (this, ax, x, f, n, coef, bc_projector, gs_h, niter) |
| Solve a linear system with the CPU BiCGStab method. | |
| subroutine | bicgstab_check_inner_product (inner_product, norm_a, norm_b, quantity) |
| Check an inner product for a BiCGStab breakdown. | |
| subroutine | bicgstab_product_and_norm (product, norm_squared, a, b, mult, n) |
| Compute a weighted inner product and squared norm in one reduction. | |
| real(kind=rp) function | bicgstab_sqrt (value, quantity) |
| Return the square root of a valid squared norm. | |
| type(ksp_monitor_t) function, dimension(3) | bicgstab_solve_coupled (this, ax, x, y, z, fx, fy, fz, n, coef, bc_projector, gs_h, niter) |
| Solve three independent systems with the CPU BiCGStab method. | |
|
private |
The comparison is normalised by both vector norms. Dividing by the larger norm first avoids overflow in their product and preserves scale invariance.
| inner_product | Weighted inner product of the two vectors. |
| norm_a | Norm of the first vector. |
| norm_b | Norm of the second vector. |
| quantity | Name of the algorithmic quantity for error reporting. |
Definition at line 350 of file bicgstab.f90.

|
private |
Definition at line 130 of file bicgstab.f90.
| subroutine bicgstab::bicgstab_init | ( | class(bicgstab_t), intent(inout), target | this, |
| integer, intent(in) | n, | ||
| integer, intent(in) | max_iter, | ||
| class(pc_t), intent(in), optional, target | m, | ||
| real(kind=rp), intent(in), optional | rel_tol, | ||
| real(kind=rp), intent(in), optional | abs_tol, | ||
| logical, intent(in), optional | monitor ) |
| n | Number of degrees of freedom. |
| max_iter | Maximum number of iterations. |
| M | Optional preconditioner. An identity preconditioner is used if absent. |
| rel_tol | Optional relative convergence tolerance. |
| abs_tol | Optional absolute convergence tolerance. |
| monitor | Optional switch for logging the residual at each iteration. |
Definition at line 93 of file bicgstab.f90.
|
private |
Combining the two values avoids adding a global synchronisation solely for the scale used by the breakdown checks.
| product | Weighted inner product of a and b. |
| norm_squared | Weighted squared norm of b. |
| a | First vector in the inner product. |
| b | Second vector in the inner product and vector whose norm is taken. |
| mult | Spectral element multiplicity weights. |
| n | Number of vector entries. |
Definition at line 381 of file bicgstab.f90.

|
private |
The initial guess in x is discarded and the iteration starts from zero.
| Ax | Linear operator. |
| x | Solution field. |
| f | Right-hand side. |
| n | Number of degrees of freedom. |
| coef | Spectral element coefficients and multiplicity weights. |
| bc_projector | Projector for dirichlet boundary nodes. |
| gs_h | Gather-scatter handle used to assemble the operator result. |
| niter | Optional maximum number of iterations, overriding the configured value. |
Definition at line 153 of file bicgstab.f90.

|
private |
This routine sequentially invokes the scalar solver for each component.
| Ax | Linear operator. |
| x | Solution field for the first component. |
| y | Solution field for the second component. |
| z | Solution field for the third component. |
| fx | Right-hand side for the first component. |
| fy | Right-hand side for the second component. |
| fz | Right-hand side for the third component. |
| n | Number of degrees of freedom per component. |
| coef | Spectral element coefficients and multiplicity weights. |
| blstx | Boundary conditions for the first component. |
| blsty | Boundary conditions for the second component. |
| blstz | Boundary conditions for the third component. |
| gs_h | Gather-scatter handle used to assemble operator results. |
| niter | Optional maximum number of iterations, overriding the configured value. |
Definition at line 446 of file bicgstab.f90.
|
private |
| value | Weighted squared norm. |
| quantity | Name of the vector for error reporting. |
Definition at line 414 of file bicgstab.f90.
