TMatVec_incore Subroutine

private subroutine TMatVec_incore(eel, x, y, dodiag)

Perform matrix vector multiplication y = TMat*x, where TMat is polarization matrix (precomputed and stored in memory) and x and y are column vectors

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

logical, intent(in) :: dodiag

Logical flag (.true. = diagonal is computed, .false. = diagonal is skipped)


Calls

proc~~tmatvec_incore~~CallsGraph proc~tmatvec_incore TMatVec_incore proc~tmatvec_offdiag TMatVec_offdiag proc~tmatvec_incore->proc~tmatvec_offdiag proc~tmatvec_diag TMatVec_diag proc~tmatvec_incore->proc~tmatvec_diag dgemm dgemm proc~tmatvec_offdiag->dgemm

Contents

Source Code


Source Code

    subroutine TMatVec_incore(eel, x, y, dodiag)
        !! Perform matrix vector multiplication y = TMat*x,
        !! where TMat is polarization matrix (precomputed and stored in memory)
        !! and x and y are column vectors
        
        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
        logical, intent(in) :: dodiag
        !! Logical flag (.true. = diagonal is computed, .false. = diagonal is
        !! skipped)
        
        call TMatVec_offdiag(eel, x, y)
        if(dodiag) call TMatVec_diag(eel, x, y)
    
    end subroutine TMatVec_incore