ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/DarkSide/fForceOptions.F90
(Generate patch)

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/fForceOptions.F90 (file contents):
Revision 2496 by chuckv, Wed Dec 7 19:46:56 2005 UTC vs.
Revision 2788 by gezelter, Mon Jun 5 18:44:05 2006 UTC

# Line 47 | Line 47
47   !!  PURPOSE:
48   !!
49   !! @author Charles F. Vardeman II
50 < !! @version $Id: fForceOptions.F90,v 1.2 2005-12-07 19:46:56 chuckv Exp $
50 > !! @version $Id: fForceOptions.F90,v 1.3 2006-06-05 18:44:05 gezelter Exp $
51  
52   !! Handles Mixing options for Fortran.
53  
54
55
54   module  fForceOptions
55 <   use definitions
56 <   implicit none
57 <   PRIVATE
58 <
55 >  use definitions
56 >  implicit none
57 >  PRIVATE
58 >  
59   #define __FORTRAN90
60   #include "UseTheForce/fForceOptions.h"
61 <
62 < type(ForceOptions), save :: fortranForceOptions
63 < logical, save :: haveForceOptions = .false.
64 <
65 <
66 < public :: ForceOptions
67 < public :: getVDW14Scale
68 < public :: getElectrostatic14Scale
69 < public :: getEnergyMixingRule
70 < public :: getDistanceMixingRule
71 < public :: usesGeometricDistanceMixing
72 < public :: usesGeometricEnergyMixing
73 < public :: setForceOptions
74 <
75 <
61 >  
62 >  type(ForceOptions), save :: fortranForceOptions
63 >  logical, save :: haveForceOptions = .false.
64 >  
65 >  
66 >  public :: ForceOptions
67 >  public :: getVDW14Scale
68 >  public :: getElectrostatic14Scale
69 >  public :: getGayBerneMu
70 >  public :: getGayBerneNu
71 >  public :: getEnergyMixingRule
72 >  public :: getDistanceMixingRule
73 >  public :: usesGeometricDistanceMixing
74 >  public :: usesGeometricEnergyMixing
75 >  public :: setForceOptions
76 >  
77   contains
78  
79 < subroutine setForceOptions(theseOptions)
80 < type(ForceOptions),intent(in) :: theseOptions
81 < fortranForceOptions = theseOptions
82 < haveForceOptions = .true.
83 < end subroutine setForceOptions
84 <
85 <
86 < function getVDW14Scale() result(thisScale)
87 < real(kind=dp) :: thisScale
88 < thisScale = fortranForceOptions%vdw14scale
90 < end function getVDW14Scale
91 <
92 < function getElectrostatic14Scale() result(thisScale)
93 < real(kind=dp) :: thisScale
94 < thisScale = fortranForceOptions%electrostatic14scale
95 < end function getElectrostatic14Scale
96 <
97 <
98 < function usesGeometricDistanceMixing() result(doesit)
99 <  logical :: doesit
100 <  doesit = .false.
101 <  if (.not.haveForceOptions) return
102 <  if (fortranForceOptions%DistanceMixingRule == GEOMETRIC_MIXING_RULE) then
103 <     doesit = .true.
104 <  endif
79 >  subroutine setForceOptions(theseOptions)
80 >    type(ForceOptions),intent(in) :: theseOptions
81 >    fortranForceOptions = theseOptions
82 >    haveForceOptions = .true.
83 >  end subroutine setForceOptions
84 >    
85 >  function getVDW14Scale() result(thisScale)
86 >    real(kind=dp) :: thisScale
87 >    thisScale = fortranForceOptions%vdw14scale
88 >  end function getVDW14Scale
89    
90 < end function usesGeometricDistanceMixing
90 >  function getElectrostatic14Scale() result(thisScale)
91 >    real(kind=dp) :: thisScale
92 >    thisScale = fortranForceOptions%electrostatic14scale
93 >  end function getElectrostatic14Scale
94 >  
95 >  function getGayBerneMu() result(thisMu)
96 >    real(kind=dp) :: thisMu
97 >    thisMu = fortranForceOptions%GayBerneMu
98 >  end function getGayBerneMu
99  
100 <
101 < function usesGeometricEnergyMixing() result(doesit)
102 <  logical :: doesit
103 <  doesit = .false.
104 <  if (.not.haveForceOptions) return
105 <  if (fortranForceOptions%EnergyMixingRule == GEOMETRIC_MIXING_RULE) then
106 <     doesit = .true.
107 <  endif
108 < end function usesGeometricEnergyMixing
109 <
110 <
111 < function getEnergyMixingRule() result(MixingRule)
112 <  integer :: MixingRule
113 <  MixingRule = 0
114 <  if (.not.haveForceOptions) return
115 <  MixingRule = fortranForceOptions%EnergyMixingRule
116 < end function getEnergyMixingRule
117 <
118 < function getDistanceMixingRule() result(MixingRule)
119 <  integer :: MixingRule
120 <  MixingRule = 0
121 <  if (.not.haveForceOptions) return
122 <  MixingRule = fortranForceOptions%DistanceMixingRule
123 < end function getDistanceMixingRule
124 <
125 <
126 <
100 >  function getGayBerneNu() result(thisNu)
101 >    real(kind=dp) :: thisNu
102 >    thisNu = fortranForceOptions%GayBerneNu
103 >  end function getGayBerneNu
104 >  
105 >  function usesGeometricDistanceMixing() result(doesit)
106 >    logical :: doesit
107 >    doesit = .false.
108 >    if (.not.haveForceOptions) return
109 >    if (fortranForceOptions%DistanceMixingRule == GEOMETRIC_MIXING_RULE) then
110 >       doesit = .true.
111 >    endif
112 >  end function usesGeometricDistanceMixing
113 >    
114 >  function usesGeometricEnergyMixing() result(doesit)
115 >    logical :: doesit
116 >    doesit = .false.
117 >    if (.not.haveForceOptions) return
118 >    if (fortranForceOptions%EnergyMixingRule == GEOMETRIC_MIXING_RULE) then
119 >       doesit = .true.
120 >    endif
121 >  end function usesGeometricEnergyMixing
122 >    
123 >  function getEnergyMixingRule() result(MixingRule)
124 >    integer :: MixingRule
125 >    MixingRule = 0
126 >    if (.not.haveForceOptions) return
127 >    MixingRule = fortranForceOptions%EnergyMixingRule
128 >  end function getEnergyMixingRule
129 >  
130 >  function getDistanceMixingRule() result(MixingRule)
131 >    integer :: MixingRule
132 >    MixingRule = 0
133 >    if (.not.haveForceOptions) return
134 >    MixingRule = fortranForceOptions%DistanceMixingRule
135 >  end function getDistanceMixingRule
136 >  
137   end module fForceOptions

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines