Set multigrid boundary conditions for the solution according to variable iw
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mg_t), | intent(inout) | :: | mg | |||
| integer, | intent(in) | :: | iw |
subroutine mg_copy_boundary_conditions(mg, iw) use mod_global_parameters type(mg_t), intent(inout) :: mg integer, intent(in) :: iw character(len=std_len) :: bnd_name(mg_num_neighbors) integer :: n do n = 1, mg_num_neighbors select case (typeboundary(iw, n)) case (bc_symm) mg%bc(n, mg_iphi)%bc_type = mg_bc_neumann mg%bc(n, mg_iphi)%bc_value = 0.0_dp case (bc_asymm) mg%bc(n, mg_iphi)%bc_type = mg_bc_dirichlet mg%bc(n, mg_iphi)%bc_value = 0.0_dp case (bc_cont) mg%bc(n, mg_iphi)%bc_type = mg_bc_continuous mg%bc(n, mg_iphi)%bc_value = 0.0_dp ! Not needed case (bc_periodic) ! Nothing to do here case default write(*,*) "mg_copy_boundary_conditions: unknown boundary type" end select end do end subroutine mg_copy_boundary_conditions