|
Neko 1.99.9
A portable framework for high-order spectral element flow simulations
|
Provides a device implementation of the BiCGStab method.
Data Types | |
| type | bicgstab_device_t |
| Device implementation of the right-preconditioned BiCGStab method. More... | |
| interface | hip_bicgstab_part1 |
| interface | hip_bicgstab_part2 |
| interface | hip_bicgstab_product_and_norm |
| interface | hip_bicgstab_update_p |
Functions/Subroutines | |
| subroutine | device_bicgstab_update_p (p_d, r_d, v_d, beta, omega, n) |
| Search direction update \(p = r + \beta (p - \omega v)\). | |
| subroutine | device_bicgstab_product_and_norm (product, norm_squared, a_d, b_d, mult_d, n) |
| Weighted inner product and squared norm in one reduction. | |
| real(kind=rp) function | device_bicgstab_part1 (s_d, r_d, v_d, mult_d, alpha, n) |
| BiCGStab part 1, \(s = r - \alpha v\). | |
| subroutine | device_bicgstab_part2 (rtr, rho, x_d, r_d, p_hat_d, s_hat_d, s_d, t_d, f_d, mult_d, alpha, omega, n) |
| BiCGStab part 2, \(x = x + \alpha \hat{p} + \omega \hat{s}\) and \(r = s - \omega t\). | |
| subroutine | bicgstab_device_init (this, n, max_iter, m, rel_tol, abs_tol, monitor) |
| Initialise a device BiCGStab solver. | |
| subroutine | bicgstab_device_free (this) |
| Free a device BiCGStab solver. | |
| type(ksp_monitor_t) function | bicgstab_device_solve (this, ax, x, f, n, coef, bc_projector, gs_h, niter) |
| Solve a linear system with the device BiCGStab method. | |
| subroutine | bicgstab_device_check_inner_product (inner_product, norm_a, norm_b, quantity) |
| Check an inner product for a BiCGStab breakdown. | |
| real(kind=rp) function | bicgstab_device_sqrt (value, quantity) |
| Return the square root of a valid squared norm. | |
| type(ksp_monitor_t) function, dimension(3) | bicgstab_device_solve_coupled (this, ax, x, y, z, fx, fy, fz, n, coef, bc_projector, gs_h, niter) |
| Solve three independent systems with the device 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 796 of file bicgstab_device.F90.

|
private |
Definition at line 557 of file bicgstab_device.F90.
|
private |
| 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 502 of file bicgstab_device.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 632 of file bicgstab_device.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. |
| bc_projector | Boundary conditions for the three components. |
| gs_h | Gather-scatter handle used to assemble operator results. |
| niter | Optional maximum number of iterations, overriding the configured value. |
Definition at line 851 of file bicgstab_device.F90.
|
private |
| value | Weighted squared norm. |
| quantity | Name of the vector for error reporting. |
Definition at line 821 of file bicgstab_device.F90.

|
private |
| s_d | Intermediate residual, written. |
| r_d | Residual. |
| v_d | Operator action \(A\hat{p}\). |
| mult_d | Spectral element multiplicity weights. |
| alpha | BiCGStab \(\alpha\). |
| n | Number of vector entries. |
Definition at line 398 of file bicgstab_device.F90.


|
private |
The rho inner product of the next iteration is reduced together with the residual norm, since both are taken against the residual this routine writes.
| rtr | Weighted squared norm \(r^T M r\) of the new residual. |
| rho | Weighted inner product \(f^T M r\) of the new residual. |
| x_d | Solution, updated in place. |
| r_d | Residual, written. |
| p_hat_d | Preconditioned search direction. |
| s_hat_d | Preconditioned intermediate residual. |
| s_d | Intermediate residual. |
| t_d | Operator action \(A\hat{s}\). |
| f_d | Right-hand side, which is also the shadow residual. |
| mult_d | Spectral element multiplicity weights. |
| alpha | BiCGStab \(\alpha\). |
| omega | BiCGStab \(\omega\). |
| n | Number of vector entries. |
Definition at line 452 of file bicgstab_device.F90.


|
private |
Combining the two values avoids 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_d | First vector in the inner product. |
| b_d | Second vector in the inner product and vector whose norm is taken. |
| mult_d | Spectral element multiplicity weights. |
| n | Number of vector entries. |
Definition at line 351 of file bicgstab_device.F90.


|
private |
| p_d | Search direction, updated in place. |
| r_d | Residual. |
| v_d | Operator action \(A\hat{p}\) of the previous iteration. |
| beta | BiCGStab \(\beta\). |
| omega | BiCGStab \(\omega\) of the previous iteration. |
| n | Number of vector entries. |
Definition at line 319 of file bicgstab_device.F90.

