ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/doForces_interface.F90
Revision: 2285
Committed: Wed Sep 7 20:46:46 2005 UTC (18 years, 10 months ago) by gezelter
File size: 1579 byte(s)
Log Message:
adding c-side interface to change cutoff Policy

File Contents

# Content
1 !! Interfaces for C programs to module....
2
3 subroutine initFortranFF(use_RF_c, use_UW_c, use_DW_c, thisStat)
4 use doForces, ONLY: init_FF
5 integer, intent(in) :: use_RF_c
6 integer, intent(in) :: use_UW_c
7 integer, intent(in) :: use_DW_c
8 integer, intent(out) :: thisStat
9 logical :: use_RF, use_UW, use_DW
10
11 use_RF = (use_RF_c .ne. 0)
12 use_UW = (use_UW_c .ne. 0)
13 use_DW = (use_DW_c .ne. 0)
14
15 call init_FF(use_RF, use_UW, use_DW, thisStat)
16
17 end subroutine initFortranFF
18
19 subroutine doForceloop(q, q_group, A, eFrame, f, t, tau, pot, &
20 do_pot_c, do_stress_c, error)
21
22 use definitions, ONLY: dp
23 use simulation
24 use doForces, ONLY: do_force_loop
25 !! Position array provided by C, dimensioned by getNlocal
26 real ( kind = dp ), dimension(3, nLocal) :: q
27 !! molecular center-of-mass position array
28 real ( kind = dp ), dimension(3, nGroups) :: q_group
29 !! Rotation Matrix for each long range particle in simulation.
30 real( kind = dp), dimension(9, nLocal) :: A
31 !! Unit vectors for dipoles (lab frame)
32 real( kind = dp ), dimension(9,nLocal) :: eFrame
33 !! Force array provided by C, dimensioned by getNlocal
34 real ( kind = dp ), dimension(3,nLocal) :: f
35 !! Torsion array provided by C, dimensioned by getNlocal
36 real( kind = dp ), dimension(3,nLocal) :: t
37
38 !! Stress Tensor
39 real( kind = dp), dimension(9) :: tau
40 real ( kind = dp ) :: pot
41 logical ( kind = 2) :: do_pot_c, do_stress_c
42 integer :: error
43
44 call do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, &
45 do_pot_c, do_stress_c, error)
46
47 end subroutine doForceloop
48