laplacian_set_methods Subroutine

public subroutine laplacian_set_methods(mg)

Arguments

Type IntentOptional Attributes Name
type(mg_t), intent(inout) :: mg

Called by

proc~~laplacian_set_methods~2~~CalledByGraph proc~laplacian_set_methods~2 laplacian_set_methods proc~mg_set_methods~2 mg_set_methods proc~mg_set_methods~2->proc~laplacian_set_methods~2 proc~check_methods~2 check_methods proc~check_methods~2->proc~mg_set_methods~2 proc~diffusion_solve_acoeff~2 diffusion_solve_acoeff proc~diffusion_solve_acoeff~2->proc~mg_set_methods~2 proc~mg_fas_fmg~2 mg_fas_fmg proc~diffusion_solve_acoeff~2->proc~mg_fas_fmg~2 proc~mg_fas_vcycle~2 mg_fas_vcycle proc~diffusion_solve_acoeff~2->proc~mg_fas_vcycle~2 proc~diffusion_solve_vcoeff~2 diffusion_solve_vcoeff proc~diffusion_solve_vcoeff~2->proc~mg_set_methods~2 proc~diffusion_solve_vcoeff~2->proc~mg_fas_fmg~2 proc~diffusion_solve_vcoeff~2->proc~mg_fas_vcycle~2 proc~diffusion_solve~2 diffusion_solve proc~diffusion_solve~2->proc~mg_set_methods~2 proc~diffusion_solve~2->proc~mg_fas_fmg~2 proc~diffusion_solve~2->proc~mg_fas_vcycle~2 proc~mg_fas_fmg~2->proc~check_methods~2 proc~mg_fas_fmg~2->proc~mg_fas_vcycle~2 proc~mg_fas_vcycle~2->proc~check_methods~2

Source Code

  subroutine laplacian_set_methods(mg)
    type(mg_t), intent(inout) :: mg

    if (all(mg%periodic)) then
       ! For a fully periodic Laplacian, remove the mean from the rhs and phi so
       ! that a unique and periodic solution can be found
       mg%subtract_mean = .true.
    end if

    select case (mg%geometry_type)
    case (mg_cartesian)
       mg%box_op => box_lpl

       select case (mg%smoother_type)
       ! case (smoother_jacobi)
       !    mg%box_smoother => box_jacobi_lpl
       case (mg_smoother_gs, mg_smoother_gsrb)
          mg%box_smoother => box_gs_lpl
       case default
          error stop "laplacian_set_methods: unsupported smoother type"
       end select
    case default
       error stop "laplacian_set_methods: unsupported geometry"
    end select

  end subroutine laplacian_set_methods