DL_MG
Data Types | Functions/Subroutines | Variables
dl_mg_multigrid_method Module Reference

Top routines for the multigrid algorith: restrict, relax, prolungate and some ancillaries. More...

Data Types

type  halo_buffers_t
 buffers use to exchage domain halos at each mg level More...
 

Functions/Subroutines

subroutine mg_solver (mg, eq_type, alpha, rho, pot, res, use_pot_in, remove_source_zero_mode, ierr)
 
subroutine mg_vcycle (mg, eq_type, niter_level1, test_conv_level1)
 run the V-cycle More...
 
subroutine mg_relax (mg, level, iters, eq_type)
 
subroutine mg_restrict (mg, level, eq_type)
 
subroutine mg_prolongate (mg, level)
 
subroutine allocate_halo_buffers (mg)
 
subroutine free_halo_buffers (mg)
 
subroutine mg_residual (mg, eq_type, halo_exch)
 specialisation of the blocked residual for multigrid no need to exchange halos as this op is done at the end of mg_relax More...
 

Variables

type(halo_buffers_t), dimension(:), allocatable, target, private halo_buff
 
logical, save test_dbc_corruption
 

Detailed Description

Top routines for the multigrid algorith: restrict, relax, prolungate and some ancillaries.

Lucian Anton

Function/Subroutine Documentation

◆ allocate_halo_buffers()

subroutine dl_mg_multigrid_method::allocate_halo_buffers ( type(mg_t), dimension(:), intent(in)  mg)

◆ free_halo_buffers()

subroutine dl_mg_multigrid_method::free_halo_buffers ( type(mg_t), dimension(:), intent(in)  mg)

◆ mg_prolongate()

subroutine dl_mg_multigrid_method::mg_prolongate ( type(mg_t), dimension(:), intent(inout), target  mg,
integer, intent(in)  level 
)

◆ mg_relax()

subroutine dl_mg_multigrid_method::mg_relax ( type(mg_t), dimension(:), intent(inout), target  mg,
integer, intent(in)  level,
integer, intent(in)  iters,
integer, intent(in)  eq_type 
)
Parameters
[in]eq_typeused to switch the smoother in red black subroutine

◆ mg_residual()

subroutine dl_mg_multigrid_method::mg_residual ( type(mg_t), intent(inout)  mg,
integer, intent(in)  eq_type,
logical, intent(in), optional  halo_exch 
)

specialisation of the blocked residual for multigrid no need to exchange halos as this op is done at the end of mg_relax

◆ mg_restrict()

subroutine dl_mg_multigrid_method::mg_restrict ( type(mg_t), dimension(:), intent(inout)  mg,
integer, intent(in)  level,
integer, intent(in)  eq_type 
)

◆ mg_solver()

subroutine dl_mg_multigrid_method::mg_solver ( type(mg_t), dimension(:), intent(inout)  mg,
integer, intent(in)  eq_type,
real(wp), intent(in)  alpha,
real(wp), dimension(isx:, isy:, isz:), intent(in)  rho,
real(wp), dimension(isx:, isy:, isz:), intent(inout)  pot,
real(wp), dimension(isx:, isy:, isz:), intent(out), optional  res,
logical, intent(in), optional  use_pot_in,
integer, intent(in), optional  remove_source_zero_mode,
integer, intent(out)  ierr 
)
Parameters
[in]use_pot_inif absent or false the inital solution is set 0 inside domain
[in]remove_source_zero_modedefect correction removes k=0 mode, avoids repetition

◆ mg_vcycle()

subroutine dl_mg_multigrid_method::mg_vcycle ( type(mg_t), dimension(:), intent(inout)  mg,
integer, intent(in)  eq_type,
integer, intent(in), optional  niter_level1,
logical, intent(in), optional  test_conv_level1 
)

run the V-cycle

Todo:
needs to handle better the convergence flag in this version the coarse level does not check for convergence

Variable Documentation

◆ halo_buff

type(halo_buffers_t), dimension(:), allocatable, target, private dl_mg_multigrid_method::halo_buff
private

◆ test_dbc_corruption

logical, save dl_mg_multigrid_method::test_dbc_corruption