mimic_init_overlaps Subroutine

public subroutine mimic_init_overlaps(overlaps)

initialize overlap maps using the input file data

Arguments

TypeIntentOptionalAttributesName
integer, intent(in), dimension(:,:):: overlaps

overlaps in the format: code_id : atom_id => code_id : atom_id (e.g. code_one : atom_three => code_two : atom_one)


Contents

Source Code


Source Code

subroutine mimic_init_overlaps(overlaps)

    !> overlaps in the format: code_id : atom_id => code_id : atom_id
    !> (e.g. code_one : atom_three => code_two : atom_one)
    integer, dimension(:,:), intent(in) :: overlaps

    integer :: n_client, n_map
    type(maps_type), dimension(:), allocatable :: overlap_maps

    allocate(overlap_maps(communicator%num_clients))

    do n_client = 1, communicator%num_clients
        do n_map = 1, size(overlaps, 2)
            if (overlaps(1, n_map) == n_client + 1) then
                call overlap_maps(n_client)%add_entry(overlaps(2, n_map), &
                     overlaps(3, n_map), overlaps(4, n_map))
            end if
        end do
    end do

    call communicator%init_overlaps(overlap_maps)

end subroutine mimic_init_overlaps