ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/doForces_interface.F90
Revision: 2358
Committed: Wed Oct 12 20:22:34 2005 UTC (18 years, 8 months ago) by chuckv
File size: 1558 byte(s)
Log Message:
Breaky, Breaky: c-fortran interface now expects an array for pot.

File Contents

# User Rev Content
1 gezelter 1948 !! Interfaces for C programs to module....
2    
3 chrisfen 2309 subroutine initFortranFF(correctionMethod, thisStat)
4 gezelter 1948 use doForces, ONLY: init_FF
5 chrisfen 2295 use definitions, ONLY : dp
6    
7     integer, intent(in) :: correctionMethod
8 gezelter 2280 integer, intent(out) :: thisStat
9 chrisfen 2295 integer :: correction
10 gezelter 2280
11 chrisfen 2295 correction = correctionMethod
12    
13 chrisfen 2309 call init_FF(correction, thisStat)
14 gezelter 2204
15 gezelter 1948 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 gezelter 2204
20 gezelter 1948 use definitions, ONLY: dp
21     use simulation
22     use doForces, ONLY: do_force_loop
23 chuckv 2358
24     #define __FORTRAN90
25     #include "UseTheForce/DarkSide/fInteractionMap.h"
26    
27 gezelter 1948 !! Position array provided by C, dimensioned by getNlocal
28     real ( kind = dp ), dimension(3, nLocal) :: q
29     !! molecular center-of-mass position array
30     real ( kind = dp ), dimension(3, nGroups) :: q_group
31     !! Rotation Matrix for each long range particle in simulation.
32     real( kind = dp), dimension(9, nLocal) :: A
33     !! Unit vectors for dipoles (lab frame)
34     real( kind = dp ), dimension(9,nLocal) :: eFrame
35     !! Force array provided by C, dimensioned by getNlocal
36     real ( kind = dp ), dimension(3,nLocal) :: f
37     !! Torsion array provided by C, dimensioned by getNlocal
38     real( kind = dp ), dimension(3,nLocal) :: t
39 gezelter 2204
40 gezelter 1948 !! Stress Tensor
41     real( kind = dp), dimension(9) :: tau
42 chuckv 2358 real ( kind = dp ),dimension(POT_ARRAY_SIZE) :: pot
43 gezelter 1948 logical ( kind = 2) :: do_pot_c, do_stress_c
44     integer :: error
45 gezelter 2204
46 gezelter 1948 call do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, &
47     do_pot_c, do_stress_c, error)
48 gezelter 2204
49 gezelter 1948 end subroutine doForceloop
50 gezelter 2285