Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !!* Fills the given array with the rotation matrix for p-Orbital tesserals.
- !!* @param rot Rotation matrix
- !!* @param dirCos Directional cosine vector for rotation
- subroutine getRotMatP(rot, dirCos)
- real(dp), intent(out) :: rot(:,:)
- real(dp), target, intent(in) :: dirCos(3)
- real(dp), pointer :: uu, vv, ww
- real(dp) :: tmpNum
- ASSERT(all(shape(rot) == (/ 3, 3 /)))
- ASSERT(size(dirCos) == 3)
- !! Directional cosine elements
- uu => dirCos(1)
- vv => dirCos(2)
- ww => dirCos(3)
- tmpNum = sqrt(1 - ww**2)
- rot(1,1) = uu / tmpNum
- rot(2,1) = vv
- rot(3,1) = ww * vv / tmpNum
- rot(1,2) = 0.0_dp
- rot(2,2) = ww
- rot(3,2) = - tmpNum
- rot(1,3) = - vv / tmpNum
- rot(2,3) = uu
- rot(3,3) = ww * uu / tmpNum
- end subroutine getRotMatP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement