ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/simulation_module.F90
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/simulation_module.F90 (file contents):
Revision 328 by gezelter, Wed Mar 12 20:00:58 2003 UTC vs.
Revision 329 by gezelter, Wed Mar 12 22:27:59 2003 UTC

# Line 40 | Line 40 | module simulation
40    real( kind = dp ), allocatable, dimension(:,:), public :: t_Row
41    real( kind = dp ), allocatable, dimension(:,:), public :: t_Col
42    real( kind = dp ), allocatable, dimension(:,:), public :: t_Temp
43 +  real( kind = dp ), allocatable, dimension(:,:), public :: rf_Row
44 +  real( kind = dp ), allocatable, dimension(:,:), public :: rf_Col
45 +
46    integer, allocatable, dimension(:), public :: atid_Row
47    integer, allocatable, dimension(:), public :: atid_Col
48   #else
49 +  real( kind = dp ), allocatable, dimension(:,:), public :: rf
50    integer, allocatable, dimension(:), public :: atid
51   #endif
52 +
53 +  real(kind = dp), dimension(9), public :: tau_Temp = 0.0_dp
54 +  real(kind = dp), public :: virial_Temp = 0.0_dp
55    
56    public :: SimulationSetup
57    public :: getBox
# Line 52 | Line 59 | module simulation
59    public :: getRlist
60    public :: getRrf
61    public :: getRt
62 +  public :: getDielect
63    public :: getNlocal
64    public :: SimUsesPBC
65    public :: SimUsesLJ
# Line 245 | Line 253 | contains
253      real( kind = dp ) :: rt
254      rt = thisSim%rt
255    end function getRt
256 +
257 +  function getDielect() result(dielect)
258 +    real( kind = dp ) :: dielect
259 +    dielect = thisSim%dielect
260 +  end function getDielect
261    
262    pure function getNlocal() result(nlocal)
263      integer :: nlocal
# Line 286 | Line 299 | contains
299      doesit = thisSim%SIM_uses_EAM
300    end function SimUsesEAM
301  
302 +  function SimUsesDirectionalAtoms() result(doesit)
303 +    logical :: doesit
304 +    doesit = thisSim%SIM_uses_dipoles .or. thisSim%SIM_uses_sticky .or. &
305 +         thisSim%SIM_uses_GB .or. thisSim%SIM_uses_RF
306 +  end function SimRequiresPrepairCalc
307 +
308    function SimRequiresPrepairCalc() result(doesit)
309      logical :: doesit
310      doesit = thisSim%SIM_uses_EAM
# Line 418 | Line 437 | contains
437         return
438      endif
439  
440 +    allocate(rf_Row(ndim,nrow),stat=alloc_stat)
441 +    if (alloc_stat /= 0 ) then
442 +       thisStat = 0
443 +       return
444 +    endif
445 +
446 +    allocate(rf_Col(ndim,ncol),stat=alloc_stat)
447 +    if (alloc_stat /= 0 ) then
448 +       thisStat = 0
449 +       return
450 +    endif
451 +
452 +
453   #else
454  
455      allocate(atid(nlocal),stat=alloc_stat)
# Line 426 | Line 458 | contains
458         return
459      end if
460  
461 +    allocate(rf(ndim,nlocal),stat=alloc_stat)
462 +    if (alloc_stat /= 0 ) then
463 +       thisStat = 0
464 +       return
465 +    endif
466 +
467   #endif
468  
469    end subroutine setupGlobals
# Line 435 | Line 473 | contains
473      !We free in the opposite order in which we allocate in.
474   #ifdef IS_MPI
475  
476 +    if (allocated(rf_Col))     deallocate(rf_Col)
477 +    if (allocated(rf_Row))     deallocate(rf_Row)    
478      if (allocated(atid_Col))   deallocate(atid_Col)
479      if (allocated(atid_Row))   deallocate(atid_Row)
480      if (allocated(t_Temp))     deallocate(t_Temp)
# Line 455 | Line 495 | contains
495      
496   #else
497      
498 +    if (allocated(rf))         deallocate(rf)
499      if (allocated(atid))       deallocate(atid)
500      
501   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines