ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/UseTheForce/doForces_interface.F90
Revision: 2309
Committed: Sun Sep 18 20:45:38 2005 UTC (18 years, 9 months ago) by chrisfen
File size: 1460 byte(s)
Log Message:
reaction field seems to work now, still need to do some testing...

File Contents

# Content
1 !! Interfaces for C programs to module....
2
3 subroutine initFortranFF(correctionMethod, thisStat)
4 use doForces, ONLY: init_FF
5 use definitions, ONLY : dp
6
7 integer, intent(in) :: correctionMethod
8 integer, intent(out) :: thisStat
9 integer :: correction
10
11 correction = correctionMethod
12
13 call init_FF(correction, thisStat)
14
15 end subroutine initFortranFF
16
17 subroutine doForceloop(q, q_group, A, eFrame, f, t, tau, pot, &
18 do_pot_c, do_stress_c, error)
19
20 use definitions, ONLY: dp
21 use simulation
22 use doForces, ONLY: do_force_loop
23 !! 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
36 !! Stress Tensor
37 real( kind = dp), dimension(9) :: tau
38 real ( kind = dp ) :: pot
39 logical ( kind = 2) :: do_pot_c, do_stress_c
40 integer :: error
41
42 call do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, &
43 do_pot_c, do_stress_c, error)
44
45 end subroutine doForceloop
46