transfer_from_block_form Subroutine

public subroutine transfer_from_block_form(ras, classes, full_vec, ras_vec)

Arguments

Type IntentOptional Attributes Name
type(ras_parameters), intent(in) :: ras
type(ras_class_data), intent(in) :: classes(ras%num_classes)
real(kind=dp), intent(out) :: full_vec(:)
type(ras_vector), intent(inout) :: ras_vec(ras%num_classes,ras%num_classes,0:7)

Contents


Source Code

    subroutine transfer_from_block_form(ras, classes, full_vec, ras_vec)

        ! See comments for transfer_to_block_form. This routine does the opposite transformation.

        type(ras_parameters), intent(in) :: ras
        type(ras_class_data), intent(in) :: classes(ras%num_classes)
        real(dp), intent(out) :: full_vec(:)
        type(ras_vector), intent(inout) :: ras_vec(ras%num_classes, ras%num_classes, 0:7)
        integer :: class_i, class_j, j, sym_i, sym_j, ind_i, ind_j
        integer :: counter

        counter = 0

        do class_i = 1, ras%num_classes
            do j = 1, classes(class_i)%num_comb
                class_j = classes(class_i)%allowed_combns(j)
                do sym_i = 0, 7
                    sym_j = ieor(HFSym_ras, sym_i)
                    if (classes(class_i)%num_sym(sym_i) == 0) cycle
                    if (classes(class_j)%num_sym(sym_j) == 0) cycle
                    do ind_i = 1, classes(class_i)%num_sym(sym_i)
                        do ind_j = 1, classes(class_j)%num_sym(sym_j)
                            counter = counter + 1
                            full_vec(counter) = ras_vec(class_i, class_j, sym_i)%elements(ind_i, ind_j)
                        end do
                    end do
                end do
            end do
        end do

    end subroutine transfer_from_block_form