ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/doForces_interface.F90
Revision: 3397
Committed: Tue May 27 16:39:06 2008 UTC (16 years, 1 month ago) by chuckv
File size: 3084 byte(s)
Log Message:
Checking in changes for Hefland moment calculations

File Contents

# User Rev Content
1 gezelter 1948 !! Interfaces for C programs to module....
2    
3 gezelter 2461 subroutine initFortranFF(thisStat)
4 gezelter 1948 use doForces, ONLY: init_FF
5 chrisfen 2295 use definitions, ONLY : dp
6    
7 gezelter 2280 integer, intent(out) :: thisStat
8    
9 gezelter 2461 call init_FF(thisStat)
10 gezelter 2204
11 gezelter 1948 end subroutine initFortranFF
12    
13 chuckv 3397 subroutine doForceloop(q, q_group, A, eFrame, f, t, tau, pot, particle_pot, &
14 gezelter 1948 do_pot_c, do_stress_c, error)
15 gezelter 2204
16 gezelter 1948 use definitions, ONLY: dp
17     use simulation
18     use doForces, ONLY: do_force_loop
19 chuckv 2358
20     #define __FORTRAN90
21     #include "UseTheForce/DarkSide/fInteractionMap.h"
22    
23 gezelter 1948 !! Position array provided by C, dimensioned by getNlocal
24     real ( kind = dp ), dimension(3, nLocal) :: q
25     !! molecular center-of-mass position array
26     real ( kind = dp ), dimension(3, nGroups) :: q_group
27     !! Rotation Matrix for each long range particle in simulation.
28     real( kind = dp), dimension(9, nLocal) :: A
29     !! Unit vectors for dipoles (lab frame)
30     real( kind = dp ), dimension(9,nLocal) :: eFrame
31     !! Force array provided by C, dimensioned by getNlocal
32     real ( kind = dp ), dimension(3,nLocal) :: f
33     !! Torsion array provided by C, dimensioned by getNlocal
34     real( kind = dp ), dimension(3,nLocal) :: t
35 gezelter 2204
36 gezelter 1948 !! Stress Tensor
37     real( kind = dp), dimension(9) :: tau
38 gezelter 2361 real ( kind = dp ),dimension(LR_POT_TYPES) :: pot
39 chuckv 3397 real( kind = dp ), dimension(nLocal) :: particle_pot
40 gezelter 1948 logical ( kind = 2) :: do_pot_c, do_stress_c
41     integer :: error
42 gezelter 2204
43 chuckv 3397 call do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, particle_pot, &
44 gezelter 1948 do_pot_c, do_stress_c, error)
45 gezelter 2204
46 gezelter 1948 end subroutine doForceloop
47 gezelter 2285
48 chrisfen 2917 subroutine getAccumulatedBoxDipole( box_dipole )
49    
50     use definitions, ONLY: dp
51     use doForces, ONLY: getBoxDipole
52    
53     !! simulation box dipole moment
54     real ( kind = dp ), dimension(3) :: box_dipole
55    
56     call getBoxDipole( box_dipole )
57    
58     end subroutine getAccumulatedBoxDipole
59    
60     subroutine setAccumulateBoxDipole()
61    
62     use doForces, ONLY: setBoxDipole
63    
64     call setBoxDipole()
65    
66     end subroutine setAccumulateBoxDipole
67    
68 gezelter 2508 subroutine setFortranElectrostaticMethod(electrostaticMethod)
69 gezelter 2461 use doForces, ONLY : setElectrostaticMethod
70    
71     integer, intent(in) :: electrostaticMethod
72    
73     call setElectrostaticMethod(electrostaticMethod)
74    
75 gezelter 2508 end subroutine setFortranElectrostaticMethod
76 gezelter 2461
77     subroutine notifyFortranCutoffPolicy(cutPolicy)
78     use doForces, ONLY : setCutoffPolicy
79    
80     integer, intent(in) :: cutPolicy
81    
82     call setCutoffPolicy( cutPolicy )
83    
84     end subroutine notifyFortranCutoffPolicy
85    
86     subroutine notifyFortranSkinThickness(this_skin)
87     use doForces, ONLY : setSkinThickness
88     use definitions, ONLY : dp
89    
90     real(kind=dp), intent(in) :: this_skin
91    
92     call setSkinThickness( this_skin )
93    
94     end subroutine notifyFortranSkinThickness
95    
96 chrisfen 3129 subroutine notifyFortranCutoffs(this_rcut, this_rsw, this_sp, this_sf)
97 gezelter 2461 use doForces, ONLY : setCutoffs
98     use definitions, ONLY : dp
99    
100     real(kind=dp), intent(in) :: this_rcut, this_rsw
101 chrisfen 3129 logical, intent(in) :: this_sp, this_sf
102 gezelter 2461
103 chrisfen 3129 call setCutoffs(this_rcut, this_rsw, this_sp, this_sf)
104 gezelter 2461
105     end subroutine notifyFortranCutoffs
106    
107     subroutine notifyFortranYouAreOnYourOwn()
108     use doForces, ONLY : cWasLame
109    
110     call cWasLame()
111     end subroutine notifyFortranYouAreOnYourOwn