--- trunk/OOPSE/libmdtools/calc_reaction_field.F90 2003/04/04 19:57:01 459 +++ trunk/OOPSE/libmdtools/calc_reaction_field.F90 2003/04/04 22:22:30 460 @@ -3,6 +3,7 @@ module reaction_field use definitions use atype_module use vector_class + use simulation #ifdef IS_MPI use mpiSimulation #endif @@ -41,7 +42,7 @@ contains integer, intent(in) :: atom1, atom2 real (kind = dp), intent(in) :: rij - real (kind = dp), dimension(:,:) :: u_l + real (kind = dp), dimension(3,getNlocal()) :: u_l integer :: me1, me2 real (kind = dp) :: taper, mu1, mu2 @@ -113,7 +114,7 @@ contains integer, intent(in) :: atom1 real(kind=dp), intent(in) :: mu1 - real(kind=dp), dimension(:,:) :: u_l + real(kind=dp), dimension(3,getNlocal()) :: u_l !! should work for both MPI and non-MPI version since this is not pairwise. rf(1,atom1) = rf(1,atom1) + u_l(1,atom1)*mu1 @@ -129,8 +130,8 @@ contains real (kind=dp), intent(in) :: mu1 real (kind=dp), intent(inout) :: rfpot logical, intent(in) :: do_pot - real (kind = dp), dimension(:,:) :: u_l - real (kind = dp), dimension(:,:) :: t + real (kind = dp), dimension(3,getNlocal()) :: u_l + real (kind = dp), dimension(3,getNlocal()) :: t if (.not.rf_initialized) then write(default_error,*) 'Reaction field not initialized!' @@ -161,8 +162,8 @@ contains integer, intent(in) :: atom1, atom2 real(kind=dp), dimension(3), intent(in) :: d real(kind=dp), intent(in) :: rij - real( kind = dp ), dimension(:,:) :: u_l - real( kind = dp ), dimension(:,:) :: f + real( kind = dp ), dimension(3,getNlocal()) :: u_l + real( kind = dp ), dimension(3,getNlocal()) :: f logical, intent(in) :: do_stress real (kind = dp), dimension(3) :: ul1