ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/heatflux/src/UseTheForce/doForces_interface.F90
Revision: 1682
Committed: Tue Feb 28 23:11:22 2012 UTC (13 years, 9 months ago) by chuckv
File size: 3272 byte(s)
Log Message:
Debugging heat flux calculation for rigid bodies.

File Contents

# User Rev Content
1 gezelter 264 !! Interfaces for C programs to module....
2    
3 gezelter 762 subroutine initFortranFF(thisStat)
4 gezelter 264 use doForces, ONLY: init_FF
5 chrisfen 596 use definitions, ONLY : dp
6    
7 gezelter 581 integer, intent(out) :: thisStat
8 chuckv 1671
9 gezelter 762 call init_FF(thisStat)
10 gezelter 507
11 gezelter 264 end subroutine initFortranFF
12    
13 chuckv 1682 subroutine doForceloop(q,vel,q_group,v_group, A, eFrame, f, t, tau, S, pot, particle_pot, &
14 gezelter 1464 error)
15 chuckv 1671
16 gezelter 264 use definitions, ONLY: dp
17     use simulation
18     use doForces, ONLY: do_force_loop
19 chuckv 1671
20 chuckv 659 #define __FORTRAN90
21     #include "UseTheForce/DarkSide/fInteractionMap.h"
22    
23 gezelter 264 !! Position array provided by C, dimensioned by getNlocal
24     real ( kind = dp ), dimension(3, nLocal) :: q
25 chuckv 1671 !! Velocity array needed for calculation of heat flux
26     real ( kind = dp ), dimension(3, nlocal) :: vel
27 gezelter 264 !! molecular center-of-mass position array
28     real ( kind = dp ), dimension(3, nGroups) :: q_group
29 chuckv 1682 !! molecular center-of-mass velocity array
30     real ( kind = dp ), dimension(3, nGroups) :: v_group
31 gezelter 264 !! Rotation Matrix for each long range particle in simulation.
32 chuckv 1671 real( kind = dp), dimension(9, nLocal) :: A
33 gezelter 264 !! 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 chuckv 1671 real( kind = dp ), dimension(3,nLocal) :: t
39 gezelter 507
40 gezelter 264 !! Stress Tensor
41 chuckv 1671 real( kind = dp), dimension(9) :: tau
42     !! Heat flux component S
43     real( kind = dp), dimension(3) :: S
44    
45 gezelter 662 real ( kind = dp ),dimension(LR_POT_TYPES) :: pot
46 chuckv 1245 real( kind = dp ), dimension(nLocal) :: particle_pot
47 gezelter 264 integer :: error
48 gezelter 507
49 chuckv 1682 call do_force_loop(q, vel, q_group, v_group, A, eFrame, f, t, tau, S, pot, particle_pot, &
50 gezelter 1464 error)
51 chuckv 1671
52 gezelter 264 end subroutine doForceloop
53 gezelter 586
54 chrisfen 998 subroutine getAccumulatedBoxDipole( box_dipole )
55 chuckv 1671
56 chrisfen 998 use definitions, ONLY: dp
57     use doForces, ONLY: getBoxDipole
58    
59 chuckv 1671 !! simulation box dipole moment
60 chrisfen 998 real ( kind = dp ), dimension(3) :: box_dipole
61 chuckv 1671
62 chrisfen 998 call getBoxDipole( box_dipole )
63 chuckv 1671
64 chrisfen 998 end subroutine getAccumulatedBoxDipole
65    
66     subroutine setAccumulateBoxDipole()
67    
68     use doForces, ONLY: setBoxDipole
69    
70     call setBoxDipole()
71 chuckv 1671
72 chrisfen 998 end subroutine setAccumulateBoxDipole
73    
74 gezelter 809 subroutine setFortranElectrostaticMethod(electrostaticMethod)
75 gezelter 762 use doForces, ONLY : setElectrostaticMethod
76    
77     integer, intent(in) :: electrostaticMethod
78    
79     call setElectrostaticMethod(electrostaticMethod)
80    
81 gezelter 809 end subroutine setFortranElectrostaticMethod
82 gezelter 762
83     subroutine notifyFortranCutoffPolicy(cutPolicy)
84     use doForces, ONLY : setCutoffPolicy
85    
86     integer, intent(in) :: cutPolicy
87    
88     call setCutoffPolicy( cutPolicy )
89    
90     end subroutine notifyFortranCutoffPolicy
91    
92     subroutine notifyFortranSkinThickness(this_skin)
93     use doForces, ONLY : setSkinThickness
94     use definitions, ONLY : dp
95    
96     real(kind=dp), intent(in) :: this_skin
97    
98     call setSkinThickness( this_skin )
99    
100     end subroutine notifyFortranSkinThickness
101    
102 chrisfen 1129 subroutine notifyFortranCutoffs(this_rcut, this_rsw, this_sp, this_sf)
103 gezelter 762 use doForces, ONLY : setCutoffs
104     use definitions, ONLY : dp
105    
106     real(kind=dp), intent(in) :: this_rcut, this_rsw
107 gezelter 1386 integer, intent(in) :: this_sp, this_sf
108 gezelter 762
109 chrisfen 1129 call setCutoffs(this_rcut, this_rsw, this_sp, this_sf)
110 gezelter 762
111     end subroutine notifyFortranCutoffs
112    
113     subroutine notifyFortranYouAreOnYourOwn()
114     use doForces, ONLY : cWasLame
115    
116     call cWasLame()
117     end subroutine notifyFortranYouAreOnYourOwn

Properties

Name Value
svn:keywords Author Id Revision Date