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 285 by mmeineke, Wed Feb 26 18:45:57 2003 UTC vs.
Revision 290 by chuckv, Thu Feb 27 21:25:47 2003 UTC

# Line 1 | Line 1
1 + !! Fortran interface to C entry plug.
2 +
3   module simulation
4    use definitions, ONLY :dp
5   #ifdef IS_MPI
# Line 11 | Line 13 | module simulation
13   #include "../headers/fsimulation.h"
14  
15    type (simtype), public :: thisSim
14 !! Tag for MPI calculations  
15  integer, allocatable, dimension(:) :: tag
16  
17 < #ifdef IS_MPI
18 <  integer, allocatable, dimension(:) :: tag_row
19 <  integer, allocatable, dimension(:) :: tag_column
20 < #endif
17 >  logical :: setSim = .false.
18  
22 !! WARNING: use_pbc hardcoded, fixme
23   logical :: setSim = .false.
19  
25 !! array for saving previous positions for neighbor lists.  
26  real( kind = dp ), allocatable,dimension(:,:),save :: q0
27
28
20    public :: wrap
21    public :: getBox
22    public :: getRcut
# Line 52 | Line 43 | module simulation
43  
44  
45  
55
56
57
58
59
60
46   contains
47  
48 <  subroutine setSimulation(nLRParticles,box,rlist,rcut,ensemble,mixingRule,use_pbc)
49 <    integer, intent(in) :: nLRParticles
50 <    real(kind = dp ), intent(in), dimension(3) :: box
66 <    real(kind = dp ), intent(in) :: rlist
67 <    real(kind = dp ), intent(in) :: rcut
68 <    character( len = stringLen), intent(in)  :: ensemble
69 <    character( len = stringLen), intent(in)  :: mixingRule
70 <    logical, intent(in) :: use_pbc
48 >  subroutine setSimulation(setThisSim,error)
49 >    type (simtype) :: setThisSim
50 >    integer :: error
51      integer :: alloc_stat
52 <    if( setsim ) return  ! simulation is already initialized
52 >
53 >    error = 0
54      setSim = .true.
55  
56 <    thisSim%nLRParticles = nLRParticles
57 <    thisSim%box          = box
77 <    thisSim%rlist        = rlist
78 <    thisSIm%rlistsq      = rlist * rlist
79 <    thisSim%rcut         = rcut
80 <    thisSim%rcutsq       = rcut * rcut
81 <    thisSim%rcut6        = thisSim%rcutsq * thisSim%rcutsq * thisSim%rcutsq
82 <    
83 <    thisSim%ensemble = ensemble
84 <    thisSim%mixingRule = mixingRule
85 <    thisSim%use_pbc = use_pbc
86 <
87 <    if (.not. allocated(q0)) then
88 <       allocate(q0(3,nLRParticles),stat=alloc_stat)
89 <    endif
56 > ! copy C struct into fortran type
57 >    thisSim = setThisSim
58    end subroutine setSimulation
59  
60    function getNparticles() result(nparticles)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines