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~~CalledByGraph proc~laplacian_set_methods laplacian_set_methods proc~mg_set_methods mg_set_methods proc~mg_set_methods->proc~laplacian_set_methods proc~check_methods check_methods proc~check_methods->proc~mg_set_methods proc~diffusion_solve diffusion_solve proc~diffusion_solve->proc~mg_set_methods proc~mg_fas_fmg mg_fas_fmg proc~diffusion_solve->proc~mg_fas_fmg proc~mg_fas_vcycle mg_fas_vcycle proc~diffusion_solve->proc~mg_fas_vcycle proc~diffusion_solve_acoeff diffusion_solve_acoeff proc~diffusion_solve_acoeff->proc~mg_set_methods proc~diffusion_solve_acoeff->proc~mg_fas_fmg proc~diffusion_solve_acoeff->proc~mg_fas_vcycle proc~diffusion_solve_vcoeff diffusion_solve_vcoeff proc~diffusion_solve_vcoeff->proc~mg_set_methods proc~diffusion_solve_vcoeff->proc~mg_fas_fmg proc~diffusion_solve_vcoeff->proc~mg_fas_vcycle proc~mg_fas_fmg->proc~check_methods proc~mg_fas_fmg->proc~mg_fas_vcycle proc~mg_fas_vcycle->proc~check_methods

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 (mg_cylindrical)
       mg%box_op => box_clpl

       select case (mg%smoother_type)
       case (mg_smoother_gs, mg_smoother_gsrb)
          mg%box_smoother => box_gs_clpl
       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