ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/calc_reaction_field.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/calc_reaction_field.F90 (file contents):
Revision 626 by mmeineke, Wed Jul 16 21:30:56 2003 UTC vs.
Revision 898 by chuckv, Mon Jan 5 22:49:14 2004 UTC

# Line 61 | Line 61 | contains
61  
62      integer, intent(in) :: atom1, atom2
63      real (kind = dp), intent(in) :: rij
64 <    real (kind = dp), dimension(3,getNlocal()) :: u_l    
64 >    real (kind = dp), dimension(3,nLocal) :: u_l    
65  
66      integer :: me1, me2
67      real (kind = dp) :: taper, mu1, mu2
# Line 134 | Line 134 | contains
134      
135      integer, intent(in) :: atom1
136      real(kind=dp), intent(in) :: mu1
137 <    real(kind=dp), dimension(3,getNlocal()) :: u_l
137 >    real(kind=dp), dimension(3,nLocal) :: u_l
138      
139      !! should work for both MPI and non-MPI version since this is not pairwise.
140      rf(1,atom1) = rf(1,atom1) + u_l(1,atom1)*mu1
# Line 150 | Line 150 | contains
150      real (kind=dp), intent(in) :: mu1
151      real (kind=dp), intent(inout) :: rfpot
152      logical, intent(in) :: do_pot
153 <    real (kind = dp), dimension(3,getNlocal()) :: u_l    
154 <    real (kind = dp), dimension(3,getNlocal()) :: t
153 >    real (kind = dp), dimension(3,nLocal) :: u_l    
154 >    real (kind = dp), dimension(3,nLocal) :: t
155  
156      if (.not.rf_initialized) then
157         write(default_error,*) 'Reaction field not initialized!'
# Line 182 | Line 182 | contains
182      integer, intent(in) :: atom1, atom2
183      real(kind=dp), dimension(3), intent(in) :: d
184      real(kind=dp), intent(in) :: rij
185 <    real( kind = dp ), dimension(3,getNlocal()) :: u_l
186 <    real( kind = dp ), dimension(3,getNlocal()) :: f
185 >    real( kind = dp ), dimension(3,nLocal) :: u_l
186 >    real( kind = dp ), dimension(3,nLocal) :: f
187      logical, intent(in) :: do_stress
188      
189      real (kind = dp), dimension(3) :: ul1
190      real (kind = dp), dimension(3) :: ul2
191      real (kind = dp) :: dtdr
192      real (kind = dp) :: dudx, dudy, dudz, u1dotu2
193 <    integer :: me1, me2
193 >    integer :: me1, me2, id1, id2
194      real (kind = dp) :: mu1, mu2
195      
196      if (.not.rf_initialized) then
# Line 257 | Line 257 | contains
257   #endif
258        
259         if (do_stress) then          
260          if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then
260  
261 + #ifdef IS_MPI
262 +          id1 = tagRow(atom1)
263 +          id2 = tagColumn(atom2)
264 + #else
265 +          id1 = atom1
266 +          id2 = atom2
267 + #endif
268 +
269 +          if (molMembershipList(id1) .ne. molMembershipList(id2)) then
270 +
271               ! because the d vector is the rj - ri vector, and
272               ! because dudx, dudy, and dudz are the
273               ! (positive) force on atom i (negative on atom j) we need

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines