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 309 by gezelter, Mon Mar 10 23:19:23 2003 UTC vs.
Revision 312 by gezelter, Tue Mar 11 17:46:18 2003 UTC

# Line 21 | Line 21 | module simulation
21    public :: getBox
22    public :: getRcut
23    public :: getRlist
24 +  public :: getRrf
25 +  public :: getRt
26    public :: getNlocal
27    public :: setSimulation
28    public :: isEnsemble
# Line 35 | Line 37 | module simulation
37       module procedure getBox_dim
38    end interface
39  
38
39
40
40   contains
41  
42    subroutine setSimulation(setThisSim,error)
# Line 47 | Line 46 | contains
46  
47      error = 0
48      setSim = .true.
49 <
51 < ! copy C struct into fortran type
49 >    ! copy C struct into fortran type
50      thisSim = setThisSim
51    end subroutine setSimulation
52  
# Line 57 | Line 55 | contains
55      nparticles = thisSim%nLRparticles
56    end function getNparticles
57  
60
58    subroutine change_box_size(new_box_size)
59      real(kind=dp), dimension(3) :: new_box_size
63
60      thisSim%box = new_box_size
65
61    end subroutine change_box_size
62  
68
63    function getBox_3d() result(thisBox)
64      real( kind = dp ), dimension(3) :: thisBox
65      thisBox = thisSim%box
# Line 74 | Line 68 | contains
68    function getBox_dim(dim) result(thisBox)
69      integer, intent(in) :: dim
70      real( kind = dp ) :: thisBox
71 <
71 >    
72      thisBox = thisSim%box(dim)
73    end function getBox_dim
74 <  
81 <  
82 <
74 >    
75    subroutine getRcut(thisrcut,rcut2,rcut6,status)
76      real( kind = dp ), intent(out) :: thisrcut
77      real( kind = dp ), intent(out), optional :: rcut2
# Line 96 | Line 88 | contains
88      thisrcut = thisSim%rcut
89      if(present(rcut2)) rcut2 = thisSim%rcutsq
90      if(present(rcut6)) rcut6 = thisSim%rcut6
99
91    end subroutine getRcut
92    
102  
103  
104
93    subroutine getRlist(thisrlist,rlist2,status)
94      real( kind = dp ), intent(out) :: thisrlist
95      real( kind = dp ), intent(out), optional :: rlist2
# Line 117 | Line 105 | contains
105      
106      thisrlist = thisSim%rlist
107      if(present(rlist2)) rlist2 = thisSim%rlistsq
120
121
108    end subroutine getRlist
109 +
110 +  function getRrf() result(rrf)
111 +    real( kind = dp ) :: rrf
112 +    rrf = thisSim%rrf
113 +  end function getRrf
114    
115 <
116 < pure function getNlocal() result(nlocal)
115 >  function getRt() result(rt)
116 >    real( kind = dp ) :: rt
117 >    rt = thisSim%rt
118 >  end function getRt
119 >  
120 >  pure function getNlocal() result(nlocal)
121      integer :: nlocal
122      nlocal = thisSim%nLRparticles
123    end function getNlocal
124 <
124 >  
125    function doStress() result(do_stress)
126      logical :: do_stress
127      do_stress = thisSim%do_stress
128    end function doStress
129 <
129 >  
130    function isEnsemble(this_ensemble) result(is_this_ensemble)
131      character(len = *) :: this_ensemble
132      logical :: is_this_ensemble
# Line 143 | Line 138 | contains
138      character (len = len(thisSim%ensemble)) :: thisEnsemble
139      thisEnsemble = thisSim%ensemble
140    end function returnEnsemble
141 <
141 >  
142    function returnMixingRules() result(thisMixingRule)
143      character (len = len(thisSim%ensemble)) :: thisMixingRule
144      thisMixingRule = thisSim%MixingRule
145    end function returnMixingRules
146 <
146 >  
147    function isPBC() result(PBCset)
148      logical :: PBCset
149      PBCset = .false.
150      if (thisSim%use_pbc) PBCset = .true.
151    end function isPBC
152 <
152 >  
153    pure function getStringLen() result (thislen)
154      integer :: thislen    
155      thislen = string_len
156    end function getStringLen
157 <
157 >  
158   end module simulation

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines