ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/DarkSide/eam.F90
(Generate patch)

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/eam.F90 (file contents):
Revision 2278 by chrisfen, Fri Aug 26 22:39:25 2005 UTC vs.
Revision 2355 by chuckv, Wed Oct 12 18:59:16 2005 UTC

# Line 50 | Line 50 | module eam
50   #endif
51    implicit none
52    PRIVATE
53 + #define __FORTRAN90
54 + #include "UseTheForce/DarkSide/fInteractionMap.h"
55  
56    INTEGER, PARAMETER :: DP = selected_real_kind(15)
57  
# Line 227 | Line 229 | contains
229      
230      eamID = EAMList%atidToEAMType(atomID)
231      cutValue = EAMList%EAMParams(eamID)%eam_rcut
230
232    end function getEAMCut
233  
234    subroutine init_EAM_FF(status)
# Line 560 | Line 561 | contains
561      ! we don't use the derivatives, dummy variables
562      real( kind = dp) :: drho,d2rho
563      integer :: eam_err
564 +    
565 +    integer :: atid1,atid2 ! Global atid    
566 +    integer :: myid_atom1 ! EAM atid
567 +    integer :: myid_atom2
568  
564    integer :: myid_atom1
565    integer :: myid_atom2
569  
570      ! check to see if we need to be cleaned at the start of a force loop
571  
# Line 570 | Line 573 | contains
573  
574  
575   #ifdef IS_MPI
576 <    myid_atom1 = atid_Row(atom1)
577 <    myid_atom2 = atid_Col(atom2)
578 < #else
579 <    myid_atom1 = atid(atom1)
580 <    myid_atom2 = atid(atom2)
576 >    Atid1 = Atid_row(Atom1)
577 >    Atid2 = Atid_col(Atom2)
578 > #else
579 >    Atid1 = Atid(Atom1)
580 >    Atid2 = Atid(Atom2)
581   #endif
582  
583 +    Myid_atom1 = Eamlist%atidtoeamtype(Atid1)
584 +    Myid_atom2 = Eamlist%atidtoeamtype(Atid2)
585 +
586      if (r.lt.EAMList%EAMParams(myid_atom1)%eam_rcut) then
587  
588  
# Line 594 | Line 600 | contains
600   #else
601         rho(atom2) = rho(atom2) + rho_i_at_j
602   #endif
603 <       !       write(*,*) atom1,atom2,r,rho_i_at_j
603 >             ! write(*,*) atom1,atom2,r,rho_i_at_j
604      endif
605  
606      if (r.lt.EAMList%EAMParams(myid_atom2)%eam_rcut) then
# Line 632 | Line 638 | contains
638      integer :: atom
639      real(kind=dp) :: U,U1,U2
640      integer :: atype1
641 <    integer :: me
641 >    integer :: me,atid1
642      integer :: n_rho_points
643  
644  
# Line 657 | Line 663 | contains
663  
664      !! Calculate F(rho) and derivative
665      do atom = 1, nlocal
666 <       me = atid(atom)
666 >       atid1 = atid(atom)
667 >       me = eamList%atidToEAMtype(atid1)
668         n_rho_points = EAMList%EAMParams(me)%eam_nrho
669         !  Check to see that the density is not greater than the larges rho we have calculated
670         if (rho(atom) < EAMList%EAMParams(me)%eam_rhovals(n_rho_points)) then
# Line 751 | Line 758 | contains
758      integer :: id1,id2
759      integer  :: mytype_atom1
760      integer  :: mytype_atom2
761 <
761 >    integer  :: atid1,atid2
762      !Local Variables
763  
764      ! write(*,*) "Frho: ", Frho(atom1)
# Line 763 | Line 770 | contains
770      if (rij .lt. EAM_rcut) then
771  
772   #ifdef IS_MPI
773 <       mytype_atom1 = atid_row(atom1)
774 <       mytype_atom2 = atid_col(atom2)
773 >       atid1 = atid_row(atom1)
774 >       atid2 = atid_col(atom2)
775   #else
776 <       mytype_atom1 = atid(atom1)
777 <       mytype_atom2 = atid(atom2)
776 >       atid1 = atid(atom1)
777 >       atid2 = atid(atom2)
778   #endif
779 +
780 +       mytype_atom1 = EAMList%atidToEAMType(atid1)
781 +       mytype_atom2 = EAMList%atidTOEAMType(atid2)
782 +
783 +
784         ! get cutoff for atom 1
785         rci = EAMList%EAMParams(mytype_atom1)%eam_rcut
786         ! get type specific cutoff for atom 2
# Line 852 | Line 864 | contains
864  
865   #ifdef IS_MPI
866         if (do_pot) then
867 <          pot_Row(atom1) = pot_Row(atom1) + phab*0.5
868 <          pot_Col(atom2) = pot_Col(atom2) + phab*0.5
867 >          pot_Row(EAM_POT,atom1) = pot_Row(EAM_POT,atom1) + phab*0.5
868 >          pot_Col(EAM_POT,atom2) = pot_Col(EAM_POT,atom2) + phab*0.5
869         end if
870  
871         f_Row(1,atom1) = f_Row(1,atom1) + fx

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines