Perform matrix vector multiplication y = TMat*x, where TMat is polarization matrix (precomputed and stored in memory) and x and y are column vectors
Type | Intent | Optional | 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) |
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