ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/doForces_interface.F90
Revision: 1948
Committed: Fri Jan 14 20:31:16 2005 UTC (19 years, 6 months ago) by gezelter
File size: 1365 byte(s)
Log Message:
separating modules and C/Fortran interface subroutines

File Contents

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