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 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2276 by chuckv, Fri Aug 26 20:34:24 2005 UTC

# Line 117 | Line 117 | module eam
117       integer           :: currentAddition = 0
118  
119       type (EAMtype), pointer  :: EAMParams(:) => null()
120 +     integer, pointer         :: atidToEAMType(:) => null()
121    end type EAMTypeList
122  
123  
# Line 152 | Line 153 | contains
153      integer                                :: eam_ident
154      integer                                :: status
155  
156 <    integer                                :: nAtypes
156 >    integer                                :: nAtypes,nEAMTypes,myATID
157      integer                                :: maxVals
158      integer                                :: alloc_stat
159      integer                                :: current
# Line 167 | Line 168 | contains
168  
169      ! check to see if this is the first time into
170      if (.not.associated(EAMList%EAMParams)) then
171 <       call getMatchingElementList(atypes, "is_EAM", .true., nAtypes, MatchList)
172 <       EAMList%n_eam_types = nAtypes
173 <       allocate(EAMList%EAMParams(nAtypes))
171 >       call getMatchingElementList(atypes, "is_EAM", .true., nEAMtypes, MatchList)
172 >       EAMList%n_eam_types = nEAMtypes
173 >       allocate(EAMList%EAMParams(nEAMTypes))
174 >       nAtypes = getSize(atypes)
175 >       allocate(EAMList%atidToEAMType(nAtypes))
176      end if
177  
178      EAMList%currentAddition = EAMList%currentAddition + 1
179      current = EAMList%currentAddition
180  
181 +    myATID =  getFirstMatchingElement(atypes, "c_ident", c_ident)
182 +    EAMList%atidToEAMType(myATID) = current
183  
184      call allocate_EAMType(eam_nrho,eam_nr,EAMList%EAMParams(current),stat=alloc_stat)
185      if (alloc_stat /= 0) then
# Line 182 | Line 187 | contains
187         return
188      end if
189  
190 <    ! this is a possible bug, we assume a correspondence between the vector atypes and
186 <    ! EAMAtypes
187 <
190 >  
191      EAMList%EAMParams(current)%eam_atype    = eam_ident
192      EAMList%EAMParams(current)%eam_lattice  = lattice_constant
193      EAMList%EAMParams(current)%eam_nrho     = eam_nrho

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines