ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/simulation_module.F90
Revision: 215
Committed: Thu Dec 19 21:59:51 2002 UTC (21 years, 6 months ago) by chuckv
File size: 1517 byte(s)
Log Message:
+ added lennard-jones force module and corresponding class.
+ created forceFactory directory.

File Contents

# User Rev Content
1 chuckv 167 module simulation
2     use definitions, ONLY :dp
3 chuckv 194 use force_wrappers, ONLY : alloc_force_wrappers
4    
5 chuckv 167 implicit none
6     PRIVATE
7    
8    
9 chuckv 194
10     real ( kind = dp ), public, dimension(3) :: box
11 chuckv 167
12    
13 chuckv 194 real ( kind = dp ), public :: rlist
14     real ( kind = dp ), public :: rcut
15     real ( kind = dp ), public :: rlistsq
16     real ( kind = dp ), public :: rcutsq
17 chuckv 167
18 chuckv 194 integer,public, allocatable, dimension(:) :: point
19     integer,public, allocatable, dimension(:) :: list
20 chuckv 167
21    
22 chuckv 194 !MPI dependent routines
23 chuckv 185
24 chuckv 194 #ifdef IS_MPI
25     ! Universal routines: All types of force calculations will need these arrays
26     ! Arrays specific to a type of force calculation should be declared in that module.
27     real( kind = dp ), allocatable, dimension(:,:) :: qRow
28     real( kind = dp ), allocatable, dimension(:,:) :: qColumn
29 chuckv 185
30 chuckv 194 real( kind = dp ), allocatable, dimension(:,:) :: fRow
31     real( kind = dp ), allocatable, dimension(:,:) :: fColumn
32 chuckv 185
33 chuckv 194 real( kind = dp ), allocatable, dimension(:,:) :: tRow
34     real( kind = dp ), allocatable, dimension(:,:) :: tColumn
35    
36     #endif
37    
38    
39    
40    
41    
42    
43 chuckv 167 contains
44    
45 chuckv 194 #ifdef MPI
46     ! Allocated work arrays for MPI
47     subroutine allocate_mpi_arrays(nDimensions,numComponents)
48     integer, intent(in) :: nDimensions
49     integer, intent(in) :: numComponents
50 chuckv 167
51 chuckv 194
52    
53    
54    
55     end subroutine allocate_mpi_arrays
56     #endif
57    
58 chuckv 167 subroutine set_simulation(box,rlist,rcut)
59    
60    
61    
62     end subroutine set_simulation
63    
64    
65    
66     subroutine change_box_size(new_box_size)
67     real(kind=dp), dimension(3) :: new_box_size
68    
69     box = new_box_size
70    
71     end subroutine change_box_size
72    
73 chuckv 215
74 chuckv 167 end module simulation