86 |
|
'set_switch: one of the switches is negative!' |
87 |
|
return |
88 |
|
endif |
89 |
< |
|
89 |
> |
|
90 |
|
rin(SwitchType) = rinner |
91 |
|
rout(SwitchType) = router |
92 |
|
rin2(SwitchType) = rinner * rinner |
115 |
|
|
116 |
|
if (r2.lt.rout2(SwitchType)) then |
117 |
|
if (r2.lt.rin2(SwitchType)) then |
118 |
< |
|
118 |
> |
|
119 |
|
sw = 1.0d0 |
120 |
|
dswdr = 0.0d0 |
121 |
|
return |
122 |
< |
|
122 |
> |
|
123 |
|
else |
124 |
< |
|
124 |
> |
|
125 |
|
r = dsqrt(r2) |
126 |
< |
|
126 |
> |
|
127 |
|
ron = rin(SwitchType) |
128 |
|
roff = rout(SwitchType) |
129 |
< |
|
129 |
> |
|
130 |
|
sw = (roff + 2.0d0*r - 3.0d0*ron)*(roff-r)**2/ ((roff-ron)**3) |
131 |
|
dswdr = 6.0d0*(r*r - r*ron - r*roff +roff*ron)/((roff-ron)**3) |
132 |
< |
|
132 |
> |
|
133 |
|
in_switching_region = .true. |
134 |
|
return |
135 |
|
endif |
136 |
|
else |
137 |
|
return |
138 |
< |
endif |
139 |
< |
|
138 |
> |
endif |
139 |
> |
|
140 |
|
end subroutine get_switch |
141 |
|
end module switcheroo |