Changeset 972
 Timestamp:
 Jun 28, 2013 2:27:59 PM (9 years ago)
 Location:
 trunk/fsource
 Files:

 2 added
 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/fsource/pypowder.for
r971 r972 187 187 END 188 188 189 190 189 SUBROUTINE PYMDCALC(MDVAL,MDAXIS,NUNIQ,UNIQ,G,MDCORR) 191 190 Cf2py intent(in) MDVAL … … 198 197 INTEGER*4 NUNIQ 199 198 REAL*4 MDVAL,MDAXIS(0:2),UNIQ(0:3*NUNIQ1),G(3,3),MDCORR 200 REAL*4 SUMMD 201 202 SUMMD = FLOAT(NUNIQ) 203 c IF ( MDVAL .NE. 1.0) THEN 204 c DO I=0,NUNIQ1 205 206 207 208 c sumMD = len(Uniq) 209 c if MDval != 1.0: 210 c for H in Uniq: 211 c cosP,sinP = G2lat.CosSinAngle(H,MDaxis,G) 212 c A = 1.0/np.sqrt((MDval*cosP)**2+sinP**2/MDval) 213 c sumMD += A**3 214 c sumMD = np.sum(1./np.sqrt((MDval*cosP)**2+sinP**2/MDval)**3) 215 c return sumMD/len(Uniq) 199 200 CALL MDCALC(MDVAL,MDAXIS,G,NUNIQ,UNIQ,MDCORR) 216 201 RETURN 217 202 END … … 249 234 END 250 235 236 SUBROUTINE PYMCSAMDSFCALC(INV,NTD,TDATA,MDATA,XDATA, 237 1 MDVAL,MDAXIS,G,MUL,NFFS,FFS,NUNIQ,UNIQ,PHI,ICALC) 238 Cf2py intent(in) INV 239 Cf2py intent(in) NTD 240 Cf2py intent(in) TDATA 241 cf2py depend(NTD) TDATA 242 Cf2py intent(in) MDATA 243 cf2py depend(NTD) MDATA 244 Cf2py intent(in) XDATA 245 cf2py depend(NTD) XDATA 246 Cf2py intent(in) MDVAL 247 Cf2py intent(in) MDAXIS 248 Cf2py intent(in) G 249 Cf2py intent(in) MUL 250 Cf2py intent(in) NFFS 251 Cf2py intent(in) FFS 252 cf2py depend(NFFS) FFS 253 Cf2py intent(in) NUNIQ 254 Cf2py intent(in) UNIQ 255 cf2py depend(NUNIQ) UNIQ 256 Cf2py intent(in) PHI 257 cf2py depend(NUNIQ) PHI 258 Cf2py intent(out) ICALC 259 260 LOGICAL*4 INV 261 INTEGER*4 NTD,MUL,NFFS,NUNIQ,TDATA(0:NTD1) 262 REAL*4 XDATA(0:3*NTD1),UNIQ(0:3*NUNIQ1) 263 REAL*4 MDATA(0:NTD1),FFS(0:NFFS1) 264 REAL*4 ICALC,PHI(0:NUNIQ1),MDVAL,MDAXIS(0:2),G(3,3) 265 REAL*4 MDCORR 266 267 CALL MCSASFCALC(INV,NTD,TDATA,MDATA,XDATA,MUL,NFFS,FFS, 268 1 NUNIQ,UNIQ,PHI,ICALC) 269 CALL MDCALC(MDVAL,MDAXIS,G,NUNIQ,UNIQ,MDCORR) 270 ICALC = ICALC*MDCORR 271 RETURN 272 END 273 251 274 C Fortran (fast) linear interpolation  B.H. Toby 9/2011 252 275 SUBROUTINE PYFINTERP(NIN,XIN,YIN,NOUT,XOUT,YOUT)
Note: See TracChangeset
for help on using the changeset viewer.