ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/heatflux/src/UseTheForce/doForces_interface.F90
Revision: 1671
Committed: Mon Jan 30 21:31:09 2012 UTC (13 years, 10 months ago) by chuckv
File size: 3155 byte(s)
Log Message:
Adding support for atomic heat flux. Is broken w/ group based cuttoffs.
Units need to be corrected and their may be a sign error in Jv.

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 1671 subroutine doForceloop(q,vel,q_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     !! Rotation Matrix for each long range particle in simulation.
30 chuckv 1671 real( kind = dp), dimension(9, nLocal) :: A
31 gezelter 264 !! 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 chuckv 1671 real( kind = dp ), dimension(3,nLocal) :: t
37 gezelter 507
38 gezelter 264 !! Stress Tensor
39 chuckv 1671 real( kind = dp), dimension(9) :: tau
40     !! Heat flux component S
41     real( kind = dp), dimension(3) :: S
42    
43 gezelter 662 real ( kind = dp ),dimension(LR_POT_TYPES) :: pot
44 chuckv 1245 real( kind = dp ), dimension(nLocal) :: particle_pot
45 gezelter 264 integer :: error
46 gezelter 507
47 chuckv 1671 call do_force_loop(q, vel, q_group, A, eFrame, f, t, tau, S, pot, particle_pot, &
48 gezelter 1464 error)
49 chuckv 1671
50 gezelter 264 end subroutine doForceloop
51 gezelter 586
52 chrisfen 998 subroutine getAccumulatedBoxDipole( box_dipole )
53 chuckv 1671
54 chrisfen 998 use definitions, ONLY: dp
55     use doForces, ONLY: getBoxDipole
56    
57 chuckv 1671 !! simulation box dipole moment
58 chrisfen 998 real ( kind = dp ), dimension(3) :: box_dipole
59 chuckv 1671
60 chrisfen 998 call getBoxDipole( box_dipole )
61 chuckv 1671
62 chrisfen 998 end subroutine getAccumulatedBoxDipole
63    
64     subroutine setAccumulateBoxDipole()
65    
66     use doForces, ONLY: setBoxDipole
67    
68     call setBoxDipole()
69 chuckv 1671
70 chrisfen 998 end subroutine setAccumulateBoxDipole
71    
72 gezelter 809 subroutine setFortranElectrostaticMethod(electrostaticMethod)
73 gezelter 762 use doForces, ONLY : setElectrostaticMethod
74    
75     integer, intent(in) :: electrostaticMethod
76    
77     call setElectrostaticMethod(electrostaticMethod)
78    
79 gezelter 809 end subroutine setFortranElectrostaticMethod
80 gezelter 762
81     subroutine notifyFortranCutoffPolicy(cutPolicy)
82     use doForces, ONLY : setCutoffPolicy
83    
84     integer, intent(in) :: cutPolicy
85    
86     call setCutoffPolicy( cutPolicy )
87    
88     end subroutine notifyFortranCutoffPolicy
89    
90     subroutine notifyFortranSkinThickness(this_skin)
91     use doForces, ONLY : setSkinThickness
92     use definitions, ONLY : dp
93    
94     real(kind=dp), intent(in) :: this_skin
95    
96     call setSkinThickness( this_skin )
97    
98     end subroutine notifyFortranSkinThickness
99    
100 chrisfen 1129 subroutine notifyFortranCutoffs(this_rcut, this_rsw, this_sp, this_sf)
101 gezelter 762 use doForces, ONLY : setCutoffs
102     use definitions, ONLY : dp
103    
104     real(kind=dp), intent(in) :: this_rcut, this_rsw
105 gezelter 1386 integer, intent(in) :: this_sp, this_sf
106 gezelter 762
107 chrisfen 1129 call setCutoffs(this_rcut, this_rsw, this_sp, this_sf)
108 gezelter 762
109     end subroutine notifyFortranCutoffs
110    
111     subroutine notifyFortranYouAreOnYourOwn()
112     use doForces, ONLY : cWasLame
113    
114     call cWasLame()
115     end subroutine notifyFortranYouAreOnYourOwn

Properties

Name Value
svn:keywords Author Id Revision Date