Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
bicgstab_cpld Module Reference

Provides a coupled CPU implementation of the BiCGStab method.

Data Types

type  bicgstab_cpld_t
 Coupled right-preconditioned CPU BiCGStab method. More...
 

Functions/Subroutines

subroutine bicgstab_cpld_init (this, n, max_iter, m, rel_tol, abs_tol, monitor)
 Initialise a coupled CPU BiCGStab solver.
 
subroutine bicgstab_cpld_free (this)
 Free a coupled CPU BiCGStab solver.
 
type(ksp_monitor_t) function bicgstab_cpld_solve_scalar (this, ax, x, f, n, coef, bc_projector, gs_h, niter)
 Reject a scalar solve with a coupled BiCGStab solver.
 
type(ksp_monitor_t) function, dimension(3) bicgstab_cpld_solve (this, ax, x, y, z, fx, fy, fz, n, coef, bc_projector, gs_h, niter)
 Solve a three-component coupled system with the CPU BiCGStab method.
 
subroutine bicgstab_cpld_check_inner_product (inner_product, norm_a, norm_b, quantity)
 Check an inner product for a coupled BiCGStab breakdown.
 
real(kind=rp) function bicgstab_cpld_sqrt (value, quantity)
 Return the square root of a valid combined squared norm.
 
subroutine bicgstab_cpld_assemble (vector, n, coef, bc_projector, gs_h)
 Assemble a coupled operator result and project its boundary data.
 
subroutine bicgstab_cpld_product (product, ax, ay, az, bx, by, bz, mult, n)
 Compute a coupled weighted inner product in one global reduction.
 
subroutine bicgstab_cpld_product_and_norm (product, norm_squared, ax, ay, az, bx, by, bz, mult, n)
 Compute a coupled inner product and squared norm in one reduction.
 

Function/Subroutine Documentation

◆ bicgstab_cpld_assemble()

subroutine bicgstab_cpld::bicgstab_cpld_assemble ( real(kind=rp), dimension(n, 3), intent(inout vector,
integer, intent(in n,
type(coef_t), intent(inout coef,
class(vector_bc_projector_t), intent(inout bc_projector,
type(gs_t), intent(inout gs_h 
)
private
Parameters
vectorThree-component operator result.
nNumber of degrees of freedom per component.
coefSpectral element coefficients used for cyclic rotation.
bc_projectorProjector for vector Dirichlet boundary nodes.
gs_hGather-scatter handle used to assemble the vector.

Definition at line 491 of file bicgstab_coupled.f90.

Here is the caller graph for this function:

◆ bicgstab_cpld_check_inner_product()

subroutine bicgstab_cpld::bicgstab_cpld_check_inner_product ( real(kind=rp), intent(in inner_product,
real(kind=rp), intent(in norm_a,
real(kind=rp), intent(in norm_b,
character(len=*), intent(in quantity 
)
private
Parameters
inner_productCombined inner product of the two vectors.
norm_aCombined norm of the first vector.
norm_bCombined norm of the second vector.
quantityName of the algorithmic quantity for error reporting.

Definition at line 444 of file bicgstab_coupled.f90.

Here is the caller graph for this function:

◆ bicgstab_cpld_free()

subroutine bicgstab_cpld::bicgstab_cpld_free ( class(bicgstab_cpld_t), intent(inout this)
private

Definition at line 130 of file bicgstab_coupled.f90.

◆ bicgstab_cpld_init()

subroutine bicgstab_cpld::bicgstab_cpld_init ( class(bicgstab_cpld_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 
)
Parameters
nNumber of degrees of freedom per component.
max_iterMaximum number of iterations.
MOptional preconditioner. An identity preconditioner is used if absent.
rel_tolOptional relative convergence tolerance.
abs_tolOptional absolute convergence tolerance.
monitorOptional switch for logging the residual at each iteration.

Definition at line 93 of file bicgstab_coupled.f90.

◆ bicgstab_cpld_product()

subroutine bicgstab_cpld::bicgstab_cpld_product ( real(kind=rp), intent(out product,
real(kind=rp), dimension(n), intent(in ax,
real(kind=rp), dimension(n), intent(in ay,
real(kind=rp), dimension(n), intent(in az,
real(kind=rp), dimension(n), intent(in bx,
real(kind=rp), dimension(n), intent(in by,
real(kind=rp), dimension(n), intent(in bz,
real(kind=rp), dimension(n), intent(in mult,
integer, intent(in n 
)
private
Parameters
productCombined weighted inner product.
axFirst component of the first vector.
aySecond component of the first vector.
azThird component of the first vector.
bxFirst component of the second vector.
bySecond component of the second vector.
bzThird component of the second vector.
multSpectral element multiplicity weights.
nNumber of degrees of freedom per component.

Definition at line 518 of file bicgstab_coupled.f90.

Here is the caller graph for this function:

◆ bicgstab_cpld_product_and_norm()

subroutine bicgstab_cpld::bicgstab_cpld_product_and_norm ( real(kind=rp), intent(out product,
real(kind=rp), intent(out norm_squared,
real(kind=rp), dimension(n), intent(in ax,
real(kind=rp), dimension(n), intent(in ay,
real(kind=rp), dimension(n), intent(in az,
real(kind=rp), dimension(n), intent(in bx,
real(kind=rp), dimension(n), intent(in by,
real(kind=rp), dimension(n), intent(in bz,
real(kind=rp), dimension(n), intent(in mult,
integer, intent(in n 
)
private
Parameters
productCombined weighted inner product of a and b.
norm_squaredCombined weighted squared norm of b.
axFirst component of a.
aySecond component of a.
azThird component of a.
bxFirst component of b.
bySecond component of b.
bzThird component of b.
multSpectral element multiplicity weights.
nNumber of degrees of freedom per component.

Definition at line 552 of file bicgstab_coupled.f90.

Here is the caller graph for this function:

◆ bicgstab_cpld_solve()

type(ksp_monitor_t) function, dimension(3) bicgstab_cpld::bicgstab_cpld_solve ( class(bicgstab_cpld_t), intent(inout this,
class(ax_t), intent(in ax,
type(field_t), intent(inout x,
type(field_t), intent(inout y,
type(field_t), intent(inout z,
real(kind=rp), dimension(n), intent(in fx,
real(kind=rp), dimension(n), intent(in fy,
real(kind=rp), dimension(n), intent(in fz,
integer, intent(in n,
type(coef_t), intent(inout coef,
class(vector_bc_projector_t), intent(inout bc_projector,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)
private

The initial guesses are discarded. All inner products combine the three components, so the method advances one Krylov recurrence for the complete coupled system.

Parameters
AxCoupled linear operator.
xSolution field for the first component.
ySolution field for the second component.
zSolution field for the third component.
fxRight-hand side for the first component.
fyRight-hand side for the second component.
fzRight-hand side for the third component.
nNumber of degrees of freedom per component.
coefSpectral element coefficients and multiplicity weights.
bc_projectorProjector for vector Dirichlet boundary nodes.
gs_hGather-scatter handle used to assemble operator results.
niterOptional maximum number of iterations, overriding the configured value.
Returns
Identical combined convergence information for all components.

Definition at line 191 of file bicgstab_coupled.f90.

Here is the call graph for this function:

◆ bicgstab_cpld_solve_scalar()

type(ksp_monitor_t) function bicgstab_cpld::bicgstab_cpld_solve_scalar ( class(bicgstab_cpld_t), intent(inout this,
class(ax_t), intent(in ax,
type(field_t), intent(inout x,
real(kind=rp), dimension(n), intent(in f,
integer, intent(in n,
type(coef_t), intent(inout coef,
class(scalar_bc_projector_t), intent(inout bc_projector,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)
private
Parameters
AxLinear operator.
xSolution field.
fRight-hand side.
nNumber of degrees of freedom.
coefSpectral element coefficients and multiplicity weights.
bc_projectorProjector for Dirichlet boundary nodes.
gs_hGather-scatter handle used to assemble the operator result.
niterOptional maximum number of iterations.
Returns
Unused convergence information.

Definition at line 150 of file bicgstab_coupled.f90.

◆ bicgstab_cpld_sqrt()

real(kind=rp) function bicgstab_cpld::bicgstab_cpld_sqrt ( real(kind=rp), intent(in value,
character(len=*), intent(in quantity 
)
private
Parameters
valueCombined weighted squared norm.
quantityName of the vector for error reporting.
Returns
The non-negative square root.

Definition at line 472 of file bicgstab_coupled.f90.

Here is the caller graph for this function: