From 1d006de413221984b7564fb7e8e3cfbb4cf00db7 Mon Sep 17 00:00:00 2001 From: "Per.Andreas.Brodtkorb" Date: Sun, 1 Feb 2015 09:33:51 +0000 Subject: [PATCH] Renamed c_codes -> c_library --- pywafo/src/wafo/source/c_codes/build_all.py | 98 -- .../src/wafo/source/c_codes/old/build_all_.py | 16 - .../wafo/source/c_codes/old/diffsumfunq.pyd | Bin 50658 -> 0 bytes .../wafo/source/c_codes/old/diffsumfunq.pyf | 30 - pywafo/src/wafo/source/c_codes/old/disufq.pyf | 30 - pywafo/src/wafo/source/c_codes/old/disufq1.c | 446 ------ .../src/wafo/source/c_codes/old/findcross.c | 53 - pywafo/src/wafo/source/c_codes/old/findrfc.c | 118 -- pywafo/src/wafo/source/c_codes/old/rfc.pyd | Bin 16384 -> 0 bytes pywafo/src/wafo/source/c_codes/old/rfc.pyf | 14 - pywafo/src/wafo/source/c_library/build_all.py | 25 + .../{c_codes => c_library}/c_functions.c | 0 .../c_library rf3 rf5 license.txt | 0 .../{c_codes => c_library}/c_library.pyd | Bin 96229 -> 96229 bytes .../{c_codes => c_library}/c_library.pyf | 0 .../wafo/source/c_library/c_librarymodule.c | 1359 +++++++++++++++++ .../source/{c_codes => c_library}/setup.py | 34 +- pywafo/src/wafo/source/mreg/build_all.py | 101 +- pywafo/src/wafo/source/mvn/build_all.py | 88 +- pywafo/src/wafo/source/mvn/mvn.pyd | Bin 137405 -> 137405 bytes pywafo/src/wafo/source/mvnprd/build_all.py | 104 +- pywafo/src/wafo/source/mvnprd/mvnprd.f | 4 +- pywafo/src/wafo/source/mvnprd/mvnprdmod.pyd | Bin 167918 -> 167918 bytes pywafo/src/wafo/source/mvnprd/setup.py | 30 +- pywafo/src/wafo/source/rind2007/build_all.py | 100 +- pywafo/src/wafo/source/rind2007/rindmod.pyd | Bin 413434 -> 413434 bytes 26 files changed, 1473 insertions(+), 1177 deletions(-) delete mode 100644 pywafo/src/wafo/source/c_codes/build_all.py delete mode 100644 pywafo/src/wafo/source/c_codes/old/build_all_.py delete mode 100644 pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd delete mode 100644 pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyf delete mode 100644 pywafo/src/wafo/source/c_codes/old/disufq.pyf delete mode 100644 pywafo/src/wafo/source/c_codes/old/disufq1.c delete mode 100644 pywafo/src/wafo/source/c_codes/old/findcross.c delete mode 100644 pywafo/src/wafo/source/c_codes/old/findrfc.c delete mode 100644 pywafo/src/wafo/source/c_codes/old/rfc.pyd delete mode 100644 pywafo/src/wafo/source/c_codes/old/rfc.pyf create mode 100644 pywafo/src/wafo/source/c_library/build_all.py rename pywafo/src/wafo/source/{c_codes => c_library}/c_functions.c (100%) rename pywafo/src/wafo/source/{c_codes => c_library}/c_library rf3 rf5 license.txt (100%) rename pywafo/src/wafo/source/{c_codes => c_library}/c_library.pyd (99%) rename pywafo/src/wafo/source/{c_codes => c_library}/c_library.pyf (100%) create mode 100644 pywafo/src/wafo/source/c_library/c_librarymodule.c rename pywafo/src/wafo/source/{c_codes => c_library}/setup.py (57%) diff --git a/pywafo/src/wafo/source/c_codes/build_all.py b/pywafo/src/wafo/source/c_codes/build_all.py deleted file mode 100644 index 43b93a2..0000000 --- a/pywafo/src/wafo/source/c_codes/build_all.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -f2py c_library.pyf c_functions.c -c - -See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW -""" -import os -import sys - -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - - fpath, unused_fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name - -def compile_all(): - f2py_call = f2py_call_str() - print '='*75 - print 'compiling c_codes' - print '='*75 - - compile_format = f2py_call + ' %s %s -c' - - pyfs = ('c_library.pyf',) - files =('c_functions.c',) - - for pyf,file in zip(pyfs,files): - os.system(compile_format % (pyf,file)) - -if __name__=='__main__': - compile_all() diff --git a/pywafo/src/wafo/source/c_codes/old/build_all_.py b/pywafo/src/wafo/source/c_codes/old/build_all_.py deleted file mode 100644 index 95251bc..0000000 --- a/pywafo/src/wafo/source/c_codes/old/build_all_.py +++ /dev/null @@ -1,16 +0,0 @@ -import os - -def compile_all(): - # Install gfortran and run the following to build the module: - #compile_format = 'f2py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' - - # Install microsoft visual c++ .NET 2003 and run the following to build the module: - compile_format = 'f2py %s %s -c' - pyfs = ('rfc.pyf','diffsumfunq.pyf') - files =('findrfc.c','disufq1.c') - - for pyf,file in zip(pyfs,files): - os.system(compile_format % (pyf,file)) - -if __name__=='__main__': - compile_all() diff --git a/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd b/pywafo/src/wafo/source/c_codes/old/diffsumfunq.pyd deleted file mode 100644 index 92ed473282efc7b380eab7d9745684dd7c298165..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50658 zcmeHw4|r77nfDD0I%069nyk@Hb=07t4LCFT4?z-=;hzK}5KCLqNk}FnCI3ujB)Fi_ zWLj=7qiGkmbQfHrbU$p_N?m9pB8I?22%tvF)~K>iUvuOKC|>O|9Fq%4Mnd)L1HOEO`$tvsBlXxn@k6 zGC4s;UEmOe#ZlJ_&wLiMPf>OSRzX-wi5)nNbTh`WM-VzlL4V?7hTGNX2F{iR z_(u$ptRW$AkE0lWGs;TbCAhZ|j{pdhaW28BIH4hu4SfR;M>OJM2BYoM7JMp6Lz3_7)3)u;2(3*>kl^%Q@&|)r>(>Lo@sN3x6?DL+<-PJ>(0-1%tt%mwmsW+`x^L z*cXV;7KAP#8W3B@&@SI&f-G-gI}`t-=HWQvv7K<^20Sxn-Ajsqm*>r0&jSqyNq^^jE-GApQBXQEEK;JIM408~J+kbn z;ghhbw#`sMmtz>Wg1>N==;#m~M?}Xl(Q#6A^oWkrqN7)I^ox!G(Q(%2IE!{l@gb3y zVD$l~m~pXn*=us%*`?+Cr&=IY7sFk{mmvrAFeCxDyMT#Lhz>-zgJ}>UsN8 zw&-Y;SQCTUR))2ZVJ(xfUQbxPl!{=sf42t3P9@Z5W7q*&p=mF zficV@)1hMrV{l6yu#UpxMv2)Uc-+X){roEo-BDA^LgFu^L+~hit5lq|NX%l*?W1tk z!cdiSREJG1r@@)uu?NgSZE&m65@!b;4}$tvCRqHAU8rM~90!nXl%P&@L&>oXd2t9G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4VxVJQEzY;sx%st5pr{DmG@!<9?gz}G9u;#8({!gFf(77Q^(F-h$snReNzRo<3UMyA;hGE|#y^cUJCk;>}#dJL78?N8m8qb+ z6s2S?)bi?@RJ8%BbF@IO?0YJUCa?Yx^H4Nr18vO)D{{vetp#*@JId(Tf^38jR>wu& zKipy44h@p!uBUV?oq2_0X~>hH9cfM}la^NrLrundha6-={Zkf+64J?eX@N-qMMA5lsAR_Blvteg=;JU_DU*oExK|Zm> zVq~~U)ok%R9lPO?r)E^b?N&2xmH8NZlU+2mmdVgKP}{RK(MB`GRJp&=0) - * kw = vector with wavenumbers (kw>=0) - * h = water depth (h >=0) - * g = constant acceleration of gravity - * nmin = minimum index where rA(:,nmin) and iA(:,nmin) is - * greater than zero. - * nmax = maximum index where rA(:,nmax) and iA(:,nmax) is - * greater than zero. - * m = size(rA,1),size(iA,1) - * n = size(rA,2),size(iA,2), or size(rvec,2),size(ivec,2) - * - * DISUFQ returns the summation of difference frequency and sum - * frequency effects in the vector vec = rvec +sqrt(-1)*ivec. - * The 2'nd order contribution to the Stokes wave is then calculated by - * a simple 1D Fourier transform, real(FFT(vec)). - * - * Install gfortran and run the following to build the module: - * f2py diffsumfunq.pyf disufq1.c -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71 - * - * by Per Andreas Brodtkorb 15.08.2001 - * revised pab 14.03.2002, 01.05.2002 22.07.2002, oct 2008 - */ - -void disufq(double *rvec, double *ivec, - double *rA, double *iA, - double *w, double *kw, - double h, double g, - int nmin, int nmax, - int m, int n) -{ - double Epij, Edij; - double tmp1, tmp2, tmp3, tmp4, kfact; - double w1, w2, kw1, kw2, Cg; - double rrA, iiA, riA, irA; - int i,jy,ix,iz1,iv1,ixi,jyi; - //int iz2, iv2; - //Initialize rvec and ivec to zero - for (ix=0;ix10000){ /* deep water /Inifinite water depth */ - for (ix = nmin-1;ix=0) - * kw = vector with wavenumbers (kw>=0) - * h = water depth (h >=0) - * g = constant acceleration of gravity - * nmin = minimum index where rA(:,nmin) and iA(:,nmin) is - * greater than zero. - * nmax = maximum index where rA(:,nmax) and iA(:,nmax) is - * greater than zero. - * m = size(rA,1),size(iA,1) - * n = size(rA,2),size(iA,2), or size(rvec,2),size(ivec,2) - * - * DISUFQ2 returns the summation of sum and difference frequency - * frequency effects in the vectors svec = rsvec +sqrt(-1)*isvec and - * dvec = rdvec +sqrt(-1)*idvec. - * The 2'nd order contribution to the Stokes wave is then calculated by - * a simple 1D Fourier transform, real(FFT(svec+dvec)). - * - * - * This is a MEX-file for MATLAB. - * by Per Andreas Brodtkorb 15.08.2001 - * revised pab 14.03.2002, 01.05.2002 - */ - -void disufq2(double *rsvec, double *isvec, - double *rdvec, double *idvec, - double *rA, double *iA, - double *w, double *kw, - double h, double g, - int nmin, int nmax, - int m, int n) -{ - double Epij, Edij; - double tmp1, tmp2, tmp3, tmp4, kfact; - double w1, w2, kw1, kw2, Cg; - double rrA, iiA, riA, irA; - int i,jy,ix,iz1,iv1,ixi,jyi; - //int iz2,iv2 - - //Initialize rvec and ivec to zero - for (ix=0;ix10000){ /* deep water /Inifinite water depth */ - for (ix = nmin-1;ix v){ - dcross=1; /* first is a down-crossing*/ - } - start=0; - if ( *(y +0)== v){ - /* Find out what type of crossing we have next time.. */ - for (i=1; i v){ - *(ind + ix) = i; /* first crossing is a up-crossing*/ - ix++; - dcross=1; /*The next crossing is a down-crossing*/ - break; - } - } - } - - for (i=start; i h) ) || ((dcross==1 ) && (*(y +i)>=h) && (*(y+i+1) < h) ) ) { - - *(ind + ix) = i+1 ; - ix++; - dcross=-dcross; - } - } - info = ix - return; -} - - diff --git a/pywafo/src/wafo/source/c_codes/old/findrfc.c b/pywafo/src/wafo/source/c_codes/old/findrfc.c deleted file mode 100644 index ac0b7d2..0000000 --- a/pywafo/src/wafo/source/c_codes/old/findrfc.c +++ /dev/null @@ -1,118 +0,0 @@ -#include "math.h" -/* - * findrfc.c - - * - * Returns indices to RFC turningpoints of a vector - * of turningpoints - * - * Install gfortran and run the following to build the module: - * f2py rfc.pyf findrfc.c -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71 -* - * 1998 by Per Andreas Brodtkorb. - */ - -void findrfc(double *y1,double hmin, int *ind, int n,int info) { - double xminus,xplus,Tpl,Tmi,*y,Tstart; - int i,j,ix=0,NC,iy; - - if (*(y1+0)> *(y1+1)){ - /* if first is a max , ignore the first max*/ - y=&(*(y1+1)); - NC=floor((n-1)/2); - Tstart=2; - } - else { - y=y1; - NC=floor(n/2); - Tstart=1; - } - - if (NC<1){ - info = 0; - return; /* No RFC cycles*/ - } - - - if (( *(y+0) > *(y+1)) && ( *(y+1) > *(y+2)) ){ - info = -1; - return; /*This is not a sequence of turningpoints, exit */ - } - if ((*(y+0) < *(y+1)) && (*(y+1)< *(y+2))){ - info=-1; - return; /*This is not a sequence of turningpoints, exit */ - } - - - for (i=0; i=0) && (*(y+2*j+1)<=*(y+2*i+1))){ - if( (*(y+2*j)= xplus){ - if ( (*(y+2*i+1)-xminus) >= hmin){ - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - } /*if*/ - goto L180; - } - - j=i+1; - while((j= *(y+2*i+1)) goto L170; - if( (*(y+2*j+2) <= xplus) ){ - xplus=*(y+2*j+2); - Tpl=(Tstart+2*j+2); - }/*if*/ - j++; - } /*while*/ - - - if ( (*(y+2*i+1)-xminus) >= hmin) { - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - - } /*if*/ - goto L180; - L170: - if (xplus <= xminus ) { - if ( (*(y+2*i+1)-xminus) >= hmin){ - *(ind+ix)=Tmi; - ix++; - *(ind+ix)=(Tstart+2*i+1); - ix++; - } /*if*/ - /*goto L180;*/ - } - else{ - if ( (*(y+2*i+1)-xplus) >= hmin) { - *(ind+ix)=(Tstart+2*i+1); - ix++; - *(ind+ix)=Tpl; - ix++; - } /*if*/ - } /*elseif*/ - L180: - iy=i; - } /* for i */ - info = ix; - return ; -} - - - diff --git a/pywafo/src/wafo/source/c_codes/old/rfc.pyd b/pywafo/src/wafo/source/c_codes/old/rfc.pyd deleted file mode 100644 index 89343f3eb741f32979aac812c48fbbb2e536d6da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHu4|Eh&nr|gE(8dnkYKLjZD5Z8J{L6Hw10?AL5<(zgfbJwDAW9R`4c!=$(5Vul zO(a`s9_=M8>vQ+boSpT^;?DEUc#b-&v;KQbLjnQB6&Xi^5XBv4HcW5_2Zg|(^?u*2 z>P~{_&c65doO$O><=n2S?|%3Df4}?P+nps3>=wodf?z;XRY7`xHce$LwXh{h%F+G~7)Aj|{wsZv4kQ1>@oYXl*v5&9+!4tIb~ z$w&;moE`ao-E)o<*dhV;{5|*}`AFBK5_rZX3c{M4u)kia7lhRD0FC-G~!u=HsUJLOfv%V=g0qS3)BWJ9>Jn! z^ppq|c0uVeL@&u>mBZ@l?z&($dTP~-!_+mT^cbV6Y*i=7X>5U^R`u9`?BkehnZccY z3|O+cPR)1^59r#vWfka}fn8^)Q>zGj^w>Rw5RFT3sFvcJ1R+J5#?twiTUf?%(D1O- zAi;zA5W}NpoaS^b8cUxmzPkGuE|y*dcrBCcCWz(UUuW)2OA!QC+yb!Iqkceg$Ia0% zU`XilEGJ?B+k050-PB)V?7y8E7sZT_(_`>xa{68c1z~kJ2(t9&Fv7jRnmuT@NkvJ5 zvXgf{&pV~ZhT$z>@?w(7+6~0?WxNlXf}JDG2}>KJm!x@W#;fRL^X-=ETF=1uR8>`a zOwl+SC)p}u;~>;hnA%ImTa}PXgVzGC88zcgP>9Cmv3usjpw+NcobxxX;zsIUU<7%S zuivI?MOGWWl=I@A3gGvT9Uwt!?9=<9sd7Y(&9@uSOkHRmP?#R8v|G_^U6ppDH`wA8 zEWrpqs(RQj2G z(NpsGR9ype^fE?sErPp2S=R)kt>ABk#a8LmEX&!$#^7n-ctJ6{YT(kBDhaIP!GPw@ zzX2@_v(?tIA#~ZfmYxlj5TerV@N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x5z;&ItWzHfk}2 zTBBYHVV=?=MPM-ecjb;in#THuK!kfr*W&Bef(jrC1!A{Fw82;_!9>lB{zzCpHc(&hh5o-`pTN&S{UYav-GJFspY)lP^! zB+{g|Iw)a?Z?fTyNARU$_Ed5Q%8=43IAN@pSL%+pHbr>C)j(Z)8995179FIA6IsV46*YRV= z0mn(l?;LkK=QwMee&@r^u(QM2?L6ju&uPd_%gxU%&Rw1x&3!WWzvVui`$q0>bJJW_ z*X=IRHQ%+ywa)bu*Nd*7x!!Oca2<7>bbajljq6j_kSit6m}kzrGw@%~M=GWz~&R?IuDSvZ*H2=x` z@8|#b{EPX;1q%z76+B+>*9FfPoG6%FxS}vpxTo;_!mEWw_jLDK_XhVS_g42#_w()# z-7gjGE3y^4iVKUYi=QrjzxZ@<_MBC7HqZI_oVVxv>zq&L*yc`}d*9raxtr&<&lN;L zI1YDCcJw$-K!2O_9_JKiiF2{j>wLlahVy{)l+%)%kvl2(czs1MZuWDyh3l`UMo6VG+6ZeqPvQ-iXSh2rFaE&`rh1k=6*2u%-n&wU(EfI zPC6X|_T_?bv%})}uH!z(G{-E*JjYVUDo4E|=-A}g?AQ)p|C3{?bAz+R+2(9_D$f7m ze8u^u^Hb*)r;zJ_mlwm&f1mqYE}b#b7m^02(P?$soOWlnvk{}{e}6^5Tbz=!B{vfh ZV0THgw$0ixYv-)zW})NH*Po;X{ul7sZn*#e diff --git a/pywafo/src/wafo/source/c_codes/old/rfc.pyf b/pywafo/src/wafo/source/c_codes/old/rfc.pyf deleted file mode 100644 index e129557..0000000 --- a/pywafo/src/wafo/source/c_codes/old/rfc.pyf +++ /dev/null @@ -1,14 +0,0 @@ -! File rfc.pyf -python module rfc -interface - subroutine findrfc(y1,hmin, ind, n,info) - intent(c) findrfc ! findrfc is a C function - intent(c) ! all findrfc arguments are considered as C based - integer intent(hide), depend(y1) :: n=len(y1) - double precision dimension(n), intent(in) :: y1 ! input array - double precision intent(in) :: hmin - integer dimension(n), intent(out) :: ind ! output array, - integer intent(out) :: info - end subroutine findrfc -end interface -end python module rfc \ No newline at end of file diff --git a/pywafo/src/wafo/source/c_library/build_all.py b/pywafo/src/wafo/source/c_library/build_all.py new file mode 100644 index 0000000..49ee1eb --- /dev/null +++ b/pywafo/src/wafo/source/c_library/build_all.py @@ -0,0 +1,25 @@ +""" +f2py c_library.pyf c_functions.c -c + +See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW +""" +import os +import sys +from wafo.f2py_tools import f2py_call_str + +def compile_all(): + f2py_call = f2py_call_str() + print '=' * 75 + print 'compiling c_codes' + print '=' * 75 + + compile_format = f2py_call + ' %s %s -c' + + pyfs = ('c_library.pyf',) + files = ('c_functions.c',) + + for pyf, file_ in zip(pyfs, files): + os.system(compile_format % (pyf, file_)) + +if __name__ == '__main__': + compile_all() diff --git a/pywafo/src/wafo/source/c_codes/c_functions.c b/pywafo/src/wafo/source/c_library/c_functions.c similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_functions.c rename to pywafo/src/wafo/source/c_library/c_functions.c diff --git a/pywafo/src/wafo/source/c_codes/c_library rf3 rf5 license.txt b/pywafo/src/wafo/source/c_library/c_library rf3 rf5 license.txt similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_library rf3 rf5 license.txt rename to pywafo/src/wafo/source/c_library/c_library rf3 rf5 license.txt diff --git a/pywafo/src/wafo/source/c_codes/c_library.pyd b/pywafo/src/wafo/source/c_library/c_library.pyd similarity index 99% rename from pywafo/src/wafo/source/c_codes/c_library.pyd rename to pywafo/src/wafo/source/c_library/c_library.pyd index 57f0ea821f455ae43def3eba4433af69f61a1d71..8aca5a748c3bebe5a760803b0568ed794c72fb6a 100644 GIT binary patch delta 31 lcmaF*p7rT_)(IWV=BcMAcKb4YZQpoHYdMIwnSI5*^8o**5Ags1 delta 31 mcmaF*p7rT_)(IWVb0xM+?Dl1v^lsxVt>qxzX7&~L&I14dybt*R diff --git a/pywafo/src/wafo/source/c_codes/c_library.pyf b/pywafo/src/wafo/source/c_library/c_library.pyf similarity index 100% rename from pywafo/src/wafo/source/c_codes/c_library.pyf rename to pywafo/src/wafo/source/c_library/c_library.pyf diff --git a/pywafo/src/wafo/source/c_library/c_librarymodule.c b/pywafo/src/wafo/source/c_library/c_librarymodule.c new file mode 100644 index 0000000..efacace --- /dev/null +++ b/pywafo/src/wafo/source/c_library/c_librarymodule.c @@ -0,0 +1,1359 @@ +/* File: c_librarymodule.c + * This file is auto-generated with f2py (version:2). + * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, + * written by Pearu Peterson . + * See http://cens.ioc.ee/projects/f2py2e/ + * Generation date: Thu Jan 29 22:06:57 2015 + * $Revision:$ + * $Date:$ + * Do not edit this file directly unless you know what you are doing!!! + */ +#ifdef __cplusplus +extern "C" { +#endif + +/*********************** See f2py2e/cfuncs.py: includes ***********************/ +#include "Python.h" +#include +#include "fortranobject.h" +#include + +/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/ +static PyObject *c_library_error; +static PyObject *c_library_module; + +/*********************** See f2py2e/cfuncs.py: typedefs ***********************/ +/*need_typedefs*/ + +/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/ +/*need_typedefs_generated*/ + +/********************** See f2py2e/cfuncs.py: cppmacros **********************/ +#define rank(var) var ## _Rank +#define shape(var,dim) var ## _Dims[dim] +#define old_rank(var) (((PyArrayObject *)(capi_ ## var ## _tmp))->nd) +#define old_shape(var,dim) (((PyArrayObject *)(capi_ ## var ## _tmp))->dimensions[dim]) +#define fshape(var,dim) shape(var,rank(var)-dim-1) +#define len(var) shape(var,0) +#define flen(var) fshape(var,0) +#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp)) +/* #define index(i) capi_i ## i */ +#define slen(var) capi_ ## var ## _len +#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1) + +#ifdef DEBUGCFUNCS +#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess); +#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \ + PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\ + fprintf(stderr,"\n"); +#else +#define CFUNCSMESS(mess) +#define CFUNCSMESSPY(mess,obj) +#endif + +#ifndef max +#define max(a,b) ((a > b) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) ((a < b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a > b) ? (a) : (b)) +#endif +#ifndef MIN +#define MIN(a,b) ((a < b) ? (a) : (b)) +#endif + +#define CHECKSCALAR(check,tcheck,name,show,var)\ + if (!(check)) {\ + char errstring[256];\ + sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\ + PyErr_SetString(c_library_error,errstring);\ + /*goto capi_fail;*/\ + } else +#if defined(PREPEND_FORTRAN) +#if defined(NO_APPEND_FORTRAN) +#if defined(UPPERCASE_FORTRAN) +#define F_FUNC(f,F) _##F +#else +#define F_FUNC(f,F) _##f +#endif +#else +#if defined(UPPERCASE_FORTRAN) +#define F_FUNC(f,F) _##F##_ +#else +#define F_FUNC(f,F) _##f##_ +#endif +#endif +#else +#if defined(NO_APPEND_FORTRAN) +#if defined(UPPERCASE_FORTRAN) +#define F_FUNC(f,F) F +#else +#define F_FUNC(f,F) f +#endif +#else +#if defined(UPPERCASE_FORTRAN) +#define F_FUNC(f,F) F##_ +#else +#define F_FUNC(f,F) f##_ +#endif +#endif +#endif +#if defined(UNDERSCORE_G77) +#define F_FUNC_US(f,F) F_FUNC(f##_,F##_) +#else +#define F_FUNC_US(f,F) F_FUNC(f,F) +#endif + + +/************************ See f2py2e/cfuncs.py: cfuncs ************************/ +static int f2py_size(PyArrayObject* var, ...) +{ + npy_int sz = 0; + npy_int dim; + npy_int rank; + va_list argp; + va_start(argp, var); + dim = va_arg(argp, npy_int); + if (dim==-1) + { + sz = PyArray_SIZE(var); + } + else + { + rank = PyArray_NDIM(var); + if (dim>=1 && dim<=rank) + sz = PyArray_DIM(var, dim-1); + else + fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank); + } + va_end(argp); + return sz; +} + +static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) { + PyObject* tmp = NULL; + if (PyFloat_Check(obj)) { +#ifdef __sgi + *v = PyFloat_AsDouble(obj); +#else + *v = PyFloat_AS_DOUBLE(obj); +#endif + return 1; + } + tmp = PyNumber_Float(obj); + if (tmp) { +#ifdef __sgi + *v = PyFloat_AsDouble(tmp); +#else + *v = PyFloat_AS_DOUBLE(tmp); +#endif + Py_DECREF(tmp); + return 1; + } + if (PyComplex_Check(obj)) + tmp = PyObject_GetAttrString(obj,"real"); + else if (PyString_Check(obj) || PyUnicode_Check(obj)) + /*pass*/; + else if (PySequence_Check(obj)) + tmp = PySequence_GetItem(obj,0); + if (tmp) { + PyErr_Clear(); + if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;} + Py_DECREF(tmp); + } + { + PyObject* err = PyErr_Occurred(); + if (err==NULL) err = c_library_error; + PyErr_SetString(err,errmess); + } + return 0; +} + +static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) { + PyObject* tmp = NULL; + if (PyInt_Check(obj)) { + *v = (int)PyInt_AS_LONG(obj); + return 1; + } + tmp = PyNumber_Int(obj); + if (tmp) { + *v = PyInt_AS_LONG(tmp); + Py_DECREF(tmp); + return 1; + } + if (PyComplex_Check(obj)) + tmp = PyObject_GetAttrString(obj,"real"); + else if (PyString_Check(obj) || PyUnicode_Check(obj)) + /*pass*/; + else if (PySequence_Check(obj)) + tmp = PySequence_GetItem(obj,0); + if (tmp) { + PyErr_Clear(); + if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;} + Py_DECREF(tmp); + } + { + PyObject* err = PyErr_Occurred(); + if (err==NULL) err = c_library_error; + PyErr_SetString(err,errmess); + } + return 0; +} + + +/********************* See f2py2e/cfuncs.py: userincludes *********************/ +/*need_userincludes*/ + +/********************* See f2py2e/capi_rules.py: usercode *********************/ + + +/* See f2py2e/rules.py */ +extern void findrfc(double*,double,int*,int,int*); +extern void findcross(double*,double,int*,int,int*); +extern void disufq(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); +extern void disufq2(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); +extern void findrfc3_astm(double*,double*,int,int*); +extern void findrfc5_astm(double*,double*,double*,int,int*); +/*eof externroutines*/ + +/******************** See f2py2e/capi_rules.py: usercode1 ********************/ + + +/******************* See f2py2e/cb_rules.py: buildcallback *******************/ +/*need_callbacks*/ + +/*********************** See f2py2e/rules.py: buildapi ***********************/ + +/********************************** findrfc **********************************/ +static char doc_f2py_rout_c_library_findrfc[] = "\ +ind,info = findrfc(y1,hmin)\n\nWrapper for ``findrfc``.\ +\n\nParameters\n----------\n" +"y1 : input rank-1 array('d') with bounds (n)\n" +"hmin : input float\n" +"\nReturns\n-------\n" +"ind : rank-1 array('i') with bounds (n)\n" +"info : rank-1 array('i') with bounds (1)"; +/* extern void findrfc(double*,double,int*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double,int*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *y1 = NULL; + npy_intp y1_Dims[1] = {-1}; + const int y1_Rank = 1; + PyArrayObject *capi_y1_tmp = NULL; + int capi_y1_intent = 0; + PyObject *y1_capi = Py_None; + double hmin = 0; + PyObject *hmin_capi = Py_None; + int *ind = NULL; + npy_intp ind_Dims[1] = {-1}; + const int ind_Rank = 1; + PyArrayObject *capi_ind_tmp = NULL; + int capi_ind_intent = 0; + int n = 0; + int *info = NULL; + npy_intp info_Dims[1] = {-1}; + const int info_Rank = 1; + PyArrayObject *capi_info_tmp = NULL; + int capi_info_intent = 0; + static char *capi_kwlist[] = {"y1","hmin",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findrfc",\ + capi_kwlist,&y1_capi,&hmin_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable info */ + info_Dims[0]=1; + capi_info_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_info_tmp = array_from_pyobj(NPY_INT,info_Dims,info_Rank,capi_info_intent,Py_None); + if (capi_info_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `info' of c_library.findrfc to C/Fortran array" ); + } else { + info = (int *)(capi_info_tmp->data); + + /* Processing variable y1 */ + ; + capi_y1_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_y1_tmp = array_from_pyobj(NPY_DOUBLE,y1_Dims,y1_Rank,capi_y1_intent,y1_capi); + if (capi_y1_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `y1' of c_library.findrfc to C/Fortran array" ); + } else { + y1 = (double *)(capi_y1_tmp->data); + + /* Processing variable hmin */ + f2py_success = double_from_pyobj(&hmin,hmin_capi,"c_library.findrfc() 2nd argument (hmin) can't be converted to double"); + if (f2py_success) { + /* Processing variable n */ + n = len(y1); + /* Processing variable ind */ + ind_Dims[0]=n; + capi_ind_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ind_tmp = array_from_pyobj(NPY_INT,ind_Dims,ind_Rank,capi_ind_intent,Py_None); + if (capi_ind_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ind' of c_library.findrfc to C/Fortran array" ); + } else { + ind = (int *)(capi_ind_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(y1,hmin,ind,n,info); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_ind_tmp,capi_info_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_ind_tmp == NULL) ... else of ind*/ + /* End of cleaning variable ind */ + /* End of cleaning variable n */ + } /*if (f2py_success) of hmin*/ + /* End of cleaning variable hmin */ + if((PyObject *)capi_y1_tmp!=y1_capi) { + Py_XDECREF(capi_y1_tmp); } + } /*if (capi_y1_tmp == NULL) ... else of y1*/ + /* End of cleaning variable y1 */ + } /*if (capi_info_tmp == NULL) ... else of info*/ + /* End of cleaning variable info */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/******************************* end of findrfc *******************************/ + +/********************************* findcross *********************************/ +static char doc_f2py_rout_c_library_findcross[] = "\ +ind,info = findcross(y,v)\n\nWrapper for ``findcross``.\ +\n\nParameters\n----------\n" +"y : input rank-1 array('d') with bounds (n)\n" +"v : input float\n" +"\nReturns\n-------\n" +"ind : rank-1 array('i') with bounds (n)\n" +"info : rank-1 array('i') with bounds (1)"; +/* extern void findcross(double*,double,int*,int,int*); */ +static PyObject *f2py_rout_c_library_findcross(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double,int*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *y = NULL; + npy_intp y_Dims[1] = {-1}; + const int y_Rank = 1; + PyArrayObject *capi_y_tmp = NULL; + int capi_y_intent = 0; + PyObject *y_capi = Py_None; + double v = 0; + PyObject *v_capi = Py_None; + int *ind = NULL; + npy_intp ind_Dims[1] = {-1}; + const int ind_Rank = 1; + PyArrayObject *capi_ind_tmp = NULL; + int capi_ind_intent = 0; + int n = 0; + int *info = NULL; + npy_intp info_Dims[1] = {-1}; + const int info_Rank = 1; + PyArrayObject *capi_info_tmp = NULL; + int capi_info_intent = 0; + static char *capi_kwlist[] = {"y","v",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findcross",\ + capi_kwlist,&y_capi,&v_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable info */ + info_Dims[0]=1; + capi_info_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_info_tmp = array_from_pyobj(NPY_INT,info_Dims,info_Rank,capi_info_intent,Py_None); + if (capi_info_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `info' of c_library.findcross to C/Fortran array" ); + } else { + info = (int *)(capi_info_tmp->data); + + /* Processing variable y */ + ; + capi_y_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); + if (capi_y_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `y' of c_library.findcross to C/Fortran array" ); + } else { + y = (double *)(capi_y_tmp->data); + + /* Processing variable v */ + f2py_success = double_from_pyobj(&v,v_capi,"c_library.findcross() 2nd argument (v) can't be converted to double"); + if (f2py_success) { + /* Processing variable n */ + n = len(y); + /* Processing variable ind */ + ind_Dims[0]=n; + capi_ind_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ind_tmp = array_from_pyobj(NPY_INT,ind_Dims,ind_Rank,capi_ind_intent,Py_None); + if (capi_ind_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ind' of c_library.findcross to C/Fortran array" ); + } else { + ind = (int *)(capi_ind_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(y,v,ind,n,info); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_ind_tmp,capi_info_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_ind_tmp == NULL) ... else of ind*/ + /* End of cleaning variable ind */ + /* End of cleaning variable n */ + } /*if (f2py_success) of v*/ + /* End of cleaning variable v */ + if((PyObject *)capi_y_tmp!=y_capi) { + Py_XDECREF(capi_y_tmp); } + } /*if (capi_y_tmp == NULL) ... else of y*/ + /* End of cleaning variable y */ + } /*if (capi_info_tmp == NULL) ... else of info*/ + /* End of cleaning variable info */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/****************************** end of findcross ******************************/ + +/*********************************** disufq ***********************************/ +static char doc_f2py_rout_c_library_disufq[] = "\ +rvec,ivec = disufq(rA,iA,w,kw,h,g,nmin,nmax,m,[n])\n\nWrapper for ``disufq``.\ +\n\nParameters\n----------\n" +"rA : input rank-1 array('d') with bounds (n*m)\n" +"iA : input rank-1 array('d') with bounds (n*m)\n" +"w : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"kw : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"h : input float\n" +"g : input float\n" +"nmin : input int\n" +"nmax : input int\n" +"m : input int\n" +"\nOther Parameters\n----------------\n" +"n : input int, optional\n Default: (len(w)-1.0)/(0.5)\n" +"\nReturns\n-------\n" +"rvec : rank-1 array('d') with bounds (n*m)\n" +"ivec : rank-1 array('d') with bounds (n*m)"; +/* extern void disufq(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); */ +static PyObject *f2py_rout_c_library_disufq(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,double*,double*,double*,double,double,int,int,int,int)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *rvec = NULL; + npy_intp rvec_Dims[1] = {-1}; + const int rvec_Rank = 1; + PyArrayObject *capi_rvec_tmp = NULL; + int capi_rvec_intent = 0; + double *ivec = NULL; + npy_intp ivec_Dims[1] = {-1}; + const int ivec_Rank = 1; + PyArrayObject *capi_ivec_tmp = NULL; + int capi_ivec_intent = 0; + double *rA = NULL; + npy_intp rA_Dims[1] = {-1}; + const int rA_Rank = 1; + PyArrayObject *capi_rA_tmp = NULL; + int capi_rA_intent = 0; + PyObject *rA_capi = Py_None; + double *iA = NULL; + npy_intp iA_Dims[1] = {-1}; + const int iA_Rank = 1; + PyArrayObject *capi_iA_tmp = NULL; + int capi_iA_intent = 0; + PyObject *iA_capi = Py_None; + double *w = NULL; + npy_intp w_Dims[1] = {-1}; + const int w_Rank = 1; + PyArrayObject *capi_w_tmp = NULL; + int capi_w_intent = 0; + PyObject *w_capi = Py_None; + double *kw = NULL; + npy_intp kw_Dims[1] = {-1}; + const int kw_Rank = 1; + PyArrayObject *capi_kw_tmp = NULL; + int capi_kw_intent = 0; + PyObject *kw_capi = Py_None; + double h = 0; + PyObject *h_capi = Py_None; + double g = 0; + PyObject *g_capi = Py_None; + int nmin = 0; + PyObject *nmin_capi = Py_None; + int nmax = 0; + PyObject *nmax_capi = Py_None; + int m = 0; + PyObject *m_capi = Py_None; + int n = 0; + PyObject *n_capi = Py_None; + static char *capi_kwlist[] = {"rA","iA","w","kw","h","g","nmin","nmax","m","n",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OOOOOOOOO|O:c_library.disufq",\ + capi_kwlist,&rA_capi,&iA_capi,&w_capi,&kw_capi,&h_capi,&g_capi,&nmin_capi,&nmax_capi,&m_capi,&n_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nmax */ + f2py_success = int_from_pyobj(&nmax,nmax_capi,"c_library.disufq() 8th argument (nmax) can't be converted to int"); + if (f2py_success) { + /* Processing variable g */ + f2py_success = double_from_pyobj(&g,g_capi,"c_library.disufq() 6th argument (g) can't be converted to double"); + if (f2py_success) { + /* Processing variable h */ + f2py_success = double_from_pyobj(&h,h_capi,"c_library.disufq() 5th argument (h) can't be converted to double"); + if (f2py_success) { + /* Processing variable m */ + f2py_success = int_from_pyobj(&m,m_capi,"c_library.disufq() 9th argument (m) can't be converted to int"); + if (f2py_success) { + /* Processing variable w */ + ; + capi_w_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_w_tmp = array_from_pyobj(NPY_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi); + if (capi_w_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 3rd argument `w' of c_library.disufq to C/Fortran array" ); + } else { + w = (double *)(capi_w_tmp->data); + + /* Processing variable nmin */ + f2py_success = int_from_pyobj(&nmin,nmin_capi,"c_library.disufq() 7th argument (nmin) can't be converted to int"); + if (f2py_success) { + /* Processing variable n */ + if (n_capi == Py_None) n = (len(w)-1.0)/(0.5); else + f2py_success = int_from_pyobj(&n,n_capi,"c_library.disufq() 1st keyword (n) can't be converted to int"); + if (f2py_success) { + CHECKSCALAR((len(w)-1.0)/(0.5)>=n,"(len(w)-1.0)/(0.5)>=n","1st keyword n","disufq:n=%d",n) { + /* Processing variable kw */ + kw_Dims[0]=0.5 * n + 1.0; + capi_kw_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_kw_tmp = array_from_pyobj(NPY_DOUBLE,kw_Dims,kw_Rank,capi_kw_intent,kw_capi); + if (capi_kw_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 4th argument `kw' of c_library.disufq to C/Fortran array" ); + } else { + kw = (double *)(capi_kw_tmp->data); + + /* Processing variable rA */ + rA_Dims[0]=n*m; + capi_rA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_rA_tmp = array_from_pyobj(NPY_DOUBLE,rA_Dims,rA_Rank,capi_rA_intent,rA_capi); + if (capi_rA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `rA' of c_library.disufq to C/Fortran array" ); + } else { + rA = (double *)(capi_rA_tmp->data); + + /* Processing variable iA */ + iA_Dims[0]=n*m; + capi_iA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_iA_tmp = array_from_pyobj(NPY_DOUBLE,iA_Dims,iA_Rank,capi_iA_intent,iA_capi); + if (capi_iA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `iA' of c_library.disufq to C/Fortran array" ); + } else { + iA = (double *)(capi_iA_tmp->data); + + /* Processing variable ivec */ + ivec_Dims[0]=n*m; + capi_ivec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_ivec_tmp = array_from_pyobj(NPY_DOUBLE,ivec_Dims,ivec_Rank,capi_ivec_intent,Py_None); + if (capi_ivec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `ivec' of c_library.disufq to C/Fortran array" ); + } else { + ivec = (double *)(capi_ivec_tmp->data); + + /* Processing variable rvec */ + rvec_Dims[0]=n*m; + capi_rvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rvec_tmp = array_from_pyobj(NPY_DOUBLE,rvec_Dims,rvec_Rank,capi_rvec_intent,Py_None); + if (capi_rvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rvec' of c_library.disufq to C/Fortran array" ); + } else { + rvec = (double *)(capi_rvec_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(rvec,ivec,rA,iA,w,kw,h,g,nmin,nmax,m,n); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_rvec_tmp,capi_ivec_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_rvec_tmp == NULL) ... else of rvec*/ + /* End of cleaning variable rvec */ + } /*if (capi_ivec_tmp == NULL) ... else of ivec*/ + /* End of cleaning variable ivec */ + if((PyObject *)capi_iA_tmp!=iA_capi) { + Py_XDECREF(capi_iA_tmp); } + } /*if (capi_iA_tmp == NULL) ... else of iA*/ + /* End of cleaning variable iA */ + if((PyObject *)capi_rA_tmp!=rA_capi) { + Py_XDECREF(capi_rA_tmp); } + } /*if (capi_rA_tmp == NULL) ... else of rA*/ + /* End of cleaning variable rA */ + if((PyObject *)capi_kw_tmp!=kw_capi) { + Py_XDECREF(capi_kw_tmp); } + } /*if (capi_kw_tmp == NULL) ... else of kw*/ + /* End of cleaning variable kw */ + } /*CHECKSCALAR((len(w)-1.0)/(0.5)>=n)*/ + } /*if (f2py_success) of n*/ + /* End of cleaning variable n */ + } /*if (f2py_success) of nmin*/ + /* End of cleaning variable nmin */ + if((PyObject *)capi_w_tmp!=w_capi) { + Py_XDECREF(capi_w_tmp); } + } /*if (capi_w_tmp == NULL) ... else of w*/ + /* End of cleaning variable w */ + } /*if (f2py_success) of m*/ + /* End of cleaning variable m */ + } /*if (f2py_success) of h*/ + /* End of cleaning variable h */ + } /*if (f2py_success) of g*/ + /* End of cleaning variable g */ + } /*if (f2py_success) of nmax*/ + /* End of cleaning variable nmax */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/******************************* end of disufq *******************************/ + +/********************************** disufq2 **********************************/ +static char doc_f2py_rout_c_library_disufq2[] = "\ +rsvec,isvec,rdvec,idvec = disufq2(rA,iA,w,kw,h,g,nmin,nmax,m,[n])\n\nWrapper for ``disufq2``.\ +\n\nParameters\n----------\n" +"rA : input rank-1 array('d') with bounds (n*m)\n" +"iA : input rank-1 array('d') with bounds (n*m)\n" +"w : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"kw : input rank-1 array('d') with bounds (0.5 * n + 1.0)\n" +"h : input float\n" +"g : input float\n" +"nmin : input int\n" +"nmax : input int\n" +"m : input int\n" +"\nOther Parameters\n----------------\n" +"n : input int, optional\n Default: (len(w)-1.0)/(0.5)\n" +"\nReturns\n-------\n" +"rsvec : rank-1 array('d') with bounds (n*m)\n" +"isvec : rank-1 array('d') with bounds (n*m)\n" +"rdvec : rank-1 array('d') with bounds (n*m)\n" +"idvec : rank-1 array('d') with bounds (n*m)"; +/* extern void disufq2(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int); */ +static PyObject *f2py_rout_c_library_disufq2(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,double*,double*,double*,double*,double*,double,double,int,int,int,int)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *rsvec = NULL; + npy_intp rsvec_Dims[1] = {-1}; + const int rsvec_Rank = 1; + PyArrayObject *capi_rsvec_tmp = NULL; + int capi_rsvec_intent = 0; + double *isvec = NULL; + npy_intp isvec_Dims[1] = {-1}; + const int isvec_Rank = 1; + PyArrayObject *capi_isvec_tmp = NULL; + int capi_isvec_intent = 0; + double *rdvec = NULL; + npy_intp rdvec_Dims[1] = {-1}; + const int rdvec_Rank = 1; + PyArrayObject *capi_rdvec_tmp = NULL; + int capi_rdvec_intent = 0; + double *idvec = NULL; + npy_intp idvec_Dims[1] = {-1}; + const int idvec_Rank = 1; + PyArrayObject *capi_idvec_tmp = NULL; + int capi_idvec_intent = 0; + double *rA = NULL; + npy_intp rA_Dims[1] = {-1}; + const int rA_Rank = 1; + PyArrayObject *capi_rA_tmp = NULL; + int capi_rA_intent = 0; + PyObject *rA_capi = Py_None; + double *iA = NULL; + npy_intp iA_Dims[1] = {-1}; + const int iA_Rank = 1; + PyArrayObject *capi_iA_tmp = NULL; + int capi_iA_intent = 0; + PyObject *iA_capi = Py_None; + double *w = NULL; + npy_intp w_Dims[1] = {-1}; + const int w_Rank = 1; + PyArrayObject *capi_w_tmp = NULL; + int capi_w_intent = 0; + PyObject *w_capi = Py_None; + double *kw = NULL; + npy_intp kw_Dims[1] = {-1}; + const int kw_Rank = 1; + PyArrayObject *capi_kw_tmp = NULL; + int capi_kw_intent = 0; + PyObject *kw_capi = Py_None; + double h = 0; + PyObject *h_capi = Py_None; + double g = 0; + PyObject *g_capi = Py_None; + int nmin = 0; + PyObject *nmin_capi = Py_None; + int nmax = 0; + PyObject *nmax_capi = Py_None; + int m = 0; + PyObject *m_capi = Py_None; + int n = 0; + PyObject *n_capi = Py_None; + static char *capi_kwlist[] = {"rA","iA","w","kw","h","g","nmin","nmax","m","n",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OOOOOOOOO|O:c_library.disufq2",\ + capi_kwlist,&rA_capi,&iA_capi,&w_capi,&kw_capi,&h_capi,&g_capi,&nmin_capi,&nmax_capi,&m_capi,&n_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nmax */ + f2py_success = int_from_pyobj(&nmax,nmax_capi,"c_library.disufq2() 8th argument (nmax) can't be converted to int"); + if (f2py_success) { + /* Processing variable g */ + f2py_success = double_from_pyobj(&g,g_capi,"c_library.disufq2() 6th argument (g) can't be converted to double"); + if (f2py_success) { + /* Processing variable m */ + f2py_success = int_from_pyobj(&m,m_capi,"c_library.disufq2() 9th argument (m) can't be converted to int"); + if (f2py_success) { + /* Processing variable w */ + ; + capi_w_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_w_tmp = array_from_pyobj(NPY_DOUBLE,w_Dims,w_Rank,capi_w_intent,w_capi); + if (capi_w_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 3rd argument `w' of c_library.disufq2 to C/Fortran array" ); + } else { + w = (double *)(capi_w_tmp->data); + + /* Processing variable h */ + f2py_success = double_from_pyobj(&h,h_capi,"c_library.disufq2() 5th argument (h) can't be converted to double"); + if (f2py_success) { + /* Processing variable nmin */ + f2py_success = int_from_pyobj(&nmin,nmin_capi,"c_library.disufq2() 7th argument (nmin) can't be converted to int"); + if (f2py_success) { + /* Processing variable n */ + if (n_capi == Py_None) n = (len(w)-1.0)/(0.5); else + f2py_success = int_from_pyobj(&n,n_capi,"c_library.disufq2() 1st keyword (n) can't be converted to int"); + if (f2py_success) { + CHECKSCALAR((len(w)-1.0)/(0.5)>=n,"(len(w)-1.0)/(0.5)>=n","1st keyword n","disufq2:n=%d",n) { + /* Processing variable rdvec */ + rdvec_Dims[0]=n*m; + capi_rdvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rdvec_tmp = array_from_pyobj(NPY_DOUBLE,rdvec_Dims,rdvec_Rank,capi_rdvec_intent,Py_None); + if (capi_rdvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rdvec' of c_library.disufq2 to C/Fortran array" ); + } else { + rdvec = (double *)(capi_rdvec_tmp->data); + + /* Processing variable idvec */ + idvec_Dims[0]=n*m; + capi_idvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_idvec_tmp = array_from_pyobj(NPY_DOUBLE,idvec_Dims,idvec_Rank,capi_idvec_intent,Py_None); + if (capi_idvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `idvec' of c_library.disufq2 to C/Fortran array" ); + } else { + idvec = (double *)(capi_idvec_tmp->data); + + /* Processing variable isvec */ + isvec_Dims[0]=n*m; + capi_isvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_isvec_tmp = array_from_pyobj(NPY_DOUBLE,isvec_Dims,isvec_Rank,capi_isvec_intent,Py_None); + if (capi_isvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `isvec' of c_library.disufq2 to C/Fortran array" ); + } else { + isvec = (double *)(capi_isvec_tmp->data); + + /* Processing variable rsvec */ + rsvec_Dims[0]=n*m; + capi_rsvec_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_rsvec_tmp = array_from_pyobj(NPY_DOUBLE,rsvec_Dims,rsvec_Rank,capi_rsvec_intent,Py_None); + if (capi_rsvec_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `rsvec' of c_library.disufq2 to C/Fortran array" ); + } else { + rsvec = (double *)(capi_rsvec_tmp->data); + + /* Processing variable kw */ + kw_Dims[0]=0.5 * n + 1.0; + capi_kw_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_kw_tmp = array_from_pyobj(NPY_DOUBLE,kw_Dims,kw_Rank,capi_kw_intent,kw_capi); + if (capi_kw_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 4th argument `kw' of c_library.disufq2 to C/Fortran array" ); + } else { + kw = (double *)(capi_kw_tmp->data); + + /* Processing variable rA */ + rA_Dims[0]=n*m; + capi_rA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_rA_tmp = array_from_pyobj(NPY_DOUBLE,rA_Dims,rA_Rank,capi_rA_intent,rA_capi); + if (capi_rA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `rA' of c_library.disufq2 to C/Fortran array" ); + } else { + rA = (double *)(capi_rA_tmp->data); + + /* Processing variable iA */ + iA_Dims[0]=n*m; + capi_iA_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_iA_tmp = array_from_pyobj(NPY_DOUBLE,iA_Dims,iA_Rank,capi_iA_intent,iA_capi); + if (capi_iA_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `iA' of c_library.disufq2 to C/Fortran array" ); + } else { + iA = (double *)(capi_iA_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(rsvec,isvec,rdvec,idvec,rA,iA,w,kw,h,g,nmin,nmax,m,n); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NNNN",capi_rsvec_tmp,capi_isvec_tmp,capi_rdvec_tmp,capi_idvec_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + if((PyObject *)capi_iA_tmp!=iA_capi) { + Py_XDECREF(capi_iA_tmp); } + } /*if (capi_iA_tmp == NULL) ... else of iA*/ + /* End of cleaning variable iA */ + if((PyObject *)capi_rA_tmp!=rA_capi) { + Py_XDECREF(capi_rA_tmp); } + } /*if (capi_rA_tmp == NULL) ... else of rA*/ + /* End of cleaning variable rA */ + if((PyObject *)capi_kw_tmp!=kw_capi) { + Py_XDECREF(capi_kw_tmp); } + } /*if (capi_kw_tmp == NULL) ... else of kw*/ + /* End of cleaning variable kw */ + } /*if (capi_rsvec_tmp == NULL) ... else of rsvec*/ + /* End of cleaning variable rsvec */ + } /*if (capi_isvec_tmp == NULL) ... else of isvec*/ + /* End of cleaning variable isvec */ + } /*if (capi_idvec_tmp == NULL) ... else of idvec*/ + /* End of cleaning variable idvec */ + } /*if (capi_rdvec_tmp == NULL) ... else of rdvec*/ + /* End of cleaning variable rdvec */ + } /*CHECKSCALAR((len(w)-1.0)/(0.5)>=n)*/ + } /*if (f2py_success) of n*/ + /* End of cleaning variable n */ + } /*if (f2py_success) of nmin*/ + /* End of cleaning variable nmin */ + } /*if (f2py_success) of h*/ + /* End of cleaning variable h */ + if((PyObject *)capi_w_tmp!=w_capi) { + Py_XDECREF(capi_w_tmp); } + } /*if (capi_w_tmp == NULL) ... else of w*/ + /* End of cleaning variable w */ + } /*if (f2py_success) of m*/ + /* End of cleaning variable m */ + } /*if (f2py_success) of g*/ + /* End of cleaning variable g */ + } /*if (f2py_success) of nmax*/ + /* End of cleaning variable nmax */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/******************************* end of disufq2 *******************************/ + +/******************************* findrfc3_astm *******************************/ +static char doc_f2py_rout_c_library_findrfc3_astm[] = "\ +array_out,nout = findrfc3_astm(array_ext)\n\nWrapper for ``findrfc3_astm``.\ +\n\nParameters\n----------\n" +"array_ext : input rank-1 array('d') with bounds (n)\n" +"\nReturns\n-------\n" +"array_out : rank-2 array('d') with bounds (n,3)\n" +"nout : rank-1 array('i') with bounds (2)"; +/* extern void findrfc3_astm(double*,double*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc3_astm(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *array_ext = NULL; + npy_intp array_ext_Dims[1] = {-1}; + const int array_ext_Rank = 1; + PyArrayObject *capi_array_ext_tmp = NULL; + int capi_array_ext_intent = 0; + PyObject *array_ext_capi = Py_None; + double *array_out = NULL; + npy_intp array_out_Dims[2] = {-1, -1}; + const int array_out_Rank = 2; + PyArrayObject *capi_array_out_tmp = NULL; + int capi_array_out_intent = 0; + int n = 0; + int *nout = NULL; + npy_intp nout_Dims[1] = {-1}; + const int nout_Rank = 1; + PyArrayObject *capi_nout_tmp = NULL; + int capi_nout_intent = 0; + static char *capi_kwlist[] = {"array_ext",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "O:c_library.findrfc3_astm",\ + capi_kwlist,&array_ext_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable array_ext */ + ; + capi_array_ext_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_ext_tmp = array_from_pyobj(NPY_DOUBLE,array_ext_Dims,array_ext_Rank,capi_array_ext_intent,array_ext_capi); + if (capi_array_ext_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `array_ext' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + array_ext = (double *)(capi_array_ext_tmp->data); + + /* Processing variable nout */ + nout_Dims[0]=2; + capi_nout_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_nout_tmp = array_from_pyobj(NPY_INT,nout_Dims,nout_Rank,capi_nout_intent,Py_None); + if (capi_nout_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `nout' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + nout = (int *)(capi_nout_tmp->data); + + /* Processing variable n */ + n = len(array_ext); + /* Processing variable array_out */ + array_out_Dims[0]=n,array_out_Dims[1]=3; + capi_array_out_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_array_out_tmp = array_from_pyobj(NPY_DOUBLE,array_out_Dims,array_out_Rank,capi_array_out_intent,Py_None); + if (capi_array_out_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `array_out' of c_library.findrfc3_astm to C/Fortran array" ); + } else { + array_out = (double *)(capi_array_out_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(array_ext,array_out,n,nout); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_array_out_tmp,capi_nout_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_array_out_tmp == NULL) ... else of array_out*/ + /* End of cleaning variable array_out */ + /* End of cleaning variable n */ + } /*if (capi_nout_tmp == NULL) ... else of nout*/ + /* End of cleaning variable nout */ + if((PyObject *)capi_array_ext_tmp!=array_ext_capi) { + Py_XDECREF(capi_array_ext_tmp); } + } /*if (capi_array_ext_tmp == NULL) ... else of array_ext*/ + /* End of cleaning variable array_ext */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/**************************** end of findrfc3_astm ****************************/ + +/******************************* findrfc5_astm *******************************/ +static char doc_f2py_rout_c_library_findrfc5_astm[] = "\ +array_out,nout = findrfc5_astm(array_ext,array_t)\n\nWrapper for ``findrfc5_astm``.\ +\n\nParameters\n----------\n" +"array_ext : input rank-1 array('d') with bounds (n)\n" +"array_t : input rank-1 array('d') with bounds (n)\n" +"\nReturns\n-------\n" +"array_out : rank-2 array('d') with bounds (n,5)\n" +"nout : rank-1 array('i') with bounds (2)"; +/* extern void findrfc5_astm(double*,double*,double*,int,int*); */ +static PyObject *f2py_rout_c_library_findrfc5_astm(const PyObject *capi_self, + PyObject *capi_args, + PyObject *capi_keywds, + void (*f2py_func)(double*,double*,double*,int,int*)) { + PyObject * volatile capi_buildvalue = NULL; + volatile int f2py_success = 1; +/*decl*/ + + double *array_ext = NULL; + npy_intp array_ext_Dims[1] = {-1}; + const int array_ext_Rank = 1; + PyArrayObject *capi_array_ext_tmp = NULL; + int capi_array_ext_intent = 0; + PyObject *array_ext_capi = Py_None; + double *array_t = NULL; + npy_intp array_t_Dims[1] = {-1}; + const int array_t_Rank = 1; + PyArrayObject *capi_array_t_tmp = NULL; + int capi_array_t_intent = 0; + PyObject *array_t_capi = Py_None; + double *array_out = NULL; + npy_intp array_out_Dims[2] = {-1, -1}; + const int array_out_Rank = 2; + PyArrayObject *capi_array_out_tmp = NULL; + int capi_array_out_intent = 0; + int n = 0; + int *nout = NULL; + npy_intp nout_Dims[1] = {-1}; + const int nout_Rank = 1; + PyArrayObject *capi_nout_tmp = NULL; + int capi_nout_intent = 0; + static char *capi_kwlist[] = {"array_ext","array_t",NULL}; + +/*routdebugenter*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_clock(); +#endif + if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ + "OO:c_library.findrfc5_astm",\ + capi_kwlist,&array_ext_capi,&array_t_capi)) + return NULL; +/*frompyobj*/ + /* Processing variable nout */ + nout_Dims[0]=2; + capi_nout_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_nout_tmp = array_from_pyobj(NPY_INT,nout_Dims,nout_Rank,capi_nout_intent,Py_None); + if (capi_nout_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `nout' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + nout = (int *)(capi_nout_tmp->data); + + /* Processing variable array_ext */ + ; + capi_array_ext_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_ext_tmp = array_from_pyobj(NPY_DOUBLE,array_ext_Dims,array_ext_Rank,capi_array_ext_intent,array_ext_capi); + if (capi_array_ext_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 1st argument `array_ext' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_ext = (double *)(capi_array_ext_tmp->data); + + /* Processing variable n */ + n = len(array_ext); + /* Processing variable array_t */ + array_t_Dims[0]=n; + capi_array_t_intent |= F2PY_INTENT_C|F2PY_INTENT_IN; + capi_array_t_tmp = array_from_pyobj(NPY_DOUBLE,array_t_Dims,array_t_Rank,capi_array_t_intent,array_t_capi); + if (capi_array_t_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting 2nd argument `array_t' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_t = (double *)(capi_array_t_tmp->data); + + /* Processing variable array_out */ + array_out_Dims[0]=n,array_out_Dims[1]=5; + capi_array_out_intent |= F2PY_INTENT_HIDE|F2PY_INTENT_C|F2PY_INTENT_OUT; + capi_array_out_tmp = array_from_pyobj(NPY_DOUBLE,array_out_Dims,array_out_Rank,capi_array_out_intent,Py_None); + if (capi_array_out_tmp == NULL) { + if (!PyErr_Occurred()) + PyErr_SetString(c_library_error,"failed in converting hidden `array_out' of c_library.findrfc5_astm to C/Fortran array" ); + } else { + array_out = (double *)(capi_array_out_tmp->data); + +/*end of frompyobj*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_start_call_clock(); +#endif +/*callfortranroutine*/ + (*f2py_func)(array_ext,array_t,array_out,n,nout); +if (PyErr_Occurred()) + f2py_success = 0; +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_call_clock(); +#endif +/*end of callfortranroutine*/ + if (f2py_success) { +/*pyobjfrom*/ +/*end of pyobjfrom*/ + CFUNCSMESS("Building return value.\n"); + capi_buildvalue = Py_BuildValue("NN",capi_array_out_tmp,capi_nout_tmp); +/*closepyobjfrom*/ +/*end of closepyobjfrom*/ + } /*if (f2py_success) after callfortranroutine*/ +/*cleanupfrompyobj*/ + } /*if (capi_array_out_tmp == NULL) ... else of array_out*/ + /* End of cleaning variable array_out */ + if((PyObject *)capi_array_t_tmp!=array_t_capi) { + Py_XDECREF(capi_array_t_tmp); } + } /*if (capi_array_t_tmp == NULL) ... else of array_t*/ + /* End of cleaning variable array_t */ + /* End of cleaning variable n */ + if((PyObject *)capi_array_ext_tmp!=array_ext_capi) { + Py_XDECREF(capi_array_ext_tmp); } + } /*if (capi_array_ext_tmp == NULL) ... else of array_ext*/ + /* End of cleaning variable array_ext */ + } /*if (capi_nout_tmp == NULL) ... else of nout*/ + /* End of cleaning variable nout */ +/*end of cleanupfrompyobj*/ + if (capi_buildvalue == NULL) { +/*routdebugfailure*/ + } else { +/*routdebugleave*/ + } + CFUNCSMESS("Freeing memory.\n"); +/*freemem*/ +#ifdef F2PY_REPORT_ATEXIT +f2py_stop_clock(); +#endif + return capi_buildvalue; +} +/**************************** end of findrfc5_astm ****************************/ +/*eof body*/ + +/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/ +/*need_f90modhooks*/ + +/************** See f2py2e/rules.py: module_rules['modulebody'] **************/ + +/******************* See f2py2e/common_rules.py: buildhooks *******************/ + +/*need_commonhooks*/ + +/**************************** See f2py2e/rules.py ****************************/ + +static FortranDataDef f2py_routine_defs[] = { + {"findrfc",-1,{{-1}},0,(char *)findrfc,(f2py_init_func)f2py_rout_c_library_findrfc,doc_f2py_rout_c_library_findrfc}, + {"findcross",-1,{{-1}},0,(char *)findcross,(f2py_init_func)f2py_rout_c_library_findcross,doc_f2py_rout_c_library_findcross}, + {"disufq",-1,{{-1}},0,(char *)disufq,(f2py_init_func)f2py_rout_c_library_disufq,doc_f2py_rout_c_library_disufq}, + {"disufq2",-1,{{-1}},0,(char *)disufq2,(f2py_init_func)f2py_rout_c_library_disufq2,doc_f2py_rout_c_library_disufq2}, + {"findrfc3_astm",-1,{{-1}},0,(char *)findrfc3_astm,(f2py_init_func)f2py_rout_c_library_findrfc3_astm,doc_f2py_rout_c_library_findrfc3_astm}, + {"findrfc5_astm",-1,{{-1}},0,(char *)findrfc5_astm,(f2py_init_func)f2py_rout_c_library_findrfc5_astm,doc_f2py_rout_c_library_findrfc5_astm}, + +/*eof routine_defs*/ + {NULL} +}; + +static PyMethodDef f2py_module_methods[] = { + + {NULL,NULL} +}; + +#if PY_VERSION_HEX >= 0x03000000 +static struct PyModuleDef moduledef = { + PyModuleDef_HEAD_INIT, + "c_library", + NULL, + -1, + f2py_module_methods, + NULL, + NULL, + NULL, + NULL +}; +#endif + +#if PY_VERSION_HEX >= 0x03000000 +#define RETVAL m +PyMODINIT_FUNC PyInit_c_library(void) { +#else +#define RETVAL +PyMODINIT_FUNC initc_library(void) { +#endif + int i; + PyObject *m,*d, *s; +#if PY_VERSION_HEX >= 0x03000000 + m = c_library_module = PyModule_Create(&moduledef); +#else + m = c_library_module = Py_InitModule("c_library", f2py_module_methods); +#endif + Py_TYPE(&PyFortran_Type) = &PyType_Type; + import_array(); + if (PyErr_Occurred()) + {PyErr_SetString(PyExc_ImportError, "can't initialize module c_library (failed to import numpy)"); return RETVAL;} + d = PyModule_GetDict(m); + s = PyString_FromString("$Revision: $"); + PyDict_SetItemString(d, "__version__", s); +#if PY_VERSION_HEX >= 0x03000000 + s = PyUnicode_FromString( +#else + s = PyString_FromString( +#endif + "This module 'c_library' is auto-generated with f2py (version:2).\nFunctions:\n" +" ind,info = findrfc(y1,hmin)\n" +" ind,info = findcross(y,v)\n" +" rvec,ivec = disufq(rA,iA,w,kw,h,g,nmin,nmax,m,n=(len(w)-1.0)/(0.5))\n" +" rsvec,isvec,rdvec,idvec = disufq2(rA,iA,w,kw,h,g,nmin,nmax,m,n=(len(w)-1.0)/(0.5))\n" +" array_out,nout = findrfc3_astm(array_ext)\n" +" array_out,nout = findrfc5_astm(array_ext,array_t)\n" +"."); + PyDict_SetItemString(d, "__doc__", s); + c_library_error = PyErr_NewException ("c_library.error", NULL, NULL); + Py_DECREF(s); + for(i=0;f2py_routine_defs[i].name!=NULL;i++) + PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i])); + + + + + + +/*eof initf2pywraphooks*/ +/*eof initf90modhooks*/ + +/*eof initcommonhooks*/ + + +#ifdef F2PY_REPORT_ATEXIT + if (! PyErr_Occurred()) + on_exit(f2py_report_on_exit,(void*)"c_library"); +#endif + + return RETVAL; +} +#ifdef __cplusplus +} +#endif diff --git a/pywafo/src/wafo/source/c_codes/setup.py b/pywafo/src/wafo/source/c_library/setup.py similarity index 57% rename from pywafo/src/wafo/source/c_codes/setup.py rename to pywafo/src/wafo/source/c_library/setup.py index 966aded..d6d9242 100644 --- a/pywafo/src/wafo/source/c_codes/setup.py +++ b/pywafo/src/wafo/source/c_library/setup.py @@ -1,16 +1,18 @@ -''' -python setup.py build_src build_ext --inplace - -See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW -''' -# File setup.py -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('',parent_package,top_path) - - config.add_extension('c_library', - sources = ['c_library.pyf','c_functions.c']) - return config -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(**configuration(top_path='').todict()) \ No newline at end of file +''' +python setup.py build_src build_ext --inplace + +See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW +''' +# File setup.py + + +def configuration(parent_package='', top_path=None): + from numpy.distutils.misc_util import Configuration + config = Configuration('', parent_package, top_path) + + config.add_extension('c_library', + sources=['c_library.pyf', 'c_functions.c']) + return config +if __name__ == "__main__": + from numpy.distutils.core import setup + setup(**configuration(top_path='').todict()) diff --git a/pywafo/src/wafo/source/mreg/build_all.py b/pywafo/src/wafo/source/mreg/build_all.py index a3ebb32..335ccdc 100644 --- a/pywafo/src/wafo/source/mreg/build_all.py +++ b/pywafo/src/wafo/source/mreg/build_all.py @@ -6,96 +6,25 @@ gfortran -W -Wall -pedantic-errors -fbounds-check -Werror -c dsvdc.f mregmodule. """ import os import sys +from wafo.f2py_tools import f2py_call_str -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling cov2mod' - print '='*75 - - - files = ['dsvdc','mregmodule', 'intfcmod'] + print '=' * 75 + + files = ['dsvdc', 'mregmodule', 'intfcmod'] compile1_format = 'gfortran -fPIC -c %s.f' format1 = '%s.o ' * len(files) - for file in files: - os.system(compile1_format % file) - file_objects = format1 % tuple(files) - - os.system(f2py_call + ' -m cov2mod -c %s cov2mmpdfreg_intfc.f' % file_objects) - - -if __name__=='__main__': + for file_ in files: + os.system(compile1_format % file_) + file_objects = format1 % tuple(files) + + os.system(f2py_call + ' -m cov2mod -c %s cov2mmpdfreg_intfc.f' % + file_objects) + + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/mvn/build_all.py b/pywafo/src/wafo/source/mvn/build_all.py index 1b1228d..d856c6b 100644 --- a/pywafo/src/wafo/source/mvn/build_all.py +++ b/pywafo/src/wafo/source/mvn/build_all.py @@ -4,89 +4,17 @@ builds mvn.pyd import os import sys -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name +from wafo.f2py_tools import f2py_call_str def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling mvn' - print '='*75 - + print '=' * 75 + os.system(f2py_call + ' mvn.pyf mvndst.f -c ') - - -if __name__=='__main__': + + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/mvn/mvn.pyd b/pywafo/src/wafo/source/mvn/mvn.pyd index c76f9e22e335316ab7465e4ce3c2f602e14615ae..3fba514c4a3fc71f49a68cce7a0de96b6b4defa0 100644 GIT binary patch delta 35 pcmdnHkz?;hjtL#i4ymUncKb4QY-_x=^%kR+BuHR8yAb5#Ik=nxJ7 diff --git a/pywafo/src/wafo/source/mvnprd/setup.py b/pywafo/src/wafo/source/mvnprd/setup.py index 6a993bb..cbf6e05 100644 --- a/pywafo/src/wafo/source/mvnprd/setup.py +++ b/pywafo/src/wafo/source/mvnprd/setup.py @@ -5,26 +5,28 @@ See also http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW ''' # File setup.py + + def compile_all(): - import os - files = ['mvnprd', 'mvnprodcorrprb'] - compile1_format = 'gfortran -fPIC -c %s.f' - for file in files: - os.system(compile1_format % file) - file_objects = ['%s.o' % file for file in files] - return file_objects - - -def configuration(parent_package='',top_path=None): + import os + files = ['mvnprd', 'mvnprodcorrprb'] + compile1_format = 'gfortran -fPIC -c %s.f' + for file_ in files: + os.system(compile1_format % file_) + file_objects = ['%s.o' % file_ for file_ in files] + return file_objects + + +def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration libs = compile_all() - config = Configuration('',parent_package,top_path) + config = Configuration('', parent_package, top_path) config.add_extension('mvnprdmod', - libraries = libs, - sources = ['mvnprd_interface.f']) + libraries=libs, + sources=['mvnprd_interface.f']) return config if __name__ == "__main__": from numpy.distutils.core import setup - setup(**configuration(top_path='').todict()) \ No newline at end of file + setup(**configuration(top_path='').todict()) diff --git a/pywafo/src/wafo/source/rind2007/build_all.py b/pywafo/src/wafo/source/rind2007/build_all.py index 134088e..f143f99 100644 --- a/pywafo/src/wafo/source/rind2007/build_all.py +++ b/pywafo/src/wafo/source/rind2007/build_all.py @@ -7,95 +7,25 @@ http://www.scipy.org/Cookbook/CompilingExtensionsOnWindowsWithMinGW """ import os import sys +from wafo.f2py_tools import f2py_call_str -def which(program): - """ - Test if program exists - ====================== - - In order to test if a certain executable exists, it will search for the - program name in the environment variables. - If program is a full path to an executable, it will check it exists - - Copied from: - http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python/ - It is supposed to mimic the UNIX command "which" - """ - - def is_exe(fpath): - return os.path.exists(fpath) and os.access(fpath, os.X_OK) - - fpath, fname = os.path.split(program) - if fpath: - if is_exe(program): - return program - else: - for path in os.environ["PATH"].split(os.pathsep): - exe_file = os.path.join(path, program) - if is_exe(exe_file): - return exe_file - - return None - -def f2py_call_str(): - # regardless of platform, try to figure out which f2py call is in the path - # define possible options - - # on Arch Linux, python and f2py are the calls corresponding to python 3 - # and python2/f2py2 for python 2 - # other Linux versions might still use python/f2py for python 2 - if os.path.basename(sys.executable).endswith('2'): - for k in ('f2py2','f2py2.6','f2py2.7',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - # on Windows and other Linux using python/f2py - else: - for k in ('f2py','f2py2.6','f2py2.7','f2py.py',): - # if we found the f2py path, no need to look further - if which(k): - f2py_call = k - f2py_path = which(k) - break - - try: - print 'found f2py in:', f2py_path - return f2py_call - # raise exception if f2py is not found, f2py_path variable will not exist - except NameError: - raise UserWarning, \ - 'Couldn\'t locate f2py. Should be part of NumPy installation.' -# # this might vary among specific cases: f2py, f2py2.7, f2py3.2, ... -# # TODO: more robust approach, find out what f2py is in the users path -# if os.name == 'posix': -# compile_format = 'f2py2.6 %s %s -c' -# -# # Install microsoft visual c++ .NET 2003 and run the following to build the module: -# elif os.name == 'nt': -# # compile_format = 'f2py.py %s %s -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr71' -# compile_format = 'f2py.py %s %s -c' -# -# # give an Error for other OS-es -# else: -# raise UserWarning, \ -# 'Untested platform:', os.name def compile_all(): - f2py_call = f2py_call_str() - print '='*75 + f2py_call = f2py_call_str() + print '=' * 75 print 'compiling rind2007' - print '='*75 - - files = ['intmodule', 'jacobmod', 'swapmod', 'fimod','rindmod','rind71mod'] + print '=' * 75 + + files = ['intmodule', 'jacobmod', 'swapmod', + 'fimod', 'rindmod', 'rind71mod'] compile1_format = 'gfortran -fPIC -c %s.f' format1 = '%s.o ' * len(files) - for file in files: - os.system(compile1_format % file) - file_objects = format1 % tuple(files) - - os.system(f2py_call + ' -m rindmod -c %s rind_interface.f ' % file_objects) - -if __name__=='__main__': + for file_ in files: + os.system(compile1_format % file_) + file_objects = format1 % tuple(files) + + os.system(f2py_call + ' -m rindmod -c %s rind_interface.f ' % + file_objects) + +if __name__ == '__main__': compile_all() diff --git a/pywafo/src/wafo/source/rind2007/rindmod.pyd b/pywafo/src/wafo/source/rind2007/rindmod.pyd index 2c9c0c035860cd259a4d59edff8341814183a127..a038fca6c76c1cc669e56212040ff02bdbd8b3d5 100644 GIT binary patch delta 49 zcmex0SMt|f$q60I-l?Z2cKb4);%9HX-Flm`^)^%MZRV}FSv1drq}tifv215Q$NISe E05`7|F#rGn delta 49 zcmex0SMt|f$q60I>m{~K?Dl0&DPwEA-Flm`^)^%MZRV}FSv1drq}tifv215Q$NISe E060JvF#rGn