TMatVec_diag Subroutine

private subroutine TMatVec_diag(eel, x, y)

This routine compute the product between the diagonal of T matrix with x, and add it to y. The product is simply computed by each element of x for its inverse polarizability.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

The electostatic data structure

real(kind=rp), intent(in), dimension(3*eel%pol_atoms) :: x

Input vector

real(kind=rp), intent(out), dimension(3*eel%pol_atoms) :: y

Output vector


Called by

proc~~tmatvec_diag~~CalledByGraph proc~tmatvec_diag TMatVec_diag proc~tmatvec_incore TMatVec_incore proc~tmatvec_incore->proc~tmatvec_diag proc~tmatvec_otf TMatVec_otf proc~tmatvec_otf->proc~tmatvec_diag

Contents

Source Code


Source Code

    subroutine TMatVec_diag(eel, x, y)
        !! This routine compute the product between the diagonal of T matrix
        !! with x, and add it to y. The product is simply computed by 
        !! each element of x for its inverse polarizability.

        implicit none

        type(ommp_electrostatics_type), intent(in) :: eel
        !! The electostatic data structure 
        real(rp), dimension(3*eel%pol_atoms), intent(in) :: x
        !! Input vector
        real(rp), dimension(3*eel%pol_atoms), intent(out) :: y
        !! Output vector

        integer(ip) :: i, ii

        !$omp parallel do default(shared) private(i,ii) 
        do i=1, 3*eel%pol_atoms
            ii = (i+2)/3
            y(i) = y(i) + x(i) / eel%pol(ii)
        end do
    end subroutine TMatVec_diag