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