slepc4py-3.7.0/0000755000175000001440000000000012720314530014046 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/0000755000175000001440000000000012720314530014776 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/index.html0000644000175000001440000002547712720314513017013 0ustar dalcinlusers00000000000000 SLEPc for Python

SLEPc for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Online Documentation

Discussion and Support

Downloads and Development

Citations

If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.

Acknowledgments

This project was partially supported by the Extreme Computing Research Center (ECRC), Division of Computer, Electrical, and Mathematical Sciences & Engineering (CEMSE), King Abdullah University of Science and Technology (KAUST).

slepc4py-3.7.0/docs/slepc4py.pdf0000644000175000001440000036317512720314526017260 0ustar dalcinlusers00000000000000%PDF-1.5 % 1 0 obj << /Length 843 /Filter /FlateDecode >> stream xmUMo0WxNWH Z&T~3ڮzy87?nkNehܤ=77U\;?:׺v==onU;O^uu#½O ۍ=٘a?kLy6F/7}̽][H<Sicݾk^90jYVH^v}0<rL ͯ_/CkBnyWTHkuqö{s\녚"p]ϞќKյ u/A )`JbD>`2$`TY'`(ZqBJŌ )Ǩ%553<,(hlwB60aG+LgıcW c rn q9Mܗ8% CMq.5ShrAI皎\Sȩ ]8 `Y7ь1Oyezl,d mYĸSSJf-1i:C&e c4R$D& &+übLaj by+bYBg YJYYr֟bx(rGT̛`F+٭L ,C9?d+͊11ӊĊ׊T_~+Cg!o!_??/?㫄Y ?^B\jUP{xᇻL^U}9pQq0O}c}3tȢ}Ə!VOu˷ endstream endobj 45 0 obj << /Length 586 /Filter /FlateDecode >> stream xmTˎ0+$$0  a#A%߯jD岻fc;Z̫MfG} q]/ޭmޯo⣩0Z^x]fkn{E+{*ʧypg6;5PVpH8$hmڢ*߄zR:")󨺠3qXysO'H)-"}[˺s 3 4{pYdrK+ a }ѫW{ Fvm7344AGc ڤ_86 endstream endobj 57 0 obj << /Length 730 /Filter /FlateDecode >> stream xW[o0~c"a啱!!=MڴDIIҍ{Nb7IE-/ډsw嘢)ӀAKCÏl@%޼h~^SZ~?P4KXFOݚB;c? /D\c C &5F5}t{u~=176ĜFe_e? /ABo0!QaNΫI4S/ Q$BN K8KI^*b\uƽ$eK9t)C)/%y)E#߅t+ 80ḳ9l9*'8'geѤES{=؜VJAoĮNRmrcF)>ƌFiնYf DN8pau?a#-F! ɋ4iU0JXI玤zcf)&:<@{Ve`P8qa $!]Raxh*KW9DCx!h3Htɹ.(If> stream xڵYIw8WHg1{9etcw.I` 0HKlO HvOω$P(Ԇ@8wp'S/ N>;+^έ9azI suhDz̉1^qoɼ,svă,qW'iku2%K,zŒGn'|&ՍlʼnqJxati`oOOzyS}wlyJ;qoU9gUmo+mr|nBԢV~1]wྫmC\Qȕy[ՆD^S1pC#in'ZS ^1K]ETk@ u#e05hCd|QÜ0| 8Ű_PH|'g |}}5\[_nDrz]we) P[zF$޾ $&AQ\z,E ˜l0ճm.&SY }{L~Td!v?1)d7}ڢ|V[zSV9ՙUCٜE)j+N"jx$C%^fN-xh mAK͚xx`1#3NTC^\mDqšldן<AjF雒xnGl_1੗(NnTm'0" 0zg? D`3JmU_t&֠J;H!74zu!"~'=h$ăL?a81g^N,sĖ?CņǶ!jrFئU X;UUigH (h9 na*8XcTQ CFSM C fS[™^VmVfYJCJ,LٳbTdiA}w:clLdfHΧ՘Q}a6=TawX˚AV6[b1ph ],9:1$eiZ[VӔ0}pGLWT! Ayc|d\HS /͙f?y >[;Js#ٹAKX4jE`0=5f~ۗk\aqF(±rRNJA!)^P1?XYw}_<rFǼ0W˫|Om*Vtri 4O WZ5P>**[fxF'kǏ%4Xte8%m)(,xõ$>9c(LzH< > stream xڥY[w6~ϯRX,/"EuO'n⍵}IQ-IX;fn'3|Ex*ؽMYlmqe:0OQ,JU^VFaɚ?+AyYk}hJMkX֪r7߮IpxӰtMT*a 6m<;v}Ψ}p|lxmX8zxoΠj WKӈYT^ו(QKT~Ò)HV[JqiY^}j˶ } ;˼,ƃZeJMA' fͶ㋚%LAE /E(CAnIАU0Ҁb- ^9zsYCܔkP)\iC=4h0%HLZ.yVݯ; }.tXuڊyy?<"O?2fLR{!9%WۛA6q"@EFAIΉnJr#Hh |;xuo$ّpHeƎ\Y (=~RݲOn!3`;Qʛ`dk8=vzECbɧ0C`[`̽a (Jr3z6VUTnߌwˌC1@BW<;b3~gD`t=0&g{gB Olifx#adXW`}} =QzyF7~Ncb6&Y6̙9tMx &c3l$8*> 87 %I< vrL\{5kG|jp]WWՃ}=s14$>c\yT(3bW~驆":930M" :!)ksHC9c/fg0 ]Sso,šgI&G+0wo N> stream xZK۸ϯБh|*U9Y;٭x&{}(Hb-}Ek4I\5@7μ_o<}}wϖ2n3S*qbܭg6e´YU: fmڅ)׋eB ^N3-4y^uDXUՆm\# 4m n3wJ0]zgkq~8b-4P1ݥ3׿O)ZB~BJ[i.7t22{{Dm~J)ǦmU7̩ٛ{),8`q|[&m@G+d%[~rldd4!i4GËtjok2at[F(UmU< 0#æ@<>k:0(+]V5ۂt/2nkB+`Bd-jCڂɟc]2m}[0Ba~vqS8:+[[wF-/*ɡGDX҈ǂ=r[4LW{TM67ъ~oM-J)^+iqPKspQ G}H:zS t53~ '`"M "s ?q/^cqzp*%N:iX O3AREL>RkW{"ہg՗%\poqq8+{9lpHR 3DuVS3%{6S뇟"j?!n𼹻"$e:l } T bā!?<g~+|7(K_XvJ-t= =}IϸY'@=l @'R&EQv<Ҽ4xpX.Dua

~W<'a*I`䧾,b!.?AC yb%((rvA٣HbmsAq[պ9ON(oݦe}xl+;4O!C=綇a_پ.B!A19)fᬯ f2r2%50;Zf ZPn7uU<d%~>T,0P) g4&C|35?? eWmar'< )r>[q|(O_\Kк25xЛ;)CIS&'wqThpA7^|VzI 8TmZ7cqk!UgCަن))JpI&(ҖQQC. NX]3er|X$_[Ye|e9ߔXD3cz.*:ĩk U X?N+QUWJ:]tׅ: nǏ&[ UQE/uiI$ GzI.K|A^7@|Q/[\R% ltGHbʄl>y~|/~h^I'J1r`eES{,Z.wS<_򴫽R,vJ2{S%_ |͟ 3 ,wi ҅0d\-+)FjyX vS Mׂgˎc_C~gtThVm9>X47տ}|uLJ$/2ox4~rI KX$UIoRd!x7u]nЃ.҅&N2h~_}@JYw_5YjZ$Eg6=yުm¶&˥z4Q!E\Ew*$.^߅HbWaqiU6#ôd> gurO7@|#>PR{  W1{zЗ38-sXͫkӝ_!4lۉҟ \'H |OJZ endstream endobj 95 0 obj << /Length 2228 /Filter /FlateDecode >> stream x[sFV$̋sͣRY_ow@vߧgZ#n]e`i5upBS9N1 ?C3#!ug΃td Ixp:'jw 4`SiJvPֈPƚ| pCP^ҵ:( QS:#0su OεԧԽME0ps_bç5|`B)$"#m^c2Ho\#.*;Hƭ`\߾ b"+[#ە8GD5 һd=Cw|譗3x=Ho0=Ӹlֻu|9 ݣ u~i;;x,j6_תl>gq4{FOc;>v:==y^-Tr,G-ۼ8(zz7S*1{8?qv;| 3: (;i/ߌ5HY35bg}HT˛Tifn?49jT'1eN9ip(EN}\ 0]r~1UCFA%䣽 f碚]o> oj9vJT6ԽpύӵU-Dj7\Y;\dE{3Rד g/H|ȓXd`P!3[AjǕ1#`cJ;t U `0ij/쀶UL$Ta[2l+iȗ5{U*b`sy*4pg: . 5hGs:4I1kzSP*bcNzdd3g/W*yUg1I#2 4󕞄/ \e!̞ͯKC4Gw{cdyan>ͅ+Mh=h}CAt_LiOEoC#>ZB!)' l9bS년QXuWBֳZUpgZ*AAE +V&wqo?>mk!WE!")b(l^$cx[ׂw i(˄Hʹ:Cz*Ynt %:}|%6 H/VwVӪ4(uIXKdAʞtvy\v,F o6t!Wsd{2S!) m+Ⱝp*C5Հcal`"rXpXp/ښ=`3SEܠwpxf7|dY0==yBaþlMEm;io2 d_-/V֤h\TIUBҋ;UTa5zy׀׮!ohlЩol|=E”=.uVf{CCF 3gI=>}hk\r Ԫwկ|AcoamLtSoΛߔM^tjh >Pl:wu?%F­BV׍u~pba2 U' UyZXgRS{O\U-Yc `u#wӖzCPPi5?`i@:F jxoz}oWدwØn`ihFMb3L'q>1 ak\5J]UHsϲGBΑoΜ 5KJo0ʉ # $B ʠ-Ve | fZFa|hA%K5joӠ0_=ژ= endstream endobj 100 0 obj << /Length 2317 /Filter /FlateDecode >> stream xko{~zu%)"{@QaP(2m"K:Iv"?3|Ȓ<gۻ,8PY9߿^ 'bθsts%˅4[ֳLҵKۮ˿=""PiY4Ԁ{> ,VnjIIlLX)@3f)Ψݖ'DBt<2H6*+HQ%u;.~X,bn\Ʌ&IeG4O"*09caQNC\%irP8+5d7vۚi-hXdJO2OڬƝWYz! kmiYF1m5A*h BH #00-SS6+ ~}Ϩꕣ;;< 3X͹j^0oR"UAhOm˜e_1F|f `!oH‡\c|VRD=)BXIZc-gp<ۼmnoқXU}I&?:[_2m0b8h}Q4e˯Jl药`C8 ~``$ygOULjFK `7p82ۼ5ո8oL9ǘ)Ǚdž{|4O$j$͙Lc,ƒ&)<+̛m`sg50 zt,"}ݹ1,ϷM[} OFP%lyLYakIӖ=2 NmQUh<*5 N(]& lfؑ^/ˢkS6u.򝼥^u7dAw6o:t7J'^Vn!{NtBU>)#ZΠf0Up1c1?Wݵk6U܇|TebMysRMgӶe B!d3XdYvs>7k%8v|[HP~$ 5rפm=ubnez*Ia|cpNօmYU$N:de9&m۬@ B5ֲ^ RX}oL#[= RjEQgwb3݌ = e ~<%C‰'C$b(|Sn#0Ec c "Ad^tNs6N͞:} (!/e ΀ȶ5#}} +2׷@E ԗ~/QP_R<$H=0G$n|%n|aV $]]1U3 jpT'B-ތAa&E* Z50p9{>6 1yr;)/ Ɉf{diV#~,K@a{Na ߅ܙPNzfV WN1F׋>ЈKk:[1]ݍl_"!Z2q}ˌ2i`Eols38N/)n{2_)~i]eU9ĝ͉F~>P?|5#ǭZ>GD&W%qA_)ô1e2]B*SͨΊ~@VnJ˅U3ZX¤Gev#L1<Yo꓊)x/7pfY=W$\%tԈ3>P_ej=Cm1:ϭnFW:Y͓hT,[ endstream endobj 104 0 obj << /Length 2099 /Filter /FlateDecode >> stream xڵXms6_w3L 6i}f:iSo!);_HF<wgzkzo/kGy I/^(0xڍl ?3Y+Iu6;n|5pמ\xss )<1{$i~'ރ{A( ye?$A<'z~Nơq#= xqNrդhEz8׋u? AڵogFXr># 7Riʾ0ɯT5jHx h0q!c&l~6LMY\$[Hi;ʶwэރee^>=jUmjZYFbJ#.S=jkWתV 79 %6*M,Vw[-81MSmf^*uR}+]N݁?iH u 7vb%S2ńt$SL go×:WEs_C8=S+$P:%-3X]d0Ĵ,l Lu { twʽ8W{Ϝ l2X4fuVE* 7,d'kS.i&Fз1sl ZBA0uBeG:n8F I>7nT5 evo ((FaۍrWN߯N}\mӪO˻9wHm\ ~PK_ !.',p'1YЈ0 ]Hx`UY̫ۡmkɒpx1~8sȎwc,3G+y}pm* ;WuxGцCtnGioG$olT"$!Ś # |l4..u6nKoh'vIkJ׶M  A~+?U t3'M:/ $ 9 gASYb%`ͺb*aTZ9m7&|jYgec7|?%N!xiĩy8 8R )|FE@ɨcj׵]>gl8QU*؂D0v\Ytaqر\lgeUgNfAF,gE7"gqS yc1 kwCtrre<C_l sPxJp@>oN1Y'MN= tss|rk qw3_,$le!ܘx>yH5Cluσ,fL[1%*~?\>nAyjt=]AIz?~/ H¢qab4epf-nX"™#B/!F} F?#&R@~"/<:7s eK󞁚=FSQzý1;P$۫K 3ؑYL IJa~dhω0u~J_޼scο‰ "Jv!. 큡T ҡn__^M`X1HON\Sfh_+Uod5euȉXwW?kBKET{XtǷIi=$+8WV/-.ܩ99%4GAx_MGȍjks endstream endobj 117 0 obj << /Length 2103 /Filter /FlateDecode >> stream xY[o۸~ϯyEyH۳mxmQ(b,i%yeYq , &o¡#j_p0Gń3I7:0pnʕ} Թ:6qG=F:"<jH(ccp !\ eJ|5=Q HLo;>UDt|g*JG]_?x'U)p츌Pn8^q]/Q9[i;s~DfdUy*.5x 7o'|Oٴ. ‚A'`sG݄q{SN^Z@a%PB O-QAq$[d`4Oz]'iMC1W pe:)U6l]'y]Dިamu\ɒyfnΛ/BpOB!̢uF' Řh<&x4@VEUՉ>=(K7yiU9e @L#cPr;˿RIc /_%=y[/^lc6I\.-二$HDOĀٲ5c,e4<_ ! 7flg`mk>WC,"S{o5z'\㹑e`4\H,ͣ9 ES>g[)aHZgo96{9<0DA=P> ?``!{!U`!ރ "F星x/$@չH={Wӝ Hac+K"Nn"\g-?>c\.ב-01]LCTg']cZvǨ:Rìb*HH^ӮG ZxbLLVXX5x}gѶ<&ڒ`uoksks۠w[L/˱+} #g!_秡\\i<+8^im8xW&8)U|,'gg N*J-$Ӆ}Wѽ`:^8„Ul/Uy  D*MՔ e%C˜OO.ޟpq}zrl:j% MK!JpB( jS4`7WD%aح4 ǭx5 I՜oXsE{a  {5STUҔltKQ`BÉreÙhmuiޚ㼈J@2+3ˣf\!wYU23M[泸cgL5ʹ8ݶhdVTKʽMeDz̫ʅ!FۜݺmdzlNz2n[49t]KpHZGH]1Oo2>HWH endstream endobj 127 0 obj << /Length 2191 /Filter /FlateDecode >> stream xڵY[s۶~yfB$2M/i;ڞI2=4 L(%Bh'!\][{ g#^DPi쥛oA+PG3k"o]~yIAw2  WZaL|U.BțܨӝO tm.J;3oT*Smw Wn\Uu9E_l˛62c׿L" 3!0}Il xz5{!HrnO kܱY@DPXb>gu_WM7#aeOE@eK:JUpl>nw(l.~vj$T7ܥ;?,(&On Ĩ'EiS_W9 (ĞI&ҴIYڕF֜(;QCAƈH:~~uӌtAQ/=/\D@9۫F٦34q@nu6/e^]R:F4&jkMY{q˛bEahl (k1RIc1:2FC2{Vg_?%ž8E]YP=Dm9e[:&7QC(ԪkO"iһ= ҠG@!C$"xMwtp^t)>H,@c* mYj7a@eDcW7VCM6oz2**}e3I<אVz`pBvINPd DICOHJm3'P%||h}+!; H}a9Daɥ1YqKga-B48͇"_28 w C^B|$6ۮnC i(T"> V`Oۛ0`f +'+ CX@:sCw ۖ8X=v.i*FB `0 v^QN.NHJ?2,-X(ht칂 gEUDdә34L$V]PQHzD엸icuc{I> }R90A^ھ͵^,](n'@hm<1mVZMI*U1El;e;^A3NRoC]b 2.-Z ,5%/t׷=o& mEǻmꨬ:B8N$CDߚv|3NaL~&)hxPKV0WKh"Ь\if+e <ûJ^]!uv!BI>Y:W 9i2sx,t}gd6"]#HOD =}ЀfDpOHΠ-ۼS3I;cn!$0~w9qU[Vcoͭj&!@OXVM R gvL2,|8xc5R*m:50|7>O)\" uͷcT eT#LEpmC苞K$慝:Ҙ  I=y뀃q/PdIDChZ\Aдo2-sNjAMnw*;7 (b۽Nf&Nz{[5pc.X*&}_gBekQwRBL[P;xdsBo(YEHiUg BoF"?ľr .5&^SsjMlKG;]޾ Vpꌯɾ6ZAoaqcKtCh{Y-S!]j5tF˩GT KCP_8.BC̤o;CgpA~Exrݣ7^&b%ƺFl6 L/Q( BGI?Ү!X_n$ur2͒b.(hwAs]ߦIdE=,S:6s;hxUOzGT}8qi"'WZ*)ʎ׀WfQQE`\f%, lRٯOpvs]:F9yc&'ԌH8HqA*G 9|c!AدO 9_ endstream endobj 3 0 obj << /Type /ObjStm /N 100 /First 793 /Length 2077 /Filter /FlateDecode >> stream xZKsI+h\]P8v;a{"vFFmDHֿ/ATM]Y+FEHƠT"fE^') "H>u*F1n$8*KQN. Ke3y8) wK;cgL)!TdUò.1F9N/!-%xNdg$jtq}50_s)NG A)L"gRfb"tAt& 5TbX=B]Y%'` Y~wlTV=y 2& b&ȅd:qP5c".s&8׀V z2bֻR0xd"Xr'^pG@& (0!(8JWaš_!AskE##47"<ÛE rFل!#;qQA6E \(zV1Cb &PaΰD2gryDLUCԳI٫PsenM}.8x/;>/t\NvHs+UrX?&?~ոl005-Ԥ{>GR_2iϭLäՋAX܌ڶON`Е{[׳sMjjONc~8URO` nUnK^ RNRd:ŇQ_}xScXO(]=wyᆴ ##f`1Ği^ 湐(Kr3xZX2\v6wӏu__u5* .sYR-\PE"6&dNZb7^cBھ{N"yAKN#I8Vǰ1O $Ildd82§27:iOχ :dw44<;/u n7o`lڀMRr9mj{r:llXTKIf@.:7YK En(a*AU8n{A^H=p:\nz,#}4kxfkhͯ#ʫ56q{_B-䢟UZ$גT%fت[MbDlG%I=fH I12.DICQ,87(^5+c޽ϳ/u=GQ|ZWdPz_7{vDfJ﵍գ 0s\I='w0)=hTA[(K11}Θ;MwfXKx aMCQ[]&;M1*I8+\ E,B xN6M6Hߣt!k4'Br݂ IZpJڧ8dJSUXv9ҌV1F+lJ#jE }2_I t_M>%/L.).pئVۡQ(N3?}/\}WU 2=Y(W7z\N4BI9vPső ǘ!1ls{'3ǝrx#=/wQnߋr`ogsc endstream endobj 140 0 obj << /Length1 1606 /Length2 7007 /Length3 0 /Length 7820 /Filter /FlateDecode >> stream xڭVuXݶa!fT[C@T.i AC.s}{{^kwkkg?yk-)C!Hn~> 6hrCFa'O ;$ QC$& "<(@ap3fo/?<;`'  {Ftn MEvn]O{70  ; @췋 ?8  0 p݃BH!YutC΍߻PH(wI|0^ A>߹A0f{ Cŀ 9@==Ns'H͑_>'y =(jG(/'>/O~ = ;(rՆ"So*DH?"Oܿk?<ZM~`7  }X;w￉{ /D iw9ӽ|<|eA:{nqн tn_.ÛLGOQ({Ց{b]់P? [@T "oZ ,KSZY F :~izz9cgA ga |@7hɏVZcX\"^a{SvLW6v]cc#_@+K(F(u)~ƎI2Ʒ=}7Xtc-L^dg0@`ZuA`KW"M ) N!<]?A^\ΞG\2 1+dK,T!CELj ^ *yWڜs rWyğB @͒'^_O_I{H0Ri 80 Գ5`ʩ|%4ANL.2vNVX&^| 2 KB#qJ|%Xx.'*5/wߧc$sưƘ-#`>͕@V۴8p[UDo@3$}AS[#E/4U Ab:*uM8|q[[@v)S 3\KW Zw׺#bmY _m-=pz@==oXJx>g; R 'ULPD4*Z2J)XK[QE`blnk W/y" `2d 1>!\wp8/UUDs0GpZ_sXyXY՗\76ȣ}† }e=茋4)I@AյgdWߑkg(l #AN$ _)e?_Da*YӑN WAu? :.H&r%F?1%軣s+S99}I TUB6lB6 x?;*hP]XVHG?\$cG99\77vz1-JߴnbɣIû$H;R~.[ÛS<^I6SA0>AF75uV ~*-,% ߭\\.H EyotyZי5cf9eca(5<A wY,6 mإ1:?zվX] ^$_V?T y^[Zml9y2-~(-|igτ2|Q2/\NVOd(SXpi]/ݍlN%#@Cbᙁ }SuH[oyhdo~MSQILCm מ1 ( ,rsUj73ioJ1;͚,)pQ٣~9*BOFYFGq>1@A; ־yUr ȵ8ԴoXI[j2əYh'``[μ7;lnu!_252s?$?I$(ï9 1qAi# ]*Ȼ#}[[>aNkw4:5\|/!-g%]"!2IY?~p>%U$orZltkPj_qDjҭ?? tKX$pIF*+HՖ؍{x:y+u׵OW~Z%*ᢺwoD7EEH&$0=yq>֗|+T}{"F7g'n Ļvw TcJLd1GDqgGd>ct5,*eF yOWEG'@XNfKsM~!wj>'v6ZbBdL!"_Ů{q1<_IV$ny|9k lHȳ!FhzoLy8+մ$ԶoC+38::㿏0ᯈ,Mk*gƞ'"b_EVn 01sҠ5r욓Q(TWhKO2GZatK!fr;OUDiHI7:~Y?9"3BC=!.<۟o5S#_(g}@!"B]1'%(,_2}xZ8wR),UrI2^tgdF1 Y IgcFΑm2P1MpG"H ;OA[gccD?&xOѵ-R)o(wDr2BRnɦeɚٔw֣^=KlT(i RcqeLIҍ 'z;dqؽjH1jD8r<#gJ;o JQt IL&]mDEf"g{澏v7*Z$6j Ki7aŒX/DxZ|5E QIvc Zʴ<"ь ~˚WmjE:.;"YGۯQuJ,]zL(_ rA78  *Ge +ILPJhBe5A1ـbh ICӷLM1Cdz5 7IN&ﴉ79_ ٛ&4M9󪁇b̡?SdM}W?r|sVۛv1 x9.j΅˃:gZYÂzN@9k1p d;RzUOWa);RG?W'B 1?D/lN7PIO˓C2^Km}OtJ#pO":4a~N֬x8^p)RPxg^dPj He n~e5ERzΔ&g3|wܙD_.<kQWC@ ]n$ >|h޾zUԛſcj(!!qѮ$乔ެm׺ELo2xx 7,8>$gkL#]M XՈ-SOhES< r-|_×6w !mtag>NU'q?ʼ+| ԑ5X&Q84 WimsvN|Ķ&N}yME:dE۶:l누M-~./h!`\A 1 @f.+kJ&N)nK͞<-?(K{Lds5'(f[UUꞲ r el8DU1Iqg[t~;.1Wdq =h8܈wvhȱ0hǥQJbW1!Ļ)p9dX?0Y2/\H Ӷt@d2S0jɅ{P:dлX佋IV,ds7.˶B5-3¾f=o%b; pY;ko/Qsp+SڻҒa}*ПMղ?s=1f3!̜} |ڻْtwm!mskg8gee4ɳ.r@D=^6Q5co[qZʫ4ְs6LڕdV-$lN *e?tBi-Y`:Yӈo޲ih$#Ь"DXgVe\ҦQzbOu?)@8a%47ch`A[{$cf1"&ƞpa>݄ԩ_gjō_(x'(]V)Q?*YS.cr, ?Q0gWkD&h!gGRW{{7@exyǙ,b9 1R^apN߹: NRoJ[43Ռ܋[[Źz(?zxȻs-DYv+S `l^\ Pc?|:^VW#rHBȘer8uC[<ΞzK[̐tc'KW3Z[= ύiVKbo'|>Ti?$ 21V{LJ R2 &αڟ~iiipC Ȑ/e}fЬ"6_z[:<ugM̔o Fը\;ّg'Oo&|Ȑv/Ѷfp4i.iy}:d>Շ^E4 2vtd~\IIIVr]3ɗOoxx ʤ $% ^6jyHk t`4Ĝnp\H4ȻP"~5Sn.IG{>Bv?b!dfËja69`oREw≏?ژ ObEE"ojv)bRM88,4bWҳ)"Xc,H26yzm`K,@-qT:Acm&EҥϤ뎍>t˧mX gᇺU 7/bf؍tW#t|x)z,_์KO*p*S&T{J5[9 gJ0y%Qd$^MPŵ|>h/~\VʯiUu%%cqH$\Tv`'qM~+BHJK>Gދt6pdK|ñjt_؊f6jSb ¸}U%Dg_̛x5 gpxzHW'8kI O7Z=W 29hUš|pR_uI>XNƆ=>DC!uMJ$;OlCU2]ǀVCi"!Q$д*ГŽstښztv!xu7[s"7*EHnQ7w@y!ZW“Z+5Vx&V RΓi4''VdOTΦ:~F5,SPL>80}F;7&1_{'& (|cY 4,PC#f|`S]>py*6B MZ:ȥ1\定iry-b~Spf8xNyi|82MtHv/~ nE,BK9eLx ޑbNɔvԅiI seT2'7gM>=UD~-QU#Mj=skh:YHeg*"^FB[E#sZakèsg83I23>$3xxkY cѭ-D,80$Dj*/o0BN2&yRw)}o<8\#;B;}-Kd"pȸ[Sj[k*?0O*| \rdQЌ2 Q幁^cQO'GTzEW@d|zmv  3AebAR0ά t|/a~O EYѻѝ8S`h|r8i-9ᒠ֜_TPcG3.O0E^}:$a~&!Jn?D8Up[Sd "3M?N>f endstream endobj 142 0 obj << /Length1 1612 /Length2 17583 /Length3 0 /Length 18413 /Filter /FlateDecode >> stream xڬeP]-;UX4и;4N̜{sGE<;3ʕr'"컢 P֙ oac$gg+K 4s58 -lE @h `f0qqqD=-̝jT44e'`;,l\v6@[U@9`ja ((jIK(%@[5@ ka uRL^lM,)͉/d4 n E :X89}X8 m`aklbvSwaL7y::`g7埒 lhap;0p6/ſh8YؚZ#/?:[m`6cbon3 [8Eo\j?3Ch o7%Ne9$DwCUs c+Zo俓+ҿ3h(;_QwVK"gg0^tO 3 oBN&&C0ZdF>o0bv&̊O?ncGǿ-?t h lgl\kRTg W}Yjq]_z.WGm}4gҙCi>LkTU U!y'Q ~bƹF6;ޤ~t'#3?k?:7_㴆8.&ԺsOCc#{o!hr`x |Sξ';{8>4Br(!Wӟ'E:]k 5{A (l&˘SrPd+)'Zohb~m%cmmtD1͆i5c†*9tM@C_+z [")V_]~-f?e}Ir(Ma ӬGYczHh#(`e]wnF )@}"&k_JLp^. ^%m ]O0 1] wU~GnW6;%YRÀ(" U裐`@a}-O@^4-ǣ4m>nBa"ВS(5V}OWҳ?[Cn )#adoK 騥tKaTem^@+02KǴ#Q$׬:T晶mYJ}@v}A7pV8;58yנW KihACaubܞ "w4<=XZ2ᶦ|DtA?Vo4LZ d+Y6Ku^`ZrsEC=\vr҆Lu|U*vL>XIc R @Rr8$^9LɈ.ȥʧc 7Pu>] ew| .3O rTʒF?:m=eg8lMr*{5w w"XY{o4oH,gϹ(MKך"&|L;ok'-%"-mɜ>;,\ |Na"?oee g' >jό<1!iwR YMQn]=E LY1chUg!rʊ9<.h*IڧH8\p@e0?v t-9;ӸNm/(JIWރe+C鯅FU\teo!@ b絔:醬K!K#5M ߯7Nla&Щ vKmifNMt} 29 |IP(8;)!-3t3E/cT Y l'K6ñ->@* خR%5K\(; 4ә v28ǯ'e5hl @na3cY+ *&ņs ?Y }LYCpr jO <%tBB?׹>]A_D2g ĥ6d@"$+_s?v"𷳦aYKy.ujxg> rArjp$Ldu 4(Y+{\9/f33]8 /G:'3@ac[#̬M7!;5 Nrp*T52nyy#4dK7=򉷤2ܙ6ikD@I>A_=u?Ev7-xMN0dt`eF..]2wi ҆+[  =W$p'y?~iqP|hBDa%fG(k/#pO ;$]rl[YKӗE\0.s[-{ ʓBB<?ώ BtD)!L Γ'v^')yT2TL- &sܕT (0̓Ap 3/^O޷a`x[զ Kw*bt9[u *3b:Vg]@Db%`\O{` AD2ˀJ/ڥ[B׮nZ:񵓢%[׎Pӿ#GrLÇ!" 8 $CCV}1+8 AnFxF,<xA^Air$-  72y9eD+A'uTn8DU5O8BpaGVn}RIkBc- վdY7ԫ`V_RνϬνBtFPIvzD޾JrmrVgb=75V6j2fANOeU [VNRݒ}K-xUR:RY>0H~fCm"̮a3 ;JnP]VfuOvb>|I+E䲚JV7QMYl/^˪zzI݊ȏ*e?B ;6D t W\CZtS/uid6^pJ?Sλd;kHCe:~x9Sޣ?L4e;O-)teB/Y+jt^'[7sαŋ[ʢ]8&l29K7.d;SyƏ$P~>C>jF4{K-jOa!<+mp,A7uL~'dFFT$ d{]Rt1XkIYmv +=LP}wͽUG|[d^+H %q$.kح$wl/֦ѫS! r{IbѾ;bs'os0)Z@.=T-G1c22s)?݃=DDY!yOCd!]@؍8Hr J8:Wn 6pi©G稝+IL|Qs"*<ڛbA' 'X\R I"cFF֓vF䨨;8+@n TI&$B0IU'~Gذv?[Ӏ?u-UɑGMG_鳤hZ;U7F`@zW~Iuy|įN=cYx0/me$_ܡ+TDMx$5lPc@E07 jlSհe -pJ*b\7NgW,||tz2@M3X=~Ď2Pځ0qi&~Vf M#b^gG~'nZDH4eJwl}&Nõ@h3G43Ӗ]V1;E.x>TM,FD40;vn"tnֳ!&ߥ-Z8n LB #ppFhRۢz)ٵfi={ ֠X&њߐUDc#7ر<4B*+iŌ6nJT"}ც*^ԋ+'Ph"# {'^.̎Sv-R[ΆBy\f5ZʫCaK~XM9 ar<#Tb_#t#e rT?pı^Du> zƕ@ 136D&tbo*3OFy55)9X8ThzM8)qiGId;N7 v)Rx?|cVjp>ڨ=́tǐ;Ú6au\ba|.լ٪ #ս>!~E4v/9Y-f*t`[ `#X?yЀe (a`fY35-[m5QMB;U 0  P .[:J"ŻHZ;1A=@kb 0 ^ؔTl)I<CS/) s@̴LS4K*!mvlN0s: 13Rjz63J@洉ijqfH }7P4_!m8Z 9bU kIZe&anߒ[bjYx"/]RN.|0S p`ely߹%]`fL#*Ͷ^d )V.+"C;Ā!zfj,y߫SDaI4\KRdϟtX8:gPA8;Rf^1bBڮXö 0|%~ScMs2\-A0HR& p.`~bs 2bRVNYWaށh-=(LB-ϚkMaP''$/f.-C~_%_*l$t#l}rbw:\ɿ-3u Q2ۋ= 2"˴ܾ?T[bb&F@ n@A 09 lOfF>'h{ZS o=:B|7INuzuj5sӻ7XkmIޓ6~׹ۺ xjgÅpG\c]4\W)^wݾapkF7$* ]a܍j}u79(ǝ3e0h]_q'?[) j&b4\rkӽ6{$eG[IaUEc =+P竍Ƃ/(薔Y6{$h>N{Ȭ1-yTrRɢ^úBImSKzp=Ep#"k*Ltd{E0s/?S`^qyC#A1D+3ة=$H,2ǡM >?gNO⢴)Kx ޷̽ 4%hp77?ra-j> Jyg (y62TҗE# x8~eh0ʹ/%93_n{F/gee#{^f&ݥYC +:ƴݎ h{Amo;iןS+X9*-f}k@j+d~Jr'BzNT&h\a&z!uS)+׭ֳvLH@MSŦ,Lk<;.ދjJ:ʒEi0,MRp\]ϊoWc'?hE*=RX$Vw0\")ө,2dEvkX2CI6XJϐ~$'x'[7Vap7W5)n$̯֩PYi=f Mwfv:ݟoiU8̇wu`m X5+% ~=q='ǹi=1UL4Dw1Faq"V`wG~2[80`%HRD?8cxT\n:V&pY׳ɜpM҂^MQ UB5RЬ&Ϊ;9sƈNx_9d=G:{?~(al/ޢ߂rkrUK HP.O7p<նGև<ukNCt+hv+F`T(|#Ǣr̬)S*! O"T- {dNa%!7@_$܌JQw|C4h).N^ثV}63Ϩ%%.P+j 8 VTWކ=!1! QM5V = ] ڀBbyB!QYsOצ)ΘJ :tI ٚ-ږy^Cp^"2X>͐O:FBH(d*ݼE4Lց$nK2F$1/rZAsϵQZg8 hEqdL?FGCcvtZ9?"1Ggyzj#ɧ^c0[+.J!69W^Ԟėx~JF5WAoO (EH{\ `fP+hd¥N`dډֆ;_v:=kQ߃"0 ':}3n!—y]ކ9difzjks{rEgv\ѹ ډiNX^M9.Z}qw5^7\I.G8o-In7wg9m}23\W|x2" l"ÇD*Jw?~_/$,V>-&p Ld?hJ[1 B%3QKIVwTQ gi.-d~(ʰMqm=?8qؾy.̲t%i'1Rw7v?CPHt]7xkXg=vz.A}F/M+*Gz|3H֟~5r %kgpȺ!EpR7^6m.%)אLͷCvwLWr<J5bA{4@V<1a4\ fu4L^la}|{?COQTx%Yy"A*3jMiu'K6*<.ڭ?]T[iOG3\d#v8SnKZcC11iǙ8irؖuOpU>; scS=߰$3 m,._@]=GHJ= òV=CŘ,TSܓNf6oEyoޠd)y:j钪D/Hsa7e8eoT=8jx>&UY}+])#4Q%(XیƝVh5I< ޓhGlq4J! jQȟ' 7 L2JO+Abݢh́)!?} 'ڂ/G],Ѓ !EV}*rflNʸxvu1mmͦ7eKrDd Zu764p˔ĀQ[,G_fjMx;e!QŘw"h w6j7m^  D"ǕPfB= mƙƯ#9RSr csf 0fA:ϡ?nXaB.$k,]DO܆#aneڨu)XL ƱعEk^>g +Ohl/VVr]!hT%2΃/n~k@kmPotU/&>9:`Y7kʫ#Gy;dns#棤PjXdeD<{+DyaItP%R₡X%;6BX:dI @ P@ v_&QPq1 ߪcFZU~' Z7ƾ)`1 0i6TW s5-"NfB1Ʊ0?}R BM㟑Eyt I>CSaݘY >%d/qޔ3.bI.|㊌P$#BFM E\3׃^{ ]!cN LK~u9p;ía$6HF( sIwǾF{#]2rʱ@ |ѱPo*0o. kD?pWZ״ןv@ľxXʸi<v;ov#z5`eDq_r@@UW)9_|lƦ˂ZN];.ƞ@ yFДZ)ߚc}7xѧK~Z3 ˝uQQn*k7ni wG7e]zy7 )-m0);ѧZ§Mݦѭ 1,Y_QQ:,XNIqG ³VET5@:IO~Zθ\|DND6fVbsR3UOwJq w !I]xz!)m c69tM-&W"7/$^ĻuYXuCWٞE</JWEhmǐC@i1Z1{@dB%ເϧrjCx1+IOln{TnN7m;X !tȧ?Y}(.^(Z燵 BwY@o T|Bw3*֤YDʺSE6ظDi![HVmaYss>EAcڿ> ,ygt־}6_%<'嬼s`R|ZWcSuHɸLaLX?t\zyEͯMI:qg0UG[.GKY;P< iD~6u.&U6kg[d% TdRzHb*m!shn*p"2㾃b_by*f!VB쯢gnm9^Yvfǖ]hIb&( cx?+O/5G8Ha5?`.P*[Ujyj+J1lLT]Јλ)JG3 q5:yR 7'̥߼p2 ~ɗwa{跴5L[(3Kc=" ОT0/5"9o]8$oZ;Lh@fqvG9} Zdyߏ,u{Ci:+JM^&ѩ'=T.2m /?]$ޖӨkEX_ (goG *;p3 AbK|05OAۀ$Ԃ>$awO)65q&Xf_jG:%\6&}/U),U0l䏾!ǐ :gC K&0 cӲȾH>r;9萬9ڵ;ٴl7'\33hJD &'^o^B=',^zshjmԣxlnP_{'ÂsI&K):siUP ' v"E'q? )uA-V=Cs)PuX`/T5T'UIojII\kzI> B$7D]WtE'R9m۰@3|6aaQ^"zW< "܁|",GyJ/Ϲ ֤~^@@X;.,_~NKZ)snK/lo!xPnIϞ`8k qL든gCoj)23>:(Iu]TtU,]GYGD`[=s<.H?#UȕOQT#8nO"q } ]a4r6X(4o"NpϢ\w-1i*Uؤܻ^H)GaV]GKK$$D>4 6eazSOSa*ײ^Z_#U=ɱV)nW#A7(ɀ :b`.؃orI!I-3FQȻ88H:Njd_ЫEZuCZ` ߔOm}FJ:]#ĢyairI\$Eup@Tɵ0Ő|Tsѹ`8 &d2_;Tf]~{Vg}mB 免0E!15>&D^74FC["Vp'1ΛO_dBF̀4\<X+Ȯㄥ"[}ݏ]d4J.g(doms_kka[3nnl2+"-Y(q2hEՃ ؛h#&j껞݌}ɒTVeK;=CjB0/j\:7(J# *;oΦ߼y+ ;W+XD?$Jٮ ǑPQYmٻbxȂ=z8OUWXuWѭ@LƇ_x F ৔6:h4lrzǞ R}UT$ S2PJ孼w)Q4Frch8UַxЗFS2"-]1D+,N9(mu9-RrNQ.OzILƴ1[ãhOw;RK:J;#ζQŕCz ݠǶ/E}>+F7~U1x3x~8ek&(F 4'^͉&ytS|7jNI8K{ Nd[g3.>Bg=?+ߩZle:E+\x/.ںq) GК!?+l?g~{.5S>+ܕ3&$;CRJš yR |ŨC #ƼtܻS \fѭ~0m*›9TxA]T` lAjͬ;IGMĵ\bfbhBYzX%x%nx4Z*xlF }KRw\_䲕yBl_y c2ly>N7r[M28?9iHZQ5'66d1NJr&Vhc_JXUM1UekBO8t+ zdmzۈDb}]B3)*Jڤ$-$B-& 8mKu|e+xKdEN_a.BԤ^_hk5vf5Lz0q-`2z螑0y-Kp8lI\o#1f@M.U dvwp{8gHԼ̫A8C@UgƊ}کvތgR;W BّEM%Ot:{TYтQK7ѢI%P7n0E}3#\ޱ4m~#GAl';P%q)-4ſ e0W ]tCr?er"gGyΜ%r-yg`fe*BA~6r[F@n:!(`+=K} Xp bPs{0kȝ--;> stream xڭteX]6-!=4Htwww03t*!%- 4HI|{}3ǵ׹ֹ\{QkJX;[ePVN6A* VfںY:* rK[@=5@hp ]@vP33˿-]D#! [0C)ׁZ@ j؀)5uU9@Y8ݟ[(` `pr[~a{撀,9 et \nN l,@ 6 rqs~pzƞԝ!P xΪ.-WP; 3 pyvrZA\-s?m] hkf@iO}G..xtaCzi}m ^3/?1۟1",k *39%2O+F_ߩeU-G8G 7Y8C PHmab Ȃ yf:`k# |X88iہE ^\gWVVaO/OMj{HloIIg//+/'2Yqqppo42`+gߛ[?/ۿ a+w7gy@ uiJ(>}0g`Lڨ~ ̥N0?ҹ3 =rC}U[g/.ۊv:S'yd~4Lk|;%GzѾs;cHnȧL4xW.ViqmX08GIW }Ã?IP,SnuVw|B!XlG~CPS~_`F{"i>Gᢼ@yz=7M|g E1MJ%qlY!^xHɰ8^Q=GgRd3Oo~`kB.} O^ jnS4xx5q NepNÃΖ=aY5c1a%XUP3,ۚ9"1i[hQQw!pl+^nT~6&R;P(k`@LI(ݘF}EfjcA?C 2RYcgjK6\0iLPguM{rB}T(UڻQyC; e,PTx=DZǹ.VOJi9=$mf/E> LsƲݴ>i+^Kjޗ]ynϥ(bxɌGtx\dzcjR{dRJƵwf;±$,lt0Bv[xNFl=p@ m؏U|Aޡ(1#&`קW]5oBr}7 c7Q%:kOO߬DYύfڬ i ϑrr?v̧v14|{ED]Z()6Q6-vJ>ۜ߸#2m()kjlO(xg5$'%:b n7BO0\cټGdnLn%Nme) |Pǩoc٩>F~T;,2V &mmϋTL)l;iT-BC㋰'+~e#ؤ uѩl̏i\Ҹ%T3t$[ /\X44@W=y3q}ݜp@L~wo93QCPC6fvPvWK3 ?OfswMzAظe՗i']4\%+}ߗOɛ&z2U`8Լm!M!i#5zL "e iy|!r Sr cZ&Ǖ^7quG:Gfyq-"8:@kU{#=)٩P"sgkگ- ڨ$Z^pms~yc@Kr9-ɥh+#]3'?&6n,.0iF <L6z+!iUg ?ri[`<>eτogCbd ݸ_!/ѮjT%aJ}8װ=!E D.Yb846ltwQW pJHݤ_jo6 $_z,{ >Vc$/c6e3?(ƃ& f"l׻JKXha<Cq"=Qj 2Wn0Oyhi\CfŸ5ww{Z֋dT8 K!'!]Kۜq804ކbO]̰l}ΰ{PO>e;C:>p%Ee9hdD~ ųnw|TnocT8뙞~{ڬ}Y%)Cӣ q[>.*`Y+/)s&mgJQ|e#h_>Հ5R:}\_[_-_PѫeHsdmk+xBcQ5ʢ *?KN,w6!z{u`15^P40%F<'*T4dA nUZE Xp|UheB'o;(އx4\^q '-'G,_#fxkۍBUA8|Ҥu3C4+[[NPKWt j#\⻆ d/X>LǎFfO0 1c de}@P>NjTBjiN׏/UF?@MCYUfzorԫ[jP5ұ`7qB>hL2v Ke9tXŠW/o6K&+RY`0u9:p#~"Gnd%u> ) /aCys.!(*yƍP+ƨl:SsC&ҞPtn˅eoqmsk_I81.D~{)9Zw4lm@kN8-y{ {f.2q>;0KbL8q*D䴟2-ݾE$2 ̛sUۇ hqSЈ*<7e:0:o)> gػԍ$ vUc^#7K$5"1dD? ɧe2b¼B ՐEO?2uF6P+7IkrKӝx+҂ [/r_He(u-RH+z%CG{>NC?"mX^1e4i:DjJ#qoe9?یvDx6mYՀ>y2lTZz^-[m\q}'aaOgX:gװYUj^yD1*k]@%>q*J=c[|ëb~ t GzYC=3GsU>,E<.JЂ,w/[˨xD$H\ИuzWC e1b ps-,c9ŷ7 w/st b}*<  Qfk@[foSB|$ dFQ&N~MCZzZpPqtH/HaFd?E,1&+'uW(ܫKg)eĪGXA;Wf1s|^L& d"ntInyp?½݀Gc^ieF,a(˨G1/~2%!1<,NjsVԔ61@-it0͜wSw|@aw?iYhAHO5Ue*uMI=eq.qt3kΨZ+q5X%UL'O5@AuU m6|:;HRSӕ9% 4_[:H{;dA=mS֗]@ 1 yh& VB+@;ږ+#Ɏ*(MCED% McLYC1=iҨ}q*q*oDz&;"S 锸a=NM?F&ú ܙ L(L;lj>&9lTdh[{2ul<,('}JQ;MNE~*͖Sv;χNc'Nk-< bwс]쓭>/8Ak8ȄyQF9"Ii!]=3L fD :?\+%"[74ĕP8ܽ/1oqD 8X?9c 91/~T\fv\̳u+inNB=ʹZ.1V_k1"dsܢ.Rl@è񅫡ek53R`7C8)#2ҥR_/ׇ;+`'ƛ=zyK!_!M6/TqmG M SudɸQ3V깍Gˤ4L@ :YQOܦ-g_9ԑd=$kc}Id`R,*Woz*nn4sk'5e&L-C<ͧx,S"-okU᭫5'$΀ %oX![#RH)Kd\xb 2׶Z* Bmk.en\ y8o. SXK]#]JZĢg20kkB*c v`NbL/An.ߑ#i pt1{1يU1 n=qᛎXwVr> stream xڭyeT\ђ5ܡ ֡h A;'8 `!8|$o޼Y_3uOU]j9{]fzm=.9+ W78@ C%<` F`@la1\|;{@׈_?!W<عX^Nn`x ك'0@᥶2UY vCNmWNfغBNXl\]@?yp?ay7 i pC!O t= 8yxۺ%u}p~=iz6v,?b OAf mx\aO)3D?DywFoCtr:? ?. cX3@#?w 0S\잤iC`6[S \@`6ͧoqtta. ߙ?7KMFi?u{"uhsC^'"y:l1A&_ 50(`T4/`\l\ADt=m<'E;`kiFCzVYo7@[i~QAPkכȯbw5a -n;jCݤNϻR?z XD8vCx,Kq3~;@15ѵ,Chb_1z3v I{OKNQ{v8rc2KSa_6\9Ia6Ch5LL(rT4?-ҥ6m('h Do;9zE_񴇈g^&4Д$c/@vPA@> w^vw~W'BFS2\9@p O7+8.}46D`|k'ZXYopN=}^?;/ _Tʚ ~9C=7c'\z$|Bt ֟T?7`iM aNǏ.5/HH!r;mIΔsBQ8 ?GR2s!Y\jRpijYm8qԈMbKרgu~]=#1{]a*j[Y3KbpFuTF̋fRk$ e(fX R!ykը^F7j%P]yA);!4BƏh&93:Fg$#heReO7GS/=ȷh83xtL<0akb.$oޓ##ERv/R]7StTJBK ڹ,86%-'L6Ѿ{Hd eFA_ҹT݌2or֍fBT;"ֈLZQqGQǻWTj5T: P #N7Hzk#$8 o?S fnn"*Yuq+l\U/ 4iq X4aZ9Moܳ"2YK\;{6/'y:Jw;T֓o$nMFM Su7A"Vuzf,8K5ֆEcr)4`@I wXjƍq f |yLy}AUaK* t|6C h3e`dgNņoپh.tT\݌`-Psg3,4߰+DN iu,2Y -IP"8v&HB u@2<&Ff#My֨?IyJ /h1F #i䄍iω*}Ǐ=CK)KSTѴ{Df钟oOBzQ^۸!Us|}~NVj@&q׊.k?GT'UBl!7wM'.x8Ok#cOFR6m5JoQ |uV=V:Ia LG=OK(9+)M#x莻eB_A(FQO싷d#tKmB??y`_q)>c[C*fDYina cSXhZ}FZq ~wٵ 7U}/ hfF4sbxhו=( ֱdI(l÷׏q/ |A(^1p6TfC UAA$UFxkp#Zs{s2\úo+_7^_zUvא5:ྠ(J*4oX-X!izM&1seFeJ>+*\zXŵ0|)l+_St=d*,<d"ܠ*#Bu^:?\ۭ;hBU["BwU3dY|+^JOZV]tT\f9]ƽALK<$f:6–rcˈ%R*p)mLuvw C[$z=Y}OkR\ߋ09-6l?-Q]HOU;S:eB~n=vIU [x[G9S^Ybs`n6 b_ 8rf2 cQ~0mnU/,aAsiz'~MϚ ~Pik mi:eg%o`&?'w$:G3]Ag8È%6z `R{܃YaYyFA>ܻJH͂ϓi]s>=UXVHnҐ:+np6'M:_ $9=)S佳)­x|!ݹ k`YM[~2 ̡˙I[ͣq, NR܄p͝QnjÇt$o'Nf$u6%uhM坡x|(]!淫,T*hʺjf-:b_&w@3#џ-"6mEvn,-Oalp#oPPxY?&N/d7 TF1f&D6EBқBݾd"5/-rq3CT"&0OtNsq~ɩRoXJj x}l3vjƉFD i=L-zbZA·k\m=(JE1 㐁u%Yt$b ԺWõrSCh]D&rԃݾT +Z<]7!?t6E9fyngE ; Ǟkb]ck*4S,c\;^_LvW!ZLeOxp;nC75oq=RË1CyqpE -o1Y:̊  3g躹rI&|1B"73e/~I4|N;3+ob>:t9},!|/3,r\1Gi.U$4[Mb+z s=V/7VڠVg!ۮG@Hl[†$|.d y,ܻ N`2lU~C\ѓ\5CR[ϦZ kH6axS\F[ABҁk!{6*wFȲHЗ8 3Yw*CW_\k 5 kx-ƽs.-7aZj&! S꼺U{m^av^q{N'$L2~oT;M"#$z?C^m[ELYaJaj+2{}ud9wEvVSz^f(/c)٣Nk|!%VrLLG:>m40ܣwjF{BjJazIާ3sJI $-C zIiR :~ZKvԕeU&|WiGEv$!:HV>OuUvRBg[9܀#k"E%Ay2Ww쾠~pq[I#B(JIHtJ{'US/O#]ށ9K Ŕ&n [Al@{dHRIYU$I9X>ּ?`Y({,o(=TƔ֑z_6O5#efxՕ@99y 1ht902J}*|ٿJf_W^%jMϛ^TiWӊ|c_J+f)YC_-dkRv=O4(lFN4rn#6[ٖ[nTx4Gҏ huJ# zq.{FE!1f_rXE|sE䦁UDﲐxgg$M Xtm_r5&8V];H}8~H@"iu4ל{oMg&6S6EyWNt8]w!ROё֨tRӚd={ґ,`~( o]W!W[![֫ܚ{G<=rv2* V֠؈guo6C<19)8Ju?¥^} .xqZԢYseUcJ{yenw8f:P"M|UjYf1;Ƨ-gX* ml#D i 5g8:5p2k.7Ώ|U'nkmRxzVUA2Bgv>V!y7p+\\UYjU?JE+O[k`-6]mƃkyOqEaIg uC<̷R[]} fg% f\5i\ S*鴔uOƱa *%`I17|vG\sX4q=LeAT*sQ_eNw D lÓu2F8] :ü'u_ɗt[[ S(\zLIڄf囘s9As@#v55V3!9X_I (v1E'#e,>hvv$ VL޻RX8Z˱܉1!F1$-\O1Ya6ciŞ3HYȃJk;; =|I[GZuɏ[iSu~Aމ!r([DckRjYunRm4p}: FϫڹNNhۭgC.fF,:ފ_TZt/̶#20>fm'NG[!cZ #0 !Do)_XpGK:|aLM-"ӴhX6g`S|;\uXh8HCY疌[~v'i 5EoMd 6i'7|2=ugk^ߏ?u]4a?x/պl+ĆӇS9fx&iԜV;F9GE6*NDm>8`rƮ5>gފжҞ7s?8S,fGȋ[Tjhbpn9Zlbs'dhz< osN]Uakq޷ 5]Ď׺! KrV>uL*.' Zin|TGώ{9=wuʙb'{5@HD1ů"(mtV)DeV6WS4o.PA!j F>0eRwF ou 49|e]CQ C(;waoȧ'͕/5E8^Rt@r0 os Eߴ1 +;7eQYk GoGva - endstream endobj 148 0 obj << /Length1 1625 /Length2 6016 /Length3 0 /Length 6841 /Filter /FlateDecode >> stream xڭUeXin[sfAAf薐S@:%钒8{;9>^^yu@0+2 hBẖg0{q hK "2`N[>;''׿,]V@p |pP `5 P6TTh`'dV k K K n@o vrgq"=@([n # p@bH2m:AdVmEt"l-s!HFz`@%4Ha w.+0;[#s# d8!P)8m,@`8Iݝ [::ڻ@"m P\ˢ4ΰ#EX`P{wl˫ C SoS ?0Ȁ# 3/};rd[x}~_4 tػ;_rPDx2C70H-c !P0r g  ];rN*+)(wWOm 7< /* ąM?D:?D8A|<||?~:F ~/. B? ar^}d8x0 ĝ%>%'"(һ+w9Ud}?,ZܔT JչOl;ޮs۳6ǃ3if=gi\{kGy0lH:f7X Nd29*P˲wXb7X;z:0[WsE0KZRm3|D[8Vo]K$Rcm=X1O"49U$窡R'Lu0_hڈ6TEL)v矶z<Iɶ~o'|Ab&b"\4v>W-).1$Y]Mf\sįog*-;^hk^Pߍa2~ evhL[{x*ʢsY4J!a0z5/ӌ0?_`kK%KS)a(x[/V>F= YbBYOdM"G7]˜aj'PlQ^ʣ[aͭZAOqu?|\0ލ"6J[i4*l-Jt~S> ` ZXDORސˡE~zkn,,238D[U/#>DdW+Fvѯ %!fӤ|橪$Z 6XC$kw?lI_2m֎ZUkR-3ma-ZRb^5~Vim.dG-B?pSf@PU>js]XOྥnKT5u:[eCEk#`h=`UHiH3ibQ");]qgFwQrۣx'%r/Ob{1e_eK?bF4RIAיbuڿ*sd󋤉۰Tr[#]x"=59XtE)bծDȉ[{+Y :?_~cC(njN*V3Ue\I0<;O`Vucol6NW2bsi V0§ZzP6u}^fN.prƋ83;̙D^ԓA~A*(x(ͣqbݩKڅC3eJK!5_d)G"4KC^ʋD>7$`c)F=ңBY=/` +ppJ)Ȯw(o6M&hH6}K]VĽ 7b_Q.j^+ @Zx*_s_ypkN7}ęg;ֳ@%oo BEtu5j}qcաi(wXK.۶SDKcKͦfCuV۸NzbO! Ehv.]I0GE.ke}Y]ы{?xc)HiM :c*΂Ǘz'O Ed[yq'sHE(6*۳[iPbF8ȣI.ʴd>ay;M6% Y}JKuٴuH\=j}WE[ӷG˓ίv :fMe:T'A^z ֗OUMf} 5Iy'rFqlί+4j6Ghktr~ cB.$i׳܍,KE> Ɠ;5He*kzMc*uI}K!D*>svUl<~XM (RNp>'QI'ҥ&wxhTLtdqz2<2_`dl{;:v[h<!S;PZd@cq~j3I,fJFKho_ߗņ IYVv&6 ġD-Ri*\6dVUg5QV_t3(\#ጷ*Vr?~RRRn .p }u1(>hLSڶ>h:W\V#Ӹ<{kÎDqe`֑[ۛ\ g,z욓0冸)>wj 45~?߻jߞxg1t3Л෸)f?/+,TEq%#[z,)9O&pXM$c̀ @b.vئ}~%yM!h9ʡd`wNeDqqV:Md=b$T0BԠngI0xTbǍ' ;))+-M@Œ_l- Mm/!T Fi"j㑉?62[|y]kEWfH/2$۸d μ"Gsn:Z4l̚l(Jx TGm0}uBSGv~B騃'(='/S_۪E?~]tF>8V@wrk#^qU563T8q%*vD!UzǠaM>7xW נ5 B7A[rh́^d?\ʸFAdAj9U Bjm1h9E pE*_s偲܎8DaAGZUydfY9ꒈB%4V6q3aEU1GJ Ԑz,ƈKfщFpHKREql٩'P(u\0=F&1_fPٍH9 cvUj_|so2q=(,0l[[R~ms>NNsG3ZfD5'@j"yVxG^afBjfFyŝ|'V}ȣݵiu˗C] 9b{ =1&:sBO+y0 & _mX/>9l$p&e{*hܝ-hbmQrk-'^P%k1E 6GP떿, {4_(aϿIRj9Ƌ>ZI=Itk`1JN g#NOlx3VAf`WoK*@Jv#Ifl0"mSlq16DpZ1&+z¾E/㜂S=cׇ&9(۠YQKx3[,&MecD^%p!Ѯ`¤]KԊV(O-nЖ.~ŷY9T`9]`eѶL"{dN&}J -!=Z@fk{'e1+u歙3( lT7 }9}Q:_,m+\Jd+LB _7`8.sM+q]$gBZ`[ed IomU?DY}ާj3qS力,q, Ǡ[hf@qA('wϵHR ߅\4_HP+\_n/pGyu_uvEp(Y6`4>b e]HkldO4Ileн,Tg_t}i~ KqW`'[ŧ̎qύ7lkme?u|`.nkR-j٪eP9/ `xRuV_pȌdKϚ`wW=R L3<0OGO/!e|F)=( "j"j)u 5SRnU E:`!S2aHt(Gx;c{G)%Pl|]p ϔmv\1T%4vf{є&Ee k<˓5|9M)]@b"95`g)]6~dʾEhO|͆V =y6/ق.Qqڻro2inuߔTMePL~8(y$ζViK%̏F7NGQ;hT ژi=F?p߀Oɞpĸƾ?]-+qok_-8b e4n ?>0>N]? ט+/DJ|+V|4bj9lm%hy%9i{)Lx@X}쮄~~Z#6"RREYx}^8`&xP$$ꛊP٘X`q?^۸>b5͹siPeD7: ͫ!l.b("n;IC/LCaiJbYEAFw,6ӡi礫͋SO"!t%QԜ^X'ig)]4sO*5F $#Q6ܖ+kG5hRC7Lu˝|J@nTu)* sVF,7r`zy*k{;k^kFyL[dinN ՊR*ҋfW 1$&McB;q}^q?7F{M3|fϥV)uW6MkxEv I`ds'—)Mc[?"ӻ뻬ˌuģrmtѐoE!n~}px"n$*v$(Fkk#:=A\)ޭO"ԦOPŀ )DMM憪)#NRZEEA9L\2.n}1É/n71oF0~:2H IܔkO:ɭ%[0}.?"<)Btګ8AOS]! ~qcś֒NG=I:*3s$.ݎa|?6[ݦ\eGR^hxTϩsOMr'`(qq}O6јQ%XuВ&i1X]K HS97^ L7OJx֋Eh'{C0($@8ŕ×X(mkI!V֦1b]he)`7$)默^>ǝt9MmyN.{:bD?|0CĭVMÁEa@Z0*D(lJiɳ7q`ͨtzW?ȬgKlԳ'R%sb$'Fuug=)f2cOB\IV_cVU endstream endobj 150 0 obj << /Length1 1626 /Length2 12073 /Length3 0 /Length 12901 /Filter /FlateDecode >> stream xڭweT\.  uK]-xpM].wf:w^kOSo)T5Ā i{;3+?@lknolϧȤor.jj ' lo'it@@$ `CH;x8-,!Z-u:J2zlay{q;؂ o!׎ b m@ U=9e@dr2ڀ`33`n`foU3[,1g d~sR1@N`gw`dby3qMnn7 '7 7[0U{gx˪*)K_oj%寒ֽyBLvW.Svv1x 7 g?0@&N@[uu[&6{m_g93 3[n  _"ggn`c:W kf@l<@9 =-%2-K{5cޖm-lrWk?ЊU'1yk-̬ *bf 07yr-; lzXYEi 6@vFY$$u@4=ްG)J:F\ `d{{oY}bYvwd/a6i%KmFߗ<= ; eyL *-3R;4!i;P\Yտʾ/-|:aǑ%]Wuv@DyW܄fݞPS\@:Ο?Ս{_ԺX(oGino> v3"S &Q$A<^\yF]%きmJ~, ?n.m mo$\fke~BeP?hF7BFnPyXXj9*jZh#,z#J9F=ع jM}M3v:zCN2<FMV uɣ] KW[=1NBOՍ2)i#j` {eQ*DD<~M2_8pB".*g4f}"-0Ng0EJЌ0؋߿ 6wvH6܋+SGyTT/`%jzev DBg7TH";D[D*,];"4OItg&DgEO?ǥLz4 YH%˵匌?:j%_#<2~Ee;!uO/pV<~FEw1 2BW<ͮH3C%miա0Li]y + Q,P'P*$\7\s}*X>W *Z%T}_eT(SJ>,*Z^yvߣ!N#R]YnO.X_V78sXñ?y\qgd$Ij4 $Fk:!c8v|2NZ׈ }A݉3w E6T?sGxlw 2e AV qח5*i٪,1*`WL)THֻ sM}H:n 69?T/Gu>:lȈ.6 z}'4IRK⃈t9N di5wܟmqe>HRc8 q6H_DhC+#4O?:NV R!{qHpi+RCY^ 5xtq՗~R&ꭏ?x$ zNIz.>aPO"B.'NrBm-M[=Ǚ\('p|{4;?붾gEbܟm="Z2*=tMAȺR:`W,cdI3Ԇx7~K[/!%jDŽ0|-GzG &\+_q>{uCˏFeߑ?zz}GXvD} Vi-HzZ&dPW^2B:uSQXqHX^{WPuJw/z]G Rǖ'P _Y-=-V1t^YjB]wڙe?acj :edTR}O !v_ &<=F0JYkoTI['K2`qM!VkC9;> H;:oʆɶwr 3KI'^Mf o]\V"RO}9ItĞmʢ,\Llٸe@5udk#iBuEG#^u8Wփ,UQ,gZK^/d#N!%؍_6Shl'=>`U3 2VG,.X\bw4pA˲TZE %vDv˥@qۥKf-d'Mf/>5AWk>7>R-)Gp_j3$r5P˵FweJ3bqhzԤDpWiI,3eѻCNwhYzRkY e4M<7c .N{$ɳ@ W1Z8p :&;D嵽ѽ@׫F(DWf=?VRoEQKU]ڎ,E}#A(I}i-3q+hd!ǵO)Q O*t3?T?Ӕ(軪WVq#@w5&yOyyyJ߯|󧈘$[#ft.c_~HӒzdҡ{ap׭ #uP\] ZAӧvHEDE_l'^!7c\^4`ϣgb ,.Uti٪ӆ{4ެ\g ko?gHpYl'ibpֈpaf~"ԜYWp彣pDB q:O*>h TxP1L 0ZCpz#hglT 9'Tķ\f|bP>qkED\]}i4^u/8z-{6v ~B=^*)*?1 臋=Hr{Z3VX ߘUGɲTP$+[{Is5oՆؖ6Cg_4|:t*0V$.*N3i&xOTB c_+3$q1<yf-$ES$?GK"1 FDZdUy|FܴvpKwUyɳHP  6EaX%y , ߣYO]{Ž/vMa¥~ỹ-a>-|RU{SmE~Y:ܯp|dsQ-hIÏ9hu=Ay_,HM!ǵܔ/A8 ۺka 0z<%زN%X/ڤ^@yd Dz^\g*Ҕ\ys/rtIH&D|佮0 ;ގ3Xtiy?K9nkV6AƉڭʈ@V9~M bDln!M ~O9/ ̜|Uc֕)Fp&{k~P4{,~ m^m:o_HA.8[)7Z}W}^:~?lq#Wx{/?49uƃle|ӴhdjH NLz_rk R4&s#ԭ:6Xw50(YpWݑ * <ֱtxf{.~\sU%Z2-\֊PG~oZx(ZCf0 f-UPE-^XCN%̘݇nsG YӜL^UUJ/p9Dr [n̓^"g}F7g$ID$pܥZf1a1aSYwMHwTN=u/FQ ~R2mTUyVocSՂHe݀r豼Q`("JA lf834iĬb)%aE.$QaEE7 ZJI%\kB lٻ:>EC)qmj'o9 ZueUaa&#wE3I/\RK^w)%zScϘʠ2J|ht"L[UVs33S7p/n?rƃ)?t;YtpȠעzyF.% h[ٟhҕ+mq1s[ q[U? Ċ^W/za?>: HU?Is$SkAWpbҹ\iOp;] b-p$TqI7 y/-L\RI3_֙(5uI7:j$0Ml9~4d 5G_u%TTgmD9wiv 0Nx>QJcYdL^ gwxVP㝭Fl1k_Ob:{;9މy~ QtY7|Jno;010F)E7$j{^ ㋷9ES (%8yA-K 5JRn%IS'$efuӛ|aqr¹OSnlm4jNLȘ%'e{9>0]qR߸*Vg+E-hNzx["[a`:qoP,PRѭu*sgL=lSMͨC/ڱsxNywk6D(z|.s)lR8fIxf~Szsߐ_g1}xFZOr  7FrZV4&A6)khT<;GcM3hn4r8z/42|W v ^+3_VVuwI*+Y0kmmFCqV?䡍 G§#%=Y,dAo~L>_ϵБ[\n@mk0~Lf\YBk~}QwYR&&)ƿCE^̜BhBҴ6zupȿqt5xSq6yqYs'f sQ:+C_" AFý;rO> iM$Oy/i,|#Ii$VKw"4wE^'{tp@'ÔeIQldaIkWWz!6 B_KI ֨$3'{ޠ k8tv Ϯ]RQ cmlu뱫lME_%yRAXJH4'Ba)GP7 j/ryvt8ꁿZ&_0XNQ*^LQK0-Q/ b^ v뾦N8}D*BW))!Ͳ1i#G+Q!Zr j G_*:d=߄C\0*9^T60{3yznTa"=tVP%뉌Kc~*ӌu>EˑWLPsОN2@:6SkblKo^ne66E,~)x)=Kw- j|(THsc/5DZP F#)O4)?2gYCDZ7{]l ^&Nwvκ9a&τKuCm7fo/i*@kUwSN!} =e KHǦb`ƽ ˦X&|Kv~39G%@- AA'ץ$Vis=1o-QBDm"{@&a+$I}) =ĉtfpm?Q\Ik;f}a L&h0z DΒ:DeΏdJ wB*2(Nʙ;a 9YDɊwUԎC ף#]r}3ۓm %* M|mڬ WK|e@hBze(d3%dixah&}^` !SF_w$!Mk:(cfc\~%NYعy~ >Ԃ j~ԤZJ;pm[c&6TDZ6lBRc~洎wߍqQ,I"s5ֈܰdI~dONRx n^0(mCrwgΡOu=1#,߇,$Yo8! N6x-0"hJa 7E2{lVcw&EFf.+;q`J bzjv?gRtZ'1ZZ;*>Ty|)_e6= oWmK'8k2 STӉF%Z2K8 %'`Ni$̅3bs"d"|i /,,/sQ=Q_w K3El)CDi* δ"*苒O>#4~QզF aދe . tѶ;:(!TsCSU9;쿑Z1YQSk -޽hͧ^ a%5zѦ9t2=ӲRXR*tiS W\_5BeFFyT28|}}'W!e9_hc&韜ffpIM')0/d,/vj/htxq8%$J6"WGI&wk<26U.$ Nv)5 :/+OzдHZ_ޠa)mkzŽLdTs-la]l H[ CG7H0td D{CXFoİPyn/S7 Sಐ{L& #WgQ BH b{m4FwWgЊ:P!K='|Mi4vl%A\.\C 8-ȼ}~ p"rwYrX&JXǤ)'|#6븚܃zV7_2`ISMi׆Z+V7I~) OrzԤG:3l,>:-:=3@y"Ж\P'йzj\lW\׿1&"JMV%K|oV-ȋw>_@{z꫒n2͵A/kgGf@ͥ:/6ݽc3|)%>@%-׫g'K L+v?vt4]F5?> bNw>~CYrӜH[x2b!Nmf#6 H_zc>҉D x7ON,!ܶ[@uKl~ʳ`@Bib˯SxdkJ?;q ZڠITkvc'F0"%\onX*!T@!V)x tߊOO;9hAӝmƒ2!'?+)WwֺC1dnY]S>En!ByN~e=,K2@DWƨj61wM!WSR4<͏jC2׃aun3i~n=ܭ8]*=TZmFrN_ÛnY@`<2T~N 0w7;WQAkC)40/̩ψB,܇圂}|)DYh=]>\xZϯ#Yr^i!jn!iQNAmJaۜ]WhZ17obU{صEJE({](SIy9;b. d?, ᵴRcR9]ʻᰅ"hzӒ8ס,3D(uc'~iP_+t ܀%jr[o=q?qěMNhwa֥nIBAEǗ`3NuE?~iqlg8ra+<  Q^.*88ˏ8-,$$Y;vO<}㳆?&IpTS:ǏI`|Vd5= "iY,D3g|Qˊc}9>RLFJwgSNrDimY=G'4t}mi) `( 8mN~j_ԋ*N$Hy+fr w ^%%.tp2!3&ls `꼭S(hYS #a&G s#cqAoIIQ\bM6͊3L C u5c\ aS\̪ j&Te%tPRC#tS*#֢D<4Y|aaOjB{]"(y=9/5^5:sxʍxxf~&#Vq}#w aq帑O>ք@TzK-ׯ~Dc~jl처3J;FNCs-F3#|ߞn6m,.: pSA.%n|46pkƩ; ,b##}{Xz0&Wț7=>\IsfZ7"+H1+WN95[h:,} ]-"Ė2kdU_ظKqBԌ`4'GK.ưjG )8+LJK~"G`?ʵ endstream endobj 152 0 obj << /Length1 1630 /Length2 17019 /Length3 0 /Length 17861 /Filter /FlateDecode >> stream xڬSfݶ%¶m۶me62lʰmf63x߻jVTښ}9V[dD*tBftLy+;c7e;y.Y:e3 7_9 7@ jf`f0qqqD,,]jT44)`?5=],_l]B_;\-VfE-)y @flke21w1;8l}8؛ZS _,!ꯛ?*Zw o\V&n$WnZStpqu1qrt(*<]-\bW p0ki`OIu5wy `jhk7_0Ggbeo,Mm\\;Y'_\]la4qY7w01[n?ufj?3C7 #S{[/9 ߐ;Hoz/>Whq7[[y#d @Ϣ5rYzٿ?Im_j-r43Ur5ٿjfζVfW[tLEjiebc lVٛ Ą5Uh7 _Uon98#, cb1s2bf߄\<:fdWϓ7q0gtT\MNQ9;%_ o7343Y_q0 Npc u,kR-. uO2 oZ>w<>ðM3.%/D"AsĠ_q}$Ψ~7_?*Ľ0gc놛iuOuwp;ӲzSx7jiaQ6q(O gҵЍ_X:捯Qbv k{ӛ" )Ud>Y y5$˟!n}-ީZ%Mi 6c&i`J-Ҹy6ϲJfd1<2>45$U%95lvHva .HhLO,B@VGM$QbbT(+`Se,}%A|~`uWI t5DYY\ =0Xb7,i/ kqrdCupۏD+´;D3u91*yLH75,nD?YeϧN_rԵMQ?{"*@5@ft|\85k1DJ?$Jiv+*~8'Rc)u`JaVc`)|jsaAg!7B,r$NNP=^/vV,ѕ+ueFYðs=y?@oǵ?X*)qvt-\6se$*&4l, DIFf1^]j'j8 'φkR"F s,Gly16Ajfa w+xߙ%cҕAH,ǜzhNwn*^O.]b! 5jYO¤*~"N4^C~Y,a:D魛"`0?6pGbէE֭+T#Ozk68mtl"nN7.oK906ZS^FxG o8͡efňŅ=S[WVt8C`ׄT /pv=ʪw'ꂿB2dM݈>p qh!hv3K+}:YOQJ%wa(;ȡMs#F"[ֳY02Z͎'^S{~ƲE+}E+b?(j6/;|[X!dVGa~CTZS ?r:Q}RsD95ZͳBHo&hu O׌8Ô$v Aż,zTH 1v/eW_¶_|c4&oe1lP@Gط^[ kf9t_l>$ɞ-A-1_1{U\L*rY Cg]cj$&Q5B+a.(Ez+Yi-F[k-GHkKS)@_02[z禔}G&qMqqɘ$=< ɄUS3oL5%=Gt%`z WƨRM-TD>Pb Z RԜ__H "PӫklGU笳>/ Trs1.oJ K|$^u P;(~ {44ZwNs0Sr|-UdxZ0A {,ԑÿz$0%+xh'Gd#XxIL0 rgNmi&yH62jׇWEa:|!5Rgke6 4n,2P[Զw1Yw1?\>ǃޚUͣUW?5ACͅdP8D\c%sX@4BLvć"_2$,bPDaw,vJ/_N#s6)5#aed}wDVV[VC#ȄL6+Uo@#2ĥ2rm+>~zv^>q $\*oMNK,#w~mB,[Lx&u0!җG^,aD2ǫ>hw?}9MC |wben+޶vFb($$jK]g|4?^XeRS/:M7;Ms!Y'c-Vjڽ`Ie%~Y `rGgp\*F@U<7n nrB-Pg[6fۮes4%}8悈y7UV;ħ4c/|6~FAc4e \tNỢ cbǧ8`+8T>23S kWF=p[MkݏT_7M:n)1g)ʜN:n#ߨN;maG_zOjԞ0ڮ%~8LΜd̆ y%nH=WD␤~f8:S)[:OV+TKv,Ғ REޮ$ 7o/<3LާÃyS?/S*o&{M&sZ"eiܑ\-޶U ?aHAjv/ё[/ăaA Lx5F01`|HFP1 ^Ie: >a U6,0"5*zܹc'ҥ 1p1ӏ xَ_=lvHs$@RF@>q=Z~Δƅk`0I],\䶟W l-l=w#qWv,ךxqc{o=+MbKZg ,HӚ meINm:jXP@Sƛlx_*x: NهZkD-541B N~[vhGSԡgܲt`זj{j"pS CMޯB Z[n>aWP>["I [2\/āF8oqGYwBK$shGRqb%4&/1cf̗mgq Vdd}m flKtr4R_ N}4_14 5ܑ%.%tz C9jguEKy%|Z+1JO|9߄F?JE]Ɯ[wq#jD'x+%4+ԂtLۅ%hvdoF˷sR“^,_il4E O'{f4XTcB}k2IqrȀ X/v1Y 趃NWN.}޶'a)NFep!w.@ nz)ϻR.6!MS+qi=A x$vqeuXc*2琘<ҟr^h{B\@o LOv}<(4*6?\DɅD/\o]~CgˆҰ##Vcۭ&ʲL{ \1}bduoox]9A3+a@u_%0ٖo>l29r\j7+ePvL,r@HV!˥Ul8iҶ .I/' ud-ƽb_t+GSu^~;'_֓-ho祯 qM@i<_"ӫd2mk]: xBTwH 5VƊv|[z*M C==Fu 5<$Oo#4ʣWp?9DO}2D0\ gʩ{8 Eġئ$.RR:͓7*cdj_hQCSCʪp+`$ԍb~:d'-ĵG%`_$ yN%88׊# k/m ֎e;_oeaEQ򡝷:EɢwC-?bc)p,A!\ѽs\Ѩh#f .+ƫp⊧I %X":/xuOmJM5oW6n7j" aM}7udNN)P&J(QfpoNO]BbK"ULVfe$~16H$1Pܩ(;bz0Wu;1R1t}lV:k.ajX``gbl ԁZNHL)._z>{?/"WC.' {+*qxrLD2$cUw+Bva/-ti>0%ldLN4B _V<~8 Y(-Z]gbpIo5޿ CC߁Nf-l؆0@5@3V 5&&gew[=#\BկPczC!{C]LxY0Cy=VҢbyfd8FCgbXb ]M:|~0f܈9ξ HdN7QFD?HQ,g`&`G/סE1]5j?W7QEF$.28/g%Q^$?m7> ^T_/-cLdH,9kVq'zؑ4 y [U/i{|j+l(\T48/[$4=0dA.f3`K~4&ra/_030p([6'."Σ meY@;ֳkR"OSxi,zp%\>0}:z߳rT',UCoVݖ󭨬YIx(=NK~ A">b,J_XQXu]-&j~ B G2"vȫeB  /Z?{(_Dcu!Wzy9Hk7og,hoN=5ցvN}2QN!:& QU@*؉4H@ܸIrnp/0JᦀH g#N+QeA{)k^< 9dM1G%O~mM`JK5_oƦ'tV>~h.T+Ъg+^uq!T  +/ V5f+ȷZl@M{[Ph z\ok8m/}`d^)5'w;&ey lsi4"w^-=sA؍)ICKFˡdB22fLD-xaAR*\D3m׍2%n1s; 5M~|:rz۶וyƘpcamrZsҷ޼,751=nu U>CZ'=FoƏ tւH|H,uCYՊB1᨟c绎 &!@Mys'L Uk}c5e8Vڤ^ɾ'Tw.>7OjW5$̽MvT>b3st [pe ܨJYs`Է0L9*AG< +t[A> ubݲ79mC'$m){T9X%@EsR!޵e֍m`(-$bM\Ԡ$?3R!'pIYk ҼOMh&bcЈgksܩB|GI?|e&hӣlg\<vkȇ.ӕo>g#(q+g,-3!)ol`2'6Esq~qW -R<^Qt͙:r];c[bJik" zT+1k'[۝n75?rxsW ~J{,#]L@j>[ y68CUJFu(t,~cwn\S)"5FgYgx6W˸:X}e=A7@\ɞ.1`S(>rq޵Z\o^Q ,.4@UvghЪnv,!|:vS+ ;=HyPgaEļEGͳ5 ~Ima^v0kW@j({`va_уEk:ŠoKY|fk0aTo!=2`>gc SR3b4W2Y y>˖]>ɃP<<=q;-87 ʿƄFث$`?Y%xBP"QIP/{WR4\e3[qj5ΧXopZ _xBWCxGuzGB0p\ jgYx87p"kDbT,qJY!Ŭk[ ~eP z?nP~HqɮuNYQoz! F(YOO2c/IS(8rm@Cb")6Ɣnq8^-bh?@xXANW qs3.ZMGE*/?>'R}("*ҩPa| Nevm1qt{m{\d*g!!5In?tcQXP$f[CqZMzuh+T}۽EEU(רP>9$ar[-oe}ĈT7A]{p5֘f(_ŇYVan%辕%%,ڥN8[*A.dCpq#!q~qόؖYE1bZ8 sڃLgJg(RWbi mWv畓W4n{\. h. M]ˆYGޏKgzV<+͗Yw%l{wHiZEX\Ѕ(Vv ^;KO"sMіj.#JwewX:fj)+?@eRlG:s+Qi(>)[n({wC=st} 5n龗 y|. e (EZΕN _:]aPcU0' rb))ÒV|VB򦊉$$K]>t`iw)=;*n30:"ҥp>U/}5/vaZ-+;ևTlWڧ#nZ, ɸ5|x"@3 #ԶaL OA*5̸^]T)tZ hn8J 5!Jrtڔ*)JZ^?3G B &[ou^={ރGB;>=b<[/9:fbl hb=tm _"xܣ<~ $rԃ 0oxAڭ^%:9޹gjV>;y`9JN M7΁P}#)ڿPܻN ZK|dUy۪;vԄ0y^ přлen kdTtr3P5ףdrLb {?xb?!Op [A'jZN$vM? l8b V*g#ߖy'b)`%t:5Zʼn 5~,ݙ2d>'2t'&~sM?7A0t!ϋ~(&LpB'¼8v]YeHӚI)9}Y- u;F:݌F8ylc@å+&t~=شŌ6EruQv3ܐ8 nɌ #mF#|G$)F%XB7lZ|(62g v+ڙ`Cqy+)jILj}bwV9&W4N`w`ȼ`Ϋ:PSH6CuXKZ%".*qelf{nxP!Z_kh2dsK ,7Gp-8C:a8 s" exbuTT[!?~M9pcJ0u+Ez4FvӽI.b"ku { 1bW_dE]uOz]ʚi;J}b3r*N)sكg$އ]-\i3QUx70xSH@[&qdO(>9 )h YZcu2xj=|%s8_'9/26L$ӓ n\k@cfд,+/s{=@|16Q.Y"8s ɨ՚z3BW9 s0*ŷSkCnr_9q jŒ@_v,GW-aNٙzw {ҫ=a'~A_u/`JjАL(;s|"ˌo?dT3Lʱb\{okڱѬaY _6NCf 7/y#gB9cDx sRB Mq×L!9 1#'=E1d"R/Y8 */ vEݮ頫e{H,2<*Ր x]<9i('C|C*avKkw#5Aq!nO\'3]V'_.VDy (7BH.msJuҝbBh>^hrwzFUw 7$^zR6XZvúHܾ q]7GNmxُi9.rk)nS.sٛHu1 2 {^%` An.bx[rz| Bb7F`{`>+4x^8﹯nnEwHHy>Wԣo6` _l8Ykk>[[,-K+X0MP,R??s8L|T@֯ذ1(dp5al2C #8-y*PkQˉ>;ԣx%k`@ *[ou[ͦp~Znx@ι 7%gqA!S!t+jeLo@ X qݥncuOMU İI 2\0M*IU()]G9گ9 ApraGs`e#u41 w(V^ vkAsMB"Kdnp̓i8|XFf+79lXyR6g ]Q-]D<9ׂ3ױ^?FR3BGיkЋA,0M=sUM6ZV]Q!IGJGJ`PZE^A}O(%6޹*j𴌬 c6u2Y/ jw<$$B rDX熆u*EnN:Cb{{%sCgdei6wOx}:g1W3U=Hpx=yp3Jvȏg#< ӎyO`PR؍GAELk6[ᆙr!}_`xH6AQ.`|z~11,}RJkZl%)1- pSS*˛*s^ P/ `\Nꢩ;z6,LaO *cZ v+wt몑I2o,d/1:lp[# A4uLl{5Y9m-\t߁c=Kbɦf V g{vRO5|,diT#f4{c՚aiˁNg"E-,-A/6zgH4zލ92GJ~x7W\SY( akB9(P:I(aRukX8zIJ9#;sJshE"e!4mYqBu7² r0bd5燎'NPPm+E+x┾lfEyƦ`ڇeΑ]c9ּ2bb:w2U: c>6 P[ 8`|q,|;3]qWKHAĝ[WxƍC/h1[&粤މèVҘCA/.*&WXt&V^>)ХkvA-eQa4uꕱ{kQ[J¢Ha xaVjKۼiW"A~K:8Vϸi6l>vp!cYQ\K3L9̟'rj9HϦ&hw{lBW=w>EgP0Cx[̇򍱝hcܲ4߀`X.kmMKa@rcГ&#ˢ\e(r}*D&t\Uh^v _M+{D 7=ܧa,f<ZhJQ7<[9baƧ >@Ǹ3p>֔[ˏnf,ɴݧ'9i+u ṟ;Hxͷ6)'%R[S{^,MG' @]Pn4IM=YGvG go6;/z|&Eъ_[.Q =tz嫉S7=y>cGN50+_qua9ܩc8oX옿cfLSA8h1D+ =$M|'ʽ -\EY++ozwMʔ\$q ⯫wUQ`:tE3r_p>{qlaǷTtcKLf%鉚̿V4!y y^g'5iA&7I=4I^<=yiCE>OՄXmW4G~9;,22E`2{W6%4T*]\3hA.4LQo([(R_JڷKt{h5cnXA•w eCTmnG^cUK}3r[uS^7U yY$ڶFH> (=zdӳm?R?ER{z5Tܚg伣Žpp#"o{7:s7t2Vcrϳ B*rCB:5P= #J<.(Vh rDgPn9渝a')LS`qP7=|>h|/;G͜#KC88\!]&{q}!5' <dZ.A1 E p;'Qd :5YN@:񭦔s8? -!n?VBV!TYd]0^gL!;H MDZtC`C# (J`.H1w X;>CN5úٮh'i#8k} zG>EH|DI"x"?(qepex| p56_4XJ6!2G҈%uf SW7[P5!Mi$n+ochGUJO㎍aGyz{,N@kCH|cǏ7 F,enHCj9'gSURNd+isĽwz(X:-rno] $00)$kə`/$ >{&V U>PA2%bRw/c푚[uKuL0$t>Kk* g\*AQܣb׵|h_V|Y".b4~SHjGvyeW!YS]qTaD}MԮĞd;1V cT}l]0w6D=U5XYx ϡU4KHD4UVe)xIXt l;'a{ m~UR- !>R%#w*fXh@sJf+gɃum\tS( }B5'#m#uqXbkUG8D&E@2L!ۙlt1+.OSHQ.w[?j+=ȅޠϞ~*2?TofUzNS% *4M6=K6TnxƎ8> umc[L ?^E|esd^J!ݍ}Q@S6iH8dM{ku ւ|m{v0B^Fq%MVI6wɏpbJ∨xz+c\irMgj:kA݈-Ӷ> stream xڭxeT]ݒ-'8-wݾ}{OثYUk֪qơ"WVc57JہؘYJ [SgU{[%{^&U,q"QQ;M {; 04H6^^^$* Pբc``-S" K;+h~;`?+*Ih4@;{.6 3 h X;lۙ*͙K`pv݀f@ F 9,Lgl\JnawBN;l߱w2e{g x,!tݹԭ ,)Z^ 0\c*p$)]s?:%D㴡A`V<:qpwK7<8y ۽CĐHopD0v5{}tvAvCJyq H~`m- Kr]c<|#yN2}+qFjMB" Y?&Z&VRK$ijb.* ~q9ుH|;I؃8u\oAqO6TY'Nbj,BG˹_#x>XqNbw``MɖAz^55TJ^ug.qMsAyJP=ъ(DD ЏV(I*xf;o2-ëVPBlNDck<Ԃ,< E10o{^#>:8Cċb.Q~)qފ#)f 4rxfEQ(YB[;*_ϕ,M")~ a(D衮4np}]>RnP#%&'1uQKs=j2&&y7]ڠeD1ږUw*~̝E`o +f!A$]AD. LP>Kfdu-ˢ=q"9p#(YVuoj@v4GQ .fcL^ ^h#Nk?^۞fv/Ptu5ڔޗ՟S ,59* i>0Ԡ§A69lZ淵L|i[BՆ%(u1g]<-1[ YFheusz c%%fG>4 i(Y$ݑwFWtU4X]+Ǣ-?Dm|ɸhZL BNic$dy ; J3]<9/|' -M7c B&-h2~YWㄢuQGgTa090HtNX;<>9,pb c$|plt҈!I^bH2b* Q6rRU[~+`NHN$x7 xrUӋ`?0s۳ze^4Σ)0XsIn-d#1z)ZD(Fɧ51ѭВR k]2(>Mʺ,~ }RMl 2q,H`hER9z_AgbӱODQP $]6í&G;=wC*63Y06 _}W8F49ğk-d}tCEbTs/&M:~}g-ӦN7U1`5cK?:5\3ův )ԙ2+<=a$an2he%r^$ƚzV(-5ICw[>*h, No{/qIo7QSS[d~WSʒDn e$yI͝Cɗ8ciQ>ekAQ0Bh'D(F]-86~h߂ĥ2R\ /LK]8J}TIEb:0+>>%Z ut B5k1" &$ *[T7wΛNWoą6"9h1.]C-3%F\;t4gp$rvm~ws𘥪JJ6hwX S n )]ی4}̑EIu]?h|Q((}cm:"xn8k7ި'@īҰem4Jӹئ?2#I﷛O3S=Cw8^ɩ'Vk FmJ,FĨ' [N _pi_w}8W]P!֕r}O2^mM .wu|U5a%o*Jj{#'sɔ2SA/дx{78S{ 22 PdPiY}M DvPg"4aղQ'2&aD>҉Y=Tu`Ʊ4*OV#bb=H+3ې|kHzAQ6*.w &AK&5$ɓp/PXTuϧ"C?aːzǵSUX;Ր.MZydPHDr˫殓r 0Zv= U:˓bJ|=BԄpXz`Lw]5@:l?^FÙ{#>A:roj{h0g.z/ܢ?X^%?qVi&#`=XN9oSI)sp`Jg5ͨS$URƟ;\ n;шJz T ggf*l9SsZb򠌅ڶYU=*+7aDgogMv|U43&Y)m OKz#3`Ddg(1Ȉ C1vdd}Q3w/>%M`LZ|zeCb^R͓2ZBP@󪅷5vΪ YI:kx#ϐjV'>tJ@d@)p b;0;oājZc|It6<=ym'09;Lk$ l}뼠t_Nz+!9 xH*L*Ȗ.iA=?%.^EV@([7xYn1Y[n号r4 s/oJCV 0׆SWZtGDْ_v1H,.3.J.%ݘh⸂M!|B.a E3/)Znb]!$q-d͐=@[?089ӒUs d=*$<}&C`uHoZM/,g2K5"Em'`U. j00D[)TBu׏+0fDůrs (0:僸 uĂWkdGw j,kÛ`X=dHa=u :.&$n^:xSqv~/1eة ?Ә-=HP`XI؏Kh(DLS2ˎ~o'_8܉ַ)zlA%ѽoֲazò.0h~-Tp*𡈺t5Gp%/ϨCNp6#Pu˼U$NHw6o{2h _^ҴxZcFQKI3h=%_LpiU6`Ehmv|y +u|`DYnܘ* Oq #R(ApHXTf͵g-Gԙ&U6& yqk/yyQMpfY='S$s^UUH )HMQKRT峞X TgO<ua80Ƥnw:lx 5HbŕX&oC{ܥ暵~%69"׼9^w6WցW8qTmq^%7֮q\bttq5=D-ʯĀi//L4|0aSF6Es5)G&]jkr:@$ť# XT'w}0Z"L9#ZMl S>wo8ɯUgG;U.ȗY(֪/=t+2j-6 iq=_H=? BRi%[uv"Pf~6iWY 3qHsJ~SmǘO ݁*PMׁCs3B5B_Xv(`j=4w:^ɀAo%sn:Te%mV9#c"*ɦsÁWЙ"79V)wj8\P.}rod %>bjĶb vԿE̡FHt*I)x=אr7|fZ;g;ݚLMKN]2 ،U.}2 %Wb:Y!(!Ѻ?}-ߒz v*V3O+2Ղ/_(^EOO댏r~+׆rO%oDK-`wMč2k7GUz/ 4URseN;% NRfX>{J1ܰ)$rtq6y +\qaF&ٸrl{״my'Bp(a;{[5b5$$]s2IjrZ%,:+Zգlܲa@F~fA)y@ gDQf(k%#1Ve^DC{)[TZ*O. C:_l%FH*M8j`_q{U(y)L%?Q?+EE9># >f}̬RT.yX_wH*k5o0%E{s? y1XD~d'^jL~i^Q䁘n9l@79hTiNxK Rv&'K<%'EoxPMZD"",{[砂7mc\5Yʹ7HD8[Ʊ PU\HxlL4d gX\USbs޸.3DOv^]<1 t}gYE,7B,< ّ GnV6H؅5mb/ 'FEbe Gx^d&! NP UO d<6;O̡\|wNo=֮mQzFZv"&D\㢞 e "ГƠRX"C\RJGIOB[' z50osTȵUÒ8)y%J,Ϻ*7!}9R>mYeBI8h}ՄZ߰X[o@gn20hvxbvF,k1ɟA*%mj@8r쾣ˉ- zfԩ3E@)RdzTL9WOKD3:O~O,ۃ4KJD}ʄK]P V`,4e;Ib4aۡsc1;!:Cn'̇UKѪV1T_ K_Z;^;tێ V+d2i*Ŋ_|<@M!| vGE ͸JO猱dzOkOBX n1s|,h쵟/eRk|j*wfE*f\ nFRA[5ŝ+ͳ[7KwXsn60䢋E l9"c .iBPo.x+jw*o"J mxh VGH8Z0[S;gP{f=m LE!s#DF*5Me#13_{/6ιNUAnPAI&4>c?([яpq! Rk49ƴ%j UZ|?]?v}͝`pst|6֠{h5|٫e8*!.̀B]Vg eMkF@W{K >SOst=#zTlWP%=J1ZfO^aᏩ $Gp]^5/SabZQmcm~+Z/ae2Up~;B[l,Og7g;{b*^a3;Xg~,YEIź/=)gدB H/&2*ecTˇx<ߜcSڅ;M\IhqȽd(n|8hټKȂwtdD|kqHg/e7G @~EiSe+2&X6MzP܋'nX^UK9L΄i]sA[ cw@4*; qʄ0xmͱ8ݟniÅSqi?em-7_nQS"ð8ݖ1]y-57.!Gvw3 ]y|]HxdW)q)ϒLtGN-4Km親SdH%wsnD0L\qHb@1qdvS9Ut8v2^R6jB pdx!h`B4 pb̉-$K厈Y>1:t^L\N[ՈekH{tT4h%Mu>مe~(G+y Y]EҶ鳧Crn}cfd~TU6yP *̫%F$cm2)|CoHMޗS,( i:UF(g.m:(ufQ(Aeuq^'MLLLhúr;BզM-1"vi.Q]<9>VLݟXo̷Gdw^08Xτ-Zx )HV&wB)IďB 8k͔Þ,BϪAdB}W\u)xaIeWfRFLSH= /БM]YpyJ[x}DoCقF$.sl=ߦU}'MPPfJ[xrNP i9bV4b 3᫭ , {PD8@?ӽlʴ lAە9W?1&_7`,̖xrF͇Z%OӋCBS} nUTDef錷ޒZ^E66pi:(C" , ːS*_q _`(!0[Kط>@>rl߾4|԰i>Lr2"^&jҦ~9A'}a<*hW3S6 >YDy! M}Atlk-Nuq#iFj~9=0#S_kID&Y2d5 -A\z׻ jL,HMj2˧(pKP BsdN?oxRitZaKhkK'J`_^ uZ%?>&URWCFQmч?T}P^t"VLASDnP[> -7^J3{`\rXi:֯B76&:-#@>X}"QD&Cw㴃Auntϱmn7+I.f[P6ޣ־"_GJ~ɹ^TPGPg)e.k +Jkqysd|?֕歲7.?VWL$gCd$Fu~)?kcEs)iQ_BMOD7:Ah1jک16?[ ٌzc빣I#/A0&2@*";%$kf|zj9/֕dX/g+m fd]!aĭ%0Fy&-_[Q]fq 5 J Z- |l4<Mo?lW$N%^qouix]?*,B"%_)sl%YvihY(,?LQK4%$is#z8fe[zٗjF08,a;>k~l; zMn0u~>&"y_f6?Hu9`hSg*׻GL]&)F8E$(%KΆCnPf+B3ҟRK󾿄r B5U D];-xjVk#]I*(6@{Q$ygũziPQ{0ABCl ;82@z+UMTtљnu)O ;z *N@ %7~PZpwfZg{*,⸱L3sͼ`LP4?.0xd4k]}Ҽ4|+˅~1 endstream endobj 166 0 obj << /Author (Lisandro Dalcin) /Title (SLEPc for Python) /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.15)/Keywords() /CreationDate (D:20160522143446+03'00') /ModDate (D:20160522143446+03'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) kpathsea version 6.2.0) >> endobj 135 0 obj << /Type /ObjStm /N 44 /First 370 /Length 2547 /Filter /FlateDecode >> stream xZ[s۶~ׯc3.Ngb;ni.'Ze6Tן]@֏g7KIKgN9t4aZ #gI ,$i"aH*,4IUd$)2 =Ksm%8'ǎ3Vi3s=xO߯y}pP\X@}l= ӕ) zO/,쬱(LRK,VfaY!, ]5BLngmǮDk3/[̵ 7ZϊLܯ͟8z11z\ Jwˬs8oo/_vV;|qXO hEҝ.r /MpL: )eQˡ%˗x _O~9t|]{ I Ta g̖} lq+XO21Yhz q1#h>/eQ='W,ʻ̐IM:L)1!wryQl؎1é_TLvS9]{;*BN'uzw:QEb(#xu)PweU ڣ\J>ʽ8ze=i幧,*YǣvUZBUof}:BmXw(G |$8B7OYlXӎmylsk3e[vK w`;¸-@>\d@x].R7am+ uȞϟN8ڟrU7q 845ai~_)}diY:D,} d{}tr K"t)e}dB~ d{/y}tz a^@'#SOnen+@ueOǷ;bjj(WXypvrŬ#}˭X>wgt,_3K=r̠Վ/C~",,0O K}nUs@]GzWUV?.!q̣wXe1HynU8 :%N"A r-@0?gFer7etG"ѕ . k Nfm׷lk /$LfzsZ4d=/8$!S89/g.z𿋴O|:bU (tּM,JNSs^M 6w4 endstream endobj 167 0 obj << /Type /XRef /Index [0 168] /Size 168 /W [1 3 1] /Root 165 0 R /Info 166 0 R /ID [ ] /Length 404 /Filter /FlateDecode >> stream x7NA &3sDs( j$h(9 JDi}wUt JS?VMRjUCJRaZ)B0L$VFJVJJ4VBJ آVLʄ,8VDʆU <A>@!d_ŗ}@~*?_\Phj mK.P) q96*M>:ƀ4Lt|``FekLkZeXUL/ ؅8SWYy/}gpDyK4^,^T=Un=% LICENSE: SLEPc for Python

LICENSE: SLEPc for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Copyright (c) 2016, Lisandro Dalcin. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

slepc4py-3.7.0/docs/apiref/0000755000175000001440000000000012720314530016244 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.Scale-class.html0000644000175000001440000002233312720314523024363 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.Scale
Package slepc4py :: Module SLEPc :: Class PEP :: Class Scale
[hide private]
[frames] | no frames]

Class Scale


PEP scaling strategy

  • NONE: No scaling.
  • SCALAR: Parameter scaling.
  • DIAGONAL: Diagonal scaling.
  • BOTH: Both parameter and diagonal scaling.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  BOTH = 3
  DIAGONAL = 2
  NONE = 0
  SCALAR = 1
  __qualname__ = 'PEPScale'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_10.png0000644000175000001440000000156412720314524024335 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_5.png0000644000175000001440000000156412720314522024257 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.BV-class.html0000644000175000001440000022633512720314520023225 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.BV
Package slepc4py :: Module SLEPc :: Class BV
[hide private]
[frames] | no frames]

Class BV


BV
Nested Classes [hide private]
  BlockType
BV block-orthogonalization types
  OrthogBlockType
BV block-orthogonalization types
  OrthogRefineType
BV orthogonalization refinement types
  OrthogType
BV orthogonalization types
  RefineType
BV orthogonalization refinement types
  Type
BV type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
applyMatrix(self, Vec x, Vec y)
Multiplies a vector with the matrix associated to the bilinear form.
 
copy(self, BV result=None)
 
create(self, comm=None)
Creates the BV object.
 
destroy(self)
Destroys the BV object.
 
dot(self, BV Y)
M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X
 
dotVec(self, Vec v)
Computes multiple dot products of a vector against all the column vectors of a BV.
 
duplicate(self)
Duplicate the BV object with the same type and dimensions.
 
getActiveColumns(self)
Returns the current active dimensions.
 
getColumn(self, int j)
Returns a Vec object that contains the entries of the requested column of the basis vectors object.
 
getMatrix(self)
Retrieves the matrix representation of the inner product.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all BV options in the database.
 
getOrthogonalization(self)
Gets the orthogonalization settings from the BV object.
 
getSizes(self)
Returns the local and global sizes, and the number of columns.
 
getType(self)
Gets the BV type of this object.
 
insertVec(self, int j, Vec w)
Insert a vector into the specified column.
 
insertVecs(self, int s, W, bool orth)
Insert a set of vectors into specified columns.
 
matMult(self, Mat A, BV Y=None)
Computes the matrix-vector product for each column, Y = A*V.
 
matMultHermitianTranspose(self, Mat A, BV Y=None)
Computes the matrix-vector product with the conjugate transpose of a matrix for each column, Y=A^H*V.
 
matProject(self, Mat A, BV Y)
Computes the projection of a matrix onto a subspace.
 
multVec(self, alpha, beta, Vec y, q)
Computes y = beta*y + alpha*X*q.
 
norm(self, norm_type=None)
Computes the matrix norm of the BV.
 
normColumn(self, int j, norm_type=None)
Computes the matrix norm of the BV.
 
orthogonalize(self, Mat R=None, **kargs)
Orthogonalize all columns (except leading ones), that is, compute the QR decomposition.
 
orthogonalizeVec(self, Vec v)
Orthogonalize a vector with respect to a set of vectors.
 
restoreColumn(self, int j, Vec v)
Restore a column obtained with BVGetColumn().
 
scale(self, alpha)
Multiply the entries by a scalar value.
 
scaleColumn(self, int j, alpha)
Scale column j by alpha
 
setActiveColumns(self, int l, int k)
Specify the columns that will be involved in operations.
 
setFromOptions(self)
Sets BV options from the options database.
 
setMatrix(self, Mat mat, bool indef)
Sets the bilinear form to be used for inner products.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all BV options in the database.
 
setOrthogonalization(self, type=None, refine=None, eta=None, block=None)
Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors).
 
setRandom(self)
Set the active columns of BV to random numbers.
 
setSizes(self, sizes, m)
Sets the local and global sizes, and the number of columns.
 
setSizesFromVec(self, Vec w, m)
Sets the local and global sizes, and the number of columns.
 
setType(self, bv_type)
Selects the type for the BV object.
 
view(self, Viewer viewer=None)
Prints the BV data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

applyMatrix(self, Vec x, Vec y)

 

Multiplies a vector with the matrix associated to the bilinear form.

Parameters

x: Vec
The input vector.
y: Vec
The result vector.

Notes

If the bilinear form has no associated matrix this function copies the vector.

create(self, comm=None)

 

Creates the BV object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the BV object.
Overrides: petsc4py.PETSc.Object.destroy

dot(self, BV Y)

 
Computes the 'block-dot' product of two basis vectors objects.
M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X

Parameters

Y: BV
Left basis vectors, can be the same as self, giving M = X^H X.

Returns

M: Mat
The resulting matrix.

Notes

This is the generalization of VecDot() for a collection of vectors, M = Y^H*X. The result is a matrix M whose entry m_ij is equal to y_i^H x_j (where y_i^H denotes the conjugate transpose of y_i).

X and Y can be the same object.

If a non-standard inner product has been specified with setMatrix(), then the result is M = Y^H*B*X. In this case, both X and Y must have the same associated matrix.

Only rows (resp. columns) of M starting from ly (resp. lx) are computed, where ly (resp. lx) is the number of leading columns of Y (resp. X).

dotVec(self, Vec v)

 

Computes multiple dot products of a vector against all the column vectors of a BV.

Parameters

v: Vec
A vector.

Returns

m: Vec
A vector with the results.

This is analogue to VecMDot(), but using BV to represent a collection of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note that here X is transposed as opposed to BVDot().

If a non-standard inner product has been specified with BVSetMatrix(), then the result is m = X^H*B*y.

getActiveColumns(self)

 

Returns the current active dimensions.

Returns

l: int
The leading number of columns.
k: int
The active number of columns.

getColumn(self, int j)

 

Returns a Vec object that contains the entries of the requested column of the basis vectors object.

Parameters

j: int
The index of the requested column.

Returns

v: Vec
The vector containing the jth column.

Notes

Modifying the returned Vec will change the BV entries as well.

getMatrix(self)

 

Retrieves the matrix representation of the inner product.

Returns

mat: the matrix of the inner product

getOptionsPrefix(self)

 

Gets the prefix used for searching for all BV options in the database.

Returns

prefix: string
The prefix string set for this BV object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getOrthogonalization(self)

 

Gets the orthogonalization settings from the BV object.

Returns

type: BV.OrthogType enumerate
The type of orthogonalization technique.
refine: BV.OrthogRefineType enumerate
The type of refinement.
eta: float
Parameter for selective refinement (used when the the refinement type BV.OrthogRefineType.IFNEEDED).
block: BV.OrthogBlockType enumerate
The type of block orthogonalization .

getSizes(self)

 

Returns the local and global sizes, and the number of columns.

Returns

sizes: two-tuple of int
The local and global sizes (n, N).
m: int
The number of columns.

getType(self)

 

Gets the BV type of this object.

Returns

type: BV.Type enumerate
The inner product type currently being used.
Overrides: petsc4py.PETSc.Object.getType

insertVec(self, int j, Vec w)

 

Insert a vector into the specified column.

Parameters

j: int
The column to be overwritten.
w: Vec
The vector to be copied.

insertVecs(self, int s, W, bool orth)

 

Insert a set of vectors into specified columns.

Parameters

s: int
The first column to be overwritten.
W: Vec or sequence of Vec.
Set of vectors to be copied.
orth:
Flag indicating if the vectors must be orthogonalized.

Returns

m: int
Number of linearly independent vectors.

Notes

Copies the contents of vectors W into self(:,s:s+n), where n is the length of W. If orthogonalization flag is set then the vectors are copied one by one then orthogonalized against the previous one. If any are linearly dependent then it is discared and the value of m is decreased.

matMult(self, Mat A, BV Y=None)

 

Computes the matrix-vector product for each column, Y = A*V.

Parameters

A: Mat
The matrix.

Returns

Y: BV
The result.

Notes

Only active columns (excluding the leading ones) are processed.

It is possible to choose whether the computation is done column by column or using dense matrices using the options database keys:

-bv_matmult_vecs -bv_matmult_mat

The default is bv_matmult_mat.

matMultHermitianTranspose(self, Mat A, BV Y=None)

 

Computes the matrix-vector product with the conjugate transpose of a matrix for each column, Y=A^H*V.

Parameters

A: Mat
The matrix.

Returns

Y: BV
The result.

Notes

Only active columns (excluding the leading ones) are processed.

As opoosed to matMult(), this operation is always done by column by column, with a sequence of calls to MatMultHermitianTranspose().

matProject(self, Mat A, BV Y)

 

Computes the projection of a matrix onto a subspace.

M = Y^H A X

Parameters

A: Mat or None
Matrix to be projected.
Y: BV
Left basis vectors, can be the same as self, giving M = X^H A X.

Returns

M: Mat
Projection of the matrix A onto the subspace.

multVec(self, alpha, beta, Vec y, q)

 

Computes y = beta*y + alpha*X*q.

Parameter

alpha: scalar beta: scalar q: scalar or sequence of scalars

Return

y: Vec
The result.

norm(self, norm_type=None)

 

Computes the matrix norm of the BV.

Parameters

norm_type: PETSC.NormType enumerate
The norm type.

Returns

norm: float

Notes

All active columns (except the leading ones) are considered as a matrix. The allowed norms are NORM_1, NORM_FROBENIUS, and NORM_INFINITY.

This operation fails if a non-standard inner product has been specified with BVSetMatrix().

normColumn(self, int j, norm_type=None)

 

Computes the matrix norm of the BV.

Parameters

j: int
Index of column.
norm_type: PETSc.NormType (int)
The norm type.

Returns

norm: float

Notes

The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).

If a non-standard inner product has been specified with BVSetMatrix(), then the returned value is sqrt(V[j]'* B*V[j]), where B is the inner product matrix (argument 'type' is ignored).

orthogonalize(self, Mat R=None, **kargs)

 

Orthogonalize all columns (except leading ones), that is, compute the QR decomposition.

Parameters

R: Mat or None
A sequential dense matrix.

Notes

The output satisfies V0 = V*R (where V0 represent the input V) and V'*V = I.

orthogonalizeVec(self, Vec v)

 

Orthogonalize a vector with respect to a set of vectors.

Parameters

v: Vec
Vector to be orthogonalized, modified on return.

Returns

norm: float
The norm of the resulting vector.
lindep: boolean
Flag indicating that refinement did not improve the quality of orthogonalization.

Notes

This function applies an orthogonal projector to project vector v onto the orthogonal complement of the span of the columns of the BV.

This routine does not normalize the resulting vector.

restoreColumn(self, int j, Vec v)

 

Restore a column obtained with BVGetColumn().

Parameters

j: int
The index of the requested column.
v: Vec
The vector obtained with BVGetColumn().

Notes

The arguments must match the corresponding call to BVGetColumn().

scale(self, alpha)

 

Multiply the entries by a scalar value.

Parameters

alpha: float
scaling factor.

Notes

All active columns (except the leading ones) are scaled.

scaleColumn(self, int j, alpha)

 

Scale column j by alpha

Parameters

j: int
column number to be scaled.
alpha: float
scaling factor.

setActiveColumns(self, int l, int k)

 

Specify the columns that will be involved in operations.

Parameters

l: int
The leading number of columns.
k: int
The active number of columns.

setFromOptions(self)

 

Sets BV options from the options database.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setMatrix(self, Mat mat, bool indef)

 

Sets the bilinear form to be used for inner products.

Parameters

mat: Mat, optional
The matrix of the inner product.
indef: bool, optional
Whether the matrix is indefinite

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all BV options in the database.

Parameters

prefix: string
The prefix string to prepend to all BV option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setOrthogonalization(self, type=None, refine=None, eta=None, block=None)

 

Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors).

Parameters

type: BV.OrthogType enumerate, optional
The type of orthogonalization technique.
refine: BV.OrthogRefineType enumerate, optional
The type of refinement.
eta: float, optional
Parameter for selective refinement.
block: BV.OrthogBlockType enumerate, optional
The type of block orthogonalization.

Notes

The default settings work well for most problems.

The parameter eta should be a real value between 0 and 1 (or DEFAULT). The value of eta is used only when the refinement type is BV.OrthogRefineType.IFNEEDED.

When using several processors, BV.OrthogType.MGS is likely to result in bad scalability.

If the method set for block orthogonalization is GS, then the computation is done column by column with the vector orthogonalization.

setRandom(self)

 

Set the active columns of BV to random numbers.

Notes

All active columns (except the leading ones) are modified.

setSizes(self, sizes, m)

 

Sets the local and global sizes, and the number of columns.

Parameters

sizes: int or two-tuple of int
The global size N or a two-tuple (n, N) with the local and global sizes.
m: int
The number of columns.

Notes

Either n or N (but not both) can be PETSc.DECIDE or None to have it automatically set.

setSizesFromVec(self, Vec w, m)

 

Sets the local and global sizes, and the number of columns. Local and global sizes are specified indirectly by passing a template vector.

Parameters

w: Vec
The template vector.
m: int
The number of columns.

setType(self, bv_type)

 

Selects the type for the BV object.

Parameters

bv_type: BV.Type enumerate
The inner product type to be used.

view(self, Viewer viewer=None)

 

Prints the BV data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_6.png0000644000175000001440000000156412720314522024260 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.lib-module.html0000644000175000001440000001747212720314520022737 0ustar dalcinlusers00000000000000 slepc4py.lib
Package slepc4py :: Package lib
[hide private]
[frames] | no frames]

Package lib

Extension modules for different SLEPc configurations.

SLEPc can be configured with different options (eg. debug/optimized, single/double precisionm, C/C++ compilers, external packages). Each configuration variant is associated to a name, frequently available as an environmental variable named PETSC_ARCH.

This package is a holds all the available variants of the SLEPc extension module built agaist specific SLEPc configurations. It also provides a convenience function using of the builtin imp module for easily importing any of the available extension modules depending on the value of a user-provided configuration name, the PETSC_ARCH environmental variable, or a configuration file.

Functions [hide private]
 
ImportSLEPc(arch=None)
Import the SLEPc extension module for a given configuration name.
 
getPathArchSLEPc(arch=None)
Undocumented.
Variables [hide private]
  __package__ = 'slepc4py.lib'
slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type.png0000644000175000001440000000156412720314520024031 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.PowerShiftType-class.html0000644000175000001440000002167412720314521026300 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.PowerShiftType
Package slepc4py :: Module SLEPc :: Class EPS :: Class PowerShiftType
[hide private]
[frames] | no frames]

Class PowerShiftType


EPS Power shift type.

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONSTANT = 0
  RAYLEIGH = 1
  WILKINSON = 2
  __qualname__ = 'EPSPowerShiftType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_which_2.png0000644000175000001440000000162012720314522024366 0ustar dalcinlusers00000000000000PNG  IHDRE$PG`bKGDEIDATX]HSqϽ$M4t1~ 㢛[m>Y~A "$Q ON|33$Rjłd K}۵\=s?vGl6xI7p|<AN#HLLiSტvT*NjWVHa:"-E{./j`Nx6.Ե\&hѩ)@0̸g1L9rWqG.i7f6hPUk4lHR4wu?s9#iv6ZmEq1磡kCC=q'",,Y,f_:]LD͒wr33$_\|>'x0b r_e $RAzyk\Tʭ|36incm?SU*,,v~aܮ ?׹rpa]]jBBJ||oK˅=K`?>WWi!/+ |h(8(H* VF `?.,/'ƲbqXg>q,2<<).QwwzRRXH\P0ImZ --:83ȥW8E"Hv|8zQqhֶvpmP]rܭVKQQ a?auBqZF(--e|<gm>7M<ŕEVM4}\]oe;/>4^k6IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_matmode.png0000644000175000001440000000237712720314524024505 0ustar dalcinlusers00000000000000PNG  IHDRW$~bKGDIDAThHg?k:H7d{ڲD<+5=Bseg5pX$ARc6'knp.!޺\~Ǘ<==,2jP)v^d4*UًUVɂ Ȁcǎy+wyL>r "4hb /*ꀿ=!fϘAmAgi?h*UM("W$"SRxMz~V$boW*b3VG=<ŋj ]|qGccǒ!Ξ%~aw2WdqNoLƍj_O^QuuPZ ԩNݻ9yRTV iL6ng+-8?dE(&Ϗ +IL7]祀.WTPq#a:!!`55|+DGFb dۺuHNǂ8 ֮u=x8ś6Jtd$+DѣXDem-,.ݤ$of›KpJ޻cWyS""hp MQFTVGaF#$!HIW>ҡ?Ew.Q"t5#eO~"qC&NO_x98z=_?MMMMt?O#SQT(``֭=}:&x;=Q?9|w/0;c`NNfma!\kib-XT6Ϝq.5{{yEEܾs+̳X]^ohit#'ehz̟=&b -Mcxb6}}]D"\^HIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.Type-class.html0000644000175000001440000004006412720314521024257 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.Type
Package slepc4py :: Module SLEPc :: Class EPS :: Class Type
[hide private]
[frames] | no frames]

Class Type


EPS type

Native sparse eigensolvers.

  • POWER: Power Iteration, Inverse Iteration, RQI.
  • SUBSPACE: Subspace Iteration.
  • ARNOLDI: Arnoldi.
  • LANCZOS: Lanczos.
  • KRYLOVSCHUR: Krylov-Schur (default).
  • GD: Generalized Davidson.
  • JD: Jacobi-Davidson.
  • RQCG: Rayleigh Quotient Conjugate Gradient.
  • LOBPCG: Locally Optimal Block Preconditioned Conjugate Gradient.
  • CISS: Contour Integral Spectrum Slicing.
  • LAPACK: Wrappers to dense eigensolvers in Lapack.

Wrappers to sparse eigensolvers (should be enabled during installation of SLEPc)

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ARNOLDI = 'arnoldi'
  ARPACK = 'arpack'
  BLOPEX = 'blopex'
  BLZPACK = 'blzpack'
  CISS = 'ciss'
  FEAST = 'feast'
  GD = 'gd'
  JD = 'jd'
  KRYLOVSCHUR = 'krylovschur'
  LANCZOS = 'lanczos'
  LAPACK = 'lapack'
  LOBPCG = 'lobpcg'
  POWER = 'power'
  PRIMME = 'primme'
  RQCG = 'rqcg'
  SUBSPACE = 'subspace'
  TRLAN = 'trlan'
  __qualname__ = 'EPSType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.Basis-class.html0000644000175000001440000002242412720314523024376 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.Basis
Package slepc4py :: Module SLEPc :: Class PEP :: Class Basis
[hide private]
[frames] | no frames]

Class Basis


Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CHEBYSHEV1 = 1
  CHEBYSHEV2 = 2
  HERMITE = 5
  LAGUERRE = 4
  LEGENDRE = 3
  MONOMIAL = 0
  __qualname__ = 'PEPBasis'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_errortype_4.png0000644000175000001440000000227112720314524025326 0ustar dalcinlusers00000000000000PNG  IHDRY$mbKGDnIDAThc?(``````h "00H?HNNfddhx}`bqdڵp KAVBBWwF'.100.ȂROoeW5`KKG\FF vĊ;"+*0ϯ\iNr‚آERRr={?{fa300 P ba!*((!"B-Gps300|&Y^y`ɓr 6m?Z{{7?"+>r}~71[Z&-Lˆ9sCCCΨ13 3o$ 7-==2du5---;>ip8L8Z&-vd2ヵkڵkvcFGV`0 ''pwwGdd$ 0000{{{RxoyhN իWc^r>>>S6uuuqjkka2rgyF]WWf( l۶ ?3qu*jB5 ..?qEl߾HJJC! `BL\[^;~8hv8NX@:af븿.cs̡zZ?ɡD2f¨saiOMMTIiZjjj\,ܾ}088J@rT* "!!$P*pss pQw`ƍq-:rss裏,l޼Y`0.]wg̘!(g.-_s5#!??_u'T*ʤrDDD */huٚILݞi_EV"VKpB*,,$"bZn]~)&&^}\]]ä면fΜIK IВ%K(''GzSHTR__njkkϏ L&@jzzzg8XnIP+%%%޽{E͛7m jy'IRCCEFFR^^ԯ173Bhv ѢEHK;w:A...o>$D===444DQQQt iߦ&vKK PSSӝڌF#7|CDDW={',~B+V0[X3r7nF"Zx1͘1ˉF Kc~ TYYIRio>G mverss#""777 ّRRRӓ̙314_t)8p@: Ƭ^_n޼If͢69qg 0[L&ڹs'͝;F [ܹs6;t%''9N#eo>G[tZt:Н:;;Q__o~L&TUU7oO?EWV444 ++ DGGwTS㔔Э[lTWWGzj7n^|Ez/+WЅ (!!|M"1².+VٳgI҉'HPК5kd2I$%%ݻno>Grkʗ1?m۶Mz^z|}}ϏnJ488H˖-#///玈YfѢE\ɡ` 6Pggzl^mDDNvc붽綷7KF IT;QnnTXcaN@ٴxb BAv>Z;Faaa$);;n߾muL{9Z]z<<Զc*x^S^h~v7'ܳj5ɕߤ={6^yGpЀ8lڴ O<_[ ~$%%a˖-7oˑ>꯿ˑz5o7W׿$}9ƒ1d2Aڊ#&=/oo={Ъף0/(zYGyyNxy0 \+qr~, 2iS~YYyAbyl,}ǡu L̔ym'VVKj[֯rF Z ŕ6vݸԄIIX}}VމC;Ŗ=.WU11iDY=҄šu0]k+"؟ˀ%=[ ;l;Lqhp k۷CId2$/] #G K^p^2ֆG/l\~pގ?ĆrrNҍayL .VTKj/}]:r;>Va}r2 33QvH~3(: ip8L8Z&- C˄áe#iaڟiFJ;"FB:1yzz"??.ũ}hx򀉇C˄3@`nv emIENDB`slepc4py-3.7.0/docs/apiref/slepc4py-module.html0000644000175000001440000002761412720314520022171 0ustar dalcinlusers00000000000000 slepc4py
Package slepc4py
[hide private]
[frames] | no frames]

Package slepc4py

This package is an interface to SLEPc libraries.

SLEPc (the Scalable Library for Eigenvalue Problem Computations) is a software library for the solution of large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc and can be used for either standard or generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix.


Version: 3.7.0

Author: Lisandro Dalcin

Submodules [hide private]
  • slepc4py.SLEPc: Scalable Library for Eigenvalue Problem Computations.
  • slepc4py.lib: Extension modules for different SLEPc configurations.

Functions [hide private]
 
init(args=None, arch=None)
Initialize SLEPc.
 
get_include()
Return the directory in the package that contains header files.
Variables [hide private]
  __credits__ = 'SLEPc Team <slepc-maint@upv.es>'
  __package__ = None
Function Details [hide private]

init(args=None, arch=None)

 

Initialize SLEPc.

This function should be called only once, typically at the very beginning of the bootstrap script of an application.
Parameters:
  • args - command-line arguments, usually the 'sys.argv' list.
  • arch - specific configuration to use.

get_include()

 

Return the directory in the package that contains header files.

Extension modules that need to compile against slepc4py should use this function to locate the appropriate include directory. Using Python distutils (or perhaps NumPy distutils):

import petscc4py, slepc4py
Extension('extension_name', ...
          include_dirs=[...,
                        petsc4py.get_include(),
                        slepc4py.get_include(),])

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP-class.html0000644000175000001440000027552012720314522023344 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP
Package slepc4py :: Module SLEPc :: Class PEP
[hide private]
[frames] | no frames]

Class PEP


PEP
Nested Classes [hide private]
  Basis
  Conv
PEP convergence test
  ConvergedReason
PEP convergence reasons
  ErrorType
PEP error type to assess accuracy of computed solutions
  Extract
Extraction strategy used to obtain eigenvectors of the PEP from the eigenvectors of the linearization
  ProblemType
PEP problem type
  Refine
PEP refinement strategy
  RefineScheme
Scheme for solving linear systems during iterative refinement
  Scale
PEP scaling strategy
  Type
PEP type
  Which
PEP desired part of spectrum
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
appendOptionsPrefix(self, prefix)
Appends to the prefix used for searching for all PEP options in the database.
 
cancelMonitor(self)
Clears all monitors for a PEP object.
 
computeError(self, int i, etype=None)
Computes the error (based on the residual norm) associated with the i-th computed eigenpair.
 
create(self, comm=None)
Creates the PEP object.
 
destroy(self)
Destroys the PEP object.
 
errorView(self, etype=None, Viewer viewer=None)
Displays the errors associated with the computed solution (as well as the eigenvalues).
 
getBV(self)
Obtain the basis vectors object associated to the eigensolver.
 
getBasis(self)
Gets the type of polynomial basis used to describe the polynomial eigenvalue problem.
 
getConverged(self)
Gets the number of converged eigenpairs.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
getConvergenceTest(self)
Return the method used to compute the error estimate used in the convergence test.
 
getDimensions(self)
Gets the number of eigenvalues to compute and the dimension of the subspace.
 
getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)
Gets the i-th solution of the eigenproblem as computed by solve().
 
getErrorEstimate(self, int i)
Returns the error estimate associated to the i-th computed eigenpair.
 
getIterationNumber(self)
Gets the current iteration number.
 
getLinearCompanionForm(self)
Returns the number of the companion form that will be used for the linearization of a quadratic eigenproblem.
 
getLinearEPS(self)
Retrieve the eigensolver object (EPS) associated to the polynomial eigenvalue solver.
 
getLinearExplicitMatrix(self)
Returns the flag indicating if the matrices A and B for the linearization are built explicitly.
 
getOperators(self)
Gets the matrices associated with the eigenvalue problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all PEP options in the database.
 
getProblemType(self)
Gets the problem type from the PEP object.
 
getRG(self)
Obtain the region object associated to the eigensolver.
 
getRefine(self)
Gets the refinement strategy used by the PEP object, and the associated parameters.
 
getST(self)
Obtain the spectral transformation (ST) object associated to the eigensolver object.
 
getScale(self, Vec Dl=None, Vec Dr=None)
Gets the strategy used for scaling the polynomial eigenproblem.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default PEP convergence tests.
 
getTrackAll(self)
Returns the flag indicating whether all residual norms must be computed or not.
 
getType(self)
Gets the PEP type of this object.
 
getWhichEigenpairs(self)
Returns which portion of the spectrum is to be sought.
 
reset(self)
Resets the PEP object.
 
setBV(self, BV bv)
Associates a basis vectors object to the eigensolver.
 
setBasis(self, basis)
Specifies the type of polynomial basis used to describe the polynomial eigenvalue problem.
 
setConvergenceTest(self, conv)
Specifies how to compute the error estimate used in the convergence test.
 
setDimensions(self, nev=None, ncv=None, mpd=None)
Sets the number of eigenvalues to compute and the dimension of the subspace.
 
setFromOptions(self)
Sets PEP options from the options database.
 
setInitialSpace(self, space)
Sets the initial space from which the eigensolver starts to iterate.
 
setLinearCompanionForm(self, cform)
Choose between the two companion forms available for the linearization of a quadratic eigenproblem.
 
setLinearEPS(self, EPS eps)
Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.
 
setLinearExplicitMatrix(self, flag)
Indicate if the matrices A and B for the linearization of the problem must be built explicitly.
 
setOperators(self, operators)
Sets the matrices associated with the eigenvalue problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all PEP options in the database.
 
setProblemType(self, problem_type)
Specifies the type of the eigenvalue problem.
 
setRG(self, RG rg)
Associates a region object to the eigensolver.
 
setRefine(self, ref, npart=None, tol=None, its=None, scheme=None)
Sets the refinement strategy used by the PEP object, and the associated parameters.
 
setST(self, ST st)
Associates a spectral transformation object to the eigensolver.
 
setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None)
Sets the scaling strategy to be used for scaling the polynomial problem before attempting to solve.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default PEP convergence tests.
 
setTrackAll(self, trackall)
Specifies if the solver must compute the residual of all approximate eigenpairs or not.
 
setType(self, pep_type)
Selects the particular solver to be used in the PEP object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the eigensolver.
 
setWhichEigenpairs(self, which)
Specifies which portion of the spectrum is to be sought.
 
solve(self)
Solves the eigensystem.
 
view(self, Viewer viewer=None)
Prints the PEP data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

appendOptionsPrefix(self, prefix)

 

Appends to the prefix used for searching for all PEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all PEP option requests.

computeError(self, int i, etype=None)

 

Computes the error (based on the residual norm) associated with the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.
etype: PEP.ErrorType enumerate
The error type to compute.

Returns

error: real
The error bound, computed in various ways from the residual norm ||P(l)x||_2 where l is the eigenvalue and x is the eigenvector.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()).

create(self, comm=None)

 

Creates the PEP object.

Parameters

comm: Comm, optional.
MPI communicator. If not provided, it defaults to all processes.

destroy(self)

 
Destroys the PEP object.
Overrides: petsc4py.PETSc.Object.destroy

errorView(self, etype=None, Viewer viewer=None)

 

Displays the errors associated with the computed solution (as well as the eigenvalues).

Parameters

etype: PEP.ErrorType enumerate, optional
The error type to compute.
viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.

Notes

By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.

getBV(self)

 

Obtain the basis vectors object associated to the eigensolver.

Returns

bv: BV
The basis vectors context.

getBasis(self)

 

Gets the type of polynomial basis used to describe the polynomial eigenvalue problem.

Returns

basis: PEP.Basis enumerate
the basis that was previously set.

getConverged(self)

 

Gets the number of converged eigenpairs.

Returns

nconv: int
Number of converged eigenpairs.

getConvergedReason(self)

 

Gets the reason why the solve() iteration was stopped.

Returns

reason: PEP.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

getConvergenceTest(self)

 

Return the method used to compute the error estimate used in the convergence test.

Returns

conv: PEP.Conv
The method used to compute the error estimate used in the convergence test.

getDimensions(self)

 

Gets the number of eigenvalues to compute and the dimension of the subspace.

Returns

nev: int
Number of eigenvalues to compute.
ncv: int
Maximum dimension of the subspace to be used by the solver.
mpd: int
Maximum dimension allowed for the projected problem.

getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)

 

Gets the i-th solution of the eigenproblem as computed by solve(). The solution consists of both the eigenvalue and the eigenvector.

Parameters

i: int
Index of the solution to be obtained.
Vr: Vec, optional
Placeholder for the returned eigenvector (real part).
Vi: Vec, optional
Placeholder for the returned eigenvector (imaginary part).

Returns

e: scalar (possibly complex)
The computed eigenvalue.

getErrorEstimate(self, int i)

 

Returns the error estimate associated to the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.

Returns

error: real
Error estimate.

getIterationNumber(self)

 

Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.

Returns

its: int
Iteration number.

getLinearCompanionForm(self)

 

Returns the number of the companion form that will be used for the linearization of a quadratic eigenproblem.

Returns

cform: integer
1 or 2 (first or second companion form).

getLinearEPS(self)

 

Retrieve the eigensolver object (EPS) associated to the polynomial eigenvalue solver.

Returns

eps: EPS
The linear eigensolver.

getLinearExplicitMatrix(self)

 

Returns the flag indicating if the matrices A and B for the linearization are built explicitly.

Returns

flag: boolean

getOperators(self)

 

Gets the matrices associated with the eigenvalue problem.

Returns

operators: tuple of Mat
The matrices associated with the eigensystem.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all PEP options in the database.

Returns

prefix: string
The prefix string set for this PEP object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getProblemType(self)

 

Gets the problem type from the PEP object.

Returns

problem_type: PEP.ProblemType enumerate
The problem type that was previously set.

getRG(self)

 

Obtain the region object associated to the eigensolver.

Returns

rg: RG
The region context.

getRefine(self)

 

Gets the refinement strategy used by the PEP object, and the associated parameters.

Returns

ref: PEP.Refine
The refinement type.
npart: int
The number of partitions of the communicator.
tol: real
The convergence tolerance.
its: int
The maximum number of refinement iterations.
scheme: PEP.RefineScheme
Scheme for solving linear systems

getST(self)

 

Obtain the spectral transformation (ST) object associated to the eigensolver object.

Returns

st: ST
The spectral transformation.

getScale(self, Vec Dl=None, Vec Dr=None)

 

Gets the strategy used for scaling the polynomial eigenproblem.

Parameters

Dl: Vec, optional
Placeholder for the returned left diagonal matrix.
Dr: Vec, optional
Placeholder for the returned right diagonal matrix.

Returns

scale: PEP.Scale enumerate
The scaling strategy.
alpha: real
The scaling factor.
its: integer
The number of iteration of diagonal scaling.
lbda: real
Approximation of the wanted eigenvalues (modulus).

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default PEP convergence tests.

Returns

tol: float
The convergence tolerance.
max_it: int
The maximum number of iterations

getTrackAll(self)

 

Returns the flag indicating whether all residual norms must be computed or not.

Returns

trackall: bool
Whether the solver compute all residuals or not.

getType(self)

 

Gets the PEP type of this object.

Returns

type: PEP.Type enumerate
The solver currently being used.
Overrides: petsc4py.PETSc.Object.getType

getWhichEigenpairs(self)

 

Returns which portion of the spectrum is to be sought.

Returns

which: PEP.Which enumerate
The portion of the spectrum to be sought by the solver.

setBV(self, BV bv)

 

Associates a basis vectors object to the eigensolver.

Parameters

bv: BV
The basis vectors context.

setBasis(self, basis)

 

Specifies the type of polynomial basis used to describe the polynomial eigenvalue problem.

Parameters

basis: PEP.Basis enumerate
the basis to be set.

setConvergenceTest(self, conv)

 

Specifies how to compute the error estimate used in the convergence test.

Parameters

conv: PEP.Conv
The method used to compute the error estimate used in the convergence test.

setDimensions(self, nev=None, ncv=None, mpd=None)

 

Sets the number of eigenvalues to compute and the dimension of the subspace.

Parameters

nev: int, optional
Number of eigenvalues to compute.
ncv: int, optional
Maximum dimension of the subspace to be used by the solver.
mpd: int, optional
Maximum dimension allowed for the projected problem.

setFromOptions(self)

 
Sets PEP options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.
Overrides: petsc4py.PETSc.Object.setFromOptions

setInitialSpace(self, space)

 

Sets the initial space from which the eigensolver starts to iterate.

Parameters

space: Vec or sequence of Vec
The initial space

setLinearCompanionForm(self, cform)

 

Choose between the two companion forms available for the linearization of a quadratic eigenproblem.

Parameters

cform: integer
1 or 2 (first or second companion form).

setLinearEPS(self, EPS eps)

 

Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.

Parameters

eps: EPS
The linear eigensolver.

setLinearExplicitMatrix(self, flag)

 

Indicate if the matrices A and B for the linearization of the problem must be built explicitly.

Parameters

flag: boolean
boolean flag indicating if the matrices are built explicitly .

setOperators(self, operators)

 

Sets the matrices associated with the eigenvalue problem.

Parameters

operators: sequence of Mat
The matrices associated with the eigensystem.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all PEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all PEP option requests.
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setProblemType(self, problem_type)

 

Specifies the type of the eigenvalue problem.

Parameters

problem_type: PEP.ProblemType enumerate
The problem type to be set.

setRG(self, RG rg)

 

Associates a region object to the eigensolver.

Parameters

rg: RG
The region context.

setRefine(self, ref, npart=None, tol=None, its=None, scheme=None)

 

Sets the refinement strategy used by the PEP object, and the associated parameters.

Parameters

ref: PEP.Refine
The refinement type.
npart: int, optional
The number of partitions of the communicator.
tol: real, optional
The convergence tolerance.
its: int, optional
The maximum number of refinement iterations.
scheme: PEP.RefineScheme, optional
Scheme for linear system solves

setST(self, ST st)

 

Associates a spectral transformation object to the eigensolver.

Parameters

st: ST
The spectral transformation.

setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None)

 

Sets the scaling strategy to be used for scaling the polynomial problem before attempting to solve.

Parameters

scale: PEP.Scale enumerate
The scaling strategy.
alpha: real, optional
The scaling factor.
Dl: Vec, optional
The left diagonal matrix.
Dr: Vec, optional
The right diagonal matrix.
its: integer, optional
The number of iteration of diagonal scaling.
lbda: real, optional
Approximation of the wanted eigenvalues (modulus).

setTolerances(self, tol=None, max_it=None)

 

Sets the tolerance and maximum iteration count used by the default PEP convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
max_it: int, optional
The maximum number of iterations

setTrackAll(self, trackall)

 

Specifies if the solver must compute the residual of all approximate eigenpairs or not.

Parameters

trackall: bool
Whether compute all residuals or not.

setType(self, pep_type)

 

Selects the particular solver to be used in the PEP object.

Parameters

pep_type: PEP.Type enumerate
The solver to be used.

setWhichEigenpairs(self, which)

 

Specifies which portion of the spectrum is to be sought.

Parameters

which: PEP.Which enumerate
The portion of the spectrum to be sought by the solver.

view(self, Viewer viewer=None)

 

Prints the PEP data structure.

Parameters

viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/help.html0000644000175000001440000002603712720314520020071 0ustar dalcinlusers00000000000000 Help
 
[hide private]
[frames] | no frames]

API Documentation

This document contains the API (Application Programming Interface) documentation for SLEPc for Python. Documentation for the Python objects defined by the project is divided into separate pages for each package, module, and class. The API documentation also includes two pages containing information about the project as a whole: a trees page, and an index page.

Object Documentation

Each Package Documentation page contains:

  • A description of the package.
  • A list of the modules and sub-packages contained by the package.
  • A summary of the classes defined by the package.
  • A summary of the functions defined by the package.
  • A summary of the variables defined by the package.
  • A detailed description of each function defined by the package.
  • A detailed description of each variable defined by the package.

Each Module Documentation page contains:

  • A description of the module.
  • A summary of the classes defined by the module.
  • A summary of the functions defined by the module.
  • A summary of the variables defined by the module.
  • A detailed description of each function defined by the module.
  • A detailed description of each variable defined by the module.

Each Class Documentation page contains:

  • A class inheritance diagram.
  • A list of known subclasses.
  • A description of the class.
  • A summary of the methods defined by the class.
  • A summary of the instance variables defined by the class.
  • A summary of the class (static) variables defined by the class.
  • A detailed description of each method defined by the class.
  • A detailed description of each instance variable defined by the class.
  • A detailed description of each class (static) variable defined by the class.

Project Documentation

The Trees page contains the module and class hierarchies:

  • The module hierarchy lists every package and module, with modules grouped into packages. At the top level, and within each package, modules and sub-packages are listed alphabetically.
  • The class hierarchy lists every class, grouped by base class. If a class has more than one base class, then it will be listed under each base class. At the top level, and under each base class, classes are listed alphabetically.

The Index page contains indices of terms and identifiers:

  • The term index lists every term indexed by any object's documentation. For each term, the index provides links to each place where the term is indexed.
  • The identifier index lists the (short) name of every package, module, class, method, function, variable, and parameter. For each identifier, the index provides a short description, and a link to its documentation.

The Table of Contents

The table of contents occupies the two frames on the left side of the window. The upper-left frame displays the project contents, and the lower-left frame displays the module contents:

Project
Contents
...
API
Documentation
Frame


Module
Contents
 
...
 

The project contents frame contains a list of all packages and modules that are defined by the project. Clicking on an entry will display its contents in the module contents frame. Clicking on a special entry, labeled "Everything," will display the contents of the entire project.

The module contents frame contains a list of every submodule, class, type, exception, function, and variable defined by a module or package. Clicking on an entry will display its documentation in the API documentation frame. Clicking on the name of the module, at the top of the frame, will display the documentation for the module itself.

The "frames" and "no frames" buttons below the top navigation bar can be used to control whether the table of contents is displayed or not.

The Navigation Bar

A navigation bar is located at the top and bottom of every page. It indicates what type of page you are currently viewing, and allows you to go to related pages. The following table describes the labels on the navigation bar. Note that not some labels (such as [Parent]) are not displayed on all pages.

Label Highlighted when... Links to...
[Parent] (never highlighted) the parent of the current package
[Package] viewing a package the package containing the current object
[Module] viewing a module the module containing the current object
[Class] viewing a class the class containing the current object
[Trees] viewing the trees page the trees page
[Index] viewing the index page the index page
[Help] viewing the help page the help page

The "show private" and "hide private" buttons below the top navigation bar can be used to control whether documentation for private objects is displayed. Private objects are usually defined as objects whose (short) names begin with a single underscore, but do not end with an underscore. For example, "_x", "__pprint", and "epydoc.epytext._tokenize" are private objects; but "re.sub", "__init__", and "type_" are not. However, if a module defines the "__all__" variable, then its contents are used to decide which objects are private.

A timestamp below the bottom navigation bar indicates when each page was last updated.

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_refinesche_2.png0000644000175000001440000000301312720314523025376 0ustar dalcinlusers00000000000000PNG  IHDRw$#bKGDIDATxmLSWm)&`A t$U> 2ADef Q1* oꦢdS $ *4S.f7QTFlQje%C=<{}zz%fٌ) D\#+d͘={Y"#M&KJJ[\TƓɓ'ۘێfL&| 6?,Q|(oM1%!}/+q 10F4W\Je:3(&׮9N*Z|8JҍQFE)8hVSKT**Maz]څGFmۆ&9?t:$Isֲ]fy9r9)Nef&z6P$_ZrSSqٲ'd-Zu:GL&| <\td$$0 /'N8.fѡ}{l$eg󬱑Ӧ leJr&N䃡CڹUM.2[ZAAsVװaXuuVEG1dŕTl8aܾB8}@HHݻcjTu`r~ٳ[Ӆ |e ?k?nW_WQ]JL$e&c=Mz*=É7o MZ-,7+({~ۻUXkPZ p).hd.\HZN;bY۶9 .3WV# EJpeeARSQ(g}b"GΞuH?^].'f8RޚT\B @Qi)ÞÇ(()aM|1ѩ8-i^͔ѣYKI'AAd$$6k!!?3g۽;Y9U; r/!uD;˟j}w0F4W \#+`n?|uR1W*b2M$x޻MOlllň]d24M`h025IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.ErrorType-class.html0000644000175000001440000002172112720314521025270 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.ErrorType
Package slepc4py :: Module SLEPc :: Class EPS :: Class ErrorType
[hide private]
[frames] | no frames]

Class ErrorType


EPS error type to assess accuracy of computed solutions

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABSOLUTE = 0
  BACKWARD = 2
  RELATIVE = 1
  __qualname__ = 'EPSErrorType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_extract.png0000644000175000001440000000204512720314523024520 0ustar dalcinlusers00000000000000PNG  IHDRK$ebKGDIDATh_hSWFIcAŘb2Z1AX0vu>XMZ*mF&[XۇFF`PeVF7_f1U4+Ymva5^cwmp9_~r\  ꥮ࿄"K,)sT*,ۦ?WO$KV/y***DC2cX9?4QD /\U(혲K@%EYRx:9>"#Eh_&ArOwFF*e&+o㒂\e,hEٳ>|v"|>^eeDql߹P1|*|}_\${V|xlV~}[$B6YyhL;:'9Po L&Vh4 yH, 5'xuDlBh笱P~6ykF~65uƍ2\daVi~}n.dږޫ{282;vEb1VegL̰B!HpbFycY?{dy6<. W/yMV=ͼ}$۬V lZYg35:*_CMUS:cTMCr"xW㼶};.y* GIɲp000B , ($Ȓ"K, ($P8G$KVL&  @/:QOMMM\t8NQqG!-YPdIOׅ ȂIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_pep.png0000644000175000001440000000543712720314522023641 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx}L[/Byqw7pCtdcpjK|8#zGpf@oda4qFFlJfq-SȽ`] R;IN>}{q$ !th dIhHhx<8v^zzjdÇl]͛#ʠ3Em#### S\\ߖf8p dۍJ"11yyyr탃ZXbRRRzj]]]JZcGZBod2E3g --Mp{{;zzzpya֭m7xl6cǎqa={Gkk+Vj@aa!~G㧟~+&u=~߾}HOOX^;x UvGx<Zr"~O˗5h7H淯-Rݕ,..vÆ@SeeeA}{kimmE~~>222PQQ+WFFF`Z XVuQX, tM^;Em۶ҥK~uڵ zkصUTT`J[ۍ$,,,Tmi[ofsaII nb> T?q333Zn:Nvtt0//UUUʸTx+gڈӯK$-[ƞǏ h LHHo;>|> ի#GOVnwwws<}TBVeVV=÷zKsń_o9f5oj^/m6|rΚ5MMM$r.M&IuZZZklZ3T]mh}N` I :6mhdqq1;p8Tڵ|w3LX?^x.\ٳy9q?pi3Fmn~O={p$Cυ,?~\}qÆ qiPu]wk1.KDvv6d2r/f=~xx>Boo/oߎFwwn_ttt)))HIIW_2|hiiu`HMǔĖ-[p8}qqqذan5jy]%D}}=6nܨ ŋu<'[״xgڻ.?X]]MMSNq͚5|Ǎi0s?`0kjjhXp8p8x󩧞R*ڼ^/322O>į^tI_-ΞMk=cW_̙3 FE_EKK z!uF39    НB3eA.y"EFyy9^~evm.E>)("2pAZY ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݑ ݉\8y|ff4QZZ|ZEXj|>_K={.ę[\M`_v 3.WGQdD))Z]Bth,D 1I1<'#kɈ+(j4xJWUUیǿc6~DhIh3fgs"vލ~fmIH;Y&&H5LMִ0zE?Bδ08< H⿽;[6&Տ&q_+V^xc?ۏ&ѣXpጴdM+tGδvɉA' '۶# S8TiHhHhHhHhHhHhuX3l=3mrrrKxszQ[[ Rh4.eF\h@蟄VN slepc4py.SLEPc.MFN
Package slepc4py :: Module SLEPc :: Class MFN
[hide private]
[frames] | no frames]

Class MFN


MFN
Nested Classes [hide private]
  ConvergedReason
  Type
MFN type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
appendOptionsPrefix(self, prefix)
Appends to the prefix used for searching for all MFN options in the database.
 
cancelMonitor(self)
Clears all monitors for a MFN object.
 
create(self, comm=None)
Creates the MFN object.
 
destroy(self)
Destroys the MFN object.
 
getBV(self)
Obtain the basis vector object associated to the MFN object.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
getDimensions(self)
Gets the dimension of the subspace used by the solver.
 
getFN(self)
Obtain the math function object associated to the MFN object.
 
getIterationNumber(self)
Gets the current iteration number.
 
getOperator(self)
Gets the matrix associated with the MFN object.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all MFN options in the database.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default MFN convergence tests.
 
getType(self)
Gets the MFN type of this object.
 
reset(self)
Resets the MFN object.
 
setBV(self, BV bv)
Associates a basis vector object to the MFN object.
 
setDimensions(self, ncv)
Sets the dimension of the subspace to be used by the solver.
 
setFN(self, FN fn)
Associates a math function object to the MFN object.
 
setFromOptions(self)
Sets MFN options from the options database.
 
setOperator(self, Mat A)
Sets the matrix associated with the MFN object.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all MFN options in the database.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default MFN convergence tests.
 
setType(self, mfn_type)
Selects the particular solver to be used in the MFN object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the eigensolver.
 
solve(self, Vec b, Vec x)
Solves the matrix function problem.
 
view(self, Viewer viewer=None)
Prints the MFN data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

appendOptionsPrefix(self, prefix)

 

Appends to the prefix used for searching for all MFN options in the database.

Parameters

prefix: string
The prefix string to prepend to all MFN option requests.

create(self, comm=None)

 

Creates the MFN object.

Parameters

comm: Comm, optional.
MPI communicator. If not provided, it defaults to all processes.

destroy(self)

 
Destroys the MFN object.
Overrides: petsc4py.PETSc.Object.destroy

getBV(self)

 

Obtain the basis vector object associated to the MFN object.

Returns

bv: BV
The basis vectors context.

getConvergedReason(self)

 

Gets the reason why the solve() iteration was stopped.

Returns

reason: MFN.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

getDimensions(self)

 

Gets the dimension of the subspace used by the solver.

Returns

ncv: int
Maximum dimension of the subspace to be used by the solver.

getFN(self)

 

Obtain the math function object associated to the MFN object.

Returns

fn: FN
The math function context.

getIterationNumber(self)

 

Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.

Returns

its: int
Iteration number.

getOperator(self)

 

Gets the matrix associated with the MFN object.

Returns

A: Mat
The matrix for which the matrix function is to be computed.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all MFN options in the database.

Returns

prefix: string
The prefix string set for this MFN object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default MFN convergence tests.

Returns

tol: float
The convergence tolerance.
max_it: int
The maximum number of iterations

getType(self)

 

Gets the MFN type of this object.

Returns

type: MFN.Type enumerate
The solver currently being used.
Overrides: petsc4py.PETSc.Object.getType

setBV(self, BV bv)

 

Associates a basis vector object to the MFN object.

Parameters

bv: BV
The basis vectors context.

setDimensions(self, ncv)

 

Sets the dimension of the subspace to be used by the solver.

Parameters

ncv: int
Maximum dimension of the subspace to be used by the solver.

setFN(self, FN fn)

 

Associates a math function object to the MFN object.

Parameters

fn: FN
The math function context.

setFromOptions(self)

 
Sets MFN options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.
Overrides: petsc4py.PETSc.Object.setFromOptions

setOperator(self, Mat A)

 

Sets the matrix associated with the MFN object.

Parameters

A: Mat
The problem matrix.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all MFN options in the database.

Parameters

prefix: string
The prefix string to prepend to all MFN option requests.
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setTolerances(self, tol=None, max_it=None)

 

Sets the tolerance and maximum iteration count used by the default MFN convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
max_it: int, optional
The maximum number of iterations

setType(self, mfn_type)

 

Selects the particular solver to be used in the MFN object.

Parameters

mfn_type: MFN.Type enumerate
The solver to be used.

solve(self, Vec b, Vec x)

 

Solves the matrix function problem. Given a vector b, the vector x = f(alpha*A)*b is returned.

Parameters

b: Vec
The right hand side vector.
x: Vec
The solution.

view(self, Viewer viewer=None)

 

Prints the MFN data structure.

Parameters

viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.ErrorType-class.html0000644000175000001440000002173112720314523025270 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.ErrorType
Package slepc4py :: Module SLEPc :: Class PEP :: Class ErrorType
[hide private]
[frames] | no frames]

Class ErrorType


PEP error type to assess accuracy of computed solutions

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABSOLUTE = 0
  BACKWARD = 2
  RELATIVE = 1
  __qualname__ = 'PEPErrorType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.MFN.Type-class.html0000644000175000001440000002145012720314522024247 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.MFN.Type
Package slepc4py :: Module SLEPc :: Class MFN :: Class Type
[hide private]
[frames] | no frames]

Class Type


MFN type

Action of a matrix function on a vector.

  • KRYLOV: Restarted Krylov solver.
  • EXPOKIT: Implementation of the method in Expokit.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  EXPOKIT = 'expokit'
  KRYLOV = 'krylov'
  __qualname__ = 'MFNType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/epydoc.css0000644000175000001440000003722712720314517020261 0ustar dalcinlusers00000000000000 /* Epydoc CSS Stylesheet * * This stylesheet can be used to customize the appearance of epydoc's * HTML output. * */ /* Default Colors & Styles * - Set the default foreground & background color with 'body'; and * link colors with 'a:link' and 'a:visited'. * - Use bold for decision list terms. * - The heading styles defined here are used for headings *within* * docstring descriptions. All headings used by epydoc itself use * either class='epydoc' or class='toc' (CSS styles for both * defined below). */ body { background: #ffffff; color: #000000; } p { margin-top: 0.5em; margin-bottom: 0.5em; } a:link { color: #0000ff; } a:visited { color: #204080; } dt { font-weight: bold; } h1 { font-size: +140%; font-style: italic; font-weight: bold; } h2 { font-size: +125%; font-style: italic; font-weight: bold; } h3 { font-size: +110%; font-style: italic; font-weight: normal; } code { font-size: 100%; } /* N.B.: class, not pseudoclass */ a.link { font-family: monospace; } /* Page Header & Footer * - The standard page header consists of a navigation bar (with * pointers to standard pages such as 'home' and 'trees'); a * breadcrumbs list, which can be used to navigate to containing * classes or modules; options links, to show/hide private * variables and to show/hide frames; and a page title (using *

). The page title may be followed by a link to the * corresponding source code (using 'span.codelink'). * - The footer consists of a navigation bar, a timestamp, and a * pointer to epydoc's homepage. */ h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } h2.epydoc { font-size: +130%; font-weight: bold; } h3.epydoc { font-size: +115%; font-weight: bold; margin-top: 0.2em; } td h3.epydoc { font-size: +115%; font-weight: bold; margin-bottom: 0; } table.navbar { background: #a0c0ff; color: #000000; border: 2px groove #c0d0d0; } table.navbar table { color: #000000; } th.navbar-select { background: #70b0ff; color: #000000; } table.navbar a { text-decoration: none; } table.navbar a:link { color: #0000ff; } table.navbar a:visited { color: #204080; } span.breadcrumbs { font-size: 85%; font-weight: bold; } span.options { font-size: 70%; } span.codelink { font-size: 85%; } td.footer { font-size: 85%; } /* Table Headers * - Each summary table and details section begins with a 'header' * row. This row contains a section title (marked by * 'span.table-header') as well as a show/hide private link * (marked by 'span.options', defined above). * - Summary tables that contain user-defined groups mark those * groups using 'group header' rows. */ td.table-header { background: #70b0ff; color: #000000; border: 1px solid #608090; } td.table-header table { color: #000000; } td.table-header table a:link { color: #0000ff; } td.table-header table a:visited { color: #204080; } span.table-header { font-size: 120%; font-weight: bold; } th.group-header { background: #c0e0f8; color: #000000; text-align: left; font-style: italic; font-size: 115%; border: 1px solid #608090; } /* Summary Tables (functions, variables, etc) * - Each object is described by a single row of the table with * two cells. The left cell gives the object's type, and is * marked with 'code.summary-type'. The right cell gives the * object's name and a summary description. * - CSS styles for the table's header and group headers are * defined above, under 'Table Headers' */ table.summary { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin-bottom: 0.5em; } td.summary { border: 1px solid #608090; } code.summary-type { font-size: 85%; } table.summary a:link { color: #0000ff; } table.summary a:visited { color: #204080; } /* Details Tables (functions, variables, etc) * - Each object is described in its own div. * - A single-row summary table w/ table-header is used as * a header for each details section (CSS style for table-header * is defined above, under 'Table Headers'). */ table.details { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } table.details table { color: #000000; } table.details a:link { color: #0000ff; } table.details a:visited { color: #204080; } /* Fields */ dl.fields { margin-left: 2em; margin-top: 1em; margin-bottom: 1em; } dl.fields dd ul { margin-left: 0em; padding-left: 0em; } dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } div.fields { margin-left: 2em; } div.fields p { margin-bottom: 0.5em; } /* Index tables (identifier index, term index, etc) * - link-index is used for indices containing lists of links * (namely, the identifier index & term index). * - index-where is used in link indices for the text indicating * the container/source for each link. * - metadata-index is used for indices containing metadata * extracted from fields (namely, the bug index & todo index). */ table.link-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; } td.link-index { border-width: 0px; } table.link-index a:link { color: #0000ff; } table.link-index a:visited { color: #204080; } span.index-where { font-size: 70%; } table.metadata-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } td.metadata-index { border-width: 1px; border-style: solid; } table.metadata-index a:link { color: #0000ff; } table.metadata-index a:visited { color: #204080; } /* Function signatures * - sig* is used for the signature in the details section. * - .summary-sig* is used for the signature in the summary * table, and when listing property accessor functions. * */ .sig-name { color: #006080; } .sig-arg { color: #008060; } .sig-default { color: #602000; } .summary-sig { font-family: monospace; } .summary-sig-name { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:link { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:visited { color: #006080; font-weight: bold; } .summary-sig-arg { color: #006040; } .summary-sig-default { color: #501800; } /* Subclass list */ ul.subclass-list { display: inline; } ul.subclass-list li { display: inline; } /* To render variables, classes etc. like functions */ table.summary .summary-name { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:link { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:visited { color: #006080; font-weight: bold; font-family: monospace; } /* Variable values * - In the 'variable details' sections, each varaible's value is * listed in a 'pre.variable' box. The width of this box is * restricted to 80 chars; if the value's repr is longer than * this it will be wrapped, using a backslash marked with * class 'variable-linewrap'. If the value's repr is longer * than 3 lines, the rest will be ellided; and an ellipsis * marker ('...' marked with 'variable-ellipsis') will be used. * - If the value is a string, its quote marks will be marked * with 'variable-quote'. * - If the variable is a regexp, it is syntax-highlighted using * the re* CSS classes. */ pre.variable { padding: .5em; margin: 0; background: #dce4ec; color: #000000; border: 1px solid #708890; } .variable-linewrap { color: #604000; font-weight: bold; } .variable-ellipsis { color: #604000; font-weight: bold; } .variable-quote { color: #604000; font-weight: bold; } .variable-group { color: #008000; font-weight: bold; } .variable-op { color: #604000; font-weight: bold; } .variable-string { color: #006030; } .variable-unknown { color: #a00000; font-weight: bold; } .re { color: #000000; } .re-char { color: #006030; } .re-op { color: #600000; } .re-group { color: #003060; } .re-ref { color: #404040; } /* Base tree * - Used by class pages to display the base class hierarchy. */ pre.base-tree { font-size: 80%; margin: 0; } /* Frames-based table of contents headers * - Consists of two frames: one for selecting modules; and * the other listing the contents of the selected module. * - h1.toc is used for each frame's heading * - h2.toc is used for subheadings within each frame. */ h1.toc { text-align: center; font-size: 105%; margin: 0; font-weight: bold; padding: 0; } h2.toc { font-size: 100%; font-weight: bold; margin: 0.5em 0 0 -0.3em; } /* Syntax Highlighting for Source Code * - doctest examples are displayed in a 'pre.py-doctest' block. * If the example is in a details table entry, then it will use * the colors specified by the 'table pre.py-doctest' line. * - Source code listings are displayed in a 'pre.py-src' block. * Each line is marked with 'span.py-line' (used to draw a line * down the left margin, separating the code from the line * numbers). Line numbers are displayed with 'span.py-lineno'. * The expand/collapse block toggle button is displayed with * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not * modify the font size of the text.) * - If a source code page is opened with an anchor, then the * corresponding code block will be highlighted. The code * block's header is highlighted with 'py-highlight-hdr'; and * the code block's body is highlighted with 'py-highlight'. * - The remaining py-* classes are used to perform syntax * highlighting (py-string for string literals, py-name for names, * etc.) */ pre.py-doctest { padding: .5em; margin: 1em; background: #e8f0f8; color: #000000; border: 1px solid #708890; } table pre.py-doctest { background: #dce4ec; color: #000000; } pre.py-src { border: 2px solid #000000; background: #f0f0f0; color: #000000; } .py-line { border-left: 2px solid #000000; margin-left: .2em; padding-left: .4em; } .py-lineno { font-style: italic; font-size: 90%; padding-left: .5em; } a.py-toggle { text-decoration: none; } div.py-highlight-hdr { border-top: 2px solid #000000; border-bottom: 2px solid #000000; background: #d8e8e8; } div.py-highlight { border-bottom: 2px solid #000000; background: #d0e0e0; } .py-prompt { color: #005050; font-weight: bold;} .py-more { color: #005050; font-weight: bold;} .py-string { color: #006030; } .py-comment { color: #003060; } .py-keyword { color: #600000; } .py-output { color: #404040; } .py-name { color: #000050; } .py-name:link { color: #000050 !important; } .py-name:visited { color: #000050 !important; } .py-number { color: #005000; } .py-defname { color: #000060; font-weight: bold; } .py-def-name { color: #000060; font-weight: bold; } .py-base-class { color: #000060; } .py-param { color: #000060; } .py-docstring { color: #006030; } .py-decorator { color: #804020; } /* Use this if you don't want links to names underlined: */ /*a.py-name { text-decoration: none; }*/ /* Graphs & Diagrams * - These CSS styles are used for graphs & diagrams generated using * Graphviz dot. 'img.graph-without-title' is used for bare * diagrams (to remove the border created by making the image * clickable). */ img.graph-without-title { border: none; } img.graph-with-title { border: 1px solid #000000; } span.graph-title { font-weight: bold; } span.graph-caption { } /* General-purpose classes * - 'p.indent-wrapped-lines' defines a paragraph whose first line * is not indented, but whose subsequent lines are. * - The 'nomargin-top' class is used to remove the top margin (e.g. * from lists). The 'nomargin' class is used to remove both the * top and bottom margin (but not the left or right margin -- * for lists, that would cause the bullets to disappear.) */ p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; margin: 0; } .nomargin-top { margin-top: 0; } .nomargin { margin-top: 0; margin-bottom: 0; } /* HTML Log */ div.log-block { padding: 0; margin: .5em 0 .5em 0; background: #e8f0f8; color: #000000; border: 1px solid #000000; } div.log-error { padding: .1em .3em .1em .3em; margin: 4px; background: #ffb0b0; color: #000000; border: 1px solid #000000; } div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; background: #ffffb0; color: #000000; border: 1px solid #000000; } div.log-info { padding: .1em .3em .1em .3em; margin: 4px; background: #b0ffb0; color: #000000; border: 1px solid #000000; } h2.log-hdr { background: #70b0ff; color: #000000; margin: 0; padding: 0em 0.5em 0em 0.5em; border-bottom: 1px solid #000000; font-size: 110%; } p.log { font-weight: bold; margin: .5em 0 .5em 0; } tr.opt-changed { color: #000000; font-weight: bold; } tr.opt-default { color: #606060; } pre.log { margin: 0; padding: 0; padding-left: 1em; } slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc-module.html0000644000175000001440000004103312720314520023065 0ustar dalcinlusers00000000000000 slepc4py.SLEPc
Package slepc4py :: Module SLEPc
[hide private]
[frames] | no frames]

Module SLEPc

Scalable Library for Eigenvalue Problem Computations.
Classes [hide private]
  BV
BV
  DS
DS
  EPS
EPS
  FN
FN
  MFN
MFN
  NEP
NEP
  PEP
PEP
  RG
RG
  ST
ST
  SVD
SVD
  Sys
  _p_mem
Functions [hide private]
 
_finalize()
 
_initialize(args=None)
Variables [hide private]
  COMM_NULL = <petsc4py.PETSc.Comm object at 0x7f795a9b56d0>
  COMM_SELF = <petsc4py.PETSc.Comm object at 0x7f795a9b5710>
  COMM_WORLD = <petsc4py.PETSc.Comm object at 0x7f795a9b5750>
  DECIDE = -1
  DEFAULT = -2
  DETERMINE = -1
  __arch__ = 'arch-linux2-c-debug'
  __package__ = 'slepc4py'
  __pyx_capi__ = {'PySlepcBV_Get': <capsule object "BV (PyObject...
Variables Details [hide private]

__pyx_capi__

Value:
{'PySlepcBV_Get': <capsule object "BV (PyObject *)" at 0x7f795a9ced50>\
,
 'PySlepcBV_New': <capsule object "PyObject *(BV)" at 0x7f795a9ced20>,
 'PySlepcDS_Get': <capsule object "DS (PyObject *)" at 0x7f795a9cedb0>\
,
 'PySlepcDS_New': <capsule object "PyObject *(DS)" at 0x7f795a9ced80>,
 'PySlepcEPS_Get': <capsule object "EPS (PyObject *)" at 0x7f795a9ceed\
0>,
...

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.BV.OrthogType-class.html0000644000175000001440000002104512720314520025317 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.BV.OrthogType
Package slepc4py :: Module SLEPc :: Class BV :: Class OrthogType
[hide private]
[frames] | no frames]

Class OrthogType


BV orthogonalization types

  • CGS: Classical Gram-Schmidt.
  • MGS: Modified Gram-Schmidt.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CGS = 0
  MGS = 1
  __qualname__ = 'BVOrthogType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_balance.png0000644000175000001440000000176612720314521024442 0ustar dalcinlusers00000000000000PNG  IHDRP$*-bKGDIDAThc?HLzQ{ $''322 Ȉ\h133oG _8Ð蕕Q| ~dTg~/+xBkaF8 +-}=.w?f40TdElϞ3g>y2΢RJD%DD$ED: |**afff1!!{ˡC\..桩*h`t6@!; [?}C\M͇ϟ!*S/$X2\K~۷_|zX_ij޼r$伍Gv-*((0Ǐ,Ygɓϙs9s ,eΚԩip9I , ]_vq*Y NvvYqq_ad``KmjzӜtUU75ݸbϞ-!""+!YPPNzV"÷7oVe``DŽ%KRSnzԦ/߾jhi#+%*uU lMEEMEEg..p]<܊ӪTebBqg 7o“͛_…X ߿xś7^?_VBBTP_~fceg ~k/ b}|LrΕ;wr<\9i/ݺ呕5uJ2\Nf0tTTVww311 GWUqsrV&%Ezzzde]}0 LJ{f߽lm !-]]L..dK0mVŀ=mKw0F=<q(I:11qM$&&s0ӾVAIENDB`slepc4py-3.7.0/docs/apiref/frames.html0000644000175000001440000000111512720314520020404 0ustar dalcinlusers00000000000000 SLEPc for Python slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.RefineScheme-class.html0000644000175000001440000002177012720314522025672 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.RefineScheme
Package slepc4py :: Module SLEPc :: Class NEP :: Class RefineScheme
[hide private]
[frames] | no frames]

Class RefineScheme


Scheme for solving linear systems during iterative refinement

  • SCHUR: Schur complement.
  • MBE: Mixed block elimination.
  • EXPLICIT: Build the explicit matrix.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  EXPLICIT = 3
  MBE = 2
  SCHUR = 1
  __qualname__ = 'NEPRefineScheme'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_3.png0000644000175000001440000000156412720314521024254 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_4.png0000644000175000001440000000156412720314521024255 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_9.png0000644000175000001440000000156412720314524024265 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_nep.png0000644000175000001440000000571612720314522023637 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx}PT򢋼uy ´k֝զrI 2)MdG K$;H-`P Mr Zj,d'gbH#(,Ĺ9˂ a3#g{ ""0&#^.22a2pܾ}0feٲeI6*++ o[ffmDJk6|S[FFW|^2222:IPXmx'oIsinnhDvv6bccxd2MhZ,YXl=*|&(5I_*ʥ}#88x&]]]vaXe6<Ǎ`FVc޽QYYW̙3VTHII?B\t Dii)4SOu׆vhhHweR*DDT*N`pp@[JKK#JMM .}z^}6z3Lֶk.ڽ{7uwwӬYSrcOܝ%6~HeeeVOBo&EFFN#Z`T*ڻw𥦯^x;w.͛7vA4<0Lv>cVss3͕#;wsT[SSRRR/bݺu[Lh4ؾ};ϟr. [B'♋C뤝ii]Pu))W$ۅ̝u6WP70 =IlAbL v9{{~g*#GHqpnk?0N.(@}oS=cW E$K ol`%(+,tm3vdfz SLEPc for Python slepc4py-3.7.0/docs/apiref/class_hierarchy_for_fn.png0000644000175000001440000000551012720314521023447 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATxPTgEtQaaP™u)+EͦtI 44TdGTJx8wґ{FŰSRSEN:?sٟ ,,Ǿ3sxﳇjHBȄ` Ց ՙn̙3yf0… ﺓn*++ @6ŖQz\i@n*`_ִBu$Bu$Bu$Bu$Ch\\snp fl6!!!aaaHJJBAAvkhĽދp,\CwssR777-h_6/]Qzʕ+ĺu뼞O><sz=n݊|2>*aՅ4|(..w}]vaH8a=?0 s~ɓ;Vk@n'Zր[;>W.L&}Vyyy\t)~x|. ,feey[KUU鐛7n`4 Nш>,^U]]hZ}8v[ (<쳸vK;vE\[nn.֯_k0eC{HHR_L>~!e_FF~7ʐoԩ0(++Sc޼y/_.os=")+mGeSSM&{ndqq1W^˗/wwl|'NfcII z=iXμڔc555LMMH{{;CCCo>vttt7odrr2O>{EqKK gϞ͋/ꐗzp0&&Ν#I>ܻw~׋\lrqpd2 ,`HHIX,ϟgddq`BBү~Ou*.\@VKj#_53339uT.]gΜQڰX,^+ZnZ+͛7ի4i[[[}sč~oxqoYf?İpŊ~Ou5m?ժ HXV 0L_ ӉSNׯǪUގX(f{"<<T曃֖O?Xd fϞXv-,O`ŊʺXx3Ϡ.Aww7zje8͝;ף=_yu{{}iZ70))$\fff.\`zz:l٢|]zZlmmCj˂bb/xYpP1::Gqi׮]ڮ/X__϶6׸{x=?KXWWŋ^#A½ׯ399˖-_|&>}zO<NR`p={x|}jԗ}ΝHnݺUV3f̙3qFvwwK,i\{޼y4iϟϪ*ng166\f ;::-j#ɗ^zaaaَǾk9޽))) c||?;ysyYX^D'Lc޽(j#B///T KNZBҠ;t:HÚ5]"F}kV ³۹H3D'Ded72yY@׮ܰ^:=}}(??￑Ŏ1EQb=]ỏ҃h+)bPJOJZs~^A xХtt4K #^jlD@8r+;)տ٣oP?N r =|F@DEx-g(l,E35ei8;lNOC%͛-o QQ7n f2뚛jf5e ^$FݻsA0,[]kn^OW|ttgmSZ*uuFnFtdM߸ w%v|zzpGy󯴵eC^^Rg)*8W84sʾUQqOutr*)pJ;w.RdfB^yYA}1&Hn.RP&TA샳gl݊oq򏉉o<:t(9/O&+j*GP_)wL zj+$%;;LeD"+NfDFƞ<4PܺFd$P|٣G]5lvCk+gaa^pH$M*z |'*8x%500=!ҏF&IU[D'.qVVwYI 8:SZNPpXlWwLXl/wKZ6=֩SM.)3:3d_?< OOp~F_wڦo +CBk}}{} Z_-k..dbv6m ~􈙚:R_syo$ƒeLY"KJHe"vz9YZX @~z!n2stu򖖯JK!;o=|; ==qX nO8je0nWV@5N'kn-!aL0*wc1Mnر;w$'**N<遪|ȟ<R(q;$=twXODQZGߋ luJ\qC:2 shg7TNT=]355Za0jWXW*Q/j1 3*wc1E'{[ۯ++5Z-/|LĦMPd'{ ѡ$7Cݲehdd^IL:/ 6[߅E%=""2>M+n..q8;{m\>g _}un8uvb➔o i7bXɓ{Ҫ kTƂ/_d뚛]uO8ܹos掰T*d4=IwRRnwu&'H۱cZL߁, I11I #WPܹA-f2->>->~Yh̬߂d :Nvf ‚,,,t:]T'.TTbiiQK#D' slepc4py.SLEPc.DS
Package slepc4py :: Module SLEPc :: Class DS
[hide private]
[frames] | no frames]

Class DS


DS
Nested Classes [hide private]
  MatType
To refer to one of the matrices stored internally in DS
  StateType
DS state types
  Type
DS type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
allocate(self, ld)
Allocates memory for internal storage or matrices in DS.
 
create(self, comm=None)
Creates the DS object.
 
destroy(self)
Destroys the DS object.
 
getCompact(self)
Gets the compact storage flag.
 
getDimensions(self)
Returns the current dimensions.
 
getExtraRow(self)
Gets the extra row flag.
 
getLeadingDimension(self)
Returns the leading dimension of the allocated matrices.
 
getMethod(self)
Gets the method currently used in the DS.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all DS options in the database.
 
getRefined(self)
Gets the refined vectors flag.
 
getState(self)
Returns the current state.
 
getType(self)
Gets the DS type of this object.
 
reset(self)
Resets the DS object.
 
setCompact(self, comp)
Switch to compact storage of matrices.
 
setDimensions(self, n=None, m=None, l=None, k=None)
Resize the matrices in the DS object.
 
setExtraRow(self, ext)
Sets a flag to indicate that the matrix has one extra row.
 
setFromOptions(self)
Sets DS options from the options database.
 
setMethod(self, meth)
Selects the method to be used to solve the problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all DS options in the database.
 
setRefined(self, ref)
Sets a flag to indicate that refined vectors must be computed.
 
setState(self, state)
Change the state of the DS object.
 
setType(self, ds_type)
Selects the type for the DS object.
 
truncate(self, n)
Truncates the system represented in the DS object.
 
updateExtraRow(self)
Performs all necessary operations so that the extra row gets up-to-date after a call to solve().
 
view(self, Viewer viewer=None)
Prints the DS data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

allocate(self, ld)

 

Allocates memory for internal storage or matrices in DS.

Parameters

ld: integer
Leading dimension (maximum allowed dimension for the matrices, including the extra row if present).

create(self, comm=None)

 

Creates the DS object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the DS object.
Overrides: petsc4py.PETSc.Object.destroy

getCompact(self)

 

Gets the compact storage flag.

Returns

comp: boolean
The flag.

getDimensions(self)

 

Returns the current dimensions.

Returns

n: int
The new size.
m: int
The new column size (only for SVD).
l: int
Number of locked (inactive) leading columns.
k: int
Intermediate dimension (e.g., position of arrow).
t: int
Truncated length.

getExtraRow(self)

 

Gets the extra row flag.

Returns

comp: boolean
The flag.

getLeadingDimension(self)

 

Returns the leading dimension of the allocated matrices.

Returns

ld: integer
Leading dimension (maximum allowed dimension for the matrices).

getMethod(self)

 

Gets the method currently used in the DS.

Returns

meth: int
Identifier of the method.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all DS options in the database.

Returns

prefix: string
The prefix string set for this DS object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getRefined(self)

 

Gets the refined vectors flag.

Returns

comp: boolean
The flag.

getState(self)

 

Returns the current state.

Returns

state: DS.StateType enumerate
The current state.

getType(self)

 

Gets the DS type of this object.

Returns

type: DS.Type enumerate
The direct solver type currently being used.
Overrides: petsc4py.PETSc.Object.getType

setCompact(self, comp)

 

Switch to compact storage of matrices.

Parameters

comp: boolean
A boolean flag.

Notes

Compact storage is used in some DS types such as DS.Type.HEP when the matrix is tridiagonal. This flag can be used to indicate whether the user provides the matrix entries via the compact form (the tridiagonal DS.MatType.T) or the non-compact one (DS.MatType.A).

The default is False.

setDimensions(self, n=None, m=None, l=None, k=None)

 

Resize the matrices in the DS object.

Parameters

n: int, optional
The new size.
m: int, optional
The new column size (only for SVD).
l: int, optional
Number of locked (inactive) leading columns.
k: int, optional
Intermediate dimension (e.g., position of arrow).

Notes

The internal arrays are not reallocated.

The value m is not used except in the case of DS.SVD.

setExtraRow(self, ext)

 

Sets a flag to indicate that the matrix has one extra row.

Parameters

ext: boolean
A boolean flag.

Notes

In Krylov methods it is useful that the matrix representing the direct solver has one extra row, i.e., has dimension (n+1) x n. If this flag is activated, all transformations applied to the right of the matrix also affect this additional row. In that case, (n+1) must be less or equal than the leading dimension.

The default is False.

setFromOptions(self)

 

Sets DS options from the options database.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setMethod(self, meth)

 

Selects the method to be used to solve the problem.

Parameters

meth: int
An index indentifying the method.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all DS options in the database.

Parameters

prefix: string
The prefix string to prepend to all DS option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setRefined(self, ref)

 

Sets a flag to indicate that refined vectors must be computed.

Parameters

ref: boolean
A boolean flag.

Notes

Normally the vectors returned in DS.MatType.X are eigenvectors of the projected matrix. With this flag activated, vectors() will return the right singular vector of the smallest singular value of matrix At-theta*I, where At is the extended (n+1)xn matrix and theta is the Ritz value. This is used in the refined Ritz approximation.

The default is False.

setState(self, state)

 

Change the state of the DS object.

Parameters

state: DS.StateType enumerate
The new state.

Notes

The state indicates that the dense system is in an initial state (raw), in an intermediate state (such as tridiagonal, Hessenberg or Hessenberg-triangular), in a condensed state (such as diagonal, Schur or generalized Schur), or in a truncated state.

This function is normally used to return to the raw state when the condensed structure is destroyed.

setType(self, ds_type)

 

Selects the type for the DS object.

Parameters

ds_type: DS.Type enumerate
The direct solver type to be used.

truncate(self, n)

 

Truncates the system represented in the DS object.

Parameters

n: integer
The new size.

view(self, Viewer viewer=None)

 

Prints the DS data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.ErrorType-class.html0000644000175000001440000002173112720314522025265 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.ErrorType
Package slepc4py :: Module SLEPc :: Class NEP :: Class ErrorType
[hide private]
[frames] | no frames]

Class ErrorType


NEP error type to assess accuracy of computed solutions

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABSOLUTE = 0
  BACKWARD = 2
  RELATIVE = 1
  __qualname__ = 'NEPErrorType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.Which-class.html0000644000175000001440000003030412720314521024374 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.Which
Package slepc4py :: Module SLEPc :: Class EPS :: Class Which
[hide private]
[frames] | no frames]

Class Which


EPS desired piece of spectrum

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ALL = 10
  LARGEST_IMAGINARY = 5
  LARGEST_MAGNITUDE = 1
  LARGEST_REAL = 3
  SMALLEST_IMAGINARY = 6
  SMALLEST_MAGNITUDE = 2
  SMALLEST_REAL = 4
  TARGET_IMAGINARY = 9
  TARGET_MAGNITUDE = 7
  TARGET_REAL = 8
  USER = 11
  __qualname__ = 'EPSWhich'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP-class.html0000644000175000001440000021255612720314522023342 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP
Package slepc4py :: Module SLEPc :: Class NEP
[hide private]
[frames] | no frames]

Class NEP


NEP
Nested Classes [hide private]
  ConvergedReason
  ErrorType
NEP error type to assess accuracy of computed solutions
  Refine
NEP refinement strategy
  RefineScheme
Scheme for solving linear systems during iterative refinement
  Type
NEP type
  Which
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
appendOptionsPrefix(self, prefix)
Appends to the prefix used for searching for all NEP options in the database.
 
cancelMonitor(self)
Clears all monitors for a NEP object.
 
computeError(self, int i, etype=None)
Computes the error (based on the residual norm) associated with the i-th computed eigenpair.
 
create(self, comm=None)
Creates the NEP object.
 
destroy(self)
Destroys the NEP object.
 
errorView(self, etype=None, Viewer viewer=None)
Displays the errors associated with the computed solution (as well as the eigenvalues).
 
getBV(self)
Obtain the basis vectors object associated to the eigensolver.
 
getConverged(self)
Gets the number of converged eigenpairs.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
getDimensions(self)
Gets the number of eigenvalues to compute and the dimension of the subspace.
 
getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)
Gets the i-th solution of the eigenproblem as computed by solve().
 
getErrorEstimate(self, int i)
Returns the error estimate associated to the i-th computed eigenpair.
 
getIterationNumber(self)
Gets the current iteration number.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all NEP options in the database.
 
getRG(self)
Obtain the region object associated to the eigensolver.
 
getRIILagPreconditioner(self)
Indicates how often the preconditioner is rebuilt.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default NEP convergence tests.
 
getTrackAll(self)
Returns the flag indicating whether all residual norms must be computed or not.
 
getType(self)
Gets the NEP type of this object.
 
getWhichEigenpairs(self)
Returns which portion of the spectrum is to be sought.
 
reset(self)
Resets the NEP object.
 
setBV(self, BV bv)
Associates a basis vectors object to the eigensolver.
 
setDimensions(self, nev=None, ncv=None, mpd=None)
Sets the number of eigenvalues to compute and the dimension of the subspace.
 
setFromOptions(self)
Sets NEP options from the options database.
 
setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None)
Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix.
 
setInitialSpace(self, space)
Sets the initial space from which the eigensolver starts to iterate.
 
setJacobian(self, jacobian, Mat J, args=None, kargs=None)
Sets the function to compute Jacobian T'(lambda) as well as the location to store the matrix.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all NEP options in the database.
 
setRG(self, RG rg)
Associates a region object to the eigensolver.
 
setRIILagPreconditioner(self, lag)
Determines when the preconditioner is rebuilt in the nonlinear solve.
 
setSplitOperator(self, A, f, structure=None)
Sets the operator of the nonlinear eigenvalue problem in split form.
 
setTolerances(self, tol=None, maxit=None)
Sets the tolerance and maximum iteration count used in convergence tests.
 
setTrackAll(self, trackall)
Specifies if the solver must compute the residual of all approximate eigenpairs or not.
 
setType(self, nep_type)
Selects the particular solver to be used in the NEP object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the eigensolver.
 
setWhichEigenpairs(self, which)
Specifies which portion of the spectrum is to be sought.
 
solve(self)
Solves the eigensystem.
 
view(self, Viewer viewer=None)
Prints the NEP data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

appendOptionsPrefix(self, prefix)

 

Appends to the prefix used for searching for all NEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all NEP option requests.

computeError(self, int i, etype=None)

 

Computes the error (based on the residual norm) associated with the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.
etype: NEP.ErrorType enumerate
The error type to compute.

Returns

error: real
The error bound, computed in various ways from the residual norm ||T(lambda)x||_2 where lambda is the eigenvalue and x is the eigenvector.

create(self, comm=None)

 

Creates the NEP object.

Parameters

comm: Comm, optional.
MPI communicator. If not provided, it defaults to all processes.

destroy(self)

 
Destroys the NEP object.
Overrides: petsc4py.PETSc.Object.destroy

errorView(self, etype=None, Viewer viewer=None)

 

Displays the errors associated with the computed solution (as well as the eigenvalues).

Parameters

etype: NEP.ErrorType enumerate, optional
The error type to compute.
viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.

Notes

By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.

getBV(self)

 

Obtain the basis vectors object associated to the eigensolver.

Returns

bv: BV
The basis vectors context.

getConverged(self)

 

Gets the number of converged eigenpairs.

Returns

nconv: int
Number of converged eigenpairs.

getConvergedReason(self)

 

Gets the reason why the solve() iteration was stopped.

Returns

reason: NEP.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

getDimensions(self)

 

Gets the number of eigenvalues to compute and the dimension of the subspace.

Returns

nev: int
Number of eigenvalues to compute.
ncv: int
Maximum dimension of the subspace to be used by the solver.
mpd: int
Maximum dimension allowed for the projected problem.

getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)

 

Gets the i-th solution of the eigenproblem as computed by solve(). The solution consists of both the eigenvalue and the eigenvector.

Parameters

i: int
Index of the solution to be obtained.
Vr: Vec, optional
Placeholder for the returned eigenvector (real part).
Vi: Vec, optional
Placeholder for the returned eigenvector (imaginary part).

Returns

e: scalar (possibly complex)
The computed eigenvalue.

getErrorEstimate(self, int i)

 

Returns the error estimate associated to the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.

Returns

error: real
Error estimate.

getIterationNumber(self)

 

Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.

Returns

its: int
Iteration number.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all NEP options in the database.

Returns

prefix: string
The prefix string set for this NEP object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getRG(self)

 

Obtain the region object associated to the eigensolver.

Returns

rg: RG
The region context.

getRIILagPreconditioner(self)

 

Indicates how often the preconditioner is rebuilt.

Returns

lag: int
The lag parameter.

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default NEP convergence tests.

Returns

tol: float
The convergence tolerance.
maxit: int
The maximum number of iterations.

getTrackAll(self)

 

Returns the flag indicating whether all residual norms must be computed or not.

Returns

trackall: bool
Whether the solver compute all residuals or not.

getType(self)

 

Gets the NEP type of this object.

Returns

type: NEP.Type enumerate
The solver currently being used.
Overrides: petsc4py.PETSc.Object.getType

getWhichEigenpairs(self)

 

Returns which portion of the spectrum is to be sought.

Returns

which: NEP.Which enumerate
The portion of the spectrum to be sought by the solver.

setBV(self, BV bv)

 

Associates a basis vectors object to the eigensolver.

Parameters

bv: BV
The basis vectors context.

setDimensions(self, nev=None, ncv=None, mpd=None)

 

Sets the number of eigenvalues to compute and the dimension of the subspace.

Parameters

nev: int, optional
Number of eigenvalues to compute.
ncv: int, optional
Maximum dimension of the subspace to be used by the solver.
mpd: int, optional
Maximum dimension allowed for the projected problem.

setFromOptions(self)

 
Sets NEP options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.
Overrides: petsc4py.PETSc.Object.setFromOptions

setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None)

 

Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix.

Parameters

function:
Function evaluation routine
F: Mat
Function matrix
P: Mat
preconditioner matrix (usually same as the Function)

setInitialSpace(self, space)

 

Sets the initial space from which the eigensolver starts to iterate.

Parameters

space: Vec or sequence of Vec
The initial space

setJacobian(self, jacobian, Mat J, args=None, kargs=None)

 

Sets the function to compute Jacobian T'(lambda) as well as the location to store the matrix.

Parameters

jacobian:
Jacobian evaluation routine
J: Mat
Jacobian matrix

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all NEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all NEP option requests.
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setRG(self, RG rg)

 

Associates a region object to the eigensolver.

Parameters

rg: RG
The region context.

setRIILagPreconditioner(self, lag)

 

Determines when the preconditioner is rebuilt in the nonlinear solve.

Parameters

lag: int
0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc.

setSplitOperator(self, A, f, structure=None)

 

Sets the operator of the nonlinear eigenvalue problem in split form.

Parameters

A: Mat or sequence of Mat
Coefficient matrices of the split form.
f: sequence of FN
Scalar functions of the split form.
structure: PETSc.Mat.Structure enumerate, optional
Structure flag for matrices.

setTolerances(self, tol=None, maxit=None)

 

Sets the tolerance and maximum iteration count used in convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
maxit: int, optional
The maximum number of iterations.

setTrackAll(self, trackall)

 

Specifies if the solver must compute the residual of all approximate eigenpairs or not.

Parameters

trackall: bool
Whether compute all residuals or not.

setType(self, nep_type)

 

Selects the particular solver to be used in the NEP object.

Parameters

nep_type: NEP.Type enumerate
The solver to be used.

setWhichEigenpairs(self, which)

 

Specifies which portion of the spectrum is to be sought.

Parameters

which: NEP.Which enumerate
The portion of the spectrum to be sought by the solver.

view(self, Viewer viewer=None)

 

Prints the NEP data structure.

Parameters

viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_which.png0000644000175000001440000000162012720314521024144 0ustar dalcinlusers00000000000000PNG  IHDRE$PG`bKGDEIDATX]HSqϽ$M4t1~ 㢛[m>Y~A "$Q ON|33$Rjłd K}۵\=s?vGl6xI7p|<AN#HLLiSტvT*NjWVHa:"-E{./j`Nx6.Ե\&hѩ)@0̸g1L9rWqG.i7f6hPUk4lHR4wu?s9#iv6ZmEq1磡kCC=q'",,Y,f_:]LD͒wr33$_\|>'x0b r_e $RAzyk\Tʭ|36incm?SU*,,v~aܮ ?׹rpa]]jBBJ||oK˅=K`?>WWi!/+ |h(8(H* VF `?.,/'ƲbqXg>q,2<<).QwwzRRXH\P0ImZ --:83ȥW8E"Hv|8zQqhֶvpmP]rܭVKQQ a?auBqZF(--e|<gm>7M<ŕEVM4}\]oe;/>4^k6IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_7.png0000644000175000001440000000156412720314523024262 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_conv_2.png0000644000175000001440000000153512720314523024237 0ustar dalcinlusers00000000000000PNG  IHDR@$nbKGDIDATXc?PLJGɌ"|199͌ș߿>b߿\@_VBBWwF| nfTg~"A< |&@2=JOOKKӨQYrsBm[I_ߏ? nۦ(dg׵`C@AAQOD_mm>L|ś7 Ȃ<\\rvN{WN-]}ԝǎuΟ߰E 'Lxc={ UcǸ88ȋ@=W?+vXV$#ڔdVTvx/oûO|~x5;v03||C<}iTԷ?^}?eW l)QQVhwpX{7\\ly{枢I^lZ%>=lY:U7m=`chxqs-ܼY{ s֯oUUQQdvqժI"" |A6mƍS**d%$tUU; v=J{H_|`nMjjeQ?W(TTTTd```ceajSӗo 540 |왤 CHGUV^}eddt/g nބ?ǟ[bZU"7o >|bb+'l<9vbI__CO)WܹrNN{g~o6V?OWd+'Mz[<\Iȩ66̚U5yŅ22*~w/[ۮB^*nNʤHOO Mk2 gbd vq,( =cP`n200Z*44"8RK apQ? 0;~R O^Dӿx zĽ J!Oap쨀VkwIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_st.png0000644000175000001440000000571312720314523023501 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx}LSoRDRס|/sIeQ)ls:^lf]fܔe.ouWl&ЌQTPCof5ʹj9INbp8oأ22o08s ߿z1oYFx\UU6(Jl߾;q 塢ZvX5wuu!11rrrPSS]vjzH;a?XII 9i814w\@c츷n"rW\ҤIl*++iڴiê;==,YBŦd2QTTz|. ɔ>3m A.C޽{>hZC.Cբ ,( XOJT*SO=|geeaڴi æMp]:222s 6F-[L&ʕ+CPL8Gŝ;wKExbݻW_PPZ- BDGG#,, zzz.\ͧاQϴ+VPcc#t:l""ɡkҍ7̙C>Dtq2Gd2СCT*z=͟?Ӆמ:uT*؜VYYIGDDT*j:'.줦&zW(11>qw%R*Oj:D@n߾˗/SxxPˋ/HT]]M)L]ͧ<}XhmCDDd4.\@ ikk#???:|0j.>ɓ'}I :$jX,P('"+W]vG˖-Y3ps5nX,to>5kPaa!۱7XhdNǩf̘!]]6B[]]IR""J#?3[hɒ%tz/Z9"vfy}]z4~xy~YM&٬?V+ٳLBDBA.\pܱc())iq/W鮮Qg0766""" `0@> hooNsx}oo/V+ֆ-[_F[[""",[[[O>P]] F`G Z[rr2[bňp !55z^hH$HJJ™W_}sJݍ]Vhӧ;|>j]#bi/_N~W{FuQss3^׿%TJtM:qIR,RTI?Oozdy6Br믿9Nnn.ݽ{q]@UUUd46Wf7ޠ3gw}GW^˗/ӂ > "t,蠸8Zl={ɓT*iժUdZZj88p]]s=T}y_I&ۅ/5oɓ)44mFG/ &ؼwtt4?㩢\JOO 7R{{zUmDDiii@.챫v7{IRQ@@EEEQFFP`cND;wYfQ`` )Jڿ?R\\LQQQ$iΝt=cOwu9xRݻ)55 U$NC>BfꫯPTTrFZ+#6qD۞V]]Dl޼/“-L$jlݺSNv9ӿׯ\`^A&báeáeáeáepA_`IٰaC%/-g`ǎXpK5gEr- DZ#^2222222222222222222222222{~']yh111={G%v|[z ƍ$$$xC9`Zm/,T׽]@W_]ƨ¡3U@Z2<`áeáek0 q_޹H+Wb͐9lt+%%H{ ~ ZFP?׮A|5˗x"zk+m$<IU`Nh4<Kő PdPd< ~|L RږΝsXǡPЀ)j5V7ߠhvYcvϞ2Taɜ9iDZ=40u2`3`϶m/+[{C;LD]C,Iӄ@lZ?t nBU]? _zi|e>O/ᡡX4o6qhGg8d!k!:T[xyDCDCDCDCDCDCD)={ i0aKj|LP~~> slepc4py.SLEPc.PEP.Which
Package slepc4py :: Module SLEPc :: Class PEP :: Class Which
[hide private]
[frames] | no frames]

Class Which


PEP desired part of spectrum

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  LARGEST_IMAGINARY = 5
  LARGEST_MAGNITUDE = 1
  LARGEST_REAL = 3
  SMALLEST_IMAGINARY = 6
  SMALLEST_MAGNITUDE = 2
  SMALLEST_REAL = 4
  TARGET_IMAGINARY = 9
  TARGET_MAGNITUDE = 7
  TARGET_REAL = 8
  USER = 10
  __qualname__ = 'PEPWhich'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/toc-slepc4py.lib-module.html0000644000175000001440000000245612720314520023516 0ustar dalcinlusers00000000000000 lib

Module lib


Functions

ImportSLEPc
getPathArchSLEPc

Variables

__package__

[hide private] slepc4py-3.7.0/docs/apiref/class_hierarchy_for_mattype.png0000644000175000001440000000233512720314520024530 0ustar dalcinlusers00000000000000PNG  IHDRT$+WbKGDIDAThc?HL퀁?HNNfddh 022&''#cffր߿p.!.+!a;N%8q/˂ROoeWE^V<2ިG* hblF;ԾbFLtM2C R<{v-uuOΞţޓ'fod``wt|ggϬ laC6 3ٻXX޽t𠽉 #.!""!""*(aKd2=jNx_{w \vˡC\..100X000H8;1337<~h`u1GǼΟ~100󧴿_Iѱ?dL[|[ |wꔿ#DׯF7o)*4',a``xw/3C\\6_(մ+LyҤG@BɒOYlYN6 _yff`gUv100l9t@"vqժI"" |!LkCCVVVHٱl۶XxGHUN\W57w֭ 7nRQ!+!YPQ2|A~6 usKihhY{w+\ÇMM_}3 @f& 'u{ꩩ9yrfm-\JUNPPxÃg$2?^ 6};r'ϰU]]?q#fEWVj)+ʈo?zpC)QQs200|ś7dxF3Sszs\_~fceg ~H} FFm93Y<ǧ^<9ۛ!ٹrҤϟ_u#+kʕdx^</ooqqtUF@TGV!rB ?}Z/D{yyeg{X[W&%100dgrq;ꫩu~,]07UOӥǏU}}_@eeٿm{O۰!58>6"ϟr$**) ͝B#ݢ썍:&(&$4F6?H##zzDOZ$=]"2:??BG*a#QIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.Type-class.html0000644000175000001440000002533612720314522024260 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.Type
Package slepc4py :: Module SLEPc :: Class NEP :: Class Type
[hide private]
[frames] | no frames]

Class Type


NEP type

Nonlinear eigensolvers.

  • RII: Residual inverse iteration.
  • SLP: Successive linear problems.
  • NARNOLDI: Nonlinear Arnoldi.
  • CISS: Contour integral spectrum slice.
  • INTERPOL: Polynomial interpolation.
  • NLEIGS: Fully rational Krylov method for nonlinear eigenproblems.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CISS = 'ciss'
  INTERPOL = 'interpol'
  NARNOLDI = 'narnoldi'
  NLEIGS = 'nleigs'
  RII = 'rii'
  SLP = 'slp'
  __qualname__ = 'NEPType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_blocktype.png0000644000175000001440000000307512720314520025043 0ustar dalcinlusers00000000000000PNG  IHDR_$bKGDIDATh{LSW?Q́c&d/7<$/d02qv ('Dɦ&[ &! BA wlv"VW~s~s7NQE؃| 2|{"va…D"GQdÇZ}|A.il xڤI]~^,̿'R>1džkGv&K͚D55j{}=[hUTU{n{954T*ZjI L6\ u wuv].YeBmuؿ?`$k5_*6|xͼf i41vtvvF:}:ln/"Px+,\ԿʠW_ LI&̙?J%oph$1=Lo1JsK U55VYm8?E[ri99lS)bm-抢͛)-/4+ %e~Pee;:(8y1xO`ٖǷj5wKNǯPk'Μm&3lVv k-,.|xx~V#JIgҸq_υjl={*(ePビ~W^c, C"r#ƍYV6.ʲptwG@bZ)6(63Ra!c==hmkcsn.Q[TdttvdD//&zy?{<}},;/7lJT7L?rvYcs/mSS_ϳAAfCj+5Ѐ, GpYl RANgJM}iʢfd#9ǏSv՚ {c+WLkk |0."VT VTo̿Ԅ}c#Wz99xlԯ3fTRQѐ;, cuf&  RRadѬ%nFۭK;:Xsg{ VDYHRFWrEB,ak^#dhӵ 8v, X>̤$VT3NNDD"``Ŵ n[WEE..@=Jx`EPg$)6KB'"A"!<(eB"8;\INӘFeوݷrBA?o|@okor]aQxWVEܹL5 `|Y6e 7N66|8;'vaqoG|ǩaa tvvTݛHLLQL&#""bxco/<8̷#?;cIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.DS.MatType-class.html0000644000175000001440000003006412720314520024576 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.DS.MatType
Package slepc4py :: Module SLEPc :: Class DS :: Class MatType
[hide private]
[frames] | no frames]

Class MatType


To refer to one of the matrices stored internally in DS

  • A: first matrix of eigenproblem/singular value problem.
  • B: second matrix of a generalized eigenproblem.
  • C: third matrix of a quadratic eigenproblem.
  • T: tridiagonal matrix.
  • D: diagonal matrix.
  • Q: orthogonal matrix of (right) Schur vectors.
  • Z: orthogonal matrix of left Schur vectors.
  • X: right eigenvectors.
  • Y: left eigenvectors.
  • U: left singular vectors.
  • VT: right singular vectors.
  • W: workspace matrix.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  A = 0
  B = 1
  C = 2
  D = 4
  Q = 5
  T = 3
  U = 9
  VT = 10
  W = 11
  X = 7
  Y = 8
  Z = 6
  __qualname__ = 'DSMatType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/toc-slepc4py.SLEPc-module.html0000644000175000001440000000616412720314520023656 0ustar dalcinlusers00000000000000 SLEPc

Module SLEPc


Classes

BV
DS
EPS
FN
MFN
NEP
PEP
RG
ST
SVD
Sys

Functions

Variables

COMM_NULL
COMM_SELF
COMM_WORLD
DECIDE
DEFAULT
DETERMINE
__arch__
__package__
__pyx_capi__

[hide private] slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_2.png0000644000175000001440000000156412720314520024252 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class-tree.html0000644000175000001440000003426612720314520021206 0ustar dalcinlusers00000000000000 Class Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Class Hierarchy

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.ConvergedReason-class.html0000644000175000001440000002476012720314523026426 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.ConvergedReason
Package slepc4py :: Module SLEPc :: Class PEP :: Class ConvergedReason
[hide private]
[frames] | no frames]

Class ConvergedReason


PEP convergence reasons

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONVERGED_ITERATING = 0
  CONVERGED_TOL = 1
  CONVERGED_USER = 2
  DIVERGED_BREAKDOWN = -2
  DIVERGED_ITS = -1
  DIVERGED_SYMMETRY_LOST = -3
  ITERATING = 0
  __qualname__ = 'PEPConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/toc-slepc4py-module.html0000644000175000001440000000256112720314520022746 0ustar dalcinlusers00000000000000 slepc4py

Module slepc4py


Functions

get_include
init

Variables

__credits__
__package__

[hide private] slepc4py-3.7.0/docs/apiref/class_hierarchy_for_sys.png0000644000175000001440000000161012720314524023662 0ustar dalcinlusers00000000000000PNG  IHDR8$SnbKGD=IDATXc?PLbC#dFFƁv##crr2333}Ȁ߿p.C!)+!a;N/?~񂁁m,,Vvu] Pd0d2ӨC qoJ8U}}O']d& k{{e%$߻Tw2 'D7ߖk)*(hgl<|Ӂv: ǡ<w!Y*+/߾ 222zʡnn[k8?ݡCɁyy>~Cy||ʶ>|SW$74;8qs300iXO23[ݻ_rqpá s<=&O -)Qbfb rvK3D}ass>>} +S331gdgd`tr憋a2f]{O۰!58B5z* D=.`ol!* u3o@C Lwy @D}bbILLD2u(^QH0IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_type_8.png0000644000175000001440000000156412720314523024263 0ustar dalcinlusers00000000000000PNG  IHDR=$٥bKGD)IDATXc?L2 #dFFƁvv SQ4ڵp KAVBBWw܆^Z&80n,?XcGdE+ թ$wt|ggϬ la*; / ݜ _g``TKy o߸߸qcF9:uv?NNb0wlܿ߿ P'i+Wn~-+Wj5˗`ggdh//4lkʤ$l^..pT}5΂R"?pMP?ɉY090090Y{^cFmZxޓ'6lH x} 7wzH@T+O썍:&(&$4ZV ڎu7}Pu7|yҥ0'/_b ߿_x\E`ffFp87] :yaIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_convergedr.png0000644000175000001440000000372512720314521025210 0ustar dalcinlusers00000000000000PNG  IHDR$;/.bKGDIDAThPSWo !i*.HR ̪T@bpM,hFMĠ`ݬdG_ UKLi~Eax5ؚ2>?;ysyYX^D'Lc޽(j#B///T KNZBҠ;t:HÚ5]"F}kV ³۹H3D'Ded72yY@׮ܰ^:=}}(??￑Ŏ1EQb=]ỏ҃h+)bPJOJZs~^A xХtt4K #^jlD@8r+;)տ٣oP?N r =|F@DEx-g(l,E35ei8;lNOC%͛-o QQ7n f2뚛jf5e ^$FݻsA0,[]kn^OW|ttgmSZ*uuFnFtdM߸ w%v|zzpGy󯴵eC^^Rg)*8W84sʾUQqOutr*)pJ;w.RdfB^yYA}1&Hn.RP&TA샳gl݊oq򏉉o<:t(9/O&+j*GP_)wL zj+$%;;LeD"+NfDFƞ<4PܺFd$P|٣G]5lvCk+gaa^pH$M*z |'*8x%500=!ҏF&IU[D'.qVVwYI 8:SZNPpXlWwLXl/wKZ6=֩SM.)3:3d_?< OOp~F_wڦo +CBk}}{} Z_-k..dbv6m ~􈙚:R_syo$ƒeLY"KJHe"vz9YZX @~z!n2stu򖖯JK!;o=|; ==qX nO8je0nWV@5N'kn-!aL0*wc1Mnر;w$'**N<遪|ȟ<R(q;$=twXODQZGߋ luJ\qC:2 shg7TNT=]355Za0jWXW*Q/j1 3*wc1E'{[ۯ++5Z-/|LĦMPd'{ ѡ$7Cݲehdd^IL:/ 6[߅E%=""2>M+n..q8;{m\>g _}un8uvb➔o i7bXɓ{Ҫ kTƂ/_d뚛]uO8ܹos掰T*d4=IwRRnwu&'H۱cZL߁, I11I #WPܹA-f2->>->~Yh̬߂d :Nvf ‚,,,t:]T'.TTbiiQK#D' slepc4py.SLEPc.SVD.Which
Package slepc4py :: Module SLEPc :: Class SVD :: Class Which
[hide private]
[frames] | no frames]

Class Which


SVD desired piece of spectrum

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  LARGEST = 0
  SMALLEST = 1
  __qualname__ = 'SVDWhich'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc._p_mem-class.html0000644000175000001440000002075012720314524024147 0ustar dalcinlusers00000000000000 slepc4py.SLEPc._p_mem
Package slepc4py :: Module SLEPc :: Class _p_mem
[hide private]
[frames] | no frames]

Class _p_mem


Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_convergedr_5.png0000644000175000001440000000372512720314524025437 0ustar dalcinlusers00000000000000PNG  IHDR$;/.bKGDIDAThPSWo !i*.HR ̪T@bpM,hFMĠ`ݬdG_ UKLi~Eax5ؚ2>?;ysyYX^D'Lc޽(j#B///T KNZBҠ;t:HÚ5]"F}kV ³۹H3D'Ded72yY@׮ܰ^:=}}(??￑Ŏ1EQb=]ỏ҃h+)bPJOJZs~^A xХtt4K #^jlD@8r+;)տ٣oP?N r =|F@DEx-g(l,E35ei8;lNOC%͛-o QQ7n f2뚛jf5e ^$FݻsA0,[]kn^OW|ttgmSZ*uuFnFtdM߸ w%v|zzpGy󯴵eC^^Rg)*8W84sʾUQqOutr*)pJ;w.RdfB^yYA}1&Hn.RP&TA샳gl݊oq򏉉o<:t(9/O&+j*GP_)wL zj+$%;;LeD"+NfDFƞ<4PܺFd$P|٣G]5lvCk+gaa^pH$M*z |'*8x%500=!ҏF&IU[D'.qVVwYI 8:SZNPpXlWwLXl/wKZ6=֩SM.)3:3d_?< OOp~F_wڦo +CBk}}{} Z_-k..dbv6m ~􈙚:R_syo$ƒeLY"KJHe"vz9YZX @~z!n2stu򖖯JK!;o=|; ==qX nO8je0nWV@5N'kn-!aL0*wc1Mnر;w$'**N<遪|ȟ<R(q;$=twXODQZGߋ luJ\qC:2 shg7TNT=]355Za0jWXW*Q/j1 3*wc1E'{[ۯ++5Z-/|LĦMPd'{ ѡ$7Cݲehdd^IL:/ 6[߅E%=""2>M+n..q8;{m\>g _}un8uvb➔o i7bXɓ{Ҫ kTƂ/_d뚛]uO8ܹos掰T*d4=IwRRnwu&'H۱cZL߁, I11I #WPܹA-f2->>->~Yh̬߂d :Nvf ‚,,,t:]T'.TTbiiQK#D' slepc4py.SLEPc.Sys
Package slepc4py :: Module SLEPc :: Class Sys
[hide private]
[frames] | no frames]

Class Sys


Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
getVersion(type cls, patch=False, devel=False, date=False, author=False)
 
getVersionInfo(type cls)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.BV.BlockType-class.html0000644000175000001440000002102412720314520025104 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.BV.BlockType
Package slepc4py :: Module SLEPc :: Class BV :: Class BlockType
[hide private]
[frames] | no frames]

Class BlockType


BV block-orthogonalization types

  • GS: Gram-Schmidt.
  • CHOL: Cholesky.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CHOL = 1
  GS = 0
  __qualname__ = 'BVOrthogBlockType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.ConvergedReason-class.html0000644000175000001440000002335612720314522026423 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.ConvergedReason
Package slepc4py :: Module SLEPc :: Class NEP :: Class ConvergedReason
[hide private]
[frames] | no frames]

Class ConvergedReason


Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONVERGED_ITERATING = 0
  CONVERGED_TOL = 1
  CONVERGED_USER = 2
  DIVERGED_BREAKDOWN = -2
  DIVERGED_ITS = -1
  DIVERGED_LINEAR_SOLVE = -4
  ITERATING = 0
  __qualname__ = 'NEPConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/identifier-index.html0000644000175000001440000051756312720314520022401 0ustar dalcinlusers00000000000000 Identifier Index
 
[hide private]
[frames] | no frames]

Identifier Index

[ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ ]

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

_



slepc4py-3.7.0/docs/apiref/class_hierarchy_for_rg.png0000644000175000001440000000606612720314523023465 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx{L/ȥX90DD5 ]儙-[mQvu@'sQip8L8Z&-v`NǣF{{{V1}tb֬Yo[ZZw7ŋ u1/\Q຺:ʕ+l?p yq]]XRUUUhkkþ}P]] ZR===HMM?"?ˑ>wFXXK¹v!rvzޭc4#v\ G uuu9g衇HXPttKuSZZL&v@111TRRsagffRff]]ϴ/-HLLB@nn.n޼ ZFxx8 j50w\@DDtcǎ!992 ӦMCii)׎ 0⋸qU7oٳG\[nn.} Ə~i}7nTO?ץ.]k ۶mjP(++0`ѹ+)ә)z'4 ۉ/_NmmmH3gΤO` ϨG>>>d0T*566N9sP~~/j ""*++#JEfa?Vz(55>qu9RTOT\\LÍ`]Z jYt)577S}}=SAA/˘:;Cmmll:F\\)Jjoo;uu|}}i׮]Ifzzz֭[HGmjjRTT555:d2QDD}7DDA}~Njh">7gd"FC;v젤$7n 9 w}GǩN*OgsKm $ɈH&ٝ`oiŊ$)--?.C9|,hh4[ƍ7ޠk׮]|i?Q UTTX?f3mݺ&MDDC#t)޽-[68 9T]ݚBKnnnFdd$ 44ztNh4l6@vv6~ittt 22ҾZ;w#77 wL=zXp!5.!"Y:Nj²eˤuPcڵkc(**˥6q2e;ئՙvɒ%￧xڶmҊ+hΜ9oJI&QII ]|K2IӑN /8X8d2Bp:pqJJJƍ vٸZn%$$W_}E.\Z;w.[DDÎm]]]H-'NPss39rT*=d6Zӭ?뻳9T]zF}yӔ)S(44rrr/5ݴ~z8q"+B400@ . &Xwll,Rj"}9+??"##)88V^MqZgk@N豳v97[&oN@111yfQ())ƏO*}볪C ͛vtv>ѹQh$mٲ֬Ys*H>Yh~v0r ߏ Osj___WwXPP^}UwvCV__Tlذ/ Fzz:^z%L"$2ڤ6gz dеHWٳnC_}K|MCB C_rΜ,XAr9fdL3gлgZ7R($zW6=!_~AX]PΞݿ6̓Պ?.p 7jkg(8g]rTj xe2php8L8Z&- IT<2v 5ӘiKKKQQQ1* Hgb&-Þ.;?7IENDB`slepc4py-3.7.0/docs/apiref/epydoc.js0000644000175000001440000002452512720314517020102 0ustar dalcinlusers00000000000000function toggle_private() { // Search for any private/public links on this page. Store // their old text in "cmd," so we will know what action to // take; and change their text to the opposite action. var cmd = "?"; var elts = document.getElementsByTagName("a"); for(var i=0; i...
"; elt.innerHTML = s; } } function toggle(id) { elt = document.getElementById(id+"-toggle"); if (elt.innerHTML == "-") collapse(id); else expand(id); return false; } function highlight(id) { var elt = document.getElementById(id+"-def"); if (elt) elt.className = "py-highlight-hdr"; var elt = document.getElementById(id+"-expanded"); if (elt) elt.className = "py-highlight"; var elt = document.getElementById(id+"-collapsed"); if (elt) elt.className = "py-highlight"; } function num_lines(s) { var n = 1; var pos = s.indexOf("\n"); while ( pos > 0) { n += 1; pos = s.indexOf("\n", pos+1); } return n; } // Collapse all blocks that mave more than `min_lines` lines. function collapse_all(min_lines) { var elts = document.getElementsByTagName("div"); for (var i=0; i 0) if (elt.id.substring(split, elt.id.length) == "-expanded") if (num_lines(elt.innerHTML) > min_lines) collapse(elt.id.substring(0, split)); } } function expandto(href) { var start = href.indexOf("#")+1; if (start != 0 && start != href.length) { if (href.substring(start, href.length) != "-") { collapse_all(4); pos = href.indexOf(".", start); while (pos != -1) { var id = href.substring(start, pos); expand(id); pos = href.indexOf(".", pos+1); } var id = href.substring(start, href.length); expand(id); highlight(id); } } } function kill_doclink(id) { var parent = document.getElementById(id); parent.removeChild(parent.childNodes.item(0)); } function auto_kill_doclink(ev) { if (!ev) var ev = window.event; if (!this.contains(ev.toElement)) { var parent = document.getElementById(this.parentID); parent.removeChild(parent.childNodes.item(0)); } } function doclink(id, name, targets_id) { var elt = document.getElementById(id); // If we already opened the box, then destroy it. // (This case should never occur, but leave it in just in case.) if (elt.childNodes.length > 1) { elt.removeChild(elt.childNodes.item(0)); } else { // The outer box: relative + inline positioning. var box1 = document.createElement("div"); box1.style.position = "relative"; box1.style.display = "inline"; box1.style.top = 0; box1.style.left = 0; // A shadow for fun var shadow = document.createElement("div"); shadow.style.position = "absolute"; shadow.style.left = "-1.3em"; shadow.style.top = "-1.3em"; shadow.style.background = "#404040"; // The inner box: absolute positioning. var box2 = document.createElement("div"); box2.style.position = "relative"; box2.style.border = "1px solid #a0a0a0"; box2.style.left = "-.2em"; box2.style.top = "-.2em"; box2.style.background = "white"; box2.style.padding = ".3em .4em .3em .4em"; box2.style.fontStyle = "normal"; box2.onmouseout=auto_kill_doclink; box2.parentID = id; // Get the targets var targets_elt = document.getElementById(targets_id); var targets = targets_elt.getAttribute("targets"); var links = ""; target_list = targets.split(","); for (var i=0; i" + target[0] + ""; } // Put it all together. elt.insertBefore(box1, elt.childNodes.item(0)); //box1.appendChild(box2); box1.appendChild(shadow); shadow.appendChild(box2); box2.innerHTML = "Which "+name+" do you want to see documentation for?" + ""; } return false; } function get_anchor() { var href = location.href; var start = href.indexOf("#")+1; if ((start != 0) && (start != href.length)) return href.substring(start, href.length); } function redirect_url(dottedName) { // Scan through each element of the "pages" list, and check // if "name" matches with any of them. for (var i=0; i-m" or "-c"; // extract the portion & compare it to dottedName. var pagename = pages[i].substring(0, pages[i].length-2); if (pagename == dottedName.substring(0,pagename.length)) { // We've found a page that matches `dottedName`; // construct its URL, using leftover `dottedName` // content to form an anchor. var pagetype = pages[i].charAt(pages[i].length-1); var url = pagename + ((pagetype=="m")?"-module.html": "-class.html"); if (dottedName.length > pagename.length) url += "#" + dottedName.substring(pagename.length+1, dottedName.length); return url; } } } slepc4py-3.7.0/docs/apiref/class_hierarchy_for_errortype.png0000644000175000001440000000227112720314521025100 0ustar dalcinlusers00000000000000PNG  IHDRY$mbKGDnIDAThc?(``````h "00H?HNNfddhx}`bqdڵp KAVBBWwF'.100.ȂROoeW5`KKG\FF vĊ;"+*0ϯ\iNr‚آERRr={?{fa300 P ba!*((!"B-Gps300|&Y^y`ɓr 6m?Z{{7?"+>r}|||Kl7XmdccCDDE"J~rvkגm]ڵk$hʔ)$)55Z[[ 555iB555TZZJsN_cxVϴ meeJDDM}EEEё211Rkk+)J蠾>򢂂njv]]9;;Suui  9::˗hʕtڟMLLhɒ%*m.MBAiΜ94qD&"t, ڟlmmS^^q燐9X]lhu$ H(j@+++駟(<<)88Ν;ǵQUUu-#Gpg\.{}jjjɓ'SCC~}: >8::RQQ(44tq/]s9m?T\SS'''-R)H$RD~~>ZZZi&Y---prrB]]myy9>S@ii)bccaii KKK/>!kS 8;;j8*n@ @hh(7ol,yWq)))XnN}\\\4u=ꫯŅlmmi֭ܯvz7ښlllh˖-ID*vwwɓ'7ѣYqqqDVVVajmmZꪍ(&&LMM]g;nڷE׸S(D>>>djjJs~z EFFxɁػaexZwXhѸN;iңUÌ(u"Fdd$oߎ ^He C ĉܵFp؜ZwXhaexZwXhaexZwXhaexZwXhaexZwXhaexZwXhaexq 7~QsD2⟉ၹs>5cqmca0&L@YY|}}]ʨwӃXP**ߴ8A>>.c$8i2b܆v#"bc ø0B -;,zuu!!\ @xYĴ4{ztJRqD+,aahjm> 8nޅ HJBի?|!fTT<ƭ[h/xWht /^ddÎQի 瞃5ϛ# ?llȻxQqW`ak˭-cY@N>Y85]5Z=L57Ѽ<4qϛ ]QL ._A k _BQV]b17ߠQeWBBގ7o{.jlwFVAs"?7g}*yniXM ._R81v}< |yٲؽy3>|B߆0|wJ\2Ԡ3fvD]P5M)AݍgQq6^ ѫ| 6xcո},̰qjCsnnqaÊ*ۚ eؖagm^Sk+,LMѧT33q?pȑ!O1 H`cH6:, Yg"rrm-ڸy#,'V#VXB& 1&ZB.,(T^>]' 2B -;, 2BθNw_~wgZ1ا3mff&rrrF峼Fٳ!g0>ˋq7=`I]<J$ĮNIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.ProblemType-class.html0000644000175000001440000002455212720314521025604 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.ProblemType
Package slepc4py :: Module SLEPc :: Class EPS :: Class ProblemType
[hide private]
[frames] | no frames]

Class ProblemType


EPS problem type

  • HEP: Hermitian eigenproblem.

  • NHEP: Non-Hermitian eigenproblem.

  • GHEP: Generalized Hermitian eigenproblem.

  • GNHEP: Generalized Non-Hermitian eigenproblem.

  • PGNHEP: Generalized Non-Hermitian eigenproblem

    with positive definite B.

  • GHIEP: Generalized Hermitian-indefinite eigenproblem.

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  GHEP = 2
  GHIEP = 6
  GNHEP = 4
  HEP = 1
  NHEP = 3
  PGNHEP = 5
  __qualname__ = 'EPSProblemType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.Extraction-class.html0000644000175000001440000002530312720314521025455 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.Extraction
Package slepc4py :: Module SLEPc :: Class EPS :: Class Extraction
[hide private]
[frames] | no frames]

Class Extraction


EPS extraction technique

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  HARMONIC = 1
  HARMONIC_LARGEST = 4
  HARMONIC_RELATIVE = 2
  HARMONIC_RIGHT = 3
  REFINED = 5
  REFINED_HARMONIC = 6
  RITZ = 0
  __qualname__ = 'EPSExtraction'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_orthogtype.png0000644000175000001440000000321312720314520025245 0ustar dalcinlusers00000000000000PNG  IHDRe$cQbKGD@IDAThiPSWO"EDP nc6ad,.,2E1PPicEYD2PMD֒ap$@ADfކ:3qw{~o=wEHRf Z _ʡKI2#V4h_HzMCQQlD0`#m^__c[@,Ay׮g0>JaEE#&TʡK9~)~ 4&GvߩKD2 啕!vGj4`G4b9Ԋʌ I޽٫I"<ݳj~pPůeKTefBWp]]R IᏢRKSSKSF(`?ʰ*b JZZ}rX, Mpnn=VظmɶmYYPȾX۱GϞJil U[ ާ0ߌ-$[?4Xi@"'޾hLDc2߉D*Ԯ_FF 8qw7>si*5? sյe$'CS/"1rڝ_Y LŊ >@.2]h,1baao%'LJSWfN3>ܪꖖ.([;G$_3(_GE ݻWG[۝D ~N$++;eZp9,\hkK&|4] @WW̑#8SSՏXҔcL0+N׫P뗮F_A&e쎎PUh2|78(H̱XĄߏ`9L{*($x|esszl, gj+yd2ŢE3*x2/tDGFBzv?j r? .E!]|>}02z)Ko66XCC8jt>NOnޔR6{WgX,u",Kв'==ĀC<<&{8h _Gt3>9r7ܹꖖ4ŏ[']]e Ø;II_ht OWvU'kk?~iLfx@VmYN&44oHc4['蠠hH,?uj`hh5B 9yRio^2'b QpstP H@xt Ew@88[&5u*+23[΅SRkPܤl,VThooo(8:;bbxhl|-65UX.rII瑧Iڿl|ܝJsh8=l׮%7{P|a\`Y2@""""f}rA=?48QjCrL7L_ojp_H$R"p@T@Pv(F}ICj>zW_ʡK9fXBIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_mfn.png0000644000175000001440000000602512720314522023627 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATxmPSW@4H *Ba& _HqZNն*Ŷ?TGj-cW VhC dNT:Щ-(g?%ɽ`rs8yι.!(yƆCdCdgՊgΝ;ި1sEttNrRQQAxrrr#J.gZ ۲E_yMdCdCdCdC;H a ʕ+q5678~6zfyyyA`` ␟:ڻj裏"((s,$(5a?y-?BBB<իW#@]]rss Z{7`mYYY/P^^Eaڴia!"YAاP(.ͅ.W QXX a<͘1å?9Ժs{]t)L&tΝ;(77233(%%6o,|_zbR"jiiÇR$BD -\^}Uz >諯"HN"JEO?4vF0O{qtW_|4c -[/5/ɓiʔ)a^ZhM8gΜIcǎ$(22瞣zB+UkF)ُmǖڤ͙f]vQRRRtt4m߾]yl6Ӷm(11ƏO*>CqMaaam6}KR]]bz0F<Қ5kSE4'H i}jEkk+>3y^x&M7zsW[]]+?Fc.G_P^^g}ry]vv6dCdCdCdCd:1ww }.c<#;;]},Khg( 8qB<״Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv8Lv|.op}sN7⟉ٳgc‰s#RhgAZUUQ]d'#"$e13>uFAhP~UU\|}m] ذ{7aBf F#ٌ_KX`qlŕ?{7O߷1AGƲe(?p,T1%8إ:;A 8lqho7 e vVADwQ3> Kۜ XL,=]==x2t:Ydi0~~~8ZP+*w8qK8&w|L[\\QYfAcsL8Lv8"%j~IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.Balance-class.html0000644000175000001440000002247612720314521024672 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.Balance
Package slepc4py :: Module SLEPc :: Class EPS :: Class Balance
[hide private]
[frames] | no frames]

Class Balance


EPS type of balancing used for non-Hermitian problems

  • NONE: None.
  • ONESIDE: One-sided eigensolver, only right eigenvectors.
  • TWOSIDE: Two-sided eigensolver, right and left eigenvectors.
  • USER: User-defined.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  NONE = 0
  ONESIDE = 1
  TWOSIDE = 2
  USER = 3
  __qualname__ = 'EPSBalance'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_errortype_3.png0000644000175000001440000000227112720314523025324 0ustar dalcinlusers00000000000000PNG  IHDRY$mbKGDnIDAThc?(``````h "00H?HNNfddhx}`bqdڵp KAVBBWwF'.100.ȂROoeW5`KKG\FF vĊ;"+*0ϯ\iNr‚آERRr={?{fa300 P ba!*((!"B-Gps300|&Y^y`ɓr 6m?Z{{7?"+>rY~A "$Q ON|33$Rjłd K}۵\=s?vGl6xI7p|<AN#HLLiSტvT*NjWVHa:"-E{./j`Nx6.Ե\&hѩ)@0̸g1L9rWqG.i7f6hPUk4lHR4wu?s9#iv6ZmEq1磡kCC=q'",,Y,f_:]LD͒wr33$_\|>'x0b r_e $RAzyk\Tʭ|36incm?SU*,,v~aܮ ?׹rpa]]jBBJ||oK˅=K`?>WWi!/+ |h(8(H* VF `?.,/'ƲbqXg>q,2<<).QwwzRRXH\P0ImZ --:83ȥW8E"Hv|8zQqhֶvpmP]rܭVKQQ a?auBqZF(--e|<gm>7M<ŕEVM4}\]oe;/>4^k6IENDB`slepc4py-3.7.0/docs/apiref/module-tree.html0000644000175000001440000001111712720314520021354 0ustar dalcinlusers00000000000000 Module Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Module Hierarchy

  • slepc4py: This package is an interface to SLEPc libraries.
    • slepc4py.SLEPc: Scalable Library for Eigenvalue Problem Computations.
    • slepc4py.lib: Extension modules for different SLEPc configurations.
slepc4py-3.7.0/docs/apiref/class_hierarchy_for_lanczosreo.png0000644000175000001440000000426312720314521025227 0ustar dalcinlusers00000000000000PNG  IHDR$gbKGDhIDATxyTSW ĢqChЎLQ@ʢPYLK!@g$mbIuM Q,2EL+zT(HEII۾L)y}wݼT*7O'[PE ޴G8@ DEE痠A300P*o?B$ Vl4mm\ojڽlY@cQ7hzl=O1d(aG]  ;hwOR=Э Z6hSrsDr 3f-)cU._c=\tiƍx444}"I!++롳gm/4{Tuu[sslJp2ˬۛ7200|񣸷7…ϞIU³'V %*ʂpڙݫəp)U99CCAɫW  3#) 9-?g$(?|<ڙГ6ICܢ++m e=UUe``!$>H2kЃą?77ٹrҤϟ_u#+kʕ$Fv[#?6͜,uWVMM %#&G%;0<)5U_M$H˗`ggdh//4lkʤ$]Xh܆ШC)>]yX ^Vj.!!7'OmؐLp`r$**) .͝B#) ;tMPLHhFM l)`4HE ,Tvu*lt@dEɆpȘ:8>x0ZF0X$`J|IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.FN.CombineType-class.html0000644000175000001440000002260412720314521025430 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.FN.CombineType
Package slepc4py :: Module SLEPc :: Class FN :: Class CombineType
[hide private]
[frames] | no frames]

Class CombineType


FN type of combination of child functions

  • ADD: Addition f(x) = f1(x)+f2(x)
  • MULTIPLY: Multiplication f(x) = f1(x)*f2(x)
  • DIVIDE: Division f(x) = f1(x)/f2(x)
  • COMPOSE: Composition f(x) = f2(f1(x))
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ADD = 0
  COMPOSE = 3
  DIVIDE = 2
  MULTIPLY = 1
  __qualname__ = 'FNCombineType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_convergedr_3.png0000644000175000001440000000372512720314522025433 0ustar dalcinlusers00000000000000PNG  IHDR$;/.bKGDIDAThPSWo !i*.HR ̪T@bpM,hFMĠ`ݬdG_ UKLi~Eax5ؚ2>?;ysyYX^D'Lc޽(j#B///T KNZBҠ;t:HÚ5]"F}kV ³۹H3D'Ded72yY@׮ܰ^:=}}(??￑Ŏ1EQb=]ỏ҃h+)bPJOJZs~^A xХtt4K #^jlD@8r+;)տ٣oP?N r =|F@DEx-g(l,E35ei8;lNOC%͛-o QQ7n f2뚛jf5e ^$FݻsA0,[]kn^OW|ttgmSZ*uuFnFtdM߸ w%v|zzpGy󯴵eC^^Rg)*8W84sʾUQqOutr*)pJ;w.RdfB^yYA}1&Hn.RP&TA샳gl݊oq򏉉o<:t(9/O&+j*GP_)wL zj+$%;;LeD"+NfDFƞ<4PܺFd$P|٣G]5lvCk+gaa^pH$M*z |'*8x%500=!ҏF&IU[D'.qVVwYI 8:SZNPpXlWwLXl/wKZ6=֩SM.)3:3d_?< OOp~F_wڦo +CBk}}{} Z_-k..dbv6m ~􈙚:R_syo$ƒeLY"KJHe"vz9YZX @~z!n2stu򖖯JK!;o=|; ==qX nO8je0nWV@5N'kn-!aL0*wc1Mnر;w$'**N<遪|ȟ<R(q;$=twXODQZGߋ luJ\qC:2 shg7TNT=]355Za0jWXW*Q/j1 3*wc1E'{[ۯ++5Z-/|LĦMPd'{ ѡ$7Cݲehdd^IL:/ 6[߅E%=""2>M+n..q8;{m\>g _}un8uvb➔o i7bXɓ{Ҫ kTƂ/_d뚛]uO8ܹos掰T*d4=IwRRnwu&'H۱cZL߁, I11I #WPܹA-f2->>->~Yh̬߂d :Nvf ‚,,,t:]T'.TTbiiQK#D' slepc4py.SLEPc.RG.Type
Package slepc4py :: Module SLEPc :: Class RG :: Class Type
[hide private]
[frames] | no frames]

Class Type


RG type
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ELLIPSE = 'ellipse'
  INTERVAL = 'interval'
  POLYGON = 'polygon'
  RING = 'ring'
  __qualname__ = 'RGType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/toc-everything.html0000644000175000001440000002234712720314520022110 0ustar dalcinlusers00000000000000 Everything

Everything


All Classes

slepc4py.SLEPc.BV
slepc4py.SLEPc.BV.BlockType
slepc4py.SLEPc.BV.OrthogType
slepc4py.SLEPc.BV.RefineType
slepc4py.SLEPc.BV.Type
slepc4py.SLEPc.DS
slepc4py.SLEPc.DS.MatType
slepc4py.SLEPc.DS.StateType
slepc4py.SLEPc.DS.Type
slepc4py.SLEPc.EPS
slepc4py.SLEPc.EPS.Balance
slepc4py.SLEPc.EPS.Conv
slepc4py.SLEPc.EPS.ConvergedReason
slepc4py.SLEPc.EPS.ErrorType
slepc4py.SLEPc.EPS.Extraction
slepc4py.SLEPc.EPS.LanczosReorthogType
slepc4py.SLEPc.EPS.PowerShiftType
slepc4py.SLEPc.EPS.ProblemType
slepc4py.SLEPc.EPS.Type
slepc4py.SLEPc.EPS.Which
slepc4py.SLEPc.FN
slepc4py.SLEPc.FN.CombineType
slepc4py.SLEPc.FN.Type
slepc4py.SLEPc.MFN
slepc4py.SLEPc.MFN.ConvergedReason
slepc4py.SLEPc.MFN.Type
slepc4py.SLEPc.NEP
slepc4py.SLEPc.NEP.ConvergedReason
slepc4py.SLEPc.NEP.ErrorType
slepc4py.SLEPc.NEP.Refine
slepc4py.SLEPc.NEP.RefineScheme
slepc4py.SLEPc.NEP.Type
slepc4py.SLEPc.NEP.Which
slepc4py.SLEPc.PEP
slepc4py.SLEPc.PEP.Basis
slepc4py.SLEPc.PEP.Conv
slepc4py.SLEPc.PEP.ConvergedReason
slepc4py.SLEPc.PEP.ErrorType
slepc4py.SLEPc.PEP.Extract
slepc4py.SLEPc.PEP.ProblemType
slepc4py.SLEPc.PEP.Refine
slepc4py.SLEPc.PEP.RefineScheme
slepc4py.SLEPc.PEP.Scale
slepc4py.SLEPc.PEP.Type
slepc4py.SLEPc.PEP.Which
slepc4py.SLEPc.RG
slepc4py.SLEPc.RG.Type
slepc4py.SLEPc.ST
slepc4py.SLEPc.ST.MatMode
slepc4py.SLEPc.ST.Type
slepc4py.SLEPc.SVD
slepc4py.SLEPc.SVD.ConvergedReason
slepc4py.SLEPc.SVD.ErrorType
slepc4py.SLEPc.SVD.Type
slepc4py.SLEPc.SVD.Which
slepc4py.SLEPc.Sys

All Functions

slepc4py.get_include
slepc4py.init
slepc4py.lib.ImportSLEPc
slepc4py.lib.getPathArchSLEPc

All Variables

slepc4py.SLEPc.COMM_NULL
slepc4py.SLEPc.COMM_SELF
slepc4py.SLEPc.COMM_WORLD
slepc4py.SLEPc.DECIDE
slepc4py.SLEPc.DEFAULT
slepc4py.SLEPc.DETERMINE
slepc4py.SLEPc.__arch__
slepc4py.SLEPc.__package__
slepc4py.SLEPc.__pyx_capi__
slepc4py.__credits__
slepc4py.__package__
slepc4py.lib.__package__

[hide private] slepc4py-3.7.0/docs/apiref/class_hierarchy_for__p_mem.png0000644000175000001440000000151612720314524024305 0ustar dalcinlusers00000000000000PNG  IHDRS$ybKGDIDATh_HSQ{C(a*|i6$"lP4LLC#X TR QCPFTۓV͝fsw~89Wu]G"KH2EP[[+%h===TUuŋ͆VUU'3(F#=A9 z<,EXޓ/ H2"e D)?*s,FX{-VN|uXb˶ j?vVqcoss4{+.`mn.<钑 M['!Cm|ܸsP MM|x^NN5vuqoh)IȼԄf3 $窮&O8ZV#G4jWBшdrqKHL [7nwIm0Xy^yz헾չ)I|11d`t| B]l.( )c$CFyX8ӑNsx~K۷ `PɐYmc;~ϳ*-1DUl].c$AMQ%%iØП?O+ D2eelN[rt6Z "e D)/'83YK'SUU(Hp$5ezjjjvA4 ,))S ^F\IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.LanczosReorthogType-class.html0000644000175000001440000002406412720314521027325 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.LanczosReorthogType
Package slepc4py :: Module SLEPc :: Class EPS :: Class LanczosReorthogType
[hide private]
[frames] | no frames]

Class LanczosReorthogType


EPS Lanczos reorthogonalization type

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  DELAYED = 5
  FULL = 1
  LOCAL = 0
  PARTIAL = 4
  PERIODIC = 3
  SELECTIVE = 2
  __qualname__ = 'EPSLanczosReorthogType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.Type-class.html0000644000175000001440000002433112720314523024255 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.Type
Package slepc4py :: Module SLEPc :: Class PEP :: Class Type
[hide private]
[frames] | no frames]

Class Type


PEP type

Polynomial eigensolvers.

  • LINEAR: Linearization via EPS.
  • QARNOLDI: Q-Arnoldi for quadratic problems.
  • TOAR: Two-level orthogonal Arnoldi.
  • STOAR: Symmetric TOAR.
  • JD: Polynomial Jacobi-Davidson.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  JD = 'jd'
  LINEAR = 'linear'
  QARNOLDI = 'qarnoldi'
  STOAR = 'stoar'
  TOAR = 'toar'
  __qualname__ = 'PEPType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.SVD.Type-class.html0000644000175000001440000002435612720314524024275 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.SVD.Type
Package slepc4py :: Module SLEPc :: Class SVD :: Class Type
[hide private]
[frames] | no frames]

Class Type


SVD types

  • CROSS: Eigenproblem with the cross-product matrix.
  • CYCLIC: Eigenproblem with the cyclic matrix.
  • LAPACK: Wrappers to dense SVD solvers in Lapack.
  • LANCZOS: Lanczos.
  • TRLANCZOS: Thick-restart Lanczos.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CROSS = 'cross'
  CYCLIC = 'cyclic'
  LANCZOS = 'lanczos'
  LAPACK = 'lapack'
  TRLANCZOS = 'trlanczos'
  __qualname__ = 'SVDType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.BV.Type-class.html0000644000175000001440000002230212720314520024131 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.BV.Type
Package slepc4py :: Module SLEPc :: Class BV :: Class Type
[hide private]
[frames] | no frames]

Class Type


BV type
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONTIGUOUS = 'contiguous'
  MAT = 'mat'
  SVEC = 'svec'
  VECS = 'vecs'
  __qualname__ = 'BVType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.SVD-class.html0000644000175000001440000024624012720314524023353 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.SVD
Package slepc4py :: Module SLEPc :: Class SVD
[hide private]
[frames] | no frames]

Class SVD


SVD
Nested Classes [hide private]
  ConvergedReason
SVD convergence reasons
  ErrorType
SVD error type to assess accuracy of computed solutions
  Type
SVD types
  Which
SVD desired piece of spectrum
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
appendOptionsPrefix(self, prefix)
Appends to the prefix used for searching for all SVD options in the database.
 
cancelMonitor(self)
Clears all monitors for an SVD object.
 
computeError(self, int i, etype=None)
Computes the error (based on the residual norm) associated with the i-th singular triplet.
 
create(self, comm=None)
Creates the SVD object.
 
destroy(self)
Destroys the SVD object.
 
errorView(self, etype=None, Viewer viewer=None)
Displays the errors associated with the computed solution (as well as the eigenvalues).
 
getBV(self)
Obtain the basis vectors objects associated to the SVD object.
 
getConverged(self)
Gets the number of converged singular triplets.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
getCrossEPS(self)
Retrieve the eigensolver object (EPS) associated to the singular value solver.
 
getCyclicEPS(self)
Retrieve the eigensolver object (EPS) associated to the singular value solver.
 
getCyclicExplicitMatrix(self)
Returns the flag indicating if H(A) = [ 0 A ; A^T 0 ] is built explicitly.
 
getDimensions(self)
Gets the number of singular values to compute and the dimension of the subspace.
 
getImplicitTranspose(self)
Gets the mode used to handle the transpose of the matrix associated with the singular value problem.
 
getIterationNumber(self)
Gets the current iteration number.
 
getOperator(self)
Gets the matrix associated with the singular value problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all SVD options in the database.
 
getSingularTriplet(self, int i, Vec U=None, Vec V=None)
Gets the i-th triplet of the singular value decomposition as computed by solve().
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default SVD convergence tests.
 
getType(self)
Gets the SVD type of this object.
 
getValue(self, int i)
Gets the i-th singular value as computed by solve().
 
getVectors(self, int i, Vec U, Vec V)
Gets the i-th left and right singular vectors as computed by solve().
 
getWhichSingularTriplets(self)
Returns which singular triplets are to be sought.
 
reset(self)
Resets the SVD object.
 
setBV(self, BV V, BV U=None)
Associates basis vectors objects to the SVD solver.
 
setCrossEPS(self, EPS eps)
Associate an eigensolver object (EPS) to the singular value solver.
 
setCyclicEPS(self, EPS eps)
Associate an eigensolver object (EPS) to the singular value solver.
 
setCyclicExplicitMatrix(self, flag=True)
Indicate if the eigensolver operator H(A) = [ 0 A ; A^T 0 ] must be computed explicitly.
 
setDimensions(self, nsv=None, ncv=None, mpd=None)
Sets the number of singular values to compute and the dimension of the subspace.
 
setFromOptions(self)
Sets SVD options from the options database.
 
setImplicitTranspose(self, mode)
Indicates how to handle the transpose of the matrix associated with the singular value problem.
 
setInitialSpace(self, space)
Sets the initial space from which the SVD solver starts to iterate.
 
setLanczosOneSide(self, flag=True)
Indicate if the variant of the Lanczos method to be used is one-sided or two-sided.
 
setOperator(self, Mat A)
Sets the matrix associated with the singular value problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all SVD options in the database.
 
setTRLanczosOneSide(self, flag=True)
Indicate if the variant of the thick-restart Lanczos method to be used is one-sided or two-sided.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default SVD convergence tests.
 
setType(self, svd_type)
Selects the particular solver to be used in the SVD object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the singular value solver.
 
setWhichSingularTriplets(self, which)
Specifies which singular triplets are to be sought.
 
solve(self)
Solves the singular value problem.
 
view(self, Viewer viewer=None)
Prints the SVD data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  bv
  max_it
  tol
  transpose_mode
  which

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

appendOptionsPrefix(self, prefix)

 

Appends to the prefix used for searching for all SVD options in the database.

Parameters

prefix: string
The prefix string to prepend to all SVD option requests.

computeError(self, int i, etype=None)

 

Computes the error (based on the residual norm) associated with the i-th singular triplet.

Parameters

i: int
Index of the solution to be considered.
etype: SVD.ErrorType enumerate
The error type to compute.

Returns

e: real
The relative error bound, computed in various ways from the residual norm sqrt(n1^2+n2^2) where n1 = ||A*v-sigma*u||_2, n2 = ||A^T*u-sigma*v||_2, sigma is the singular value, u and v are the left and right singular vectors.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()).

create(self, comm=None)

 

Creates the SVD object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the SVD object.
Overrides: petsc4py.PETSc.Object.destroy

errorView(self, etype=None, Viewer viewer=None)

 

Displays the errors associated with the computed solution (as well as the eigenvalues).

Parameters

etype: SVD.ErrorType enumerate, optional
The error type to compute.
viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.

Notes

By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.

getBV(self)

 

Obtain the basis vectors objects associated to the SVD object.

Returns

V: BV
The basis vectors context for right singular vectors.
U: BV
The basis vectors context for left singular vectors.

getConverged(self)

 

Gets the number of converged singular triplets.

Returns

nconv: int
Number of converged singular triplets.

Notes

This function should be called after solve() has finished.

getConvergedReason(self)

 

Gets the reason why the solve() iteration was stopped.

Returns

reason: SVD.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

getCrossEPS(self)

 

Retrieve the eigensolver object (EPS) associated to the singular value solver.

Returns

eps: EPS
The eigensolver object.

getCyclicEPS(self)

 

Retrieve the eigensolver object (EPS) associated to the singular value solver.

Returns

eps: EPS
The eigensolver object.

getCyclicExplicitMatrix(self)

 

Returns the flag indicating if H(A) = [ 0 A ; A^T 0 ] is built explicitly.

Returns

flag: boolean
True if H(A) is built explicitly.

getDimensions(self)

 

Gets the number of singular values to compute and the dimension of the subspace.

Returns

nsv: int
Number of singular values to compute.
ncv: int
Maximum dimension of the subspace to be used by the solver.
mpd: int
Maximum dimension allowed for the projected problem.

getImplicitTranspose(self)

 

Gets the mode used to handle the transpose of the matrix associated with the singular value problem.

Returns

impl: boolean
How to handle the transpose (implicitly or not).

getIterationNumber(self)

 

Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.

Returns

its: int
Iteration number.

getOperator(self)

 

Gets the matrix associated with the singular value problem.

Returns

A: Mat
The matrix associated with the singular value problem.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all SVD options in the database.

Returns

prefix: string
The prefix string set for this SVD object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getSingularTriplet(self, int i, Vec U=None, Vec V=None)

 

Gets the i-th triplet of the singular value decomposition as computed by solve(). The solution consists of the singular value and its left and right singular vectors.

Parameters

i: int
Index of the solution to be obtained.
U: Vec
Placeholder for the returned left singular vector.
V: Vec
Placeholder for the returned right singular vector.

Returns

s: float
The computed singular value.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default SVD convergence tests.

Returns

tol: float
The convergence tolerance.
max_it: int
The maximum number of iterations

getType(self)

 

Gets the SVD type of this object.

Returns

type: SVD.Type enumerate
The solver currently being used.
Overrides: petsc4py.PETSc.Object.getType

getValue(self, int i)

 

Gets the i-th singular value as computed by solve().

Parameters

i: int
Index of the solution to be obtained.

Returns

s: float
The computed singular value.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().

getVectors(self, int i, Vec U, Vec V)

 

Gets the i-th left and right singular vectors as computed by solve().

Parameters

i: int
Index of the solution to be obtained.
U: Vec
Placeholder for the returned left singular vector.
V: Vec
Placeholder for the returned right singular vector.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().

getWhichSingularTriplets(self)

 

Returns which singular triplets are to be sought.

Returns

which: SVD.Which enumerate
The singular values to be sought (either largest or smallest).

setBV(self, BV V, BV U=None)

 

Associates basis vectors objects to the SVD solver.

Parameters

V: BV
The basis vectors context for right singular vectors.
U: BV
The basis vectors context for left singular vectors.

setCrossEPS(self, EPS eps)

 

Associate an eigensolver object (EPS) to the singular value solver.

Parameters

eps: EPS
The eigensolver object.

setCyclicEPS(self, EPS eps)

 

Associate an eigensolver object (EPS) to the singular value solver.

Parameters

eps: EPS
The eigensolver object.

setCyclicExplicitMatrix(self, flag=True)

 

Indicate if the eigensolver operator H(A) = [ 0 A ; A^T 0 ] must be computed explicitly.

Parameters

flag: boolean
True if H(A) is built explicitly.

setDimensions(self, nsv=None, ncv=None, mpd=None)

 

Sets the number of singular values to compute and the dimension of the subspace.

Parameters

nsv: int, optional
Number of singular values to compute.
ncv: int, optional
Maximum dimension of the subspace to be used by the solver.
mpd: int, optional
Maximum dimension allowed for the projected problem.

Notes

Use DECIDE for ncv and mpd to assign a reasonably good value, which is dependent on the solution method.

The parameters ncv and mpd are intimately related, so that the user is advised to set one of them at most. Normal usage is the following:

  • In cases where nsv is small, the user sets ncv (a reasonable default is 2 * nsv).
  • In cases where nsv is large, the user sets mpd.

The value of ncv should always be between nsv and (nsv + mpd), typically ncv = nsv + mpd. If nsv is not too large, mpd = nsv is a reasonable choice, otherwise a smaller value should be used.

setFromOptions(self)

 

Sets SVD options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setImplicitTranspose(self, mode)

 

Indicates how to handle the transpose of the matrix associated with the singular value problem.

Parameters

impl: boolean
How to handle the transpose (implicitly or not).

Notes

By default, the transpose of the matrix is explicitly built (if the matrix has defined the MatTranspose operation).

If this flag is set to true, the solver does not build the transpose, but handles it implicitly via MatMultTranspose().

setInitialSpace(self, space)

 

Sets the initial space from which the SVD solver starts to iterate.

Parameters

space: an sequence of Vec
The initial space.

setLanczosOneSide(self, flag=True)

 

Indicate if the variant of the Lanczos method to be used is one-sided or two-sided.

Parameters

flag: boolean
True if the method is one-sided.

Notes

By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors. It also saves the memory required for storing such vectors.

setOperator(self, Mat A)

 

Sets the matrix associated with the singular value problem.

Parameters

A: Mat
The matrix associated with the singular value problem.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all SVD options in the database.

Parameters

prefix: string
The prefix string to prepend to all SVD option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

For example, to distinguish between the runtime options for two different SVD contexts, one could call:

S1.setOptionsPrefix("svd1_")
S2.setOptionsPrefix("svd2_")
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setTRLanczosOneSide(self, flag=True)

 

Indicate if the variant of the thick-restart Lanczos method to be used is one-sided or two-sided.

Parameters

flag: boolean
True if the method is one-sided.

Notes

By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors.

setTolerances(self, tol=None, max_it=None)

 

Sets the tolerance and maximum iteration count used by the default SVD convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
max_it: int, optional
The maximum number of iterations

Notes

Use DECIDE for max_it to assign a reasonably good value, which is dependent on the solution method.

setType(self, svd_type)

 

Selects the particular solver to be used in the SVD object.

Parameters

svd_type: SVD.Type enumerate
The solver to be used.

Notes

See SVD.Type for available methods. The default is CROSS. Normally, it is best to use setFromOptions() and then set the SVD type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.

setUp(self)

 

Sets up all the internal data structures necessary for the execution of the singular value solver.

Notes

This function need not be called explicitly in most cases, since solve() calls it. It can be useful when one wants to measure the set-up time separately from the solve time.

setWhichSingularTriplets(self, which)

 

Specifies which singular triplets are to be sought.

Parameters

which: SVD.Which enumerate
The singular values to be sought (either largest or smallest).

view(self, Viewer viewer=None)

 

Prints the SVD data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_conv.png0000644000175000001440000000153512720314521024014 0ustar dalcinlusers00000000000000PNG  IHDR@$nbKGDIDATXc?PLJGɌ"|199͌ș߿>b߿\@_VBBWwF| nfTg~"A< |&@2=JOOKKӨQYrsBm[I_ߏ? nۦ(dg׵`C@AAQOD_mm>L|ś7 Ȃ<\\rvN{WN-]}ԝǎuΟ߰E 'Lxc={ UcǸ88ȋ@=W?+vXV$#ڔdVTvx/oûO|~x5;v03||C<}iTԷ?^}?eW l)QQVhwpX{7 slepc4py.SLEPc.PEP.Refine
Package slepc4py :: Module SLEPc :: Class PEP :: Class Refine
[hide private]
[frames] | no frames]

Class Refine


PEP refinement strategy

  • NONE: No refinement.
  • SIMPLE: Refine eigenpairs one by one.
  • MULTIPLE: Refine all eigenpairs simultaneously (invariant pair).
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  MULTIPLE = 2
  NONE = 0
  SIMPLE = 1
  __qualname__ = 'PEPRefine'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_basis.png0000644000175000001440000000155712720314523024156 0ustar dalcinlusers00000000000000PNG  IHDRA$YbKGD$IDATXc?L*Q?  $''32255/^&!-k׮;Y߿ 6˗/]b``/\Sʮ.z㥥hC&~?0mXiI2njdX-zgϳ={vϜ܎ '&g5&R.D%DD$ED: |H." БO՘ YLHrax8KǼyꅆr)y{/޲5-a__o>xP=yr_45ooSTT9i~ZZ`۶Ԥ߿#GH@fZ2 g300]\JVB]V\/,;{';;\߿ Ȍۛ7p _O(OLtJM?+뭇=##lQ)ǷΜ/˸''>wU_~./^zϟaeeVVUQ~wPr`o^޻߿͋7ox9_~>9gݺWn~Y"*.`bbQQY$[\]UY鑕r߾U'g+Ȭ@JxdcP`n200Z*44"8RK apQ? 0;~R O^Dӿx zĽ J!Oapj;#IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_refinesche.png0000644000175000001440000000301312720314522025154 0ustar dalcinlusers00000000000000PNG  IHDRw$#bKGDIDATxmLSWm)&`A t$U> 2ADef Q1* oꦢdS $ *4S.f7QTFlQje%C=<{}zz%fٌ) D\#+d͘={Y"#M&KJJ[\TƓɓ'ۘێfL&| 6?,Q|(oM1%!}/+q 10F4W\Je:3(&׮9N*Z|8JҍQFE)8hVSKT**Maz]څGFmۆ&9?t:$Isֲ]fy9r9)Nef&z6P$_ZrSSqٲ'd-Zu:GL&| <\td$$0 /'N8.fѡ}{l$eg󬱑Ӧ leJr&N䃡CڹUM.2[ZAAsVװaXuuVEG1dŕTl8aܾB8}@HHݻcjTu`r~ٳ[Ӆ |e ?k?nW_WQ]JL$e&c=Mz*=É7o MZ-,7+({~ۻUXkPZ p).hd.\HZN;bY۶9 .3WV# EJpeeARSQ(g}b"GΞuH?^].'f8RޚT\B @Qi)ÞÇ(()aM|1ѩ8-i^͔ѣYKI'AAd$$6k!!?3g۽;Y9U; r/!uD;˟j}w0F4W \#+`n?|uR1W*b2M$x޻MOlllň]d24M`h025IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.FN.Type-class.html0000644000175000001440000002447212720314521024140 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.FN.Type
Package slepc4py :: Module SLEPc :: Class FN :: Class Type
[hide private]
[frames] | no frames]

Class Type


FN type
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  COMBINE = 'combine'
  EXP = 'exp'
  INVSQRT = 'invsqrt'
  LOG = 'log'
  PHI = 'phi'
  RATIONAL = 'rational'
  SQRT = 'sqrt'
  __qualname__ = 'FNType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_eps.png0000644000175000001440000000607312720314520023637 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx}PT "*`R,4JffQ&SW6P@VΈ#Yc8 5ך)qk";r' q úq. .}fΌaWBDDd `l8Lt8LtqYܹs0faѢEl$+7mڵ%+dMnv_yMDCDCDCDC$Dbcʕ'FS__lGkZƂ E>~nnnjt4qk׮A.tW^EppMpmm-z=nܸf_n ^xZP(uV믨qQTUUAV枞$&&_~Aqq1.^۷*ʩ%%%  8N֛y?B ___RTo>jiim.$tM?ÅZ~ijjj:\a\Cs|T. mCC>̙CDDs%^/-mllnii(jllګd2QDD}DDb ڻwq}||h>7Gfd"FC4o)Jjj'͛7ۭvj3LF[짴nݺewZ6y+C=D_5]zΟ?O;:uwuuQ\\-_jjjӧOB{fPJ";:#e}5˃O?f͚Ern*twwӫJӦMzשhɒ%`qٳgԩSiܹTUUED)22iݺui{uTQff&Qwwѱm͚dR*Gє#<\ث`0жmh޼yO vM}}}8q),,mFo߶٧9R]ε3&<"gj۱ceddLREv"8 z~ܸq}?rY7WwXPPx Wr#VWWDlܸO>&W\Jk3f˿k֬\`n`0oy12222ѱO=4ҟ_06Y֮]kfsˋ5ww)fmlB\C"ɓ½F:eáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáeáe㑟pҥI(xF3&ɐ"EGBBfKq]veL*[t&oIY+VHV*]Ƹ.m<:J%T*wL8Lt8Lt^i1>>X` mK}O¿\.\j~ س>;qG8cƜ3ݧhDuM RR4>?7oF~I cxy0۷C mğ4ҎNٴvGaH?6\5gpL loGGa3ϸv o`}v4GkmExH֤ 3Ue8Nr&2琎iphphphphphphx}ZO3l1+m@@Kpm slepc4py.SLEPc.PEP.Conv
Package slepc4py :: Module SLEPc :: Class PEP :: Class Conv
[hide private]
[frames] | no frames]

Class Conv


PEP convergence test

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABS = 0
  NORM = 2
  REL = 1
  USER = 3
  __qualname__ = 'PEPConv'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/redirect.html0000644000175000001440000000536412720314524020746 0ustar dalcinlusers00000000000000Epydoc Redirect Page

Epydoc Auto-redirect page

When javascript is enabled, this page will redirect URLs of the form redirect.html#dotted.name to the documentation for the object with the given fully-qualified dotted name.

 

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.SVD.ConvergedReason-class.html0000644000175000001440000002411012720314524026424 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.SVD.ConvergedReason
Package slepc4py :: Module SLEPc :: Class SVD :: Class ConvergedReason
[hide private]
[frames] | no frames]

Class ConvergedReason


SVD convergence reasons

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONVERGED_ITERATING = 0
  CONVERGED_TOL = 1
  CONVERGED_USER = 2
  DIVERGED_BREAKDOWN = -2
  DIVERGED_ITS = -1
  ITERATING = 0
  __qualname__ = 'SVDConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.Refine-class.html0000644000175000001440000002164312720314522024544 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.Refine
Package slepc4py :: Module SLEPc :: Class NEP :: Class Refine
[hide private]
[frames] | no frames]

Class Refine


NEP refinement strategy

  • NONE: No refinement.
  • SIMPLE: Refine eigenpairs one by one.
  • MULTIPLE: Refine all eigenpairs simultaneously (invariant pair).
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  MULTIPLE = 2
  NONE = 0
  SIMPLE = 1
  __qualname__ = 'NEPRefine'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.ProblemType-class.html0000644000175000001440000002174612720314523025605 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.ProblemType
Package slepc4py :: Module SLEPc :: Class PEP :: Class ProblemType
[hide private]
[frames] | no frames]

Class ProblemType


PEP problem type

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  GENERAL = 1
  GYROSCOPIC = 3
  HERMITIAN = 2
  __qualname__ = 'PEPProblemType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.NEP.Which-class.html0000644000175000001440000002527112720314522024377 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.NEP.Which
Package slepc4py :: Module SLEPc :: Class NEP :: Class Which
[hide private]
[frames] | no frames]

Class Which


Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ALL = 10
  LARGEST_IMAGINARY = 5
  LARGEST_MAGNITUDE = 1
  LARGEST_REAL = 3
  SMALLEST_IMAGINARY = 6
  SMALLEST_MAGNITUDE = 2
  SMALLEST_REAL = 4
  TARGET_IMAGINARY = 9
  TARGET_MAGNITUDE = 7
  TARGET_REAL = 8
  USER = 11
  __qualname__ = 'NEPWhich'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/api-objects.txt0000644000175000001440000016563712720314524021232 0ustar dalcinlusers00000000000000slepc4py slepc4py-module.html slepc4py.__credits__ slepc4py-module.html#__credits__ slepc4py.get_include slepc4py-module.html#get_include slepc4py.init slepc4py-module.html#init slepc4py.__package__ slepc4py-module.html#__package__ slepc4py.SLEPc slepc4py.SLEPc-module.html slepc4py.SLEPc.DEFAULT slepc4py.SLEPc-module.html#DEFAULT slepc4py.SLEPc.COMM_NULL slepc4py.SLEPc-module.html#COMM_NULL slepc4py.SLEPc.COMM_WORLD slepc4py.SLEPc-module.html#COMM_WORLD slepc4py.SLEPc.__arch__ slepc4py.SLEPc-module.html#__arch__ slepc4py.SLEPc.DECIDE slepc4py.SLEPc-module.html#DECIDE slepc4py.SLEPc.__package__ slepc4py.SLEPc-module.html#__package__ slepc4py.SLEPc.DETERMINE slepc4py.SLEPc-module.html#DETERMINE slepc4py.SLEPc._finalize slepc4py.SLEPc-module.html#_finalize slepc4py.SLEPc.__pyx_capi__ slepc4py.SLEPc-module.html#__pyx_capi__ slepc4py.SLEPc._initialize slepc4py.SLEPc-module.html#_initialize slepc4py.SLEPc.COMM_SELF slepc4py.SLEPc-module.html#COMM_SELF slepc4py.lib slepc4py.lib-module.html slepc4py.lib.__package__ slepc4py.lib-module.html#__package__ slepc4py.lib.ImportSLEPc slepc4py.lib-module.html#ImportSLEPc slepc4py.lib.getPathArchSLEPc slepc4py.lib-module.html#getPathArchSLEPc slepc4py.SLEPc.BV slepc4py.SLEPc.BV-class.html slepc4py.SLEPc.BV.matMult slepc4py.SLEPc.BV-class.html#matMult slepc4py.SLEPc.BV.norm slepc4py.SLEPc.BV-class.html#norm slepc4py.SLEPc.BV.setOptionsPrefix slepc4py.SLEPc.BV-class.html#setOptionsPrefix slepc4py.SLEPc.BV.OrthogBlockType slepc4py.SLEPc.BV.BlockType-class.html slepc4py.SLEPc.BV.setSizes slepc4py.SLEPc.BV-class.html#setSizes slepc4py.SLEPc.BV.setFromOptions slepc4py.SLEPc.BV-class.html#setFromOptions slepc4py.SLEPc.BV.orthogonalize slepc4py.SLEPc.BV-class.html#orthogonalize slepc4py.SLEPc.BV.scaleColumn slepc4py.SLEPc.BV-class.html#scaleColumn slepc4py.SLEPc.BV.getSizes slepc4py.SLEPc.BV-class.html#getSizes slepc4py.SLEPc.BV.view slepc4py.SLEPc.BV-class.html#view slepc4py.SLEPc.BV.getActiveColumns slepc4py.SLEPc.BV-class.html#getActiveColumns slepc4py.SLEPc.BV.restoreColumn slepc4py.SLEPc.BV-class.html#restoreColumn slepc4py.SLEPc.BV.Type slepc4py.SLEPc.BV.Type-class.html slepc4py.SLEPc.BV.scale slepc4py.SLEPc.BV-class.html#scale slepc4py.SLEPc.BV.orthogonalizeVec slepc4py.SLEPc.BV-class.html#orthogonalizeVec slepc4py.SLEPc.BV.insertVecs slepc4py.SLEPc.BV-class.html#insertVecs slepc4py.SLEPc.BV.normColumn slepc4py.SLEPc.BV-class.html#normColumn slepc4py.SLEPc.BV.getOrthogonalization slepc4py.SLEPc.BV-class.html#getOrthogonalization slepc4py.SLEPc.BV.getOptionsPrefix slepc4py.SLEPc.BV-class.html#getOptionsPrefix slepc4py.SLEPc.BV.setSizesFromVec slepc4py.SLEPc.BV-class.html#setSizesFromVec slepc4py.SLEPc.BV.getMatrix slepc4py.SLEPc.BV-class.html#getMatrix slepc4py.SLEPc.BV.multVec slepc4py.SLEPc.BV-class.html#multVec slepc4py.SLEPc.BV.setActiveColumns slepc4py.SLEPc.BV-class.html#setActiveColumns slepc4py.SLEPc.BV.OrthogRefineType slepc4py.SLEPc.BV.RefineType-class.html slepc4py.SLEPc.BV.getColumn slepc4py.SLEPc.BV-class.html#getColumn slepc4py.SLEPc.BV.setMatrix slepc4py.SLEPc.BV-class.html#setMatrix slepc4py.SLEPc.BV.insertVec slepc4py.SLEPc.BV-class.html#insertVec slepc4py.SLEPc.BV.BlockType slepc4py.SLEPc.BV.BlockType-class.html slepc4py.SLEPc.BV.matMultHermitianTranspose slepc4py.SLEPc.BV-class.html#matMultHermitianTranspose slepc4py.SLEPc.BV.setType slepc4py.SLEPc.BV-class.html#setType slepc4py.SLEPc.BV.create slepc4py.SLEPc.BV-class.html#create slepc4py.SLEPc.BV.duplicate slepc4py.SLEPc.BV-class.html#duplicate slepc4py.SLEPc.BV.matProject slepc4py.SLEPc.BV-class.html#matProject slepc4py.SLEPc.BV.getType slepc4py.SLEPc.BV-class.html#getType slepc4py.SLEPc.BV.OrthogType slepc4py.SLEPc.BV.OrthogType-class.html slepc4py.SLEPc.BV.copy slepc4py.SLEPc.BV-class.html#copy slepc4py.SLEPc.BV.applyMatrix slepc4py.SLEPc.BV-class.html#applyMatrix slepc4py.SLEPc.BV.__new__ slepc4py.SLEPc.BV-class.html#__new__ slepc4py.SLEPc.BV.destroy slepc4py.SLEPc.BV-class.html#destroy slepc4py.SLEPc.BV.setOrthogonalization slepc4py.SLEPc.BV-class.html#setOrthogonalization slepc4py.SLEPc.BV.RefineType slepc4py.SLEPc.BV.RefineType-class.html slepc4py.SLEPc.BV.setRandom slepc4py.SLEPc.BV-class.html#setRandom slepc4py.SLEPc.BV.dotVec slepc4py.SLEPc.BV-class.html#dotVec slepc4py.SLEPc.BV.dot slepc4py.SLEPc.BV-class.html#dot slepc4py.SLEPc.BV.BlockType slepc4py.SLEPc.BV.BlockType-class.html slepc4py.SLEPc.BV.BlockType.GS slepc4py.SLEPc.BV.BlockType-class.html#GS slepc4py.SLEPc.BV.BlockType.CHOL slepc4py.SLEPc.BV.BlockType-class.html#CHOL slepc4py.SLEPc.BV.BlockType.__qualname__ slepc4py.SLEPc.BV.BlockType-class.html#__qualname__ slepc4py.SLEPc.BV.OrthogType slepc4py.SLEPc.BV.OrthogType-class.html slepc4py.SLEPc.BV.OrthogType.__qualname__ slepc4py.SLEPc.BV.OrthogType-class.html#__qualname__ slepc4py.SLEPc.BV.OrthogType.MGS slepc4py.SLEPc.BV.OrthogType-class.html#MGS slepc4py.SLEPc.BV.OrthogType.CGS slepc4py.SLEPc.BV.OrthogType-class.html#CGS slepc4py.SLEPc.BV.RefineType slepc4py.SLEPc.BV.RefineType-class.html slepc4py.SLEPc.BV.RefineType.ALWAYS slepc4py.SLEPc.BV.RefineType-class.html#ALWAYS slepc4py.SLEPc.BV.RefineType.NEVER slepc4py.SLEPc.BV.RefineType-class.html#NEVER slepc4py.SLEPc.BV.RefineType.__qualname__ slepc4py.SLEPc.BV.RefineType-class.html#__qualname__ slepc4py.SLEPc.BV.RefineType.IFNEEDED slepc4py.SLEPc.BV.RefineType-class.html#IFNEEDED slepc4py.SLEPc.BV.Type slepc4py.SLEPc.BV.Type-class.html slepc4py.SLEPc.BV.Type.MAT slepc4py.SLEPc.BV.Type-class.html#MAT slepc4py.SLEPc.BV.Type.CONTIGUOUS slepc4py.SLEPc.BV.Type-class.html#CONTIGUOUS slepc4py.SLEPc.BV.Type.__qualname__ slepc4py.SLEPc.BV.Type-class.html#__qualname__ slepc4py.SLEPc.BV.Type.VECS slepc4py.SLEPc.BV.Type-class.html#VECS slepc4py.SLEPc.BV.Type.SVEC slepc4py.SLEPc.BV.Type-class.html#SVEC slepc4py.SLEPc.DS slepc4py.SLEPc.DS-class.html slepc4py.SLEPc.DS.setDimensions slepc4py.SLEPc.DS-class.html#setDimensions slepc4py.SLEPc.DS.setCompact slepc4py.SLEPc.DS-class.html#setCompact slepc4py.SLEPc.DS.MatType slepc4py.SLEPc.DS.MatType-class.html slepc4py.SLEPc.DS.setMethod slepc4py.SLEPc.DS-class.html#setMethod slepc4py.SLEPc.DS.Type slepc4py.SLEPc.DS.Type-class.html slepc4py.SLEPc.DS.setType slepc4py.SLEPc.DS-class.html#setType slepc4py.SLEPc.DS.getCompact slepc4py.SLEPc.DS-class.html#getCompact slepc4py.SLEPc.DS.__new__ slepc4py.SLEPc.DS-class.html#__new__ slepc4py.SLEPc.DS.create slepc4py.SLEPc.DS-class.html#create slepc4py.SLEPc.DS.getMethod slepc4py.SLEPc.DS-class.html#getMethod slepc4py.SLEPc.DS.allocate slepc4py.SLEPc.DS-class.html#allocate slepc4py.SLEPc.DS.destroy slepc4py.SLEPc.DS-class.html#destroy slepc4py.SLEPc.DS.getType slepc4py.SLEPc.DS-class.html#getType slepc4py.SLEPc.DS.setState slepc4py.SLEPc.DS-class.html#setState slepc4py.SLEPc.DS.getLeadingDimension slepc4py.SLEPc.DS-class.html#getLeadingDimension slepc4py.SLEPc.DS.getState slepc4py.SLEPc.DS-class.html#getState slepc4py.SLEPc.DS.setOptionsPrefix slepc4py.SLEPc.DS-class.html#setOptionsPrefix slepc4py.SLEPc.DS.getRefined slepc4py.SLEPc.DS-class.html#getRefined slepc4py.SLEPc.DS.getDimensions slepc4py.SLEPc.DS-class.html#getDimensions slepc4py.SLEPc.DS.getOptionsPrefix slepc4py.SLEPc.DS-class.html#getOptionsPrefix slepc4py.SLEPc.DS.setFromOptions slepc4py.SLEPc.DS-class.html#setFromOptions slepc4py.SLEPc.DS.setExtraRow slepc4py.SLEPc.DS-class.html#setExtraRow slepc4py.SLEPc.DS.reset slepc4py.SLEPc.DS-class.html#reset slepc4py.SLEPc.DS.StateType slepc4py.SLEPc.DS.StateType-class.html slepc4py.SLEPc.DS.getExtraRow slepc4py.SLEPc.DS-class.html#getExtraRow slepc4py.SLEPc.DS.setRefined slepc4py.SLEPc.DS-class.html#setRefined slepc4py.SLEPc.DS.truncate slepc4py.SLEPc.DS-class.html#truncate slepc4py.SLEPc.DS.view slepc4py.SLEPc.DS-class.html#view slepc4py.SLEPc.DS.updateExtraRow slepc4py.SLEPc.DS-class.html#updateExtraRow slepc4py.SLEPc.DS.MatType slepc4py.SLEPc.DS.MatType-class.html slepc4py.SLEPc.DS.MatType.A slepc4py.SLEPc.DS.MatType-class.html#A slepc4py.SLEPc.DS.MatType.C slepc4py.SLEPc.DS.MatType-class.html#C slepc4py.SLEPc.DS.MatType.B slepc4py.SLEPc.DS.MatType-class.html#B slepc4py.SLEPc.DS.MatType.D slepc4py.SLEPc.DS.MatType-class.html#D slepc4py.SLEPc.DS.MatType.Q slepc4py.SLEPc.DS.MatType-class.html#Q slepc4py.SLEPc.DS.MatType.VT slepc4py.SLEPc.DS.MatType-class.html#VT slepc4py.SLEPc.DS.MatType.T slepc4py.SLEPc.DS.MatType-class.html#T slepc4py.SLEPc.DS.MatType.W slepc4py.SLEPc.DS.MatType-class.html#W slepc4py.SLEPc.DS.MatType.Y slepc4py.SLEPc.DS.MatType-class.html#Y slepc4py.SLEPc.DS.MatType.X slepc4py.SLEPc.DS.MatType-class.html#X slepc4py.SLEPc.DS.MatType.Z slepc4py.SLEPc.DS.MatType-class.html#Z slepc4py.SLEPc.DS.MatType.__qualname__ slepc4py.SLEPc.DS.MatType-class.html#__qualname__ slepc4py.SLEPc.DS.MatType.U slepc4py.SLEPc.DS.MatType-class.html#U slepc4py.SLEPc.DS.StateType slepc4py.SLEPc.DS.StateType-class.html slepc4py.SLEPc.DS.StateType.CONDENSED slepc4py.SLEPc.DS.StateType-class.html#CONDENSED slepc4py.SLEPc.DS.StateType.TRUNCATED slepc4py.SLEPc.DS.StateType-class.html#TRUNCATED slepc4py.SLEPc.DS.StateType.__qualname__ slepc4py.SLEPc.DS.StateType-class.html#__qualname__ slepc4py.SLEPc.DS.StateType.RAW slepc4py.SLEPc.DS.StateType-class.html#RAW slepc4py.SLEPc.DS.StateType.INTERMEDIATE slepc4py.SLEPc.DS.StateType-class.html#INTERMEDIATE slepc4py.SLEPc.DS.Type slepc4py.SLEPc.DS.Type-class.html slepc4py.SLEPc.DS.Type.NEP slepc4py.SLEPc.DS.Type-class.html#NEP slepc4py.SLEPc.DS.Type.GNHEP slepc4py.SLEPc.DS.Type-class.html#GNHEP slepc4py.SLEPc.DS.Type.HEP slepc4py.SLEPc.DS.Type-class.html#HEP slepc4py.SLEPc.DS.Type.GHIEP slepc4py.SLEPc.DS.Type-class.html#GHIEP slepc4py.SLEPc.DS.Type.PEP slepc4py.SLEPc.DS.Type-class.html#PEP slepc4py.SLEPc.DS.Type.SVD slepc4py.SLEPc.DS.Type-class.html#SVD slepc4py.SLEPc.DS.Type.GHEP slepc4py.SLEPc.DS.Type-class.html#GHEP slepc4py.SLEPc.DS.Type.__qualname__ slepc4py.SLEPc.DS.Type-class.html#__qualname__ slepc4py.SLEPc.DS.Type.NHEP slepc4py.SLEPc.DS.Type-class.html#NHEP slepc4py.SLEPc.EPS slepc4py.SLEPc.EPS-class.html slepc4py.SLEPc.EPS.setWhichEigenpairs slepc4py.SLEPc.EPS-class.html#setWhichEigenpairs slepc4py.SLEPc.EPS.cancelMonitor slepc4py.SLEPc.EPS-class.html#cancelMonitor slepc4py.SLEPc.EPS.max_it slepc4py.SLEPc.EPS-class.html#max_it slepc4py.SLEPc.EPS.getTrueResidual slepc4py.SLEPc.EPS-class.html#getTrueResidual slepc4py.SLEPc.EPS.getRG slepc4py.SLEPc.EPS-class.html#getRG slepc4py.SLEPc.EPS.setDS slepc4py.SLEPc.EPS-class.html#setDS slepc4py.SLEPc.EPS.computeError slepc4py.SLEPc.EPS-class.html#computeError slepc4py.SLEPc.EPS.errorView slepc4py.SLEPc.EPS-class.html#errorView slepc4py.SLEPc.EPS.setPowerShiftType slepc4py.SLEPc.EPS-class.html#setPowerShiftType slepc4py.SLEPc.EPS.appendOptionsPrefix slepc4py.SLEPc.EPS-class.html#appendOptionsPrefix slepc4py.SLEPc.EPS.setOperators slepc4py.SLEPc.EPS-class.html#setOperators slepc4py.SLEPc.EPS.getConvergedReason slepc4py.SLEPc.EPS-class.html#getConvergedReason slepc4py.SLEPc.EPS.setInitialSpace slepc4py.SLEPc.EPS-class.html#setInitialSpace slepc4py.SLEPc.EPS.getInterval slepc4py.SLEPc.EPS-class.html#getInterval slepc4py.SLEPc.EPS.setOptionsPrefix slepc4py.SLEPc.EPS-class.html#setOptionsPrefix slepc4py.SLEPc.EPS.getKrylovSchurLocking slepc4py.SLEPc.EPS-class.html#getKrylovSchurLocking slepc4py.SLEPc.EPS.getArnoldiDelayed slepc4py.SLEPc.EPS-class.html#getArnoldiDelayed slepc4py.SLEPc.EPS.getLanczosReorthogType slepc4py.SLEPc.EPS-class.html#getLanczosReorthogType slepc4py.SLEPc.EPS.getDimensions slepc4py.SLEPc.EPS-class.html#getDimensions slepc4py.SLEPc.EPS.setFromOptions slepc4py.SLEPc.EPS-class.html#setFromOptions slepc4py.SLEPc.EPS.isGeneralized slepc4py.SLEPc.EPS-class.html#isGeneralized slepc4py.SLEPc.EPS.isHermitian slepc4py.SLEPc.EPS-class.html#isHermitian slepc4py.SLEPc.EPS.getKrylovSchurSubcommInfo slepc4py.SLEPc.EPS-class.html#getKrylovSchurSubcommInfo slepc4py.SLEPc.EPS.getBV slepc4py.SLEPc.EPS-class.html#getBV slepc4py.SLEPc.EPS.view slepc4py.SLEPc.EPS-class.html#view slepc4py.SLEPc.EPS.setKrylovSchurDetectZeros slepc4py.SLEPc.EPS-class.html#setKrylovSchurDetectZeros slepc4py.SLEPc.EPS.updateKrylovSchurSubcommMats slepc4py.SLEPc.EPS-class.html#updateKrylovSchurSubcommMats slepc4py.SLEPc.EPS.Extraction slepc4py.SLEPc.EPS.Extraction-class.html slepc4py.SLEPc.EPS.ConvergedReason slepc4py.SLEPc.EPS.ConvergedReason-class.html slepc4py.SLEPc.EPS.setKrylovSchurPartitions slepc4py.SLEPc.EPS-class.html#setKrylovSchurPartitions slepc4py.SLEPc.EPS.setExtraction slepc4py.SLEPc.EPS-class.html#setExtraction slepc4py.SLEPc.EPS.Type slepc4py.SLEPc.EPS.Type-class.html slepc4py.SLEPc.EPS.setLanczosReorthogType slepc4py.SLEPc.EPS-class.html#setLanczosReorthogType slepc4py.SLEPc.EPS.getBalance slepc4py.SLEPc.EPS-class.html#getBalance slepc4py.SLEPc.EPS.setUp slepc4py.SLEPc.EPS-class.html#setUp slepc4py.SLEPc.EPS.getST slepc4py.SLEPc.EPS-class.html#getST slepc4py.SLEPc.EPS.getDS slepc4py.SLEPc.EPS-class.html#getDS slepc4py.SLEPc.EPS.getTolerances slepc4py.SLEPc.EPS-class.html#getTolerances slepc4py.SLEPc.EPS.getOptionsPrefix slepc4py.SLEPc.EPS-class.html#getOptionsPrefix slepc4py.SLEPc.EPS.setArnoldiDelayed slepc4py.SLEPc.EPS-class.html#setArnoldiDelayed slepc4py.SLEPc.EPS.Conv slepc4py.SLEPc.EPS.Conv-class.html slepc4py.SLEPc.EPS.bv slepc4py.SLEPc.EPS-class.html#bv slepc4py.SLEPc.EPS.setTolerances slepc4py.SLEPc.EPS-class.html#setTolerances slepc4py.SLEPc.EPS.getEigenpair slepc4py.SLEPc.EPS-class.html#getEigenpair slepc4py.SLEPc.EPS.getKrylovSchurDimensions slepc4py.SLEPc.EPS-class.html#getKrylovSchurDimensions slepc4py.SLEPc.EPS.getConverged slepc4py.SLEPc.EPS-class.html#getConverged slepc4py.SLEPc.EPS.setKrylovSchurLocking slepc4py.SLEPc.EPS-class.html#setKrylovSchurLocking slepc4py.SLEPc.EPS.getTarget slepc4py.SLEPc.EPS-class.html#getTarget slepc4py.SLEPc.EPS.getPowerShiftType slepc4py.SLEPc.EPS-class.html#getPowerShiftType slepc4py.SLEPc.EPS.problem_type slepc4py.SLEPc.EPS-class.html#problem_type slepc4py.SLEPc.EPS.setType slepc4py.SLEPc.EPS-class.html#setType slepc4py.SLEPc.EPS.getOperators slepc4py.SLEPc.EPS-class.html#getOperators slepc4py.SLEPc.EPS.create slepc4py.SLEPc.EPS-class.html#create slepc4py.SLEPc.EPS.LanczosReorthogType slepc4py.SLEPc.EPS.LanczosReorthogType-class.html slepc4py.SLEPc.EPS.extraction slepc4py.SLEPc.EPS-class.html#extraction slepc4py.SLEPc.EPS.tol slepc4py.SLEPc.EPS-class.html#tol slepc4py.SLEPc.EPS.getRQCGReset slepc4py.SLEPc.EPS-class.html#getRQCGReset slepc4py.SLEPc.EPS.getProblemType slepc4py.SLEPc.EPS-class.html#getProblemType slepc4py.SLEPc.EPS.getEigenvalue slepc4py.SLEPc.EPS-class.html#getEigenvalue slepc4py.SLEPc.EPS.setInterval slepc4py.SLEPc.EPS-class.html#setInterval slepc4py.SLEPc.EPS.setTarget slepc4py.SLEPc.EPS-class.html#setTarget slepc4py.SLEPc.EPS.getType slepc4py.SLEPc.EPS-class.html#getType slepc4py.SLEPc.EPS.getTrackAll slepc4py.SLEPc.EPS-class.html#getTrackAll slepc4py.SLEPc.EPS.Balance slepc4py.SLEPc.EPS.Balance-class.html slepc4py.SLEPc.EPS.reset slepc4py.SLEPc.EPS-class.html#reset slepc4py.SLEPc.EPS.getKrylovSchurSubcommPairs slepc4py.SLEPc.EPS-class.html#getKrylovSchurSubcommPairs slepc4py.SLEPc.EPS.target slepc4py.SLEPc.EPS-class.html#target slepc4py.SLEPc.EPS.ErrorType slepc4py.SLEPc.EPS.ErrorType-class.html slepc4py.SLEPc.EPS.Which slepc4py.SLEPc.EPS.Which-class.html slepc4py.SLEPc.EPS.getKrylovSchurPartitions slepc4py.SLEPc.EPS-class.html#getKrylovSchurPartitions slepc4py.SLEPc.EPS.setConvergenceTest slepc4py.SLEPc.EPS-class.html#setConvergenceTest slepc4py.SLEPc.EPS.getIterationNumber slepc4py.SLEPc.EPS-class.html#getIterationNumber slepc4py.SLEPc.EPS.getKrylovSchurRestart slepc4py.SLEPc.EPS-class.html#getKrylovSchurRestart slepc4py.SLEPc.EPS.setDimensions slepc4py.SLEPc.EPS-class.html#setDimensions slepc4py.SLEPc.EPS.getWhichEigenpairs slepc4py.SLEPc.EPS-class.html#getWhichEigenpairs slepc4py.SLEPc.EPS.setRQCGReset slepc4py.SLEPc.EPS-class.html#setRQCGReset slepc4py.SLEPc.EPS.setKrylovSchurRestart slepc4py.SLEPc.EPS-class.html#setKrylovSchurRestart slepc4py.SLEPc.EPS.getKrylovSchurDetectZeros slepc4py.SLEPc.EPS-class.html#getKrylovSchurDetectZeros slepc4py.SLEPc.EPS.getConvergenceTest slepc4py.SLEPc.EPS-class.html#getConvergenceTest slepc4py.SLEPc.EPS.setTrueResidual slepc4py.SLEPc.EPS-class.html#setTrueResidual slepc4py.SLEPc.EPS.isPositive slepc4py.SLEPc.EPS-class.html#isPositive slepc4py.SLEPc.EPS.setBV slepc4py.SLEPc.EPS-class.html#setBV slepc4py.SLEPc.EPS.setTrackAll slepc4py.SLEPc.EPS-class.html#setTrackAll slepc4py.SLEPc.EPS.getInvariantSubspace slepc4py.SLEPc.EPS-class.html#getInvariantSubspace slepc4py.SLEPc.EPS.__new__ slepc4py.SLEPc.EPS-class.html#__new__ slepc4py.SLEPc.EPS.setKrylovSchurSubintervals slepc4py.SLEPc.EPS-class.html#setKrylovSchurSubintervals slepc4py.SLEPc.EPS.setKrylovSchurDimensions slepc4py.SLEPc.EPS-class.html#setKrylovSchurDimensions slepc4py.SLEPc.EPS.getExtraction slepc4py.SLEPc.EPS-class.html#getExtraction slepc4py.SLEPc.EPS.getErrorEstimate slepc4py.SLEPc.EPS-class.html#getErrorEstimate slepc4py.SLEPc.EPS.setRG slepc4py.SLEPc.EPS-class.html#setRG slepc4py.SLEPc.EPS.which slepc4py.SLEPc.EPS-class.html#which slepc4py.SLEPc.EPS.PowerShiftType slepc4py.SLEPc.EPS.PowerShiftType-class.html slepc4py.SLEPc.EPS.destroy slepc4py.SLEPc.EPS-class.html#destroy slepc4py.SLEPc.EPS.setProblemType slepc4py.SLEPc.EPS-class.html#setProblemType slepc4py.SLEPc.EPS.setDeflationSpace slepc4py.SLEPc.EPS-class.html#setDeflationSpace slepc4py.SLEPc.EPS.ProblemType slepc4py.SLEPc.EPS.ProblemType-class.html slepc4py.SLEPc.EPS.setBalance slepc4py.SLEPc.EPS-class.html#setBalance slepc4py.SLEPc.EPS.setST slepc4py.SLEPc.EPS-class.html#setST slepc4py.SLEPc.EPS.st slepc4py.SLEPc.EPS-class.html#st slepc4py.SLEPc.EPS.solve slepc4py.SLEPc.EPS-class.html#solve slepc4py.SLEPc.EPS.getKrylovSchurSubcommMats slepc4py.SLEPc.EPS-class.html#getKrylovSchurSubcommMats slepc4py.SLEPc.EPS.getEigenvector slepc4py.SLEPc.EPS-class.html#getEigenvector slepc4py.SLEPc.EPS.Balance slepc4py.SLEPc.EPS.Balance-class.html slepc4py.SLEPc.EPS.Balance.ONESIDE slepc4py.SLEPc.EPS.Balance-class.html#ONESIDE slepc4py.SLEPc.EPS.Balance.TWOSIDE slepc4py.SLEPc.EPS.Balance-class.html#TWOSIDE slepc4py.SLEPc.EPS.Balance.NONE slepc4py.SLEPc.EPS.Balance-class.html#NONE slepc4py.SLEPc.EPS.Balance.__qualname__ slepc4py.SLEPc.EPS.Balance-class.html#__qualname__ slepc4py.SLEPc.EPS.Balance.USER slepc4py.SLEPc.EPS.Balance-class.html#USER slepc4py.SLEPc.EPS.Conv slepc4py.SLEPc.EPS.Conv-class.html slepc4py.SLEPc.EPS.Conv.__qualname__ slepc4py.SLEPc.EPS.Conv-class.html#__qualname__ slepc4py.SLEPc.EPS.Conv.ABS slepc4py.SLEPc.EPS.Conv-class.html#ABS slepc4py.SLEPc.EPS.Conv.USER slepc4py.SLEPc.EPS.Conv-class.html#USER slepc4py.SLEPc.EPS.Conv.REL slepc4py.SLEPc.EPS.Conv-class.html#REL slepc4py.SLEPc.EPS.Conv.NORM slepc4py.SLEPc.EPS.Conv-class.html#NORM slepc4py.SLEPc.EPS.ConvergedReason slepc4py.SLEPc.EPS.ConvergedReason-class.html slepc4py.SLEPc.EPS.ConvergedReason.DIVERGED_BREAKDOWN slepc4py.SLEPc.EPS.ConvergedReason-class.html#DIVERGED_BREAKDOWN slepc4py.SLEPc.EPS.ConvergedReason.CONVERGED_USER slepc4py.SLEPc.EPS.ConvergedReason-class.html#CONVERGED_USER slepc4py.SLEPc.EPS.ConvergedReason.DIVERGED_SYMMETRY_LOST slepc4py.SLEPc.EPS.ConvergedReason-class.html#DIVERGED_SYMMETRY_LOST slepc4py.SLEPc.EPS.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.EPS.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.EPS.ConvergedReason.ITERATING slepc4py.SLEPc.EPS.ConvergedReason-class.html#ITERATING slepc4py.SLEPc.EPS.ConvergedReason.CONVERGED_ITERATING slepc4py.SLEPc.EPS.ConvergedReason-class.html#CONVERGED_ITERATING slepc4py.SLEPc.EPS.ConvergedReason.DIVERGED_ITS slepc4py.SLEPc.EPS.ConvergedReason-class.html#DIVERGED_ITS slepc4py.SLEPc.EPS.ConvergedReason.__qualname__ slepc4py.SLEPc.EPS.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.EPS.ErrorType slepc4py.SLEPc.EPS.ErrorType-class.html slepc4py.SLEPc.EPS.ErrorType.__qualname__ slepc4py.SLEPc.EPS.ErrorType-class.html#__qualname__ slepc4py.SLEPc.EPS.ErrorType.RELATIVE slepc4py.SLEPc.EPS.ErrorType-class.html#RELATIVE slepc4py.SLEPc.EPS.ErrorType.BACKWARD slepc4py.SLEPc.EPS.ErrorType-class.html#BACKWARD slepc4py.SLEPc.EPS.ErrorType.ABSOLUTE slepc4py.SLEPc.EPS.ErrorType-class.html#ABSOLUTE slepc4py.SLEPc.EPS.Extraction slepc4py.SLEPc.EPS.Extraction-class.html slepc4py.SLEPc.EPS.Extraction.HARMONIC slepc4py.SLEPc.EPS.Extraction-class.html#HARMONIC slepc4py.SLEPc.EPS.Extraction.HARMONIC_RIGHT slepc4py.SLEPc.EPS.Extraction-class.html#HARMONIC_RIGHT slepc4py.SLEPc.EPS.Extraction.HARMONIC_RELATIVE slepc4py.SLEPc.EPS.Extraction-class.html#HARMONIC_RELATIVE slepc4py.SLEPc.EPS.Extraction.HARMONIC_LARGEST slepc4py.SLEPc.EPS.Extraction-class.html#HARMONIC_LARGEST slepc4py.SLEPc.EPS.Extraction.REFINED_HARMONIC slepc4py.SLEPc.EPS.Extraction-class.html#REFINED_HARMONIC slepc4py.SLEPc.EPS.Extraction.RITZ slepc4py.SLEPc.EPS.Extraction-class.html#RITZ slepc4py.SLEPc.EPS.Extraction.__qualname__ slepc4py.SLEPc.EPS.Extraction-class.html#__qualname__ slepc4py.SLEPc.EPS.Extraction.REFINED slepc4py.SLEPc.EPS.Extraction-class.html#REFINED slepc4py.SLEPc.EPS.LanczosReorthogType slepc4py.SLEPc.EPS.LanczosReorthogType-class.html slepc4py.SLEPc.EPS.LanczosReorthogType.FULL slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#FULL slepc4py.SLEPc.EPS.LanczosReorthogType.PARTIAL slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#PARTIAL slepc4py.SLEPc.EPS.LanczosReorthogType.DELAYED slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#DELAYED slepc4py.SLEPc.EPS.LanczosReorthogType.__qualname__ slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#__qualname__ slepc4py.SLEPc.EPS.LanczosReorthogType.SELECTIVE slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#SELECTIVE slepc4py.SLEPc.EPS.LanczosReorthogType.LOCAL slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#LOCAL slepc4py.SLEPc.EPS.LanczosReorthogType.PERIODIC slepc4py.SLEPc.EPS.LanczosReorthogType-class.html#PERIODIC slepc4py.SLEPc.EPS.PowerShiftType slepc4py.SLEPc.EPS.PowerShiftType-class.html slepc4py.SLEPc.EPS.PowerShiftType.CONSTANT slepc4py.SLEPc.EPS.PowerShiftType-class.html#CONSTANT slepc4py.SLEPc.EPS.PowerShiftType.RAYLEIGH slepc4py.SLEPc.EPS.PowerShiftType-class.html#RAYLEIGH slepc4py.SLEPc.EPS.PowerShiftType.__qualname__ slepc4py.SLEPc.EPS.PowerShiftType-class.html#__qualname__ slepc4py.SLEPc.EPS.PowerShiftType.WILKINSON slepc4py.SLEPc.EPS.PowerShiftType-class.html#WILKINSON slepc4py.SLEPc.EPS.ProblemType slepc4py.SLEPc.EPS.ProblemType-class.html slepc4py.SLEPc.EPS.ProblemType.GHEP slepc4py.SLEPc.EPS.ProblemType-class.html#GHEP slepc4py.SLEPc.EPS.ProblemType.HEP slepc4py.SLEPc.EPS.ProblemType-class.html#HEP slepc4py.SLEPc.EPS.ProblemType.GHIEP slepc4py.SLEPc.EPS.ProblemType-class.html#GHIEP slepc4py.SLEPc.EPS.ProblemType.PGNHEP slepc4py.SLEPc.EPS.ProblemType-class.html#PGNHEP slepc4py.SLEPc.EPS.ProblemType.__qualname__ slepc4py.SLEPc.EPS.ProblemType-class.html#__qualname__ slepc4py.SLEPc.EPS.ProblemType.NHEP slepc4py.SLEPc.EPS.ProblemType-class.html#NHEP slepc4py.SLEPc.EPS.ProblemType.GNHEP slepc4py.SLEPc.EPS.ProblemType-class.html#GNHEP slepc4py.SLEPc.EPS.Type slepc4py.SLEPc.EPS.Type-class.html slepc4py.SLEPc.EPS.Type.SUBSPACE slepc4py.SLEPc.EPS.Type-class.html#SUBSPACE slepc4py.SLEPc.EPS.Type.JD slepc4py.SLEPc.EPS.Type-class.html#JD slepc4py.SLEPc.EPS.Type.LOBPCG slepc4py.SLEPc.EPS.Type-class.html#LOBPCG slepc4py.SLEPc.EPS.Type.RQCG slepc4py.SLEPc.EPS.Type-class.html#RQCG slepc4py.SLEPc.EPS.Type.POWER slepc4py.SLEPc.EPS.Type-class.html#POWER slepc4py.SLEPc.EPS.Type.LAPACK slepc4py.SLEPc.EPS.Type-class.html#LAPACK slepc4py.SLEPc.EPS.Type.CISS slepc4py.SLEPc.EPS.Type-class.html#CISS slepc4py.SLEPc.EPS.Type.TRLAN slepc4py.SLEPc.EPS.Type-class.html#TRLAN slepc4py.SLEPc.EPS.Type.ARNOLDI slepc4py.SLEPc.EPS.Type-class.html#ARNOLDI slepc4py.SLEPc.EPS.Type.LANCZOS slepc4py.SLEPc.EPS.Type-class.html#LANCZOS slepc4py.SLEPc.EPS.Type.ARPACK slepc4py.SLEPc.EPS.Type-class.html#ARPACK slepc4py.SLEPc.EPS.Type.KRYLOVSCHUR slepc4py.SLEPc.EPS.Type-class.html#KRYLOVSCHUR slepc4py.SLEPc.EPS.Type.FEAST slepc4py.SLEPc.EPS.Type-class.html#FEAST slepc4py.SLEPc.EPS.Type.GD slepc4py.SLEPc.EPS.Type-class.html#GD slepc4py.SLEPc.EPS.Type.BLOPEX slepc4py.SLEPc.EPS.Type-class.html#BLOPEX slepc4py.SLEPc.EPS.Type.PRIMME slepc4py.SLEPc.EPS.Type-class.html#PRIMME slepc4py.SLEPc.EPS.Type.__qualname__ slepc4py.SLEPc.EPS.Type-class.html#__qualname__ slepc4py.SLEPc.EPS.Type.BLZPACK slepc4py.SLEPc.EPS.Type-class.html#BLZPACK slepc4py.SLEPc.EPS.Which slepc4py.SLEPc.EPS.Which-class.html slepc4py.SLEPc.EPS.Which.TARGET_MAGNITUDE slepc4py.SLEPc.EPS.Which-class.html#TARGET_MAGNITUDE slepc4py.SLEPc.EPS.Which.LARGEST_IMAGINARY slepc4py.SLEPc.EPS.Which-class.html#LARGEST_IMAGINARY slepc4py.SLEPc.EPS.Which.USER slepc4py.SLEPc.EPS.Which-class.html#USER slepc4py.SLEPc.EPS.Which.SMALLEST_REAL slepc4py.SLEPc.EPS.Which-class.html#SMALLEST_REAL slepc4py.SLEPc.EPS.Which.SMALLEST_MAGNITUDE slepc4py.SLEPc.EPS.Which-class.html#SMALLEST_MAGNITUDE slepc4py.SLEPc.EPS.Which.SMALLEST_IMAGINARY slepc4py.SLEPc.EPS.Which-class.html#SMALLEST_IMAGINARY slepc4py.SLEPc.EPS.Which.LARGEST_REAL slepc4py.SLEPc.EPS.Which-class.html#LARGEST_REAL slepc4py.SLEPc.EPS.Which.ALL slepc4py.SLEPc.EPS.Which-class.html#ALL slepc4py.SLEPc.EPS.Which.LARGEST_MAGNITUDE slepc4py.SLEPc.EPS.Which-class.html#LARGEST_MAGNITUDE slepc4py.SLEPc.EPS.Which.__qualname__ slepc4py.SLEPc.EPS.Which-class.html#__qualname__ slepc4py.SLEPc.EPS.Which.TARGET_IMAGINARY slepc4py.SLEPc.EPS.Which-class.html#TARGET_IMAGINARY slepc4py.SLEPc.EPS.Which.TARGET_REAL slepc4py.SLEPc.EPS.Which-class.html#TARGET_REAL slepc4py.SLEPc.FN slepc4py.SLEPc.FN-class.html slepc4py.SLEPc.FN.evaluateFunction slepc4py.SLEPc.FN-class.html#evaluateFunction slepc4py.SLEPc.FN.setScale slepc4py.SLEPc.FN-class.html#setScale slepc4py.SLEPc.FN.evaluateDerivative slepc4py.SLEPc.FN-class.html#evaluateDerivative slepc4py.SLEPc.FN.setType slepc4py.SLEPc.FN-class.html#setType slepc4py.SLEPc.FN.__new__ slepc4py.SLEPc.FN-class.html#__new__ slepc4py.SLEPc.FN.Type slepc4py.SLEPc.FN.Type-class.html slepc4py.SLEPc.FN.create slepc4py.SLEPc.FN-class.html#create slepc4py.SLEPc.FN.CombineType slepc4py.SLEPc.FN.CombineType-class.html slepc4py.SLEPc.FN.destroy slepc4py.SLEPc.FN-class.html#destroy slepc4py.SLEPc.FN.setRationalNumerator slepc4py.SLEPc.FN-class.html#setRationalNumerator slepc4py.SLEPc.FN.setOptionsPrefix slepc4py.SLEPc.FN-class.html#setOptionsPrefix slepc4py.SLEPc.FN.getType slepc4py.SLEPc.FN-class.html#getType slepc4py.SLEPc.FN.getOptionsPrefix slepc4py.SLEPc.FN-class.html#getOptionsPrefix slepc4py.SLEPc.FN.setFromOptions slepc4py.SLEPc.FN-class.html#setFromOptions slepc4py.SLEPc.FN.getScale slepc4py.SLEPc.FN-class.html#getScale slepc4py.SLEPc.FN.setRationalDenominator slepc4py.SLEPc.FN-class.html#setRationalDenominator slepc4py.SLEPc.FN.view slepc4py.SLEPc.FN-class.html#view slepc4py.SLEPc.FN.CombineType slepc4py.SLEPc.FN.CombineType-class.html slepc4py.SLEPc.FN.CombineType.COMPOSE slepc4py.SLEPc.FN.CombineType-class.html#COMPOSE slepc4py.SLEPc.FN.CombineType.DIVIDE slepc4py.SLEPc.FN.CombineType-class.html#DIVIDE slepc4py.SLEPc.FN.CombineType.__qualname__ slepc4py.SLEPc.FN.CombineType-class.html#__qualname__ slepc4py.SLEPc.FN.CombineType.ADD slepc4py.SLEPc.FN.CombineType-class.html#ADD slepc4py.SLEPc.FN.CombineType.MULTIPLY slepc4py.SLEPc.FN.CombineType-class.html#MULTIPLY slepc4py.SLEPc.FN.Type slepc4py.SLEPc.FN.Type-class.html slepc4py.SLEPc.FN.Type.LOG slepc4py.SLEPc.FN.Type-class.html#LOG slepc4py.SLEPc.FN.Type.COMBINE slepc4py.SLEPc.FN.Type-class.html#COMBINE slepc4py.SLEPc.FN.Type.EXP slepc4py.SLEPc.FN.Type-class.html#EXP slepc4py.SLEPc.FN.Type.INVSQRT slepc4py.SLEPc.FN.Type-class.html#INVSQRT slepc4py.SLEPc.FN.Type.RATIONAL slepc4py.SLEPc.FN.Type-class.html#RATIONAL slepc4py.SLEPc.FN.Type.PHI slepc4py.SLEPc.FN.Type-class.html#PHI slepc4py.SLEPc.FN.Type.SQRT slepc4py.SLEPc.FN.Type-class.html#SQRT slepc4py.SLEPc.FN.Type.__qualname__ slepc4py.SLEPc.FN.Type-class.html#__qualname__ slepc4py.SLEPc.MFN slepc4py.SLEPc.MFN-class.html slepc4py.SLEPc.MFN.setTolerances slepc4py.SLEPc.MFN-class.html#setTolerances slepc4py.SLEPc.MFN.setDimensions slepc4py.SLEPc.MFN-class.html#setDimensions slepc4py.SLEPc.MFN.getOperator slepc4py.SLEPc.MFN-class.html#getOperator slepc4py.SLEPc.MFN.cancelMonitor slepc4py.SLEPc.MFN-class.html#cancelMonitor slepc4py.SLEPc.MFN.ConvergedReason slepc4py.SLEPc.MFN.ConvergedReason-class.html slepc4py.SLEPc.MFN.setBV slepc4py.SLEPc.MFN-class.html#setBV slepc4py.SLEPc.MFN.setFN slepc4py.SLEPc.MFN-class.html#setFN slepc4py.SLEPc.MFN.Type slepc4py.SLEPc.MFN.Type-class.html slepc4py.SLEPc.MFN.setType slepc4py.SLEPc.MFN-class.html#setType slepc4py.SLEPc.MFN.__new__ slepc4py.SLEPc.MFN-class.html#__new__ slepc4py.SLEPc.MFN.create slepc4py.SLEPc.MFN-class.html#create slepc4py.SLEPc.MFN.appendOptionsPrefix slepc4py.SLEPc.MFN-class.html#appendOptionsPrefix slepc4py.SLEPc.MFN.destroy slepc4py.SLEPc.MFN-class.html#destroy slepc4py.SLEPc.MFN.getConvergedReason slepc4py.SLEPc.MFN-class.html#getConvergedReason slepc4py.SLEPc.MFN.setOptionsPrefix slepc4py.SLEPc.MFN-class.html#setOptionsPrefix slepc4py.SLEPc.MFN.setUp slepc4py.SLEPc.MFN-class.html#setUp slepc4py.SLEPc.MFN.getType slepc4py.SLEPc.MFN-class.html#getType slepc4py.SLEPc.MFN.getTolerances slepc4py.SLEPc.MFN-class.html#getTolerances slepc4py.SLEPc.MFN.getDimensions slepc4py.SLEPc.MFN-class.html#getDimensions slepc4py.SLEPc.MFN.getOptionsPrefix slepc4py.SLEPc.MFN-class.html#getOptionsPrefix slepc4py.SLEPc.MFN.setFromOptions slepc4py.SLEPc.MFN-class.html#setFromOptions slepc4py.SLEPc.MFN.getFN slepc4py.SLEPc.MFN-class.html#getFN slepc4py.SLEPc.MFN.reset slepc4py.SLEPc.MFN-class.html#reset slepc4py.SLEPc.MFN.solve slepc4py.SLEPc.MFN-class.html#solve slepc4py.SLEPc.MFN.getBV slepc4py.SLEPc.MFN-class.html#getBV slepc4py.SLEPc.MFN.setOperator slepc4py.SLEPc.MFN-class.html#setOperator slepc4py.SLEPc.MFN.getIterationNumber slepc4py.SLEPc.MFN-class.html#getIterationNumber slepc4py.SLEPc.MFN.view slepc4py.SLEPc.MFN-class.html#view slepc4py.SLEPc.MFN.ConvergedReason slepc4py.SLEPc.MFN.ConvergedReason-class.html slepc4py.SLEPc.MFN.ConvergedReason.DIVERGED_BREAKDOWN slepc4py.SLEPc.MFN.ConvergedReason-class.html#DIVERGED_BREAKDOWN slepc4py.SLEPc.MFN.ConvergedReason.ITERATING slepc4py.SLEPc.MFN.ConvergedReason-class.html#ITERATING slepc4py.SLEPc.MFN.ConvergedReason.CONVERGED_ITS slepc4py.SLEPc.MFN.ConvergedReason-class.html#CONVERGED_ITS slepc4py.SLEPc.MFN.ConvergedReason.__qualname__ slepc4py.SLEPc.MFN.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.MFN.ConvergedReason.CONVERGED_ITERATING slepc4py.SLEPc.MFN.ConvergedReason-class.html#CONVERGED_ITERATING slepc4py.SLEPc.MFN.ConvergedReason.DIVERGED_ITS slepc4py.SLEPc.MFN.ConvergedReason-class.html#DIVERGED_ITS slepc4py.SLEPc.MFN.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.MFN.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.MFN.Type slepc4py.SLEPc.MFN.Type-class.html slepc4py.SLEPc.MFN.Type.__qualname__ slepc4py.SLEPc.MFN.Type-class.html#__qualname__ slepc4py.SLEPc.MFN.Type.KRYLOV slepc4py.SLEPc.MFN.Type-class.html#KRYLOV slepc4py.SLEPc.MFN.Type.EXPOKIT slepc4py.SLEPc.MFN.Type-class.html#EXPOKIT slepc4py.SLEPc.NEP slepc4py.SLEPc.NEP-class.html slepc4py.SLEPc.NEP.setWhichEigenpairs slepc4py.SLEPc.NEP-class.html#setWhichEigenpairs slepc4py.SLEPc.NEP.cancelMonitor slepc4py.SLEPc.NEP-class.html#cancelMonitor slepc4py.SLEPc.NEP.getRG slepc4py.SLEPc.NEP-class.html#getRG slepc4py.SLEPc.NEP.computeError slepc4py.SLEPc.NEP-class.html#computeError slepc4py.SLEPc.NEP.errorView slepc4py.SLEPc.NEP-class.html#errorView slepc4py.SLEPc.NEP.RefineScheme slepc4py.SLEPc.NEP.RefineScheme-class.html slepc4py.SLEPc.NEP.appendOptionsPrefix slepc4py.SLEPc.NEP-class.html#appendOptionsPrefix slepc4py.SLEPc.NEP.getConvergedReason slepc4py.SLEPc.NEP-class.html#getConvergedReason slepc4py.SLEPc.NEP.setInitialSpace slepc4py.SLEPc.NEP-class.html#setInitialSpace slepc4py.SLEPc.NEP.setOptionsPrefix slepc4py.SLEPc.NEP-class.html#setOptionsPrefix slepc4py.SLEPc.NEP.getDimensions slepc4py.SLEPc.NEP-class.html#getDimensions slepc4py.SLEPc.NEP.setFromOptions slepc4py.SLEPc.NEP-class.html#setFromOptions slepc4py.SLEPc.NEP.getBV slepc4py.SLEPc.NEP-class.html#getBV slepc4py.SLEPc.NEP.view slepc4py.SLEPc.NEP-class.html#view slepc4py.SLEPc.NEP.ConvergedReason slepc4py.SLEPc.NEP.ConvergedReason-class.html slepc4py.SLEPc.NEP.setJacobian slepc4py.SLEPc.NEP-class.html#setJacobian slepc4py.SLEPc.NEP.Which slepc4py.SLEPc.NEP.Which-class.html slepc4py.SLEPc.NEP.Type slepc4py.SLEPc.NEP.Type-class.html slepc4py.SLEPc.NEP.setUp slepc4py.SLEPc.NEP-class.html#setUp slepc4py.SLEPc.NEP.getOptionsPrefix slepc4py.SLEPc.NEP-class.html#getOptionsPrefix slepc4py.SLEPc.NEP.Refine slepc4py.SLEPc.NEP.Refine-class.html slepc4py.SLEPc.NEP.setTolerances slepc4py.SLEPc.NEP-class.html#setTolerances slepc4py.SLEPc.NEP.getEigenpair slepc4py.SLEPc.NEP-class.html#getEigenpair slepc4py.SLEPc.NEP.getConverged slepc4py.SLEPc.NEP-class.html#getConverged slepc4py.SLEPc.NEP.setType slepc4py.SLEPc.NEP-class.html#setType slepc4py.SLEPc.NEP.setFunction slepc4py.SLEPc.NEP-class.html#setFunction slepc4py.SLEPc.NEP.create slepc4py.SLEPc.NEP-class.html#create slepc4py.SLEPc.NEP.getType slepc4py.SLEPc.NEP-class.html#getType slepc4py.SLEPc.NEP.getTrackAll slepc4py.SLEPc.NEP-class.html#getTrackAll slepc4py.SLEPc.NEP.reset slepc4py.SLEPc.NEP-class.html#reset slepc4py.SLEPc.NEP.ErrorType slepc4py.SLEPc.NEP.ErrorType-class.html slepc4py.SLEPc.NEP.getIterationNumber slepc4py.SLEPc.NEP-class.html#getIterationNumber slepc4py.SLEPc.NEP.setDimensions slepc4py.SLEPc.NEP-class.html#setDimensions slepc4py.SLEPc.NEP.getWhichEigenpairs slepc4py.SLEPc.NEP-class.html#getWhichEigenpairs slepc4py.SLEPc.NEP.setBV slepc4py.SLEPc.NEP-class.html#setBV slepc4py.SLEPc.NEP.setTrackAll slepc4py.SLEPc.NEP-class.html#setTrackAll slepc4py.SLEPc.NEP.__new__ slepc4py.SLEPc.NEP-class.html#__new__ slepc4py.SLEPc.NEP.getErrorEstimate slepc4py.SLEPc.NEP-class.html#getErrorEstimate slepc4py.SLEPc.NEP.setRG slepc4py.SLEPc.NEP-class.html#setRG slepc4py.SLEPc.NEP.destroy slepc4py.SLEPc.NEP-class.html#destroy slepc4py.SLEPc.NEP.getRIILagPreconditioner slepc4py.SLEPc.NEP-class.html#getRIILagPreconditioner slepc4py.SLEPc.NEP.getTolerances slepc4py.SLEPc.NEP-class.html#getTolerances slepc4py.SLEPc.NEP.setSplitOperator slepc4py.SLEPc.NEP-class.html#setSplitOperator slepc4py.SLEPc.NEP.setRIILagPreconditioner slepc4py.SLEPc.NEP-class.html#setRIILagPreconditioner slepc4py.SLEPc.NEP.solve slepc4py.SLEPc.NEP-class.html#solve slepc4py.SLEPc.NEP.ConvergedReason slepc4py.SLEPc.NEP.ConvergedReason-class.html slepc4py.SLEPc.NEP.ConvergedReason.DIVERGED_BREAKDOWN slepc4py.SLEPc.NEP.ConvergedReason-class.html#DIVERGED_BREAKDOWN slepc4py.SLEPc.NEP.ConvergedReason.CONVERGED_USER slepc4py.SLEPc.NEP.ConvergedReason-class.html#CONVERGED_USER slepc4py.SLEPc.NEP.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.NEP.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.NEP.ConvergedReason.ITERATING slepc4py.SLEPc.NEP.ConvergedReason-class.html#ITERATING slepc4py.SLEPc.NEP.ConvergedReason.CONVERGED_ITERATING slepc4py.SLEPc.NEP.ConvergedReason-class.html#CONVERGED_ITERATING slepc4py.SLEPc.NEP.ConvergedReason.DIVERGED_ITS slepc4py.SLEPc.NEP.ConvergedReason-class.html#DIVERGED_ITS slepc4py.SLEPc.NEP.ConvergedReason.__qualname__ slepc4py.SLEPc.NEP.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.NEP.ConvergedReason.DIVERGED_LINEAR_SOLVE slepc4py.SLEPc.NEP.ConvergedReason-class.html#DIVERGED_LINEAR_SOLVE slepc4py.SLEPc.NEP.ErrorType slepc4py.SLEPc.NEP.ErrorType-class.html slepc4py.SLEPc.NEP.ErrorType.__qualname__ slepc4py.SLEPc.NEP.ErrorType-class.html#__qualname__ slepc4py.SLEPc.NEP.ErrorType.RELATIVE slepc4py.SLEPc.NEP.ErrorType-class.html#RELATIVE slepc4py.SLEPc.NEP.ErrorType.BACKWARD slepc4py.SLEPc.NEP.ErrorType-class.html#BACKWARD slepc4py.SLEPc.NEP.ErrorType.ABSOLUTE slepc4py.SLEPc.NEP.ErrorType-class.html#ABSOLUTE slepc4py.SLEPc.NEP.Refine slepc4py.SLEPc.NEP.Refine-class.html slepc4py.SLEPc.NEP.Refine.NONE slepc4py.SLEPc.NEP.Refine-class.html#NONE slepc4py.SLEPc.NEP.Refine.MULTIPLE slepc4py.SLEPc.NEP.Refine-class.html#MULTIPLE slepc4py.SLEPc.NEP.Refine.SIMPLE slepc4py.SLEPc.NEP.Refine-class.html#SIMPLE slepc4py.SLEPc.NEP.Refine.__qualname__ slepc4py.SLEPc.NEP.Refine-class.html#__qualname__ slepc4py.SLEPc.NEP.RefineScheme slepc4py.SLEPc.NEP.RefineScheme-class.html slepc4py.SLEPc.NEP.RefineScheme.SCHUR slepc4py.SLEPc.NEP.RefineScheme-class.html#SCHUR slepc4py.SLEPc.NEP.RefineScheme.MBE slepc4py.SLEPc.NEP.RefineScheme-class.html#MBE slepc4py.SLEPc.NEP.RefineScheme.EXPLICIT slepc4py.SLEPc.NEP.RefineScheme-class.html#EXPLICIT slepc4py.SLEPc.NEP.RefineScheme.__qualname__ slepc4py.SLEPc.NEP.RefineScheme-class.html#__qualname__ slepc4py.SLEPc.NEP.Type slepc4py.SLEPc.NEP.Type-class.html slepc4py.SLEPc.NEP.Type.NARNOLDI slepc4py.SLEPc.NEP.Type-class.html#NARNOLDI slepc4py.SLEPc.NEP.Type.SLP slepc4py.SLEPc.NEP.Type-class.html#SLP slepc4py.SLEPc.NEP.Type.CISS slepc4py.SLEPc.NEP.Type-class.html#CISS slepc4py.SLEPc.NEP.Type.__qualname__ slepc4py.SLEPc.NEP.Type-class.html#__qualname__ slepc4py.SLEPc.NEP.Type.INTERPOL slepc4py.SLEPc.NEP.Type-class.html#INTERPOL slepc4py.SLEPc.NEP.Type.RII slepc4py.SLEPc.NEP.Type-class.html#RII slepc4py.SLEPc.NEP.Type.NLEIGS slepc4py.SLEPc.NEP.Type-class.html#NLEIGS slepc4py.SLEPc.NEP.Which slepc4py.SLEPc.NEP.Which-class.html slepc4py.SLEPc.NEP.Which.TARGET_MAGNITUDE slepc4py.SLEPc.NEP.Which-class.html#TARGET_MAGNITUDE slepc4py.SLEPc.NEP.Which.LARGEST_IMAGINARY slepc4py.SLEPc.NEP.Which-class.html#LARGEST_IMAGINARY slepc4py.SLEPc.NEP.Which.USER slepc4py.SLEPc.NEP.Which-class.html#USER slepc4py.SLEPc.NEP.Which.SMALLEST_REAL slepc4py.SLEPc.NEP.Which-class.html#SMALLEST_REAL slepc4py.SLEPc.NEP.Which.SMALLEST_MAGNITUDE slepc4py.SLEPc.NEP.Which-class.html#SMALLEST_MAGNITUDE slepc4py.SLEPc.NEP.Which.SMALLEST_IMAGINARY slepc4py.SLEPc.NEP.Which-class.html#SMALLEST_IMAGINARY slepc4py.SLEPc.NEP.Which.LARGEST_REAL slepc4py.SLEPc.NEP.Which-class.html#LARGEST_REAL slepc4py.SLEPc.NEP.Which.ALL slepc4py.SLEPc.NEP.Which-class.html#ALL slepc4py.SLEPc.NEP.Which.LARGEST_MAGNITUDE slepc4py.SLEPc.NEP.Which-class.html#LARGEST_MAGNITUDE slepc4py.SLEPc.NEP.Which.__qualname__ slepc4py.SLEPc.NEP.Which-class.html#__qualname__ slepc4py.SLEPc.NEP.Which.TARGET_IMAGINARY slepc4py.SLEPc.NEP.Which-class.html#TARGET_IMAGINARY slepc4py.SLEPc.NEP.Which.TARGET_REAL slepc4py.SLEPc.NEP.Which-class.html#TARGET_REAL slepc4py.SLEPc.PEP slepc4py.SLEPc.PEP-class.html slepc4py.SLEPc.PEP.setWhichEigenpairs slepc4py.SLEPc.PEP-class.html#setWhichEigenpairs slepc4py.SLEPc.PEP.cancelMonitor slepc4py.SLEPc.PEP-class.html#cancelMonitor slepc4py.SLEPc.PEP.getRG slepc4py.SLEPc.PEP-class.html#getRG slepc4py.SLEPc.PEP.computeError slepc4py.SLEPc.PEP-class.html#computeError slepc4py.SLEPc.PEP.errorView slepc4py.SLEPc.PEP-class.html#errorView slepc4py.SLEPc.PEP.RefineScheme slepc4py.SLEPc.PEP.RefineScheme-class.html slepc4py.SLEPc.PEP.appendOptionsPrefix slepc4py.SLEPc.PEP-class.html#appendOptionsPrefix slepc4py.SLEPc.PEP.setOperators slepc4py.SLEPc.PEP-class.html#setOperators slepc4py.SLEPc.PEP.getConvergedReason slepc4py.SLEPc.PEP-class.html#getConvergedReason slepc4py.SLEPc.PEP.setInitialSpace slepc4py.SLEPc.PEP-class.html#setInitialSpace slepc4py.SLEPc.PEP.setOptionsPrefix slepc4py.SLEPc.PEP-class.html#setOptionsPrefix slepc4py.SLEPc.PEP.getDimensions slepc4py.SLEPc.PEP-class.html#getDimensions slepc4py.SLEPc.PEP.setFromOptions slepc4py.SLEPc.PEP-class.html#setFromOptions slepc4py.SLEPc.PEP.setST slepc4py.SLEPc.PEP-class.html#setST slepc4py.SLEPc.PEP.getBV slepc4py.SLEPc.PEP-class.html#getBV slepc4py.SLEPc.PEP.setRefine slepc4py.SLEPc.PEP-class.html#setRefine slepc4py.SLEPc.PEP.view slepc4py.SLEPc.PEP-class.html#view slepc4py.SLEPc.PEP.Scale slepc4py.SLEPc.PEP.Scale-class.html slepc4py.SLEPc.PEP.ConvergedReason slepc4py.SLEPc.PEP.ConvergedReason-class.html slepc4py.SLEPc.PEP.Which slepc4py.SLEPc.PEP.Which-class.html slepc4py.SLEPc.PEP.Type slepc4py.SLEPc.PEP.Type-class.html slepc4py.SLEPc.PEP.getLinearExplicitMatrix slepc4py.SLEPc.PEP-class.html#getLinearExplicitMatrix slepc4py.SLEPc.PEP.getLinearEPS slepc4py.SLEPc.PEP-class.html#getLinearEPS slepc4py.SLEPc.PEP.setUp slepc4py.SLEPc.PEP-class.html#setUp slepc4py.SLEPc.PEP.getST slepc4py.SLEPc.PEP-class.html#getST slepc4py.SLEPc.PEP.getOptionsPrefix slepc4py.SLEPc.PEP-class.html#getOptionsPrefix slepc4py.SLEPc.PEP.setConvergenceTest slepc4py.SLEPc.PEP-class.html#setConvergenceTest slepc4py.SLEPc.PEP.setLinearExplicitMatrix slepc4py.SLEPc.PEP-class.html#setLinearExplicitMatrix slepc4py.SLEPc.PEP.getBasis slepc4py.SLEPc.PEP-class.html#getBasis slepc4py.SLEPc.PEP.Extract slepc4py.SLEPc.PEP.Extract-class.html slepc4py.SLEPc.PEP.getConvergenceTest slepc4py.SLEPc.PEP-class.html#getConvergenceTest slepc4py.SLEPc.PEP.Refine slepc4py.SLEPc.PEP.Refine-class.html slepc4py.SLEPc.PEP.setTolerances slepc4py.SLEPc.PEP-class.html#setTolerances slepc4py.SLEPc.PEP.getEigenpair slepc4py.SLEPc.PEP-class.html#getEigenpair slepc4py.SLEPc.PEP.Basis slepc4py.SLEPc.PEP.Basis-class.html slepc4py.SLEPc.PEP.getConverged slepc4py.SLEPc.PEP-class.html#getConverged slepc4py.SLEPc.PEP.getLinearCompanionForm slepc4py.SLEPc.PEP-class.html#getLinearCompanionForm slepc4py.SLEPc.PEP.setType slepc4py.SLEPc.PEP-class.html#setType slepc4py.SLEPc.PEP.getOperators slepc4py.SLEPc.PEP-class.html#getOperators slepc4py.SLEPc.PEP.create slepc4py.SLEPc.PEP-class.html#create slepc4py.SLEPc.PEP.getProblemType slepc4py.SLEPc.PEP-class.html#getProblemType slepc4py.SLEPc.PEP.getType slepc4py.SLEPc.PEP-class.html#getType slepc4py.SLEPc.PEP.getTrackAll slepc4py.SLEPc.PEP-class.html#getTrackAll slepc4py.SLEPc.PEP.reset slepc4py.SLEPc.PEP-class.html#reset slepc4py.SLEPc.PEP.Conv slepc4py.SLEPc.PEP.Conv-class.html slepc4py.SLEPc.PEP.ErrorType slepc4py.SLEPc.PEP.ErrorType-class.html slepc4py.SLEPc.PEP.getIterationNumber slepc4py.SLEPc.PEP-class.html#getIterationNumber slepc4py.SLEPc.PEP.setDimensions slepc4py.SLEPc.PEP-class.html#setDimensions slepc4py.SLEPc.PEP.getWhichEigenpairs slepc4py.SLEPc.PEP-class.html#getWhichEigenpairs slepc4py.SLEPc.PEP.setBasis slepc4py.SLEPc.PEP-class.html#setBasis slepc4py.SLEPc.PEP.setScale slepc4py.SLEPc.PEP-class.html#setScale slepc4py.SLEPc.PEP.setBV slepc4py.SLEPc.PEP-class.html#setBV slepc4py.SLEPc.PEP.setTrackAll slepc4py.SLEPc.PEP-class.html#setTrackAll slepc4py.SLEPc.PEP.__new__ slepc4py.SLEPc.PEP-class.html#__new__ slepc4py.SLEPc.PEP.getErrorEstimate slepc4py.SLEPc.PEP-class.html#getErrorEstimate slepc4py.SLEPc.PEP.setRG slepc4py.SLEPc.PEP-class.html#setRG slepc4py.SLEPc.PEP.destroy slepc4py.SLEPc.PEP-class.html#destroy slepc4py.SLEPc.PEP.setProblemType slepc4py.SLEPc.PEP-class.html#setProblemType slepc4py.SLEPc.PEP.getTolerances slepc4py.SLEPc.PEP-class.html#getTolerances slepc4py.SLEPc.PEP.ProblemType slepc4py.SLEPc.PEP.ProblemType-class.html slepc4py.SLEPc.PEP.getScale slepc4py.SLEPc.PEP-class.html#getScale slepc4py.SLEPc.PEP.setLinearEPS slepc4py.SLEPc.PEP-class.html#setLinearEPS slepc4py.SLEPc.PEP.solve slepc4py.SLEPc.PEP-class.html#solve slepc4py.SLEPc.PEP.setLinearCompanionForm slepc4py.SLEPc.PEP-class.html#setLinearCompanionForm slepc4py.SLEPc.PEP.getRefine slepc4py.SLEPc.PEP-class.html#getRefine slepc4py.SLEPc.PEP.Basis slepc4py.SLEPc.PEP.Basis-class.html slepc4py.SLEPc.PEP.Basis.CHEBYSHEV1 slepc4py.SLEPc.PEP.Basis-class.html#CHEBYSHEV1 slepc4py.SLEPc.PEP.Basis.CHEBYSHEV2 slepc4py.SLEPc.PEP.Basis-class.html#CHEBYSHEV2 slepc4py.SLEPc.PEP.Basis.LEGENDRE slepc4py.SLEPc.PEP.Basis-class.html#LEGENDRE slepc4py.SLEPc.PEP.Basis.LAGUERRE slepc4py.SLEPc.PEP.Basis-class.html#LAGUERRE slepc4py.SLEPc.PEP.Basis.MONOMIAL slepc4py.SLEPc.PEP.Basis-class.html#MONOMIAL slepc4py.SLEPc.PEP.Basis.HERMITE slepc4py.SLEPc.PEP.Basis-class.html#HERMITE slepc4py.SLEPc.PEP.Basis.__qualname__ slepc4py.SLEPc.PEP.Basis-class.html#__qualname__ slepc4py.SLEPc.PEP.Conv slepc4py.SLEPc.PEP.Conv-class.html slepc4py.SLEPc.PEP.Conv.__qualname__ slepc4py.SLEPc.PEP.Conv-class.html#__qualname__ slepc4py.SLEPc.PEP.Conv.ABS slepc4py.SLEPc.PEP.Conv-class.html#ABS slepc4py.SLEPc.PEP.Conv.USER slepc4py.SLEPc.PEP.Conv-class.html#USER slepc4py.SLEPc.PEP.Conv.REL slepc4py.SLEPc.PEP.Conv-class.html#REL slepc4py.SLEPc.PEP.Conv.NORM slepc4py.SLEPc.PEP.Conv-class.html#NORM slepc4py.SLEPc.PEP.ConvergedReason slepc4py.SLEPc.PEP.ConvergedReason-class.html slepc4py.SLEPc.PEP.ConvergedReason.DIVERGED_BREAKDOWN slepc4py.SLEPc.PEP.ConvergedReason-class.html#DIVERGED_BREAKDOWN slepc4py.SLEPc.PEP.ConvergedReason.CONVERGED_USER slepc4py.SLEPc.PEP.ConvergedReason-class.html#CONVERGED_USER slepc4py.SLEPc.PEP.ConvergedReason.DIVERGED_SYMMETRY_LOST slepc4py.SLEPc.PEP.ConvergedReason-class.html#DIVERGED_SYMMETRY_LOST slepc4py.SLEPc.PEP.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.PEP.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.PEP.ConvergedReason.ITERATING slepc4py.SLEPc.PEP.ConvergedReason-class.html#ITERATING slepc4py.SLEPc.PEP.ConvergedReason.CONVERGED_ITERATING slepc4py.SLEPc.PEP.ConvergedReason-class.html#CONVERGED_ITERATING slepc4py.SLEPc.PEP.ConvergedReason.DIVERGED_ITS slepc4py.SLEPc.PEP.ConvergedReason-class.html#DIVERGED_ITS slepc4py.SLEPc.PEP.ConvergedReason.__qualname__ slepc4py.SLEPc.PEP.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.PEP.ErrorType slepc4py.SLEPc.PEP.ErrorType-class.html slepc4py.SLEPc.PEP.ErrorType.__qualname__ slepc4py.SLEPc.PEP.ErrorType-class.html#__qualname__ slepc4py.SLEPc.PEP.ErrorType.RELATIVE slepc4py.SLEPc.PEP.ErrorType-class.html#RELATIVE slepc4py.SLEPc.PEP.ErrorType.BACKWARD slepc4py.SLEPc.PEP.ErrorType-class.html#BACKWARD slepc4py.SLEPc.PEP.ErrorType.ABSOLUTE slepc4py.SLEPc.PEP.ErrorType-class.html#ABSOLUTE slepc4py.SLEPc.PEP.Extract slepc4py.SLEPc.PEP.Extract-class.html slepc4py.SLEPc.PEP.Extract.NONE slepc4py.SLEPc.PEP.Extract-class.html#NONE slepc4py.SLEPc.PEP.Extract.STRUCTURED slepc4py.SLEPc.PEP.Extract-class.html#STRUCTURED slepc4py.SLEPc.PEP.Extract.RESIDUAL slepc4py.SLEPc.PEP.Extract-class.html#RESIDUAL slepc4py.SLEPc.PEP.Extract.__qualname__ slepc4py.SLEPc.PEP.Extract-class.html#__qualname__ slepc4py.SLEPc.PEP.Extract.NORM slepc4py.SLEPc.PEP.Extract-class.html#NORM slepc4py.SLEPc.PEP.ProblemType slepc4py.SLEPc.PEP.ProblemType-class.html slepc4py.SLEPc.PEP.ProblemType.GENERAL slepc4py.SLEPc.PEP.ProblemType-class.html#GENERAL slepc4py.SLEPc.PEP.ProblemType.__qualname__ slepc4py.SLEPc.PEP.ProblemType-class.html#__qualname__ slepc4py.SLEPc.PEP.ProblemType.HERMITIAN slepc4py.SLEPc.PEP.ProblemType-class.html#HERMITIAN slepc4py.SLEPc.PEP.ProblemType.GYROSCOPIC slepc4py.SLEPc.PEP.ProblemType-class.html#GYROSCOPIC slepc4py.SLEPc.PEP.Refine slepc4py.SLEPc.PEP.Refine-class.html slepc4py.SLEPc.PEP.Refine.NONE slepc4py.SLEPc.PEP.Refine-class.html#NONE slepc4py.SLEPc.PEP.Refine.MULTIPLE slepc4py.SLEPc.PEP.Refine-class.html#MULTIPLE slepc4py.SLEPc.PEP.Refine.SIMPLE slepc4py.SLEPc.PEP.Refine-class.html#SIMPLE slepc4py.SLEPc.PEP.Refine.__qualname__ slepc4py.SLEPc.PEP.Refine-class.html#__qualname__ slepc4py.SLEPc.PEP.RefineScheme slepc4py.SLEPc.PEP.RefineScheme-class.html slepc4py.SLEPc.PEP.RefineScheme.SCHUR slepc4py.SLEPc.PEP.RefineScheme-class.html#SCHUR slepc4py.SLEPc.PEP.RefineScheme.MBE slepc4py.SLEPc.PEP.RefineScheme-class.html#MBE slepc4py.SLEPc.PEP.RefineScheme.EXPLICIT slepc4py.SLEPc.PEP.RefineScheme-class.html#EXPLICIT slepc4py.SLEPc.PEP.RefineScheme.__qualname__ slepc4py.SLEPc.PEP.RefineScheme-class.html#__qualname__ slepc4py.SLEPc.PEP.Scale slepc4py.SLEPc.PEP.Scale-class.html slepc4py.SLEPc.PEP.Scale.BOTH slepc4py.SLEPc.PEP.Scale-class.html#BOTH slepc4py.SLEPc.PEP.Scale.NONE slepc4py.SLEPc.PEP.Scale-class.html#NONE slepc4py.SLEPc.PEP.Scale.DIAGONAL slepc4py.SLEPc.PEP.Scale-class.html#DIAGONAL slepc4py.SLEPc.PEP.Scale.__qualname__ slepc4py.SLEPc.PEP.Scale-class.html#__qualname__ slepc4py.SLEPc.PEP.Scale.SCALAR slepc4py.SLEPc.PEP.Scale-class.html#SCALAR slepc4py.SLEPc.PEP.Type slepc4py.SLEPc.PEP.Type-class.html slepc4py.SLEPc.PEP.Type.QARNOLDI slepc4py.SLEPc.PEP.Type-class.html#QARNOLDI slepc4py.SLEPc.PEP.Type.LINEAR slepc4py.SLEPc.PEP.Type-class.html#LINEAR slepc4py.SLEPc.PEP.Type.__qualname__ slepc4py.SLEPc.PEP.Type-class.html#__qualname__ slepc4py.SLEPc.PEP.Type.JD slepc4py.SLEPc.PEP.Type-class.html#JD slepc4py.SLEPc.PEP.Type.STOAR slepc4py.SLEPc.PEP.Type-class.html#STOAR slepc4py.SLEPc.PEP.Type.TOAR slepc4py.SLEPc.PEP.Type-class.html#TOAR slepc4py.SLEPc.PEP.Which slepc4py.SLEPc.PEP.Which-class.html slepc4py.SLEPc.PEP.Which.TARGET_MAGNITUDE slepc4py.SLEPc.PEP.Which-class.html#TARGET_MAGNITUDE slepc4py.SLEPc.PEP.Which.LARGEST_IMAGINARY slepc4py.SLEPc.PEP.Which-class.html#LARGEST_IMAGINARY slepc4py.SLEPc.PEP.Which.USER slepc4py.SLEPc.PEP.Which-class.html#USER slepc4py.SLEPc.PEP.Which.SMALLEST_REAL slepc4py.SLEPc.PEP.Which-class.html#SMALLEST_REAL slepc4py.SLEPc.PEP.Which.SMALLEST_MAGNITUDE slepc4py.SLEPc.PEP.Which-class.html#SMALLEST_MAGNITUDE slepc4py.SLEPc.PEP.Which.SMALLEST_IMAGINARY slepc4py.SLEPc.PEP.Which-class.html#SMALLEST_IMAGINARY slepc4py.SLEPc.PEP.Which.LARGEST_REAL slepc4py.SLEPc.PEP.Which-class.html#LARGEST_REAL slepc4py.SLEPc.PEP.Which.LARGEST_MAGNITUDE slepc4py.SLEPc.PEP.Which-class.html#LARGEST_MAGNITUDE slepc4py.SLEPc.PEP.Which.__qualname__ slepc4py.SLEPc.PEP.Which-class.html#__qualname__ slepc4py.SLEPc.PEP.Which.TARGET_IMAGINARY slepc4py.SLEPc.PEP.Which-class.html#TARGET_IMAGINARY slepc4py.SLEPc.PEP.Which.TARGET_REAL slepc4py.SLEPc.PEP.Which-class.html#TARGET_REAL slepc4py.SLEPc.RG slepc4py.SLEPc.RG-class.html slepc4py.SLEPc.RG.Type slepc4py.SLEPc.RG.Type-class.html slepc4py.SLEPc.RG.setType slepc4py.SLEPc.RG-class.html#setType slepc4py.SLEPc.RG.__new__ slepc4py.SLEPc.RG-class.html#__new__ slepc4py.SLEPc.RG.getComplement slepc4py.SLEPc.RG-class.html#getComplement slepc4py.SLEPc.RG.create slepc4py.SLEPc.RG-class.html#create slepc4py.SLEPc.RG.setComplement slepc4py.SLEPc.RG-class.html#setComplement slepc4py.SLEPc.RG.destroy slepc4py.SLEPc.RG-class.html#destroy slepc4py.SLEPc.RG.setOptionsPrefix slepc4py.SLEPc.RG-class.html#setOptionsPrefix slepc4py.SLEPc.RG.getType slepc4py.SLEPc.RG-class.html#getType slepc4py.SLEPc.RG.getOptionsPrefix slepc4py.SLEPc.RG-class.html#getOptionsPrefix slepc4py.SLEPc.RG.getIntervalEndpoints slepc4py.SLEPc.RG-class.html#getIntervalEndpoints slepc4py.SLEPc.RG.setFromOptions slepc4py.SLEPc.RG-class.html#setFromOptions slepc4py.SLEPc.RG.setIntervalEndpoints slepc4py.SLEPc.RG-class.html#setIntervalEndpoints slepc4py.SLEPc.RG.isTrivial slepc4py.SLEPc.RG-class.html#isTrivial slepc4py.SLEPc.RG.getEllipseParameters slepc4py.SLEPc.RG-class.html#getEllipseParameters slepc4py.SLEPc.RG.setEllipseParameters slepc4py.SLEPc.RG-class.html#setEllipseParameters slepc4py.SLEPc.RG.view slepc4py.SLEPc.RG-class.html#view slepc4py.SLEPc.RG.Type slepc4py.SLEPc.RG.Type-class.html slepc4py.SLEPc.RG.Type.POLYGON slepc4py.SLEPc.RG.Type-class.html#POLYGON slepc4py.SLEPc.RG.Type.INTERVAL slepc4py.SLEPc.RG.Type-class.html#INTERVAL slepc4py.SLEPc.RG.Type.__qualname__ slepc4py.SLEPc.RG.Type-class.html#__qualname__ slepc4py.SLEPc.RG.Type.RING slepc4py.SLEPc.RG.Type-class.html#RING slepc4py.SLEPc.RG.Type.ELLIPSE slepc4py.SLEPc.RG.Type-class.html#ELLIPSE slepc4py.SLEPc.ST slepc4py.SLEPc.ST-class.html slepc4py.SLEPc.ST.setKSP slepc4py.SLEPc.ST-class.html#setKSP slepc4py.SLEPc.ST.setTransform slepc4py.SLEPc.ST-class.html#setTransform slepc4py.SLEPc.ST.MatMode slepc4py.SLEPc.ST.MatMode-class.html slepc4py.SLEPc.ST.getMatMode slepc4py.SLEPc.ST-class.html#getMatMode slepc4py.SLEPc.ST.apply slepc4py.SLEPc.ST-class.html#apply slepc4py.SLEPc.ST.setMatMode slepc4py.SLEPc.ST-class.html#setMatMode slepc4py.SLEPc.ST.Type slepc4py.SLEPc.ST.Type-class.html slepc4py.SLEPc.ST.setType slepc4py.SLEPc.ST-class.html#setType slepc4py.SLEPc.ST.getOperators slepc4py.SLEPc.ST-class.html#getOperators slepc4py.SLEPc.ST.getTransform slepc4py.SLEPc.ST-class.html#getTransform slepc4py.SLEPc.ST.__new__ slepc4py.SLEPc.ST-class.html#__new__ slepc4py.SLEPc.ST.create slepc4py.SLEPc.ST-class.html#create slepc4py.SLEPc.ST.setCayleyAntishift slepc4py.SLEPc.ST-class.html#setCayleyAntishift slepc4py.SLEPc.ST.setOperators slepc4py.SLEPc.ST-class.html#setOperators slepc4py.SLEPc.ST.destroy slepc4py.SLEPc.ST-class.html#destroy slepc4py.SLEPc.ST.getKSP slepc4py.SLEPc.ST-class.html#getKSP slepc4py.SLEPc.ST.setOptionsPrefix slepc4py.SLEPc.ST-class.html#setOptionsPrefix slepc4py.SLEPc.ST.mat_mode slepc4py.SLEPc.ST-class.html#mat_mode slepc4py.SLEPc.ST.setUp slepc4py.SLEPc.ST-class.html#setUp slepc4py.SLEPc.ST.getType slepc4py.SLEPc.ST-class.html#getType slepc4py.SLEPc.ST.getOptionsPrefix slepc4py.SLEPc.ST-class.html#getOptionsPrefix slepc4py.SLEPc.ST.setFromOptions slepc4py.SLEPc.ST-class.html#setFromOptions slepc4py.SLEPc.ST.setShift slepc4py.SLEPc.ST-class.html#setShift slepc4py.SLEPc.ST.ksp slepc4py.SLEPc.ST-class.html#ksp slepc4py.SLEPc.ST.reset slepc4py.SLEPc.ST-class.html#reset slepc4py.SLEPc.ST.setMatStructure slepc4py.SLEPc.ST-class.html#setMatStructure slepc4py.SLEPc.ST.applyTranspose slepc4py.SLEPc.ST-class.html#applyTranspose slepc4py.SLEPc.ST.shift slepc4py.SLEPc.ST-class.html#shift slepc4py.SLEPc.ST.getShift slepc4py.SLEPc.ST-class.html#getShift slepc4py.SLEPc.ST.view slepc4py.SLEPc.ST-class.html#view slepc4py.SLEPc.ST.MatMode slepc4py.SLEPc.ST.MatMode-class.html slepc4py.SLEPc.ST.MatMode.SHELL slepc4py.SLEPc.ST.MatMode-class.html#SHELL slepc4py.SLEPc.ST.MatMode.INPLACE slepc4py.SLEPc.ST.MatMode-class.html#INPLACE slepc4py.SLEPc.ST.MatMode.__qualname__ slepc4py.SLEPc.ST.MatMode-class.html#__qualname__ slepc4py.SLEPc.ST.MatMode.COPY slepc4py.SLEPc.ST.MatMode-class.html#COPY slepc4py.SLEPc.ST.Type slepc4py.SLEPc.ST.Type-class.html slepc4py.SLEPc.ST.Type.SINVERT slepc4py.SLEPc.ST.Type-class.html#SINVERT slepc4py.SLEPc.ST.Type.SHELL slepc4py.SLEPc.ST.Type-class.html#SHELL slepc4py.SLEPc.ST.Type.CAYLEY slepc4py.SLEPc.ST.Type-class.html#CAYLEY slepc4py.SLEPc.ST.Type.SHIFT slepc4py.SLEPc.ST.Type-class.html#SHIFT slepc4py.SLEPc.ST.Type.__qualname__ slepc4py.SLEPc.ST.Type-class.html#__qualname__ slepc4py.SLEPc.ST.Type.PRECOND slepc4py.SLEPc.ST.Type-class.html#PRECOND slepc4py.SLEPc.SVD slepc4py.SLEPc.SVD-class.html slepc4py.SLEPc.SVD.cancelMonitor slepc4py.SLEPc.SVD-class.html#cancelMonitor slepc4py.SLEPc.SVD.max_it slepc4py.SLEPc.SVD-class.html#max_it slepc4py.SLEPc.SVD.computeError slepc4py.SLEPc.SVD-class.html#computeError slepc4py.SLEPc.SVD.errorView slepc4py.SLEPc.SVD-class.html#errorView slepc4py.SLEPc.SVD.appendOptionsPrefix slepc4py.SLEPc.SVD-class.html#appendOptionsPrefix slepc4py.SLEPc.SVD.getConvergedReason slepc4py.SLEPc.SVD-class.html#getConvergedReason slepc4py.SLEPc.SVD.setInitialSpace slepc4py.SLEPc.SVD-class.html#setInitialSpace slepc4py.SLEPc.SVD.setOptionsPrefix slepc4py.SLEPc.SVD-class.html#setOptionsPrefix slepc4py.SLEPc.SVD.getDimensions slepc4py.SLEPc.SVD-class.html#getDimensions slepc4py.SLEPc.SVD.setFromOptions slepc4py.SLEPc.SVD-class.html#setFromOptions slepc4py.SLEPc.SVD.getBV slepc4py.SLEPc.SVD-class.html#getBV slepc4py.SLEPc.SVD.view slepc4py.SLEPc.SVD-class.html#view slepc4py.SLEPc.SVD.ConvergedReason slepc4py.SLEPc.SVD.ConvergedReason-class.html slepc4py.SLEPc.SVD.Which slepc4py.SLEPc.SVD.Which-class.html slepc4py.SLEPc.SVD.Type slepc4py.SLEPc.SVD.Type-class.html slepc4py.SLEPc.SVD.getCrossEPS slepc4py.SLEPc.SVD-class.html#getCrossEPS slepc4py.SLEPc.SVD.getWhichSingularTriplets slepc4py.SLEPc.SVD-class.html#getWhichSingularTriplets slepc4py.SLEPc.SVD.setUp slepc4py.SLEPc.SVD-class.html#setUp slepc4py.SLEPc.SVD.transpose_mode slepc4py.SLEPc.SVD-class.html#transpose_mode slepc4py.SLEPc.SVD.getOptionsPrefix slepc4py.SLEPc.SVD-class.html#getOptionsPrefix slepc4py.SLEPc.SVD.getCyclicExplicitMatrix slepc4py.SLEPc.SVD-class.html#getCyclicExplicitMatrix slepc4py.SLEPc.SVD.bv slepc4py.SLEPc.SVD-class.html#bv slepc4py.SLEPc.SVD.setTolerances slepc4py.SLEPc.SVD-class.html#setTolerances slepc4py.SLEPc.SVD.getConverged slepc4py.SLEPc.SVD-class.html#getConverged slepc4py.SLEPc.SVD.setCrossEPS slepc4py.SLEPc.SVD-class.html#setCrossEPS slepc4py.SLEPc.SVD.setCyclicExplicitMatrix slepc4py.SLEPc.SVD-class.html#setCyclicExplicitMatrix slepc4py.SLEPc.SVD.setType slepc4py.SLEPc.SVD-class.html#setType slepc4py.SLEPc.SVD.setLanczosOneSide slepc4py.SLEPc.SVD-class.html#setLanczosOneSide slepc4py.SLEPc.SVD.create slepc4py.SLEPc.SVD-class.html#create slepc4py.SLEPc.SVD.tol slepc4py.SLEPc.SVD-class.html#tol slepc4py.SLEPc.SVD.getCyclicEPS slepc4py.SLEPc.SVD-class.html#getCyclicEPS slepc4py.SLEPc.SVD.setImplicitTranspose slepc4py.SLEPc.SVD-class.html#setImplicitTranspose slepc4py.SLEPc.SVD.getType slepc4py.SLEPc.SVD-class.html#getType slepc4py.SLEPc.SVD.setWhichSingularTriplets slepc4py.SLEPc.SVD-class.html#setWhichSingularTriplets slepc4py.SLEPc.SVD.getSingularTriplet slepc4py.SLEPc.SVD-class.html#getSingularTriplet slepc4py.SLEPc.SVD.setCyclicEPS slepc4py.SLEPc.SVD-class.html#setCyclicEPS slepc4py.SLEPc.SVD.reset slepc4py.SLEPc.SVD-class.html#reset slepc4py.SLEPc.SVD.ErrorType slepc4py.SLEPc.SVD.ErrorType-class.html slepc4py.SLEPc.SVD.getValue slepc4py.SLEPc.SVD-class.html#getValue slepc4py.SLEPc.SVD.setOperator slepc4py.SLEPc.SVD-class.html#setOperator slepc4py.SLEPc.SVD.getIterationNumber slepc4py.SLEPc.SVD-class.html#getIterationNumber slepc4py.SLEPc.SVD.getOperator slepc4py.SLEPc.SVD-class.html#getOperator slepc4py.SLEPc.SVD.setDimensions slepc4py.SLEPc.SVD-class.html#setDimensions slepc4py.SLEPc.SVD.getVectors slepc4py.SLEPc.SVD-class.html#getVectors slepc4py.SLEPc.SVD.setBV slepc4py.SLEPc.SVD-class.html#setBV slepc4py.SLEPc.SVD.getImplicitTranspose slepc4py.SLEPc.SVD-class.html#getImplicitTranspose slepc4py.SLEPc.SVD.setTRLanczosOneSide slepc4py.SLEPc.SVD-class.html#setTRLanczosOneSide slepc4py.SLEPc.SVD.__new__ slepc4py.SLEPc.SVD-class.html#__new__ slepc4py.SLEPc.SVD.which slepc4py.SLEPc.SVD-class.html#which slepc4py.SLEPc.SVD.destroy slepc4py.SLEPc.SVD-class.html#destroy slepc4py.SLEPc.SVD.getTolerances slepc4py.SLEPc.SVD-class.html#getTolerances slepc4py.SLEPc.SVD.solve slepc4py.SLEPc.SVD-class.html#solve slepc4py.SLEPc.SVD.ConvergedReason slepc4py.SLEPc.SVD.ConvergedReason-class.html slepc4py.SLEPc.SVD.ConvergedReason.DIVERGED_BREAKDOWN slepc4py.SLEPc.SVD.ConvergedReason-class.html#DIVERGED_BREAKDOWN slepc4py.SLEPc.SVD.ConvergedReason.ITERATING slepc4py.SLEPc.SVD.ConvergedReason-class.html#ITERATING slepc4py.SLEPc.SVD.ConvergedReason.__qualname__ slepc4py.SLEPc.SVD.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.SVD.ConvergedReason.CONVERGED_USER slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_USER slepc4py.SLEPc.SVD.ConvergedReason.CONVERGED_ITERATING slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_ITERATING slepc4py.SLEPc.SVD.ConvergedReason.DIVERGED_ITS slepc4py.SLEPc.SVD.ConvergedReason-class.html#DIVERGED_ITS slepc4py.SLEPc.SVD.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.SVD.ErrorType slepc4py.SLEPc.SVD.ErrorType-class.html slepc4py.SLEPc.SVD.ErrorType.__qualname__ slepc4py.SLEPc.SVD.ErrorType-class.html#__qualname__ slepc4py.SLEPc.SVD.ErrorType.RELATIVE slepc4py.SLEPc.SVD.ErrorType-class.html#RELATIVE slepc4py.SLEPc.SVD.ErrorType.ABSOLUTE slepc4py.SLEPc.SVD.ErrorType-class.html#ABSOLUTE slepc4py.SLEPc.SVD.Type slepc4py.SLEPc.SVD.Type-class.html slepc4py.SLEPc.SVD.Type.CYCLIC slepc4py.SLEPc.SVD.Type-class.html#CYCLIC slepc4py.SLEPc.SVD.Type.LAPACK slepc4py.SLEPc.SVD.Type-class.html#LAPACK slepc4py.SLEPc.SVD.Type.CROSS slepc4py.SLEPc.SVD.Type-class.html#CROSS slepc4py.SLEPc.SVD.Type.__qualname__ slepc4py.SLEPc.SVD.Type-class.html#__qualname__ slepc4py.SLEPc.SVD.Type.LANCZOS slepc4py.SLEPc.SVD.Type-class.html#LANCZOS slepc4py.SLEPc.SVD.Type.TRLANCZOS slepc4py.SLEPc.SVD.Type-class.html#TRLANCZOS slepc4py.SLEPc.SVD.Which slepc4py.SLEPc.SVD.Which-class.html slepc4py.SLEPc.SVD.Which.__qualname__ slepc4py.SLEPc.SVD.Which-class.html#__qualname__ slepc4py.SLEPc.SVD.Which.SMALLEST slepc4py.SLEPc.SVD.Which-class.html#SMALLEST slepc4py.SLEPc.SVD.Which.LARGEST slepc4py.SLEPc.SVD.Which-class.html#LARGEST slepc4py.SLEPc.Sys slepc4py.SLEPc.Sys-class.html slepc4py.SLEPc.Sys.__new__ slepc4py.SLEPc.Sys-class.html#__new__ slepc4py.SLEPc.Sys.getVersionInfo slepc4py.SLEPc.Sys-class.html#getVersionInfo slepc4py.SLEPc.Sys.getVersion slepc4py.SLEPc.Sys-class.html#getVersion slepc4py.SLEPc._p_mem slepc4py.SLEPc._p_mem-class.html slepc4py.SLEPc._p_mem.__new__ slepc4py.SLEPc._p_mem-class.html#__new__ slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.DS.StateType-class.html0000644000175000001440000002260312720314520025135 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.DS.StateType
Package slepc4py :: Module SLEPc :: Class DS :: Class StateType
[hide private]
[frames] | no frames]

Class StateType


DS state types

  • RAW: Not processed yet.
  • INTERMEDIATE: Reduced to Hessenberg or tridiagonal form (or equivalent).
  • CONDENSED: Reduced to Schur or diagonal form (or equivalent).
  • TRUNCATED: Condensed form truncated to a smaller size.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONDENSED = 2
  INTERMEDIATE = 1
  RAW = 0
  TRUNCATED = 3
  __qualname__ = 'DSStateType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_errortype_2.png0000644000175000001440000000227112720314522025322 0ustar dalcinlusers00000000000000PNG  IHDRY$mbKGDnIDAThc?(``````h "00H?HNNfddhx}`bqdڵp KAVBBWwF'.100.ȂROoeW5`KKG\FF vĊ;"+*0ϯ\iNr‚آERRr={?{fa300 P ba!*((!"B-Gps300|&Y^y`ɓr 6m?Z{{7?"+>r3u|0\rΎX,Mmml6AwZ(#ctM5++o+#ԁL@HHI(d5t:@`Mz.UT۽Gl޳XC}~@[GGJv攔 Uf%UUҲzΓ)Fs纹CbqWoTmV1aR5p~cL&tVk[wvvwoMMuY- _X^#2EoS5AA@Ef[ hdId$S$:RV%8 99cڭR%>=}}V!RXZS ܭR y3ZF{{{{tI~~PD~{ߥ ܨW?:hJJ*rsZyyi3 .^Pn.6۳G[UUcqgv~=M!!7of(f([TT}5+[41Z> W#.USryLhÌ**~ڿߛsG ]CN+\Kd7Ӟ/-U8rUryE]-/>ޑ&"M޾X^/N$'s9|~LTVzlzu{Sl(Sގ\5|,h}8yK{H4{6jxX`og7=t {u2J=p.DFk=68ΟOǰg7xp"M$CH@HYgn76F<GnpY,Ѩ3'KNCb#Kv]Ha3:C@HA[|aQIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.MFN.ConvergedReason-class.html0000644000175000001440000002270712720314522026420 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.MFN.ConvergedReason
Package slepc4py :: Module SLEPc :: Class MFN :: Class ConvergedReason
[hide private]
[frames] | no frames]

Class ConvergedReason


Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONVERGED_ITERATING = 0
  CONVERGED_ITS = 3
  CONVERGED_TOL = 2
  DIVERGED_BREAKDOWN = -4
  DIVERGED_ITS = -3
  ITERATING = 0
  __qualname__ = 'MFNConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_refine.png0000644000175000001440000000161512720314522024317 0ustar dalcinlusers00000000000000PNG  IHDRG$'bKGDBIDATh_HSQ?V2, TmCTP K=@ bCEdփH0§2$P.]:8/=}s4M$qKv)G#LTf̖D7䨪bjjj䐀ak++sܺǒ$gi2W4Aq:'}&7dR)G%rs\jkjkyŔ3 ½o1&Ooܠ+^\XS@Zd"s%}t x6nN_`!rH9R)GLJGxY˴#IAw,Fw,DgϗZ_fz8 B FyG!IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.ConvergedReason-class.html0000644000175000001440000002475012720314521026426 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.ConvergedReason
Package slepc4py :: Module SLEPc :: Class EPS :: Class ConvergedReason
[hide private]
[frames] | no frames]

Class ConvergedReason


EPS convergence reasons

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CONVERGED_ITERATING = 0
  CONVERGED_TOL = 1
  CONVERGED_USER = 2
  DIVERGED_BREAKDOWN = -2
  DIVERGED_ITS = -1
  DIVERGED_SYMMETRY_LOST = -3
  ITERATING = 0
  __qualname__ = 'EPSConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.BV.RefineType-class.html0000644000175000001440000002175212720314520025272 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.BV.RefineType
Package slepc4py :: Module SLEPc :: Class BV :: Class RefineType
[hide private]
[frames] | no frames]

Class RefineType


BV orthogonalization refinement types

  • IFNEEDED: Reorthogonalize if a criterion is satisfied.
  • NEVER: Never reorthogonalize.
  • ALWAYS: Always reorthogonalize.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ALWAYS = 2
  IFNEEDED = 0
  NEVER = 1
  __qualname__ = 'BVOrthogRefineType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/toc.html0000644000175000001440000000312112720314520017713 0ustar dalcinlusers00000000000000 Table of Contents

Table of Contents


Everything

Modules

slepc4py
slepc4py.SLEPc
slepc4py.lib

[hide private] slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.DS.Type-class.html0000644000175000001440000002521612720314520024137 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.DS.Type
Package slepc4py :: Module SLEPc :: Class DS :: Class Type
[hide private]
[frames] | no frames]

Class Type


DS type
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  GHEP = 'ghep'
  GHIEP = 'ghiep'
  GNHEP = 'gnhep'
  HEP = 'hep'
  NEP = 'nep'
  NHEP = 'nhep'
  PEP = 'pep'
  SVD = 'svd'
  __qualname__ = 'DSType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.Extract-class.html0000644000175000001440000002263612720314523024754 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.Extract
Package slepc4py :: Module SLEPc :: Class PEP :: Class Extract
[hide private]
[frames] | no frames]

Class Extract


Extraction strategy used to obtain eigenvectors of the PEP from the eigenvectors of the linearization

  • NONE: Use the first block.
  • NORM: Use the first or last block depending on norm of H.
  • RESIDUAL: Use the block with smallest residual.
  • STRUCTURED: Combine all blocks in a certain way.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  NONE = 1
  NORM = 2
  RESIDUAL = 3
  STRUCTURED = 4
  __qualname__ = 'PEPExtract'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.RG-class.html0000644000175000001440000010275512720314523023230 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.RG
Package slepc4py :: Module SLEPc :: Class RG
[hide private]
[frames] | no frames]

Class RG


RG
Nested Classes [hide private]
  Type
RG type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
create(self, comm=None)
Creates the RG object.
 
destroy(self)
Destroys the RG object.
 
getComplement(self)
Returns the flag indicating whether the region is complemented or not.
 
getEllipseParameters(self)
Gets the parameters that define the ellipse region.
 
getIntervalEndpoints(self)
Gets the parameters that define the interval region.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all RG options in the database.
 
getType(self)
Gets the RG type of this object.
 
isTrivial(self)
Tells whether it is the trivial region (whole complex plane).
 
setComplement(self, comp)
Sets a flag to indicate that the region is the complement of the specified one.
 
setEllipseParameters(self, center, radius, vscale)
Sets the parameters defining the ellipse region.
 
setFromOptions(self)
Sets RG options from the options database.
 
setIntervalEndpoints(self, a, b, c, d)
Sets the parameters defining the interval region.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all RG options in the database.
 
setType(self, rg_type)
Selects the type for the RG object.
 
view(self, Viewer viewer=None)
Prints the RG data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

create(self, comm=None)

 

Creates the RG object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the RG object.
Overrides: petsc4py.PETSc.Object.destroy

getComplement(self)

 

Returns the flag indicating whether the region is complemented or not.

Returns

flg: bool
Whether the region is complemented or not.

getEllipseParameters(self)

 

Gets the parameters that define the ellipse region.

Returns

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float
The vertical scale.

getIntervalEndpoints(self)

 

Gets the parameters that define the interval region.

Returns

a: float
The left endpoint in the real axis.
b: float
The right endpoint in the real axis.
c: float
The upper endpoint in the imaginary axis.
d: float
The lower endpoint in the imaginary axis.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all RG options in the database.

Returns

prefix: string
The prefix string set for this RG object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getType(self)

 

Gets the RG type of this object.

Returns

type: RG.Type enumerate
The inner product type currently being used.
Overrides: petsc4py.PETSc.Object.getType

isTrivial(self)

 

Tells whether it is the trivial region (whole complex plane).

Returns

flag: boolean
True if the region is equal to the whole complex plane, e.g., an interval region with all four endpoints unbounded or an ellipse with infinite radius.

setComplement(self, comp)

 

Sets a flag to indicate that the region is the complement of the specified one.

Parameters

comp: bool
Activate/deactivate the complementation of the region.

setEllipseParameters(self, center, radius, vscale)

 

Sets the parameters defining the ellipse region.

Parameters

center: float (real or complex)
The center.
radius: float
The radius.
vscale: float
The vertical scale.

setFromOptions(self)

 

Sets RG options from the options database.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setIntervalEndpoints(self, a, b, c, d)

 

Sets the parameters defining the interval region.

Parameters

a: float
The left endpoint in the real axis.
b: float
The right endpoint in the real axis.
c: float
The upper endpoint in the imaginary axis.
d: float
The lower endpoint in the imaginary axis.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all RG options in the database.

Parameters

prefix: string
The prefix string to prepend to all RG option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setType(self, rg_type)

 

Selects the type for the RG object.

Parameters

rg_type: RG.Type enumerate
The inner product type to be used.

view(self, Viewer viewer=None)

 

Prints the RG data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_refine_2.png0000644000175000001440000000161512720314523024541 0ustar dalcinlusers00000000000000PNG  IHDRG$'bKGDBIDATh_HSQ?V2, TmCTP K=@ bCEdփH0§2$P.]:8/=}s4M$qKv)G#LTf̖D7䨪bjjj䐀ak++sܺǒ$gi2W4Aq:'}&7dR)G%rs\jkjkyŔ3 ½o1&Ooܠ+^\XS@Zd"s%}t x6nN_`!rH9R)GLJGxY˴#IAw,Fw,DgϗZ_fz8 B FyG!IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_powershift.png0000644000175000001440000000350612720314521025241 0ustar dalcinlusers00000000000000PNG  IHDR}$+cMbKGDIDAThyPWY`0`Qa4#(V,#vb” V;hQc R9F rLA kQ1}}v pDPpP(L ԭܼ ǐK.aVk*`B&/Rդ3DRZ] 2 jgpaz\ܹ_=$,]=ྫU|'XYadGGQW?֦ͼ?/`JjE"Z`eCұRۅ 3DUm򒓭--&qww}=۶@{g\.7%@Put &hO}}b]A@*owvXQ}PPBZwt 4ZT|<)NN90(F'$Lwq1d2Rt((/7(D"%gd`-iZZZ:{7%ƙ%uH]Dx^"^Z[֍+V2vn,- 7,@*@֍s(+ Prz|~vbbnISޣy軕$GGU^AB^ޏ11s(١-[rr FP8( [׮WSKPQbgG8Nge%eB&Sxy7oMEF ŋ))N֩s==bJ6l%V2S#U$+W{yaKUGv035S߇GQq|Ξgb2$&R(<qk+m|vŃEBasH(TTx.]={ dZ?{6eXt*N xLBBh|ʒvq`{bLM_K5K#g4ӧM@O,ICeeEwx:9izz5ي*EUⲳgѸ&(^M $RQ\@e~~=UF><44]Gh76ޯݓfHȠSZt//42idj+'1-[+שC$yy׉ŷލ_ᡂ'8Y[KeC'NRo*J,cc<2 vuysfm ptD{A^gX/v=rwRҳs\.[+y{+>΋~K$ubqh5lZk[[,8Dv͚hNy燳M{Qѐԩ?3׻z}W]= \-{7ʈ[Z; r\,jn/U_C{cg]=ྫ5IENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_problemtyp.png0000644000175000001440000000266312720314521025247 0ustar dalcinlusers00000000000000PNG  IHDRm$ #bKGDhIDATh{LSWVJEuEٜvBjQ8Wc$X|ࠐFNd.1$D0e3-"F۲?NrwA!\p{z!70M|$G"@>3u|0\rΎX,Mmml6AwZ(#ctM5++o+#ԁL@HHI(d5t:@`Mz.UT۽Gl޳XC}~@[GGJv攔 Uf%UUҲzΓ)Fs纹CbqWoTmV1aR5p~cL&tVk[wvvwoMMuY- _X^#2EoS5AA@Ef[ hdId$S$:RV%8 99cڭR%>=}}V!RXZS ܭR y3ZF{{{{tI~~PD~{ߥ ܨW?:hJJ*rsZyyi3 .^Pn.6۳G[UUcqgv~=M!!7of(f([TT}5+[41Z> W#.USryLhÌ**~ڿߛsG ]CN+\Kd7Ӟ/-U8rUryE]-/>ޑ&"M޾X^/N$'s9|~LTVzlzu{Sl(Sގ\5|,h}8yK{H4{6jxX`og7=t {u2J=p.DFk=68ΟOǰg7xp"M$CH@HYgn76F<GnpY,Ѩ3'KNCb#Kv]Ha3:C@HA[|aQIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.PEP.RefineScheme-class.html0000644000175000001440000002200012720314523025660 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.PEP.RefineScheme
Package slepc4py :: Module SLEPc :: Class PEP :: Class RefineScheme
[hide private]
[frames] | no frames]

Class RefineScheme


Scheme for solving linear systems during iterative refinement

  • SCHUR: Schur complement.
  • MBE: Mixed block elimination.
  • EXPLICIT: Build the explicit matrix.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  EXPLICIT = 3
  MBE = 2
  SCHUR = 1
  __qualname__ = 'PEPRefineScheme'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.ST.Type-class.html0000644000175000001440000002417412720314524024165 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.ST.Type
Package slepc4py :: Module SLEPc :: Class ST :: Class Type
[hide private]
[frames] | no frames]

Class Type


ST types

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CAYLEY = 'cayley'
  PRECOND = 'precond'
  SHELL = 'shell'
  SHIFT = 'shift'
  SINVERT = 'sinvert'
  __qualname__ = 'STType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS-class.html0000644000175000001440000047565412720314521023360 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS
Package slepc4py :: Module SLEPc :: Class EPS
[hide private]
[frames] | no frames]

Class EPS


EPS
Nested Classes [hide private]
  Balance
EPS type of balancing used for non-Hermitian problems
  Conv
EPS convergence test
  ConvergedReason
EPS convergence reasons
  ErrorType
EPS error type to assess accuracy of computed solutions
  Extraction
EPS extraction technique
  LanczosReorthogType
EPS Lanczos reorthogonalization type
  PowerShiftType
EPS Power shift type.
  ProblemType
EPS problem type
  Type
EPS type
  Which
EPS desired piece of spectrum
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
appendOptionsPrefix(self, prefix)
Appends to the prefix used for searching for all EPS options in the database.
 
cancelMonitor(self)
Clears all monitors for an EPS object.
 
computeError(self, int i, etype=None)
Computes the error (based on the residual norm) associated with the i-th computed eigenpair.
 
create(self, comm=None)
Creates the EPS object.
 
destroy(self)
Destroys the EPS object.
 
errorView(self, etype=None, Viewer viewer=None)
Displays the errors associated with the computed solution (as well as the eigenvalues).
 
getArnoldiDelayed(self)
Gets the type of reorthogonalization used during the Arnoldi iteration.
 
getBV(self)
Obtain the basis vector objects associated to the eigensolver.
 
getBalance(self)
Gets the balancing type used by the EPS object, and the associated parameters.
 
getConverged(self)
Gets the number of converged eigenpairs.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
getConvergenceTest(self)
Return the method used to compute the error estimate used in the convergence test.
 
getDS(self)
Obtain the direct solver associated to the eigensolver.
 
getDimensions(self)
Gets the number of eigenvalues to compute and the dimension of the subspace.
 
getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)
Gets the i-th solution of the eigenproblem as computed by solve().
 
getEigenvalue(self, int i)
Gets the i-th eigenvalue as computed by solve().
 
getEigenvector(self, int i, Vec Vr, Vec Vi=None)
Gets the i-th eigenvector as computed by solve().
 
getErrorEstimate(self, int i)
Returns the error estimate associated to the i-th computed eigenpair.
 
getExtraction(self)
Gets the extraction type used by the EPS object.
 
getInterval(self)
Gets the computational interval for spectrum slicing.
 
getInvariantSubspace(self)
Gets an orthonormal basis of the computed invariant subspace.
 
getIterationNumber(self)
Gets the current iteration number.
 
getKrylovSchurDetectZeros(self)
Gets the flag that enforces zero detection in spectrum slicing.
 
getKrylovSchurDimensions(self)
Gets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.
 
getKrylovSchurLocking(self)
Gets the locking flag used in the Krylov-Schur method.
 
getKrylovSchurPartitions(self)
Gets the number of partitions of the communicator in case of spectrum slicing.
 
getKrylovSchurRestart(self)
Gets the restart parameter used in the Krylov-Schur method.
 
getKrylovSchurSubcommInfo(self)
Gets information related to the case of doing spectrum slicing for a computational interval with multiple communicators.
 
getKrylovSchurSubcommMats(self)
Gets the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.
 
getKrylovSchurSubcommPairs(self, int i, Vec V)
Gets the i-th eigenpair stored internally in the multi-communicator to which the calling process belongs.
 
getLanczosReorthogType(self)
Gets the type of reorthogonalization used during the Lanczos iteration.
 
getOperators(self)
Gets the matrices associated with the eigenvalue problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all EPS options in the database.
 
getPowerShiftType(self)
Gets the type of shifts used during the power iteration.
 
getProblemType(self)
Gets the problem type from the EPS object.
 
getRG(self)
Obtain the region object associated to the eigensolver.
 
getRQCGReset(self)
Gets the reset parameter used in the RQCG method.
 
getST(self)
Obtain the spectral transformation (ST) object associated to the eigensolver object.
 
getTarget(self)
Gets the value of the target.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default EPS convergence tests.
 
getTrackAll(self)
Returns the flag indicating whether all residual norms must be computed or not.
 
getTrueResidual(self)
Returns the flag indicating whether true residual must be computed explicitly or not.
 
getType(self)
Gets the EPS type of this object.
 
getWhichEigenpairs(self)
Returns which portion of the spectrum is to be sought.
 
isGeneralized(self)
Tells whether the EPS object corresponds to a generalized eigenvalue problem.
 
isHermitian(self)
Tells whether the EPS object corresponds to a Hermitian eigenvalue problem.
 
isPositive(self)
Tells whether the EPS object corresponds to an eigenvalue problem type that requires a positive (semi-) definite matrix B.
 
reset(self)
Resets the EPS object.
 
setArnoldiDelayed(self, delayed)
Activates or deactivates delayed reorthogonalization in the Arnoldi iteration.
 
setBV(self, BV bv)
Associates a basis vectors object to the eigensolver.
 
setBalance(self, balance=None, iterations=None, cutoff=None)
Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it.
 
setConvergenceTest(self, conv)
Specifies how to compute the error estimate used in the convergence test.
 
setDS(self, DS ds)
Associates a direct solver object to the eigensolver.
 
setDeflationSpace(self, space)
Add vectors to the basis of the deflation space.
 
setDimensions(self, nev=None, ncv=None, mpd=None)
Sets the number of eigenvalues to compute and the dimension of the subspace.
 
setExtraction(self, extraction)
Sets the extraction type used by the EPS object.
 
setFromOptions(self)
Sets EPS options from the options database.
 
setInitialSpace(self, space)
Sets the initial space from which the eigensolver starts to iterate.
 
setInterval(self, inta, intb)
Defines the computational interval for spectrum slicing.
 
setKrylovSchurDetectZeros(self, detect)
Sets a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation.
 
setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None)
Sets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.
 
setKrylovSchurLocking(self, lock)
Choose between locking and non-locking variants of the Krylov-Schur method.
 
setKrylovSchurPartitions(self, npart)
Sets the number of partitions for the case of doing spectrum slicing for a computational interval with the communicator split in several sub-communicators.
 
setKrylovSchurRestart(self, keep)
Sets the restart parameter for the Krylov-Schur method, in particular the proportion of basis vectors that must be kept after restart.
 
setKrylovSchurSubintervals(self, subint)
Sets the subinterval boundaries for spectrum slicing with a computational interval.
 
setLanczosReorthogType(self, reorthog)
Sets the type of reorthogonalization used during the Lanczos iteration.
 
setOperators(self, Mat A, Mat B=None)
Sets the matrices associated with the eigenvalue problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all EPS options in the database.
 
setPowerShiftType(self, shift)
Sets the type of shifts used during the power iteration.
 
setProblemType(self, problem_type)
Specifies the type of the eigenvalue problem.
 
setRG(self, RG rg)
Associates a region object to the eigensolver.
 
setRQCGReset(self, nrest)
Sets the reset parameter of the RQCG iteration.
 
setST(self, ST st)
Associates a spectral transformation object to the eigensolver.
 
setTarget(self, target)
Sets the value of the target.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default EPS convergence tests.
 
setTrackAll(self, trackall)
Specifies if the solver must compute the residual of all approximate eigenpairs or not.
 
setTrueResidual(self, trueres)
Specifies if the solver must compute the true residual explicitly or not.
 
setType(self, eps_type)
Selects the particular solver to be used in the EPS object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the eigensolver.
 
setWhichEigenpairs(self, which)
Specifies which portion of the spectrum is to be sought.
 
solve(self)
Solves the eigensystem.
 
updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False)
Update the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.
 
view(self, Viewer viewer=None)
Prints the EPS data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  bv
  extraction
  max_it
  problem_type
  st
  target
  tol
  which

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

appendOptionsPrefix(self, prefix)

 

Appends to the prefix used for searching for all EPS options in the database.

Parameters

prefix: string
The prefix string to prepend to all EPS option requests.

computeError(self, int i, etype=None)

 

Computes the error (based on the residual norm) associated with the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.
etype: EPS.ErrorType enumerate
The error type to compute.

Returns

e: real
The error bound, computed in various ways from the residual norm ||Ax-kBx||_2 where k is the eigenvalue and x is the eigenvector.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()).

create(self, comm=None)

 

Creates the EPS object.

Parameters

comm: MPI_Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the EPS object.
Overrides: petsc4py.PETSc.Object.destroy

errorView(self, etype=None, Viewer viewer=None)

 

Displays the errors associated with the computed solution (as well as the eigenvalues).

Parameters

etype: EPS.ErrorType enumerate, optional
The error type to compute.
viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.

Notes

By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.

getArnoldiDelayed(self)

 

Gets the type of reorthogonalization used during the Arnoldi iteration.

Returns

delayed: boolean
True if delayed reorthogonalization is to be used.

getBV(self)

 

Obtain the basis vector objects associated to the eigensolver.

Returns

bv: BV
The basis vectors context.

getBalance(self)

 

Gets the balancing type used by the EPS object, and the associated parameters.

Returns

balance: EPS.Balance enumerate
The balancing method
iterations: integer
Number of iterations of the balancing algorithm
cutoff: real
Cutoff value

getConverged(self)

 

Gets the number of converged eigenpairs.

Returns

nconv: int
Number of converged eigenpairs.

Notes

This function should be called after solve() has finished.

getConvergedReason(self)

 

Gets the reason why the solve() iteration was stopped.

Returns

reason: EPS.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

getConvergenceTest(self)

 

Return the method used to compute the error estimate used in the convergence test.

Returns

conv: EPS.Conv
The method used to compute the error estimate used in the convergence test.

getDS(self)

 

Obtain the direct solver associated to the eigensolver.

Returns

ds: DS
The direct solver context.

getDimensions(self)

 

Gets the number of eigenvalues to compute and the dimension of the subspace.

Returns

nev: int
Number of eigenvalues to compute.
ncv: int
Maximum dimension of the subspace to be used by the solver.
mpd: int
Maximum dimension allowed for the projected problem.

getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)

 

Gets the i-th solution of the eigenproblem as computed by solve(). The solution consists of both the eigenvalue and the eigenvector.

Parameters

i: int
Index of the solution to be obtained.
Vr: Vec
Placeholder for the returned eigenvector (real part).
Vi: Vec
Placeholder for the returned eigenvector (imaginary part).

Returns

e: scalar (possibly complex)
The computed eigenvalue.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().

getEigenvalue(self, int i)

 

Gets the i-th eigenvalue as computed by solve().

Parameters

i: int
Index of the solution to be obtained.

Returns

e: scalar (possibly complex)
The computed eigenvalue.

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().

getEigenvector(self, int i, Vec Vr, Vec Vi=None)

 

Gets the i-th eigenvector as computed by solve().

Parameters

i: int
Index of the solution to be obtained.
Vr: Vec
Placeholder for the returned eigenvector (real part).
Vi: Vec, optional
Placeholder for the returned eigenvector (imaginary part).

Notes

The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().

getErrorEstimate(self, int i)

 

Returns the error estimate associated to the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.

Returns

e: real
Error estimate.

Notes

This is the error estimate used internally by the eigensolver. The actual error bound can be computed with computeError().

getExtraction(self)

 

Gets the extraction type used by the EPS object.

Returns

extraction: EPS.Extraction enumerate
The method of extraction.

getInterval(self)

 

Gets the computational interval for spectrum slicing.

Returns

inta: float
The left end of the interval.
intb: float
The right end of the interval.

Notes

If the interval was not set by the user, then zeros are returned.

getInvariantSubspace(self)

 

Gets an orthonormal basis of the computed invariant subspace.

Returns

subspace: list of Vec
Basis of the invariant subspace.

Notes

This function should be called after solve() has finished.

The returned vectors span an invariant subspace associated with the computed eigenvalues. An invariant subspace X of A` satisfies ``A x in X for all x in X (a similar definition applies for generalized eigenproblems).

getIterationNumber(self)

 

Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.

Returns

its: int
Iteration number.

getKrylovSchurDetectZeros(self)

 

Gets the flag that enforces zero detection in spectrum slicing.

Returns

detect: bool
The zero detection flag.

getKrylovSchurDimensions(self)

 

Gets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.

Returns

nev: int
Number of eigenvalues to compute.
ncv: int
Maximum dimension of the subspace to be used by the solver.
mpd: int
Maximum dimension allowed for the projected problem.

getKrylovSchurLocking(self)

 

Gets the locking flag used in the Krylov-Schur method.

Returns

lock: bool
The locking flag.

getKrylovSchurPartitions(self)

 

Gets the number of partitions of the communicator in case of spectrum slicing.

Returns

npart: int
The number of partitions.

getKrylovSchurRestart(self)

 

Gets the restart parameter used in the Krylov-Schur method.

Returns

keep: float
The number of vectors to be kept at restart.

getKrylovSchurSubcommInfo(self)

 

Gets information related to the case of doing spectrum slicing for a computational interval with multiple communicators.

Returns

k: int
Number of the subinterval for the calling process.
n: int
Number of eigenvalues found in the k-th subinterval.
v: Vec
A vector owned by processes in the subcommunicator with dimensions compatible for locally computed eigenvectors.

Notes

This function is only available for spectrum slicing runs.

The returned Vec should be destroyed by the user.

getKrylovSchurSubcommMats(self)

 

Gets the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.

Returns

A: Mat
The matrix associated with the eigensystem.
B: Mat
The second matrix in the case of generalized eigenproblems.

Notes

This is the analog of getOperators(), but returns the matrices distributed differently (in the subcommunicator rather than in the parent communicator).

These matrices should not be modified by the user.

getKrylovSchurSubcommPairs(self, int i, Vec V)

 

Gets the i-th eigenpair stored internally in the multi-communicator to which the calling process belongs.

Parameters

i: int
Index of the solution to be obtained.
V: Vec
Placeholder for the returned eigenvector.

Returns

e: scalar
The computed eigenvalue.

Notes

The index i should be a value between 0 and n-1, where n is the number of vectors in the local subinterval, see getKrylovSchurSubcommInfo().

getLanczosReorthogType(self)

 

Gets the type of reorthogonalization used during the Lanczos iteration.

Returns

reorthog: EPS.LanczosReorthogType enumerate
The type of reorthogonalization.

getOperators(self)

 

Gets the matrices associated with the eigenvalue problem.

Returns

A: Mat
The matrix associated with the eigensystem.
B: Mat
The second matrix in the case of generalized eigenproblems.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all EPS options in the database.

Returns

prefix: string
The prefix string set for this EPS object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getPowerShiftType(self)

 

Gets the type of shifts used during the power iteration.

Returns

shift: EPS.PowerShiftType enumerate
The type of shift.

getProblemType(self)

 

Gets the problem type from the EPS object.

Returns

problem_type: EPS.ProblemType enumerate
The problem type that was previously set.

getRG(self)

 

Obtain the region object associated to the eigensolver.

Returns

rg: RG
The region context.

getRQCGReset(self)

 

Gets the reset parameter used in the RQCG method.

Returns

nrest: integer
The number of iterations between resets.

getST(self)

 

Obtain the spectral transformation (ST) object associated to the eigensolver object.

Returns

st: ST
The spectral transformation.

getTarget(self)

 

Gets the value of the target.

Returns

target: float (real or complex)
The value of the target.

Notes

If the target was not set by the user, then zero is returned.

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default EPS convergence tests.

Returns

tol: float
The convergence tolerance.
max_it: int
The maximum number of iterations

getTrackAll(self)

 

Returns the flag indicating whether all residual norms must be computed or not.

Returns

trackall: bool
Whether the solver compute all residuals or not.

getTrueResidual(self)

 

Returns the flag indicating whether true residual must be computed explicitly or not.

Returns

trueres: bool
Whether the solver compute all residuals or not.

getType(self)

 

Gets the EPS type of this object.

Returns

type: EPS.Type enumerate
The solver currently being used.
Overrides: petsc4py.PETSc.Object.getType

getWhichEigenpairs(self)

 

Returns which portion of the spectrum is to be sought.

Returns

which: EPS.Which enumerate
The portion of the spectrum to be sought by the solver.

isGeneralized(self)

 

Tells whether the EPS object corresponds to a generalized eigenvalue problem.

Returns

flag: boolean
True if two matrices were set with setOperators().

isHermitian(self)

 

Tells whether the EPS object corresponds to a Hermitian eigenvalue problem.

Returns

flag: boolean
True if the problem type set with setProblemType() was Hermitian.

isPositive(self)

 

Tells whether the EPS object corresponds to an eigenvalue problem type that requires a positive (semi-) definite matrix B.

Returns

flag: boolean
True if the problem type set with setProblemType() was positive.

setArnoldiDelayed(self, delayed)

 

Activates or deactivates delayed reorthogonalization in the Arnoldi iteration.

Parameters

delayed: boolean
True if delayed reorthogonalization is to be used.

Notes

This call is only relevant if the type was set to EPS.Type.ARNOLDI with setType().

Delayed reorthogonalization is an aggressive optimization for the Arnoldi eigensolver than may provide better scalability, but sometimes makes the solver converge less than the default algorithm.

setBV(self, BV bv)

 

Associates a basis vectors object to the eigensolver.

Parameters

bv: BV
The basis vectors context.

setBalance(self, balance=None, iterations=None, cutoff=None)

 

Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it.

Parameters

balance: EPS.Balance enumerate
The balancing method
iterations: integer
Number of iterations of the balancing algorithm
cutoff: real
Cutoff value

setConvergenceTest(self, conv)

 

Specifies how to compute the error estimate used in the convergence test.

Parameters

conv: EPS.Conv
The method used to compute the error estimate used in the convergence test.

setDS(self, DS ds)

 

Associates a direct solver object to the eigensolver.

Parameters

ds: DS
The direct solver context.

setDeflationSpace(self, space)

 

Add vectors to the basis of the deflation space.

Parameters

space: a Vec or an array of Vec
Set of basis vectors to be added to the deflation space.

Notes

When a deflation space is given, the eigensolver seeks the eigensolution in the restriction of the problem to the orthogonal complement of this space. This can be used for instance in the case that an invariant subspace is known beforehand (such as the nullspace of the matrix).

The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally.

These vectors do not persist from one solve() call to the other, so the deflation space should be set every time.

setDimensions(self, nev=None, ncv=None, mpd=None)

 

Sets the number of eigenvalues to compute and the dimension of the subspace.

Parameters

nev: int, optional
Number of eigenvalues to compute.
ncv: int, optional
Maximum dimension of the subspace to be used by the solver.
mpd: int, optional
Maximum dimension allowed for the projected problem.

Notes

Use DECIDE for ncv and mpd to assign a reasonably good value, which is dependent on the solution method.

The parameters ncv and mpd are intimately related, so that the user is advised to set one of them at most. Normal usage is the following:

  • In cases where nev is small, the user sets ncv (a reasonable default is 2 * nev).
  • In cases where nev is large, the user sets mpd.

The value of ncv should always be between nev and (nev + mpd), typically ncv = nev + mpd. If nev is not too large, mpd = nev is a reasonable choice, otherwise a smaller value should be used.

setExtraction(self, extraction)

 

Sets the extraction type used by the EPS object.

Parameters

extraction: EPS.Extraction enumerate
The extraction method to be used by the solver.

Notes

Not all eigensolvers support all types of extraction. See the SLEPc documentation for details.

By default, a standard Rayleigh-Ritz extraction is used. Other extractions may be useful when computing interior eigenvalues.

Harmonic-type extractions are used in combination with a target. See setTarget().

setFromOptions(self)

 

Sets EPS options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setInitialSpace(self, space)

 

Sets the initial space from which the eigensolver starts to iterate.

Parameters

space: Vec or sequence of Vec
The initial space

Notes

Some solvers start to iterate on a single vector (initial vector). In that case, the other vectors are ignored.

In contrast to setDeflationSpace(), these vectors do not persist from one solve() call to the other, so the initial space should be set every time.

The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally.

Common usage of this function is when the user can provide a rough approximation of the wanted eigenspace. Then, convergence may be faster.

setInterval(self, inta, intb)

 

Defines the computational interval for spectrum slicing.

Parameters

inta: float
The left end of the interval.
intb: float
The right end of the interval.

Notes

Spectrum slicing is a technique employed for computing all eigenvalues of symmetric eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with EPS.Which.ALL, see setWhichEigenpairs().

setKrylovSchurDetectZeros(self, detect)

 

Sets a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation.

Parameters

detect: bool
True if zeros must checked for.

Notes

A zero in the factorization indicates that a shift coincides with an eigenvalue.

This flag is turned off by default, and may be necessary in some cases, especially when several partitions are being used. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS.

setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None)

 

Sets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. The meaning of the parameters is the same as in setDimensions().

Parameters

nev: int, optional
Number of eigenvalues to compute.
ncv: int, optional
Maximum dimension of the subspace to be used by the solver.
mpd: int, optional
Maximum dimension allowed for the projected problem.

setKrylovSchurLocking(self, lock)

 

Choose between locking and non-locking variants of the Krylov-Schur method.

Parameters

lock: bool
True if the locking variant must be selected.

Notes

The default is to lock converged eigenpairs when the method restarts. This behaviour can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).

setKrylovSchurPartitions(self, npart)

 

Sets the number of partitions for the case of doing spectrum slicing for a computational interval with the communicator split in several sub-communicators.

Parameters

npart: int
The number of partitions.

Notes

By default, npart=1 so all processes in the communicator participate in the processing of the whole interval. If npart>1 then the interval is divided into npart subintervals, each of them being processed by a subset of processes.

setKrylovSchurRestart(self, keep)

 

Sets the restart parameter for the Krylov-Schur method, in particular the proportion of basis vectors that must be kept after restart.

Parameters

keep: float
The number of vectors to be kept at restart.

Notes

Allowed values are in the range [0.1,0.9]. The default is 0.5.

setKrylovSchurSubintervals(self, subint)

 

Sets the subinterval boundaries for spectrum slicing with a computational interval.

Parameters

subint: list of real values specifying subintervals

Notes

Logically Collective on EPS This function must be called after setKrylovSchurPartitions(). For npart partitions, the argument subint must contain npart+1 real values sorted in ascending order: subint_0, subint_1, ..., subint_npart, where the first and last values must coincide with the interval endpoints set with EPSSetInterval(). The subintervals are then defined by two consecutive points: [subint_0,subint_1], [subint_1,subint_2], and so on.

setLanczosReorthogType(self, reorthog)

 

Sets the type of reorthogonalization used during the Lanczos iteration.

Parameters

reorthog: EPS.LanczosReorthogType enumerate
The type of reorthogonalization.

Notes

This call is only relevant if the type was set to EPS.Type.LANCZOS with setType().

setOperators(self, Mat A, Mat B=None)

 

Sets the matrices associated with the eigenvalue problem.

Parameters

A: Mat
The matrix associated with the eigensystem.
B: Mat, optional
The second matrix in the case of generalized eigenproblems; if not provided, a standard eigenproblem is assumed.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all EPS options in the database.

Parameters

prefix: string
The prefix string to prepend to all EPS option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

For example, to distinguish between the runtime options for two different EPS contexts, one could call:

E1.setOptionsPrefix("eig1_")
E2.setOptionsPrefix("eig2_")
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setPowerShiftType(self, shift)

 

Sets the type of shifts used during the power iteration. This can be used to emulate the Rayleigh Quotient Iteration (RQI) method.

Parameters

shift: EPS.PowerShiftType enumerate
The type of shift.

Notes

This call is only relevant if the type was set to EPS.Type.POWER with setType().

By default, shifts are constant (EPS.PowerShiftType.CONSTANT) and the iteration is the simple power method (or inverse iteration if a shift-and-invert transformation is being used).

A variable shift can be specified (EPS.PowerShiftType.RAYLEIGH or EPS.PowerShiftType.WILKINSON). In this case, the iteration behaves rather like a cubic converging method as RQI.

setProblemType(self, problem_type)

 

Specifies the type of the eigenvalue problem.

Parameters

problem_type: EPS.ProblemType enumerate
The problem type to be set.

Notes

Allowed values are: Hermitian (HEP), non-Hermitian (NHEP), generalized Hermitian (GHEP), generalized non-Hermitian (GNHEP), and generalized non-Hermitian with positive semi-definite B (PGNHEP).

This function must be used to instruct SLEPc to exploit symmetry. If no problem type is specified, by default a non-Hermitian problem is assumed (either standard or generalized). If the user knows that the problem is Hermitian (i.e. A=A^H) or generalized Hermitian (i.e. A=A^H, B=B^H, and B positive definite) then it is recommended to set the problem type so that eigensolver can exploit these properties.

setRG(self, RG rg)

 

Associates a region object to the eigensolver.

Parameters

rg: RG
The region context.

setRQCGReset(self, nrest)

 

Sets the reset parameter of the RQCG iteration. Every nrest iterations, the solver performs a Rayleigh-Ritz projection step.

Parameters

nrest: integer
The number of iterations between resets.

setST(self, ST st)

 

Associates a spectral transformation object to the eigensolver.

Parameters

st: ST
The spectral transformation.

setTarget(self, target)

 

Sets the value of the target.

Parameters

target: float (real or complex)
The value of the target.

Notes

The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with setWhichEigenpairs().

setTolerances(self, tol=None, max_it=None)

 

Sets the tolerance and maximum iteration count used by the default EPS convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
max_it: int, optional
The maximum number of iterations

Notes

Use DECIDE for maxits to assign a reasonably good value, which is dependent on the solution method.

setTrackAll(self, trackall)

 

Specifies if the solver must compute the residual of all approximate eigenpairs or not.

Parameters

trackall: bool
Whether compute all residuals or not.

setTrueResidual(self, trueres)

 

Specifies if the solver must compute the true residual explicitly or not.

Parameters

trueres: bool
Whether compute the true residual or not.

setType(self, eps_type)

 

Selects the particular solver to be used in the EPS object.

Parameters

eps_type: EPS.Type enumerate
The solver to be used.

Notes

See EPS.Type for available methods. The default is EPS.Type.KRYLOVSCHUR. Normally, it is best to use setFromOptions() and then set the EPS type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.

setUp(self)

 

Sets up all the internal data structures necessary for the execution of the eigensolver.

Notes

This function need not be called explicitly in most cases, since solve() calls it. It can be useful when one wants to measure the set-up time separately from the solve time.

setWhichEigenpairs(self, which)

 

Specifies which portion of the spectrum is to be sought.

Parameters

which: EPS.Which enumerate
The portion of the spectrum to be sought by the solver.

Notes

Not all eigensolvers implemented in EPS account for all the possible values. Also, some values make sense only for certain types of problems. If SLEPc is compiled for real numbers EPS.Which.LARGEST_IMAGINARY and EPS.Which.SMALLEST_IMAGINARY use the absolute value of the imaginary part for eigenvalue selection.

updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False)

 

Update the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.

Parameters

s: float (real or complex)
Scalar that multiplies the existing A matrix.
a: float (real or complex)
Scalar used in the axpy operation on A.
Au: Mat, optional
The matrix used in the axpy operation on A.
t: float (real or complex)
Scalar that multiplies the existing B matrix.
b: float (real or complex)
Scalar used in the axpy operation on B.
Bu: Mat, optional
The matrix used in the axpy operation on B.
structure: PETSc.Mat.Structure enumerate
Either same, different, or a subset of the non-zero sparsity pattern.
globalup: bool
Whether global matrices must be updated or not.

Notes

This function modifies the eigenproblem matrices at subcommunicator level, and optionally updates the global matrices in the parent communicator. The updates are expressed as A <-- s*A + a*Au, B <-- t*B + b*Bu.

It is possible to update one of the matrices, or both.

The matrices Au and Bu must be equal in all subcommunicators.

The str flag is passed to the Mat.axpy() operations to perform the updates.

If globalup is True, communication is carried out to reconstruct the updated matrices in the parent communicator.

view(self, Viewer viewer=None)

 

Prints the EPS data structure.

Parameters

viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_statetype.png0000644000175000001440000000257712720314520025077 0ustar dalcinlusers00000000000000PNG  IHDR]$d>bKGD4IDATh{LSwO ԁ+PkeuʠQWH2h@ڤEP"$kI:|f Ak -tRBq҇Dy?~{鷿ibF#X]V).Auь<  $IRxN,^>$  -d ն(&& ^7X}ivZiں.2.AuBMɓnTOvR77-7W}g箊 K-hshrDP¬z4>`]k+ 3>M$R4]"!`œ'úl.7lFd%c0ϣ%EnsZmfYvGlV;#Z{z>A` 937r? P|}MD k Zw,VVYم˗G:~|WBAVϻpsZ5wt:W )C 'D";yFD,GNbۿ{R(ܝhX[8_NL ?JKrcjc(d {[w$2,55WbbB~|[PݝfL"$ubwi!$%1K*(H:H3d2Wy뺺Gcc窫\NܱxöuueX,@ovThnog-OCwDfg禦~i2"=e\K>Xdٰ(^T렺X:VLctbARUj}=shߵuP]W?'IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.FN-class.html0000644000175000001440000010032512720314521023210 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.FN
Package slepc4py :: Module SLEPc :: Class FN
[hide private]
[frames] | no frames]

Class FN


FN
Nested Classes [hide private]
  CombineType
FN type of combination of child functions
  Type
FN type
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
create(self, comm=None)
Creates the FN object.
 
destroy(self)
Destroys the FN object.
 
evaluateDerivative(self, x)
Computes the value of the derivative f'(x) for a given x.
 
evaluateFunction(self, x)
Computes the value of the function f(x) for a given x.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all FN options in the database.
 
getScale(self)
Gets the scaling parameters that define the matematical function.
 
getType(self)
Gets the FN type of this object.
 
setFromOptions(self)
Sets FN options from the options database.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all FN options in the database.
 
setRationalDenominator(self, alpha)
Sets the coefficients of the denominator of the rational function.
 
setRationalNumerator(self, alpha)
Sets the coefficients of the numerator of the rational function.
 
setScale(self, alpha=None, beta=None)
Sets the scaling parameters that define the matematical function.
 
setType(self, fn_type)
Selects the type for the FN object.
 
view(self, Viewer viewer=None)
Prints the FN data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

create(self, comm=None)

 

Creates the FN object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the FN object.
Overrides: petsc4py.PETSc.Object.destroy

evaluateDerivative(self, x)

 

Computes the value of the derivative f'(x) for a given x.

Parameters

x: scalar
Value where the derivative must be evaluated.

Returns

y: scalar
The result of f'(x).

evaluateFunction(self, x)

 

Computes the value of the function f(x) for a given x.

Parameters

x: scalar
Value where the function must be evaluated.

Returns

y: scalar
The result of f(x).

getOptionsPrefix(self)

 

Gets the prefix used for searching for all FN options in the database.

Returns

prefix: string
The prefix string set for this FN object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getScale(self)

 

Gets the scaling parameters that define the matematical function.

Returns

alpha: scalar (possibly complex)
inner scaling (argument).
beta: scalar (possibly complex)
outer scaling (result).

getType(self)

 

Gets the FN type of this object.

Returns

type: FN.Type enumerate
The inner product type currently being used.
Overrides: petsc4py.PETSc.Object.getType

setFromOptions(self)

 

Sets FN options from the options database.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all FN options in the database.

Parameters

prefix: string
The prefix string to prepend to all FN option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setRationalDenominator(self, alpha)

 

Sets the coefficients of the denominator of the rational function.

Parameters

alpha: array of scalars
Coefficients.

setRationalNumerator(self, alpha)

 

Sets the coefficients of the numerator of the rational function.

Parameters

alpha: array of scalars
Coefficients.

setScale(self, alpha=None, beta=None)

 

Sets the scaling parameters that define the matematical function.

Parameters

alpha: scalar (possibly complex)
inner scaling (argument).
beta: scalar (possibly complex)
outer scaling (result).

setType(self, fn_type)

 

Selects the type for the FN object.

Parameters

fn_type: FN.Type enumerate
The inner product type to be used.

view(self, Viewer viewer=None)

 

Prints the FN data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_convergedr_2.png0000644000175000001440000000372512720314522025432 0ustar dalcinlusers00000000000000PNG  IHDR$;/.bKGDIDAThPSWo !i*.HR ̪T@bpM,hFMĠ`ݬdG_ UKLi~Eax5ؚ2>?;ysyYX^D'Lc޽(j#B///T KNZBҠ;t:HÚ5]"F}kV ³۹H3D'Ded72yY@׮ܰ^:=}}(??￑Ŏ1EQb=]ỏ҃h+)bPJOJZs~^A xХtt4K #^jlD@8r+;)տ٣oP?N r =|F@DEx-g(l,E35ei8;lNOC%͛-o QQ7n f2뚛jf5e ^$FݻsA0,[]kn^OW|ttgmSZ*uuFnFtdM߸ w%v|zzpGy󯴵eC^^Rg)*8W84sʾUQqOutr*)pJ;w.RdfB^yYA}1&Hn.RP&TA샳gl݊oq򏉉o<:t(9/O&+j*GP_)wL zj+$%;;LeD"+NfDFƞ<4PܺFd$P|٣G]5lvCk+gaa^pH$M*z |'*8x%500=!ҏF&IU[D'.qVVwYI 8:SZNPpXlWwLXl/wKZ6=֩SM.)3:3d_?< OOp~F_wڦo +CBk}}{} Z_-k..dbv6m ~􈙚:R_syo$ƒeLY"KJHe"vz9YZX @~z!n2stu򖖯JK!;o=|; ==qX nO8je0nWV@5N'kn-!aL0*wc1Mnر;w$'**N<遪|ȟ<R(q;$=twXODQZGߋ luJ\qC:2 shg7TNT=]355Za0jWXW*Q/j1 3*wc1E'{[ۯ++5Z-/|LĦMPd'{ ѡ$7Cݲehdd^IL:/ 6[߅E%=""2>M+n..q8;{m\>g _}un8uvb➔o i7bXɓ{Ҫ kTƂ/_d뚛]uO8ܹos掰T*d4=IwRRnwu&'H۱cZL߁, I11I #WPܹA-f2->>->~Yh̬߂d :Nvf ‚,,,t:]T'.TTbiiQK#D' slepc4py.SLEPc.SVD.ErrorType
Package slepc4py :: Module SLEPc :: Class SVD :: Class ErrorType
[hide private]
[frames] | no frames]

Class ErrorType


SVD error type to assess accuracy of computed solutions

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABSOLUTE = 0
  RELATIVE = 1
  __qualname__ = 'SVDErrorType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.ST.MatMode-class.html0000644000175000001440000002176512720314524024575 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.ST.MatMode
Package slepc4py :: Module SLEPc :: Class ST :: Class MatMode
[hide private]
[frames] | no frames]

Class MatMode


ST matrix mode

  • COPY: A working copy of the matrix is created.
  • INPLACE: The operation is computed in-place.
  • SHELL: The matrix A-sigma*B is handled as an implicit matrix.
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  COPY = 0
  INPLACE = 1
  SHELL = 2
  __qualname__ = 'STMatMode'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_which_4.png0000644000175000001440000000162012720314524024372 0ustar dalcinlusers00000000000000PNG  IHDRE$PG`bKGDEIDATX]HSqϽ$M4t1~ 㢛[m>Y~A "$Q ON|33$Rjłd K}۵\=s?vGl6xI7p|<AN#HLLiSტvT*NjWVHa:"-E{./j`Nx6.Ե\&hѩ)@0̸g1L9rWqG.i7f6hPUk4lHR4wu?s9#iv6ZmEq1磡kCC=q'",,Y,f_:]LD͒wr33$_\|>'x0b r_e $RAzyk\Tʭ|36incm?SU*,,v~aܮ ?׹rpa]]jBBJ||oK˅=K`?>WWi!/+ |h(8(H* VF `?.,/'ƲbqXg>q,2<<).QwwzRRXH\P0ImZ --:83ȥW8E"Hv|8zQqhֶvpmP]rܭVKQQ a?auBqZF(--e|<gm>7M<ŕEVM4}\]oe;/>4^k6IENDB`slepc4py-3.7.0/docs/apiref/crarr.png0000644000175000001440000000052412720314517020071 0ustar dalcinlusers00000000000000PNG  IHDR eE,tEXtCreation TimeTue 22 Aug 2006 00:43:10 -0500` XtIME)} pHYsnu>gAMA aEPLTEðf4sW ЊrD`@bCܖX{`,lNo@xdE螊dƴ~TwvtRNS@fMIDATxc`@0&+(;; /EXؑ? n  b;'+Y#(r<"IENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.EPS.Conv-class.html0000644000175000001440000002211312720314521024236 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.EPS.Conv
Package slepc4py :: Module SLEPc :: Class EPS :: Class Conv
[hide private]
[frames] | no frames]

Class Conv


EPS convergence test

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ABS = 0
  NORM = 2
  REL = 1
  USER = 3
  __qualname__ = 'EPSConv'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_bv.png0000644000175000001440000000600612720314520023453 0ustar dalcinlusers00000000000000PNG  IHDR[dGbKGD IDATx}LSoERY #/sR/DPܮs]"nn`ܛ%7q7ssK&LFĄl`2-4sJqHZZ/s T~$99ߞ>="#"c]Z&-XVǎCoo/aܹs㸒>|˨X֮]Qr9l6_T`L8Z&- C;D2a ʕ+q_tmt:L&rss1}t ..Zîl6CFpp0Ν_z,޿, W<AAAh4(..֕`ƌ/nOsqNiEK.&jK;w$"ȠK.Qcc#͞=o3L4~xOGcǎ%DRz=͟?rss~w@gj0!"bRTdt:NjnnUVQRRmO$JEǏ'ZM"?Xg4 """ZҨ)..o.oL=ρkmllth#66fΜImmm}UUUґ?F#v^ri3gH[ZZhʔ)t̙[rZwl6j""Z|9޽c?EZhtyqsfV]vѬYϏJJJ gɓP(܎SYYM>]W_?=ρX,ҺDD$]`HHێOzj :vԆ^w Ҟ={3ZjZ+B*Ӹq㨵c?l]M&8paiߦɓ'cNdd$UUUo޽>89P]nN`0H?755!** P(`0@ 0j.X,8t:::qF<@TTZZZmu:{=@}}=rrr`@bb"v1hmoQVVdL2[1,DuAKd2ӥy@cO?]v\%0(((@FFy]t;l+?+ǏOqUl޽7t^ǜw^գ (8#H+Hz!lق"ؼy(txLH=+("???(OlBo)Byu5֤{v L2q;>_R4ttvi t"V=J'/F -M BQ~t{Rp0''s格vKv Gt:NVm6 m& Req(?q^@22wG~EJ  JEùsx*-͇Uxz0F#&ca_cjd$CCmrml),DڼyЎ륟njY8TX1c_-[Gt.ġ&醼ڞ L8Z&- C˄áe2uZ'D_gZ&Lu C"Jwi[^./oduOp8L8cuݎyIENDB`slepc4py-3.7.0/docs/apiref/slepc4py.SLEPc.ST-class.html0000644000175000001440000014424412720314524023246 0ustar dalcinlusers00000000000000 slepc4py.SLEPc.ST
Package slepc4py :: Module SLEPc :: Class ST
[hide private]
[frames] | no frames]

Class ST


ST
Nested Classes [hide private]
  MatMode
ST matrix mode
  Type
ST types
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(S, ...)
 
apply(self, Vec x, Vec y)
Applies the spectral transformation operator to a vector, for instance (A - sB)^-1 B in the case of the shift-and-invert tranformation and generalized eigenproblem.
 
applyTranspose(self, Vec x, Vec y)
Applies the transpose of the operator to a vector, for instance B^T(A - sB)^-T in the case of the shift-and-invert tranformation and generalized eigenproblem.
 
create(self, comm=None)
Creates the ST object.
 
destroy(self)
Destroys the ST object.
 
getKSP(self)
Gets the KSP object associated with the spectral transformation.
 
getMatMode(self)
Gets a flag that indicates how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.
 
getOperators(self)
Gets the matrices associated with the eigenvalue problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all ST options in the database.
 
getShift(self)
Gets the shift associated with the spectral transformation.
 
getTransform(self)
Gets the flag indicating whether the transformed matrices are computed or not.
 
getType(self)
Gets the ST type of this object.
 
reset(self)
Resets the ST object.
 
setCayleyAntishift(self, tau)
Sets the value of the anti-shift for the Cayley spectral transformation.
 
setFromOptions(self)
Sets ST options from the options database.
 
setKSP(self, KSP ksp)
Sets the KSP object associated with the spectral transformation.
 
setMatMode(self, mode)
Sets a flag to indicate how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.
 
setMatStructure(self, structure)
Sets an internal Mat.Structure attribute to indicate which is the relation of the sparsity pattern of the two matrices A and B constituting the generalized eigenvalue problem.
 
setOperators(self, operators)
Sets the matrices associated with the eigenvalue problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all ST options in the database.
 
setShift(self, shift)
Sets the shift associated with the spectral transformation.
 
setTransform(self, flag)
Sets a flag to indicate whether the transformed matrices are computed or not.
 
setType(self, st_type)
Builds ST for a particular spectral transformation.
 
setUp(self)
Prepares for the use of a spectral transformation.
 
view(self, Viewer viewer=None)
Prints the ST data structure.

Inherited from petsc4py.PETSc.Object: __copy__, __deepcopy__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, compose, decRef, getAttr, getClassId, getClassName, getComm, getDict, getName, getRefCount, getTabLevel, incRef, incrementTabLevel, query, setAttr, setName, setTabLevel, stateIncrease

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  ksp
  mat_mode
  shift

Inherited from petsc4py.PETSc.Object: classid, comm, fortran, handle, klass, name, prefix, refcount, type

Inherited from object: __class__

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

apply(self, Vec x, Vec y)

 

Applies the spectral transformation operator to a vector, for instance (A - sB)^-1 B in the case of the shift-and-invert tranformation and generalized eigenproblem.

Parameters

x: Vec
The input vector.
y: Vec
The result vector.

applyTranspose(self, Vec x, Vec y)

 

Applies the transpose of the operator to a vector, for instance B^T(A - sB)^-T in the case of the shift-and-invert tranformation and generalized eigenproblem.

Parameters

x: Vec
The input vector.
y: Vec
The result vector.

create(self, comm=None)

 

Creates the ST object.

Parameters

comm: Comm, optional
MPI communicator; if not provided, it defaults to all processes.

destroy(self)

 
Destroys the ST object.
Overrides: petsc4py.PETSc.Object.destroy

getKSP(self)

 

Gets the KSP object associated with the spectral transformation.

Returns

ksp: KSP
The linear solver object.

Notes

On output, the internal value of KSP can be NULL if the combination of eigenproblem type and selected transformation does not require to solve a linear system of equations.

getMatMode(self)

 

Gets a flag that indicates how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.

Returns

mode: ST.MatMode enumerate
The mode flag.

getOperators(self)

 

Gets the matrices associated with the eigenvalue problem.

Returns

operators: tuple of Mat
The matrices associated with the eigensystem.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all ST options in the database.

Returns

prefix: string
The prefix string set for this ST object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getShift(self)

 

Gets the shift associated with the spectral transformation.

Returns

shift: scalar (possibly complex)
The value of the shift.

getTransform(self)

 

Gets the flag indicating whether the transformed matrices are computed or not.

Returns

flag: boolean
This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem.

getType(self)

 

Gets the ST type of this object.

Returns

type: ST.Type enumerate
The spectral transformation currently being used.
Overrides: petsc4py.PETSc.Object.getType

setCayleyAntishift(self, tau)

 

Sets the value of the anti-shift for the Cayley spectral transformation.

Parameters

tau: scalar (possibly complex)
The anti-shift.

Notes

In the generalized Cayley transform, the operator can be expressed as OP = inv(A - sigma B)*(A + tau B). This function sets the value of tau. Use setShift() for setting sigma.

setFromOptions(self)

 

Sets ST options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.

Notes

To see all options, run your program with the -help option.

Overrides: petsc4py.PETSc.Object.setFromOptions

setKSP(self, KSP ksp)

 

Sets the KSP object associated with the spectral transformation.

Parameters

ksp: KSP
The linear solver object.

setMatMode(self, mode)

 

Sets a flag to indicate how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.

Parameters

mode: ST.MatMode enumerate
The mode flag.

Notes

By default (ST.MatMode.COPY), a copy of matrix A is made and then this copy is shifted explicitly, e.g. A <- (A - s B).

With ST.MatMode.INPLACE, the original matrix A is shifted at setUp() and unshifted at the end of the computations. With respect to the previous one, this mode avoids a copy of matrix A. However, a backdraw is that the recovered matrix might be slightly different from the original one (due to roundoff).

With ST.MatMode.SHELL, the solver works with an implicit shell matrix that represents the shifted matrix. This mode is the most efficient in creating the shifted matrix but it places serious limitations to the linear solves performed in each iteration of the eigensolver (typically, only interative solvers with Jacobi preconditioning can be used).

In the case of generalized problems, in the two first modes the matrix A - s B has to be computed explicitly. The efficiency of this computation can be controlled with setMatStructure().

setMatStructure(self, structure)

 

Sets an internal Mat.Structure attribute to indicate which is the relation of the sparsity pattern of the two matrices A and B constituting the generalized eigenvalue problem. This function has no effect in the case of standard eigenproblems.

Parameters

structure: PETSc.Mat.Structure enumerate
Either same, different, or a subset of the non-zero sparsity pattern.

Notes

By default, the sparsity patterns are assumed to be different. If the patterns are equal or a subset then it is recommended to set this attribute for efficiency reasons (in particular, for internal AXPY() matrix operations).

setOperators(self, operators)

 

Sets the matrices associated with the eigenvalue problem.

Parameters

operators: sequence of Mat
The matrices associated with the eigensystem.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all ST options in the database.

Parameters

prefix: string
The prefix string to prepend to all ST option requests.

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setShift(self, shift)

 

Sets the shift associated with the spectral transformation.

Parameters

shift: scalar (possibly complex)
The value of the shift.

Notes

In some spectral transformations, changing the shift may have associated a lot of work, for example recomputing a factorization.

setTransform(self, flag)

 

Sets a flag to indicate whether the transformed matrices are computed or not.

Parameters

flag: boolean
This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem.

setType(self, st_type)

 

Builds ST for a particular spectral transformation.

Parameters

st_type: ST.Type enumerate
The spectral transformation to be used.

Notes

See ST.Type for available methods. The default is ST.Type.SHIFT with a zero shift. Normally, it is best to use setFromOptions() and then set the ST type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.

view(self, Viewer viewer=None)

 

Prints the ST data structure.

Parameters

viewer: Viewer, optional
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view

slepc4py-3.7.0/docs/apiref/class_hierarchy_for_combinetyp.png0000644000175000001440000000307112720314521025215 0ustar dalcinlusers00000000000000PNG  IHDRq$1_BbKGDIDAThc?(*`h C0aJ $''322PSS{<Q”i4ْ ֮] Fd100JHXۆxK dTg~`KKG3;hR)aJOOKKӨQ;3#ر]y Qۏ }Wvurso?r$b VVTt/oyb"IZp38AX@# iMMCZJJ/޾Ya*" БONvvNvv/߿300HP=rڽ{󣣑E66B>Nqs+' 4E:[euԩpCnۦ#h`t6@!; )wrst,.uv&74@_}27?9:uv$cq/޼PP@⒓s۟zujSAL(-U3i]s'~~ >}b``q㔊 Y ]U΂Gr!++롳gmwOQnkn.ĩ \ _wJ_.xլփ22qY'^ARbb ,,hl8P0埿yf(ϞI<<n^=5='OάŴTCATȩ{-[tS-%%OHiGtUUn=|(/)&9#" YYXP7J-eeCCqqB$cr܃gVWxҭ[3fLZ57%=ӧWܩ2%ˋHc{{<~|ժɓrv4nʚr%ŶFFm93Y< ni7b䄩+~ZRbȑM'zBdTVJFEedYZV&%ilr`kzOnCQl,A-ټ\\Njjx3319;%Y<%-+;T  y9mXKUOӥǏU}}_@w+-e``XjUhh(DpDyɓy6'\1J p01 qs:r!썍:&(&$4֍tJg0aJ}0X.a˗(a߿/^<~^&]C9@[ۃ7TuhR)CIENDB`slepc4py-3.7.0/docs/apiref/class_hierarchy_for_extraction.png0000644000175000001440000000227312720314521025227 0ustar dalcinlusers00000000000000PNG  IHDR\$ʣbKGDpIDAThc?(@LF  l?HNNfddh022&''##rA߿t@&&¹(I&ഁ'._~r8`[E?w (/+ 2-h@F R/\1ǏU}}im9pl"E))bT{,:Yf/oyb"F QAA bTǏقi@G~>%Yl:p@O ˷oWEL 3ÝǏ <)q-sKt̛<|iĺ?'֊˸`mBvv] 2_}CF ~./߾-Yyb{,Z]X,+\\ly{枢I^?aɒ{ll3ioթKOر!?hQWAA Jdf04H7L7$-3334LGޮ]U__\JVB]V\/s֯oUUe``t}\ϊ;.^$#ДU_.'!~~R}Gf޼YEVS\7-8qƌ3fҫzԦ/߾jh@>*'ak**j**2۷SpUdezaK2005Sx1e  ^\j gXYYi|+UUADE<{a_y}qaaf&{OBw<(_d߿{N܌T C dׯ_~~t_TOrΝ+w䴷? ,,y>rN͔)^^ƬD_0mժߗ'&LNon14T14tq|z^*nNʤHOOG;v|=3^] LRYeQD_007K^kh  ,`4P@F  ,`4P),Sa a('11qdN&q2O-0(Xh`V?IENDB`slepc4py-3.7.0/docs/slepc4py.info0000644000175000001440000006553612720314530017435 0ustar dalcinlusers00000000000000This is slepc4py.info, produced by makeinfo version 6.0 from slepc4py.texi. SLEPc for Python 3.7.0, May 22, 2016 Lisandro Dalcin Copyright © 2016, Lisandro Dalcin INFO-DIR-SECTION Miscellaneous START-INFO-DIR-ENTRY * slepc4py: (slepc4py.info). SLEPc for Python. END-INFO-DIR-ENTRY Generated by Sphinx 1.2.3.  File: slepc4py.info, Node: Top, Next: Contents, Up: (dir) SLEPc for Python **************** SLEPc for Python 3.7.0, May 22, 2016 Lisandro Dalcin Copyright © 2016, Lisandro Dalcin Authors: Lisandro Dalcin, Jose E. Roman Contact: , Web Site: ‘https://bitbucket.org/slepc/slepc4py’ Date: May 22, 2016 Abstract ======== This document describes slepc4py(1), a Python(2) port to the SLEPc(3) libraries. SLEPc(4) is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix. SLEPc(5) relies on PETSc(6) for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py(7) must be used together with its companion petsc4py(8). * Menu: * Contents:: * Index:: — The Detailed Node Listing — Contents * Overview:: * Tutorial:: * Installation:: * Citations:: Overview * Features:: * Components:: Tutorial * Commented source of a simple example:: * Example of command-line usage:: Installation * Using pip or easy_install:: * Using distutils:: Using distutils * Requirements:: * Downloading:: * Building:: * Installing:: ---------- Footnotes ---------- (1) http://bitbucket.org/slepc/slepc4py (2) http://www.python.org (3) http://slepc.upv.es (4) http://slepc.upv.es (5) http://slepc.upv.es (6) http://www.mcs.anl.gov/petsc/ (7) http://bitbucket.org/slepc/slepc4py (8) http://bitbucket.org/petsc/petsc4py  File: slepc4py.info, Node: Contents, Next: Index, Prev: Top, Up: Top 1 Contents ********** * Menu: * Overview:: * Tutorial:: * Installation:: * Citations::  File: slepc4py.info, Node: Overview, Next: Tutorial, Up: Contents 1.1 Overview ============ `SLEPc for Python' (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc. SLEPc (1), (2) implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (polynomial or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector. SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available. * Menu: * Features:: * Components:: ---------- Footnotes ---------- (1) J. E. Roman, C. Campos, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014. (2) Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351-362, 2005.  File: slepc4py.info, Node: Features, Next: Components, Up: Overview 1.1.1 Features -------------- Currently, the following types of eigenproblems can be addressed: * Standard eigenvalue problem, `Ax=kx', either for Hermitian or non-Hermitian matrices. * Generalized eigenvalue problem, `Ax=kBx', either Hermitian positive-definite or not. * Partial singular value decomposition of a rectangular matrix, `Au=sv'. * Polynomial eigenvalue problem, `P(k)x=0'. * Nonlinear eigenvalue problem, `T(k)x=0'. * Computing the action of a matrix function on a vector, `w=f(alpha A)v'. For the linear eigenvalue problem, the following methods are available: * Krylov eigensolvers, particularly Krylov-Schur, Arnoldi, and Lanczos. * Davidson-type eigensolvers, including Generalized Davidson and Jacobi-Davidson. * Subspace iteration and single vector iterations (inverse iteration, RQI). * Conjugate gradient for the minimization of the Rayleigh quotient. * A contour integral solver. For singular value computations, the following alternatives can be used: * Use an eigensolver via the cross-product matrix `A’A' or the cyclic matrix `[0 A; A’ 0]'. * Explicitly restarted Lanczos bidiagonalization. * Implicitly restarted Lanczos bidiagonalization (thick-restart Lanczos). For polynomial eigenvalue problems, the following methods are available: * Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization. * TOAR and Q-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems. Computation of interior eigenvalues is supported by means of the following methodologies: * Spectral transformations, such as shift-and-invert. This technique implicitly uses the inverse of the shifted matrix `(A-tI)' in order to compute eigenvalues closest to a given target value, `t'. * Harmonic extraction, a cheap alternative to shift-and-invert that also tries to approximate eigenvalues closest to a target, `t', but without requiring a matrix inversion. Other remarkable features include: * High computational efficiency, by using NumPy and SLEPc under the hood. * Data-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix-vector products as user-defined Python functions. * Run-time flexibility, by specifying numerous setting at the command line. * Ability to do the computation in parallel.  File: slepc4py.info, Node: Components, Prev: Features, Up: Overview 1.1.2 Components ---------------- SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object. EPS: The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation. SVD: This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS. PEP: This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic. NEP: This component covers the case of general nonlinear eigenproblems, T(lambda)x=0. MFN: This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential. ST: The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift-and-invert, that allows for the computation of eigenvalues closest to a given target value. BV: This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end-users. DS: The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers. FN: A component used to define mathematical functions. This is required by the end-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form.  File: slepc4py.info, Node: Tutorial, Next: Installation, Prev: Overview, Up: Contents 1.2 Tutorial ============ This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation. * Menu: * Commented source of a simple example:: * Example of command-line usage::  File: slepc4py.info, Node: Commented source of a simple example, Next: Example of command-line usage, Up: Tutorial 1.2.1 Commented source of a simple example ------------------------------------------ In this section, we include the source code of example ‘demo/ex1.py’ available in the slepc4py distribution, with comments inserted inline. The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accesing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls: import sys, slepc4py slepc4py.init(sys.argv) Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well: from petsc4py import PETSc from slepc4py import SLEPc import numpy At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument ‘n’ with a default value of 30 (see the next section for example usage of command-line options): opts = PETSc.Options() n = opts.getInt('n', 30) It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects: A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0: A[0, :2] = [2, -1] rstart += 1 # last row if rend == n: A[n-1, -2:] = [-1, 2] rend -= 1 # other rows for i in range(rstart, rend): A[i, i-1:i+2] = [-1, 2, -1] A.assemble() The solver object is created in a similar way as other objects in petsc4py: E = SLEPc.EPS(); E.create() Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the ‘setFromOptions()’ operation, so that any options specified at run time in the command line are passed to the solver object: E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions() After that, the ‘solve()’ method will run the selected eigensolver, keeping the solution stored internally: E.solve() Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object: Print = PETSc.Sys.Print Print() Print("******************************") Print("*** SLEPc Solution Results ***") Print("******************************") Print() its = E.getIterationNumber() Print("Number of iterations of the method: %d" % its) eps_type = E.getType() Print("Solution method: %s" % eps_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %d" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision: nconv = E.getConverged() Print("Number of converged eigenpairs %d" % nconv) For each of the ‘nconv’ eigenpairs, we can retrieve the eigenvalue ‘k’, and the eigenvector, which is represented by means of two petsc4py vectors ‘vr’ and ‘vi’ (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct: if nconv > 0: # Create the results vectors vr, wr = A.getVecs() vi, wi = A.getVecs() # Print() Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, vr, vi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print()  File: slepc4py.info, Node: Example of command-line usage, Prev: Commented source of a simple example, Up: Tutorial 1.2.2 Example of command-line usage ----------------------------------- Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py. A simple execution of the ‘demo/ex1.py’ script will result in the following output: $ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=100 Number of converged eigenpairs 4 k ||Ax-kx||/||kx|| ----------------- ------------------ 3.989739 5.76012e-09 3.959060 1.41957e-08 3.908279 6.74118e-08 3.837916 8.34269e-08 For specifying different setting for the solver parameters, we can use SLEPc command-line options with the ‘-eps’ prefix. For instance, to change the number of requested eigenvalues and the tolerance: $ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11 The method used by the solver object can also be set at run time: $ python demo/ex1.py -eps_type lanczos All the above settings can also be change within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used: $ python demo/ex1.py -eps_view EPS Object: 1 MPI processes type: krylovschur Krylov-Schur: 50% of basis vectors kept after restart problem type: symmetric eigenvalue problem selected portion of the spectrum: largest eigenvalues in magnitude number of eigenvalues (nev): 1 number of column vectors (ncv): 16 maximum dimension of projected problem (mpd): 16 maximum number of iterations: 100 tolerance: 1e-08 convergence test: relative to the eigenvalue BV Object: 1 MPI processes type: svec 17 columns of global length 30 orthogonalization method: classical Gram-Schmidt orthogonalization refinement: if needed (eta: 0.7071) DS Object: 1 MPI processes type: hep solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI processes type: shift shift: 0 number of matrices: 1 Note that for computing eigenvalues of smallest magnitude we can use the option ‘-eps_smallest_magnitude’, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6: $ python demo/ex1.py -eps_harmonic -eps_target 0.6 Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the ‘-st_’ prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be: $ python demo/ex1.py -st_type sinvert -eps_target 0.6  File: slepc4py.info, Node: Installation, Next: Citations, Prev: Tutorial, Up: Contents 1.3 Installation ================ * Menu: * Using pip or easy_install:: * Using distutils::  File: slepc4py.info, Node: Using pip or easy_install, Next: Using distutils, Up: Installation 1.3.1 Using `pip' or `easy_install' ----------------------------------- You can use `pip' to install ‘slepc4py’ and its dependencies (‘mpi4py’ is optional but highly recommended): $ pip install [--user] numpy mpi4py $ pip install [--user] petsc petsc4py $ pip install [--user] slepc slepc4py Alternatively, you can use `easy_install' (deprecated): $ easy_install [--user] slepc4py If you already have working PETSc and SLEPc installs, set environment variables ‘SLEPC_DIR’ and ‘PETSC_DIR’ (and perhaps ‘PETSC_ARCH’ for non-prefix installs) to appropriate values and next use `pip': $ export SLEPC_DIR=/path/to/slepc $ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch-linux2-c-opt $ pip install [--user] petsc4py slepc4py  File: slepc4py.info, Node: Using distutils, Prev: Using pip or easy_install, Up: Installation 1.3.2 Using `distutils' ----------------------- * Menu: * Requirements:: * Downloading:: * Building:: * Installing::  File: slepc4py.info, Node: Requirements, Next: Downloading, Up: Using distutils 1.3.2.1 Requirements .................... You need to have the following software properly installed in order to build `SLEPc for Python': * Any MPI(1) implementation (2) (e.g., MPICH(3) or Open MPI(4)), built with shared libraries. * A matching version of PETSc(5) built with shared libraries. * A matching version of SLEPc(6) built with shared libraries. * NumPy(7) package. * petsc4py(8) package. ---------- Footnotes ---------- (1) http://www.mpi-forum.org (2) Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option ‘--with-mpi=0’). (3) http://www.mpich.org (4) http://www.open-mpi.org (5) http://www.mcs.anl.gov/petsc/ (6) http://slepc.upv.es (7) http://www.numpy.org (8) http://bitbucket.org/petsc/petsc4py  File: slepc4py.info, Node: Downloading, Next: Building, Prev: Requirements, Up: Using distutils 1.3.2.2 Downloading ................... The `SLEPc for Python' package is available for download at the project website generously hosted by Bitbucket. You can use `curl' or `wget' to get a release tarball. * Using `curl': $ curl -O https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz * Using `wget': $ wget https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz  File: slepc4py.info, Node: Building, Next: Installing, Prev: Downloading, Up: Using distutils 1.3.2.3 Building ................ After unpacking the release tarball: $ tar -zxf slepc4py-X.Y.tar.gz $ cd slepc4py-X.Y the distribution is ready for building. Note: `Mac OS X' users employing a Python distribution built with `universal binaries' may need to set the environment variables ‘MACOSX_DEPLOYMENT_TARGET’, ‘SDKROOT’, and ‘ARCHFLAGS’ to appropriate values. As an example, assume your Mac is running `Snow Leopard' on a `64-bit Intel' processor and you want to override the hard-wired cross-development SDK in Python configuration, your environment should be modified like this: $ export MACOSX_DEPLOYMENT_TARGET=10.6 $ export SDKROOT=/ $ export ARCHFLAGS='-arch x86_64' Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using `setenv', `export' or what applies to you shell or system) the environment variables ‘SLEPC_DIR`’, ‘PETSC_DIR’, and ‘PETSC_ARCH’ indicating where you have built/installed SLEPc and PETSc: $ export SLEPC_DIR=/usr/local/slepc $ export PETSC_DIR=/usr/local/petsc $ export PETSC_ARCH=arch-linux2-c-opt Alternatively, you can edit the file ‘setup.cfg’ and provide the required information below the ‘[config]’ section: [config] slepc_dir = /usr/local/slepc petsc_dir = /usr/local/petsc petsc_arch = arch-linux2-c-opt ... Finally, you can build the distribution by typing: $ python setup.py build  File: slepc4py.info, Node: Installing, Prev: Building, Up: Using distutils 1.3.2.4 Installing .................. After building, the distribution is ready for installation. If you have root privileges (either by log-in as the root user of by using `sudo') and you want to install `SLEPc for Python' in your system for all users, just do: $ python setup.py install The previous steps will install the ‘slepc4py’ package at standard location ‘`prefix'/lib/python`X'.`X'/site-packages’. If you do not have root privileges or you want to install `SLEPc for Python' for your private use, just do: $ python setup.py install --user  File: slepc4py.info, Node: Citations, Prev: Installation, Up: Contents 1.4 Citations ============= If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, `Parallel Distributed Computing using Python', Advances in Water Resources, 34(9):1124-1139, 2011. ‘http://dx.doi.org/10.1016/j.advwatres.2011.04.013’ * V. Hernandez, J.E. Roman, and V. Vidal, `SLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems', ACM Transactions on Mathematical Software, 31(3):351-362, 2005. ‘http://dx.doi.org/10.1145/1089014.1089019’  File: slepc4py.info, Node: Index, Prev: Contents, Up: Top Index ***** [index] * Menu: * ARCHFLAGS: Building. (line 15) * environment variable; ARCHFLAGS: Building. (line 15) * environment variable; MACOSX_DEPLOYMENT_TARGET: Building. (line 14) * environment variable; PETSC_ARCH: Using pip or easy_install. (line 18) * environment variable; PETSC_ARCH <1>: Building. (line 28) * environment variable; PETSC_DIR: Using pip or easy_install. (line 18) * environment variable; PETSC_DIR <1>: Building. (line 27) * environment variable; SDKROOT: Building. (line 15) * environment variable; SLEPC_DIR: Using pip or easy_install. (line 18) * environment variable; SLEPC_DIR‘: Building. (line 27) * MACOSX_DEPLOYMENT_TARGET: Building. (line 14) * PETSC_ARCH: Using pip or easy_install. (line 18) * PETSC_ARCH <1>: Building. (line 28) * PETSC_DIR: Using pip or easy_install. (line 18) * PETSC_DIR <1>: Building. (line 27) * SDKROOT: Building. (line 15) * SLEPC_DIR: Using pip or easy_install. (line 18) * SLEPC_DIR‘: Building. (line 27)  Tag Table: Node: Top334 Ref: index doc539 Ref: 0539 Ref: Top-Footnote-11770 Ref: Top-Footnote-21814 Ref: Top-Footnote-31844 Ref: Top-Footnote-41872 Ref: Top-Footnote-51900 Ref: Top-Footnote-61928 Ref: Top-Footnote-71966 Ref: Top-Footnote-82010 Node: Contents2054 Ref: index slepc-for-python2130 Ref: 12130 Ref: index contents2130 Ref: 22130 Node: Overview2224 Ref: overview overview2296 Ref: 32296 Ref: overview doc2296 Ref: 42296 Ref: Overview-Footnote-13469 Ref: Overview-Footnote-23660 Node: Features3855 Ref: overview features3929 Ref: 53929 Node: Components6517 Ref: overview components6591 Ref: 66591 Node: Tutorial9454 Ref: tutorial doc9547 Ref: 79547 Ref: tutorial tutorial9547 Ref: 89547 Node: Commented source of a simple example9829 Ref: tutorial commented-source-of-a-simple-example9950 Ref: 99950 Node: Example of command-line usage14684 Ref: tutorial example-of-command-line-usage14805 Ref: a14805 Node: Installation17940 Ref: install installation18034 Ref: b18034 Ref: install doc18034 Ref: c18034 Node: Using pip or easy_install18131 Ref: install using-pip-or-easy-install18231 Ref: d18231 Node: Using distutils19027 Ref: install using-distutils19127 Ref: e19127 Node: Requirements19251 Ref: install requirements19337 Ref: f19337 Ref: Requirements-Footnote-119800 Ref: Requirements-Footnote-219833 Ref: Requirements-Footnote-319959 Ref: Requirements-Footnote-419988 Ref: Requirements-Footnote-520020 Ref: Requirements-Footnote-620058 Ref: Requirements-Footnote-720086 Ref: Requirements-Footnote-820115 Node: Downloading20159 Ref: install downloading20262 Ref: 1020262 Node: Building20685 Ref: install building20786 Ref: 1120786 Node: Installing22328 Ref: install installing22409 Ref: 1222409 Node: Citations22984 Ref: citing citations23061 Ref: 1323061 Ref: citing doc23061 Ref: 1423061 Node: Index23706  End Tag Table  Local Variables: coding: utf-8 End: slepc4py-3.7.0/docs/source/0000755000175000001440000000000012720314530016276 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/source/sphinxfix.sty0000644000175000001440000000106012705464414021066 0ustar dalcinlusers00000000000000\setcounter{tocdepth}{2} \pagenumbering{arabic} \makeatletter \renewcommand{\theindex}{ \cleardoublepage \phantomsection \py@OldTheindex \addcontentsline{toc}{section}{\indexname} } \makeatother \makeatletter \renewcommand{\thebibliography}[1]{ \cleardoublepage \phantomsection \py@OldThebibliography{1} \addcontentsline{toc}{section}{\bibname} } \makeatother \makeatletter \renewcommand{\tableofcontents}{ \begingroup \parskip = 0mm \py@OldTableofcontents \endgroup \vfill \rule{\textwidth}{1pt} \newpage } \makeatother slepc4py-3.7.0/docs/source/manual.rst0000644000175000001440000000020012705464414020307 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ .. include:: abstract.txt .. include:: toctree.txt .. include:: links.txt slepc4py-3.7.0/docs/source/tutorial.rst0000644000175000001440000001733612705464414020717 0ustar dalcinlusers00000000000000Tutorial ======== This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation. Commented source of a simple example ------------------------------------ In this section, we include the source code of example ``demo/ex1.py`` available in the slepc4py distribution, with comments inserted inline. The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accesing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls:: import sys, slepc4py slepc4py.init(sys.argv) Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well:: from petsc4py import PETSc from slepc4py import SLEPc import numpy At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument ``n`` with a default value of 30 (see the next section for example usage of command-line options):: opts = PETSc.Options() n = opts.getInt('n', 30) It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects:: A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0: A[0, :2] = [2, -1] rstart += 1 # last row if rend == n: A[n-1, -2:] = [-1, 2] rend -= 1 # other rows for i in range(rstart, rend): A[i, i-1:i+2] = [-1, 2, -1] A.assemble() The solver object is created in a similar way as other objects in petsc4py:: E = SLEPc.EPS(); E.create() Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the ``setFromOptions()`` operation, so that any options specified at run time in the command line are passed to the solver object:: E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions() After that, the ``solve()`` method will run the selected eigensolver, keeping the solution stored internally:: E.solve() Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object:: Print = PETSc.Sys.Print Print() Print("******************************") Print("*** SLEPc Solution Results ***") Print("******************************") Print() its = E.getIterationNumber() Print("Number of iterations of the method: %d" % its) eps_type = E.getType() Print("Solution method: %s" % eps_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %d" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision:: nconv = E.getConverged() Print("Number of converged eigenpairs %d" % nconv) For each of the ``nconv`` eigenpairs, we can retrieve the eigenvalue ``k``, and the eigenvector, which is represented by means of two petsc4py vectors ``vr`` and ``vi`` (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct:: if nconv > 0: # Create the results vectors vr, wr = A.getVecs() vi, wi = A.getVecs() # Print() Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, vr, vi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print() Example of command-line usage ----------------------------- Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py. A simple execution of the ``demo/ex1.py`` script will result in the following output:: $ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=100 Number of converged eigenpairs 4 k ||Ax-kx||/||kx|| ----------------- ------------------ 3.989739 5.76012e-09 3.959060 1.41957e-08 3.908279 6.74118e-08 3.837916 8.34269e-08 For specifying different setting for the solver parameters, we can use SLEPc command-line options with the ``-eps`` prefix. For instance, to change the number of requested eigenvalues and the tolerance:: $ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11 The method used by the solver object can also be set at run time:: $ python demo/ex1.py -eps_type lanczos All the above settings can also be change within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used:: $ python demo/ex1.py -eps_view EPS Object: 1 MPI processes type: krylovschur Krylov-Schur: 50% of basis vectors kept after restart problem type: symmetric eigenvalue problem selected portion of the spectrum: largest eigenvalues in magnitude number of eigenvalues (nev): 1 number of column vectors (ncv): 16 maximum dimension of projected problem (mpd): 16 maximum number of iterations: 100 tolerance: 1e-08 convergence test: relative to the eigenvalue BV Object: 1 MPI processes type: svec 17 columns of global length 30 orthogonalization method: classical Gram-Schmidt orthogonalization refinement: if needed (eta: 0.7071) DS Object: 1 MPI processes type: hep solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI processes type: shift shift: 0 number of matrices: 1 Note that for computing eigenvalues of smallest magnitude we can use the option ``-eps_smallest_magnitude``, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6:: $ python demo/ex1.py -eps_harmonic -eps_target 0.6 Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the ``-st_`` prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be:: $ python demo/ex1.py -st_type sinvert -eps_target 0.6 slepc4py-3.7.0/docs/source/Makefile0000644000175000001440000001425212705464414017754 0ustar dalcinlusers00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/slepc4py.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/slepc4py.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/slepc4py" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/slepc4py" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." slepc4py-3.7.0/docs/source/install.rst0000644000175000001440000000773612705464414020525 0ustar dalcinlusers00000000000000Installation ============ Using **pip** or **easy_install** --------------------------------- You can use :program:`pip` to install :mod:`slepc4py` and its dependencies (:mod:`mpi4py` is optional but highly recommended):: $ pip install [--user] numpy mpi4py $ pip install [--user] petsc petsc4py $ pip install [--user] slepc slepc4py Alternatively, you can use :program:`easy_install` (deprecated):: $ easy_install [--user] slepc4py If you already have working PETSc and SLEPc installs, set environment variables :envvar:`SLEPC_DIR` and :envvar:`PETSC_DIR` (and perhaps :envvar:`PETSC_ARCH` for non-prefix installs) to appropriate values and next use :program:`pip`:: $ export SLEPC_DIR=/path/to/slepc $ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch-linux2-c-opt $ pip install [--user] petsc4py slepc4py Using **distutils** ------------------- Requirements ^^^^^^^^^^^^ You need to have the following software properly installed in order to build *SLEPc for Python*: * Any MPI_ implementation [#]_ (e.g., MPICH_ or `Open MPI`_), built with shared libraries. * A matching version of PETSc_ built with shared libraries. * A matching version of SLEPc_ built with shared libraries. * NumPy_ package. * petsc4py_ package. .. [#] Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option ``--with-mpi=0``). .. [#] You may need to use a parallelized version of the Python interpreter with some MPI-1 implementations (e.g. MPICH1). .. include:: links.txt Downloading ^^^^^^^^^^^ The *SLEPc for Python* package is available for download at the project website generously hosted by Bitbucket. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -O https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz * Using :program:`wget`:: $ wget https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz Building ^^^^^^^^ After unpacking the release tarball:: $ tar -zxf slepc4py-X.Y.tar.gz $ cd slepc4py-X.Y the distribution is ready for building. .. note:: **Mac OS X** users employing a Python distribution built with **universal binaries** may need to set the environment variables :envvar:`MACOSX_DEPLOYMENT_TARGET`, :envvar:`SDKROOT`, and :envvar:`ARCHFLAGS` to appropriate values. As an example, assume your Mac is running **Snow Leopard** on a **64-bit Intel** processor and you want to override the hard-wired cross-development SDK in Python configuration, your environment should be modified like this:: $ export MACOSX_DEPLOYMENT_TARGET=10.6 $ export SDKROOT=/ $ export ARCHFLAGS='-arch x86_64' Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using :command:`setenv`, :command:`export` or what applies to you shell or system) the environment variables :envvar:`SLEPC_DIR``, :envvar:`PETSC_DIR`, and :envvar:`PETSC_ARCH` indicating where you have built/installed SLEPc and PETSc:: $ export SLEPC_DIR=/usr/local/slepc $ export PETSC_DIR=/usr/local/petsc $ export PETSC_ARCH=arch-linux2-c-opt Alternatively, you can edit the file :file:`setup.cfg` and provide the required information below the ``[config]`` section:: [config] slepc_dir = /usr/local/slepc petsc_dir = /usr/local/petsc petsc_arch = arch-linux2-c-opt ... Finally, you can build the distribution by typing:: $ python setup.py build Installing ^^^^^^^^^^ After building, the distribution is ready for installation. If you have root privileges (either by log-in as the root user of by using :command:`sudo`) and you want to install *SLEPc for Python* in your system for all users, just do:: $ python setup.py install The previous steps will install the :mod:`slepc4py` package at standard location :file:`{prefix}/lib/python{X}.{X}/site-packages`. If you do not have root privileges or you want to install *SLEPc for Python* for your private use, just do:: $ python setup.py install --user slepc4py-3.7.0/docs/source/abstract.txt0000644000175000001440000000122312705464414020652 0ustar dalcinlusers00000000000000.. topic:: Abstract This document describes slepc4py_, a Python_ port to the SLEPc_ libraries. SLEPc_ is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix. SLEPc_ relies on PETSc_ for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py_ must be used together with its companion petsc4py_. .. Local Variables: .. mode: rst .. End: slepc4py-3.7.0/docs/source/conf.py0000644000175000001440000002442012716602462017610 0ustar dalcinlusers00000000000000# -*- coding: utf-8 -*- # # SLEPc for Python documentation build configuration file, created by # sphinx-quickstart on Sun Aug 17 12:57:45 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os try: from slepc4py import __version__ as slepc4py_version except: slepc4py_version = 'X.X.X' # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [] # Add any paths that contain templates here, relative to this directory. #templates_path = ['_templates'] templates_path = [] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'SLEPc for Python' copyright = u'2016, Lisandro Dalcin' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = slepc4py_version[:3] # The full version, including alpha/beta/rc tags. release = slepc4py_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['_static'] html_static_path = [] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'slepc4py-man' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', 'papersize': 'a4', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', 'printmodindex': '', 'printindex': '', 'preamble' : r'\usepackage{sphinxfix}', } latex_additional_files = ['sphinxfix.sty'] # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('manual', 'slepc4py.tex', u'SLEPc for Python', u'Lisandro Dalcin', 'howto'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'slepc4py', u'SLEPc for Python', [u'Lisandro Dalcin'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'slepc4py', u'SLEPc for Python', u'Lisandro Dalcin', 'slepc4py', 'SLEPc for Python.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. epub_title = u'slepc4py' epub_author = u'Lisandro Dalcin' epub_publisher = u'Lisandro Dalcin' epub_copyright = u'2016, Lisandro Dalcin' # The basename for the epub file. It defaults to the project name. epub_basename = u'slepc4py' # The HTML theme for the epub output. Since the default themes are not optimized # for small screen space, using the same theme for HTML and epub output is # usually not wise. This defaults to 'epub', a theme designed to save visual # space. #epub_theme = 'epub' # The language of the text. It defaults to the language option # or en if the language is not set. #epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. #epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. #epub_identifier = '' # A unique identification for the text. #epub_uid = '' # A tuple containing the cover image and cover page html template filenames. #epub_cover = () # A sequence of (type, uri, title) tuples for the guide element of content.opf. #epub_guide = () # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = [] # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] # The depth of the table of contents in toc.ncx. #epub_tocdepth = 3 # Allow duplicate toc entries. #epub_tocdup = True # Choose between 'default' and 'includehidden'. #epub_tocscope = 'default' # Fix unsupported image types using the PIL. #epub_fix_images = False # Scale large images. #epub_max_image_width = 0 # How to display URL addresses: 'footnote', 'no', or 'inline'. #epub_show_urls = 'inline' # If false, no index is generated. #epub_use_index = True slepc4py-3.7.0/docs/source/toctree.txt0000644000175000001440000000016512705464414020520 0ustar dalcinlusers00000000000000.. toctree:: :maxdepth: 2 overview tutorial install citing .. Local Variables: .. mode: rst .. End: slepc4py-3.7.0/docs/source/overview.rst0000644000175000001440000001553312705464414020717 0ustar dalcinlusers00000000000000Overview ======== *SLEPc for Python* (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc. SLEPc [1]_, [2]_ implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (polynomial or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector. SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available. .. [1] J. E. Roman, C. Campos, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014. .. [2] Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351-362, 2005. .. include:: links.txt Features -------- Currently, the following types of eigenproblems can be addressed: * Standard eigenvalue problem, *Ax=kx*, either for Hermitian or non-Hermitian matrices. * Generalized eigenvalue problem, *Ax=kBx*, either Hermitian positive-definite or not. * Partial singular value decomposition of a rectangular matrix, *Au=sv*. * Polynomial eigenvalue problem, *P(k)x=0*. * Nonlinear eigenvalue problem, *T(k)x=0*. * Computing the action of a matrix function on a vector, *w=f(alpha A)v*. For the linear eigenvalue problem, the following methods are available: * Krylov eigensolvers, particularly Krylov-Schur, Arnoldi, and Lanczos. * Davidson-type eigensolvers, including Generalized Davidson and Jacobi-Davidson. * Subspace iteration and single vector iterations (inverse iteration, RQI). * Conjugate gradient for the minimization of the Rayleigh quotient. * A contour integral solver. For singular value computations, the following alternatives can be used: * Use an eigensolver via the cross-product matrix *A'A* or the cyclic matrix *[0 A; A' 0]*. * Explicitly restarted Lanczos bidiagonalization. * Implicitly restarted Lanczos bidiagonalization (thick-restart Lanczos). For polynomial eigenvalue problems, the following methods are available: * Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization. * TOAR and Q-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems. Computation of interior eigenvalues is supported by means of the following methodologies: * Spectral transformations, such as shift-and-invert. This technique implicitly uses the inverse of the shifted matrix *(A-tI)* in order to compute eigenvalues closest to a given target value, *t*. * Harmonic extraction, a cheap alternative to shift-and-invert that also tries to approximate eigenvalues closest to a target, *t*, but without requiring a matrix inversion. Other remarkable features include: * High computational efficiency, by using NumPy and SLEPc under the hood. * Data-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix-vector products as user-defined Python functions. * Run-time flexibility, by specifying numerous setting at the command line. * Ability to do the computation in parallel. Components ---------- SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object. :EPS: The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation. :SVD: This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS. :PEP: This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic. :NEP: This component covers the case of general nonlinear eigenproblems, T(lambda)x=0. :MFN: This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential. :ST: The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift-and-invert, that allows for the computation of eigenvalues closest to a given target value. :BV: This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end-users. :DS: The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers. :FN: A component used to define mathematical functions. This is required by the end-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form. slepc4py-3.7.0/docs/source/make.bat0000644000175000001440000001417712705464414017727 0ustar dalcinlusers00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\slepc4py.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\slepc4py.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end slepc4py-3.7.0/docs/source/links.txt0000644000175000001440000000076512716603721020177 0ustar dalcinlusers00000000000000.. _MPI: http://www.mpi-forum.org .. _MPICH: http://www.mpich.org .. _Open MPI: http://www.open-mpi.org .. _PETSc: http://www.mcs.anl.gov/petsc/ .. _SLEPc: http://slepc.upv.es .. _Python: http://www.python.org .. _NumPy: http://www.numpy.org .. _mpi4py: http://bitbucket.org/mpi4py/mpi4py .. _petsc4py: http://bitbucket.org/petsc/petsc4py .. _slepc4py: http://bitbucket.org/slepc/slepc4py .. Local Variables: .. mode: rst .. End: slepc4py-3.7.0/docs/source/index.rst0000644000175000001440000000050212716603616020147 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ :Authors: Lisandro Dalcin, Jose E. Roman :Contact: dalcinl@gmail.com, jroman@dsic.upv.es :Web Site: https://bitbucket.org/slepc/slepc4py :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. include:: links.txt slepc4py-3.7.0/docs/source/citing.rst0000644000175000001440000000113012716604206020307 0ustar dalcinlusers00000000000000Citations ========= If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman, and V. Vidal, *SLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 slepc4py-3.7.0/docs/usrman/0000755000175000001440000000000012720314530016303 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/usrman/search.html0000644000175000001440000000621512720314514020444 0ustar dalcinlusers00000000000000 Search — SLEPc for Python 3.7.0 documentation

Search

Please activate JavaScript to enable the search functionality.

From here you can search these documents. Enter your search words into the box below and click "search". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in the result list.

slepc4py-3.7.0/docs/usrman/genindex.html0000644000175000001440000001171612720314514021002 0ustar dalcinlusers00000000000000 Index — SLEPc for Python 3.7.0 documentation
slepc4py-3.7.0/docs/usrman/objects.inv0000644000175000001440000000032412720314514020453 0ustar dalcinlusers00000000000000# Sphinx inventory version 2 # Project: SLEPc for Python # Version: 3.7 # The remainder of this file is compressed using zlib. xOKIP(.IILJQ5T(ͅJe(+槔*xShBu@&%g*AC$r1slepc4py-3.7.0/docs/usrman/index.html0000644000175000001440000001611512720314514020306 0ustar dalcinlusers00000000000000 SLEPc for Python — SLEPc for Python 3.7.0 documentation

SLEPc for Python

Authors:Lisandro Dalcin, Jose E. Roman
Contact:dalcinl@gmail.com, jroman@dsic.upv.es
Web Site:https://bitbucket.org/slepc/slepc4py
Date:May 22, 2016

Abstract

This document describes slepc4py, a Python port to the SLEPc libraries.

SLEPc is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix.

SLEPc relies on PETSc for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py must be used together with its companion petsc4py.

Table Of Contents

Next topic

Overview

This Page

slepc4py-3.7.0/docs/usrman/manual.html0000644000175000001440000001257412720314514020461 0ustar dalcinlusers00000000000000 SLEPc for Python — SLEPc for Python 3.7.0 documentation

SLEPc for Python

Abstract

This document describes slepc4py, a Python port to the SLEPc libraries.

SLEPc is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix.

SLEPc relies on PETSc for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py must be used together with its companion petsc4py.

This Page

slepc4py-3.7.0/docs/usrman/_static/0000755000175000001440000000000012720314530017731 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/usrman/_static/underscore.js0000644000175000001440000002755412062620216022455 0ustar dalcinlusers00000000000000// Underscore.js 1.3.1 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // Underscore is freely distributable under the MIT license. // Portions of Underscore are inspired or borrowed from Prototype, // Oliver Steele's Functional, and John Resig's Micro-Templating. // For all details and documentation: // http://documentcloud.github.com/underscore (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); slepc4py-3.7.0/docs/usrman/_static/comment.png0000644000175000001440000000656512062620216022115 0ustar dalcinlusers00000000000000PNG  IHDRa OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-bKGD pHYs  tIME 1;VIDAT8ukU?sg4h`G1 RQܸp%Bn"bЍXJ .4V iZ##T;m!4bP~7r>ιbwc;m;oӍAΆ ζZ^/|s{;yR=9(rtVoG1w#_ө{*E&!(LVuoᲵ‘D PG4 :&~*ݳreu: S-,U^E&JY[P!RB ŖޞʖR@_ȐdBfNvHf"2T]R j'B1ddAak/DIJD D2H&L`&L $Ex,6|~_\P $MH`I=@Z||ttvgcЕWTZ'3rje"ܵx9W> mb|byfFRx{w%DZC$wdցHmWnta(M<~;9]C/_;Տ#}o`zSڷ_>:;x컓?yݩ|}~wam-/7=0S5RP"*֯ IENDB`slepc4py-3.7.0/docs/usrman/_static/up.png0000644000175000001440000000055312062620216021066 0ustar dalcinlusers00000000000000PNG  IHDRasRGBbKGDC pHYs B(xtIME!.<̓EIDAT8͓NABP\EG{%<|xc  cr6@t;b$;3&)h1!﫳Hzz@=)p 3۵e2/ߴ ( %^ND^ }3H1DoǪISFұ?, G`{v^X[b]&HC3{:sO& ?,[eL#IENDB`slepc4py-3.7.0/docs/usrman/_static/comment-bright.png0000644000175000001440000000665412062620216023371 0ustar dalcinlusers00000000000000PNG  IHDRa OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-bKGD pHYs  tIME 6 B\<IDAT8˅Kh]es1mA`jh[-E(FEaA!bIȐ*BX"؁4)NURZ!Mhjssm؋^-\gg ]o|Ҭ[346>zd ]#8Oݺt{5uIXN!I=@Vf=v1}e>;fvnvxaHrʪJF`D¹WZ]S%S)WAb |0K=So7D~\~q-˟\aMZ,S'*} F`Nnz674U)- EYm4%7YTk-Qa"NWAo-yeq,) Ypt\hqmszG]Nar߶s^l vh\2%0EeRvIENDB`slepc4py-3.7.0/docs/usrman/_static/file.png0000644000175000001440000000061012062620216021353 0ustar dalcinlusers00000000000000PNG  IHDRabKGD pHYs  tIME  )TIDAT8˭J@Ir('[ "&xYZ X0!i|_@tD] #xjv YNaEi(əy@D&`6PZk$)5%"z.NA#Aba`Vs_3c,2mj [klvy|!Iմy;v "߮a?A7`c^nk?Bg}TЙD# "RD1yER*6MJ3K_Ut8F~IENDB`slepc4py-3.7.0/docs/usrman/_static/jquery.js0000644000175000001440000026670412331063777021641 0ustar dalcinlusers00000000000000/*! jQuery v1.8.3 jquery.com | jquery.org/license */ (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);slepc4py-3.7.0/docs/usrman/_static/searchtools.js0000644000175000001440000004270212720314514022624 0ustar dalcinlusers00000000000000/* * searchtools.js_t * ~~~~~~~~~~~~~~~~ * * Sphinx JavaScript utilties for the full-text search. * * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /** * Porter Stemmer */ var Stemmer = function() { var step2list = { ational: 'ate', tional: 'tion', enci: 'ence', anci: 'ance', izer: 'ize', bli: 'ble', alli: 'al', entli: 'ent', eli: 'e', ousli: 'ous', ization: 'ize', ation: 'ate', ator: 'ate', alism: 'al', iveness: 'ive', fulness: 'ful', ousness: 'ous', aliti: 'al', iviti: 'ive', biliti: 'ble', logi: 'log' }; var step3list = { icate: 'ic', ative: '', alize: 'al', iciti: 'ic', ical: 'ic', ful: '', ness: '' }; var c = "[^aeiou]"; // consonant var v = "[aeiouy]"; // vowel var C = c + "[^aeiouy]*"; // consonant sequence var V = v + "[aeiou]*"; // vowel sequence var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 var s_v = "^(" + C + ")?" + v; // vowel in stem this.stemWord = function (w) { var stem; var suffix; var firstch; var origword = w; if (w.length < 3) return w; var re; var re2; var re3; var re4; firstch = w.substr(0,1); if (firstch == "y") w = firstch.toUpperCase() + w.substr(1); // Step 1a re = /^(.+?)(ss|i)es$/; re2 = /^(.+?)([^s])s$/; if (re.test(w)) w = w.replace(re,"$1$2"); else if (re2.test(w)) w = w.replace(re2,"$1$2"); // Step 1b re = /^(.+?)eed$/; re2 = /^(.+?)(ed|ing)$/; if (re.test(w)) { var fp = re.exec(w); re = new RegExp(mgr0); if (re.test(fp[1])) { re = /.$/; w = w.replace(re,""); } } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1]; re2 = new RegExp(s_v); if (re2.test(stem)) { w = stem; re2 = /(at|bl|iz)$/; re3 = new RegExp("([^aeiouylsz])\\1$"); re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re2.test(w)) w = w + "e"; else if (re3.test(w)) { re = /.$/; w = w.replace(re,""); } else if (re4.test(w)) w = w + "e"; } } // Step 1c re = /^(.+?)y$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(s_v); if (re.test(stem)) w = stem + "i"; } // Step 2 re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step2list[suffix]; } // Step 3 re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step3list[suffix]; } // Step 4 re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; re2 = /^(.+?)(s|t)(ion)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); if (re.test(stem)) w = stem; } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1] + fp[2]; re2 = new RegExp(mgr1); if (re2.test(stem)) w = stem; } // Step 5 re = /^(.+?)e$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); re2 = new RegExp(meq1); re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) w = stem; } re = /ll$/; re2 = new RegExp(mgr1); if (re.test(w) && re2.test(w)) { re = /.$/; w = w.replace(re,""); } // and turn initial Y back to y if (firstch == "y") w = firstch.toLowerCase() + w.substr(1); return w; } } /** * Simple result scoring code. */ var Scorer = { // Implement the following function to further tweak the score for each result // The function takes a result array [filename, title, anchor, descr, score] // and returns the new score. /* score: function(result) { return result[4]; }, */ // query matches the full name of an object objNameMatch: 11, // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object objPrio: {0: 15, // used to be importantResults 1: 5, // used to be objectResults 2: -5}, // used to be unimportantResults // Used when the priority is not in the mapping. objPrioDefault: 0, // query found in title title: 15, // query found in terms term: 5 }; /** * Search Module */ var Search = { _index : null, _queued_query : null, _pulse_status : -1, init : function() { var params = $.getQueryParameters(); if (params.q) { var query = params.q[0]; $('input[name="q"]')[0].value = query; this.performSearch(query); } }, loadIndex : function(url) { $.ajax({type: "GET", url: url, data: null, dataType: "script", cache: true, complete: function(jqxhr, textstatus) { if (textstatus != "success") { document.getElementById("searchindexloader").src = url; } }}); }, setIndex : function(index) { var q; this._index = index; if ((q = this._queued_query) !== null) { this._queued_query = null; Search.query(q); } }, hasIndex : function() { return this._index !== null; }, deferQuery : function(query) { this._queued_query = query; }, stopPulse : function() { this._pulse_status = 0; }, startPulse : function() { if (this._pulse_status >= 0) return; function pulse() { var i; Search._pulse_status = (Search._pulse_status + 1) % 4; var dotString = ''; for (i = 0; i < Search._pulse_status; i++) dotString += '.'; Search.dots.text(dotString); if (Search._pulse_status > -1) window.setTimeout(pulse, 500); } pulse(); }, /** * perform a search for something (or wait until index is loaded) */ performSearch : function(query) { // create the required interface elements this.out = $('#search-results'); this.title = $('

' + _('Searching') + '

').appendTo(this.out); this.dots = $('').appendTo(this.title); this.status = $('

').appendTo(this.out); this.output = $('
'); } // Prettify the comment rating. comment.pretty_rating = comment.rating + ' point' + (comment.rating == 1 ? '' : 's'); // Make a class (for displaying not yet moderated comments differently) comment.css_class = comment.displayed ? '' : ' moderate'; // Create a div for this comment. var context = $.extend({}, opts, comment); var div = $(renderTemplate(commentTemplate, context)); // If the user has voted on this comment, highlight the correct arrow. if (comment.vote) { var direction = (comment.vote == 1) ? 'u' : 'd'; div.find('#' + direction + 'v' + comment.id).hide(); div.find('#' + direction + 'u' + comment.id).show(); } if (opts.moderator || comment.text != '[deleted]') { div.find('a.reply').show(); if (comment.proposal_diff) div.find('#sp' + comment.id).show(); if (opts.moderator && !comment.displayed) div.find('#cm' + comment.id).show(); if (opts.moderator || (opts.username == comment.username)) div.find('#dc' + comment.id).show(); } return div; } /** * A simple template renderer. Placeholders such as <%id%> are replaced * by context['id'] with items being escaped. Placeholders such as <#id#> * are not escaped. */ function renderTemplate(template, context) { var esc = $(document.createElement('div')); function handle(ph, escape) { var cur = context; $.each(ph.split('.'), function() { cur = cur[this]; }); return escape ? esc.text(cur || "").html() : cur; } return template.replace(/<([%#])([\w\.]*)\1>/g, function() { return handle(arguments[2], arguments[1] == '%' ? true : false); }); } /** Flash an error message briefly. */ function showError(message) { $(document.createElement('div')).attr({'class': 'popup-error'}) .append($(document.createElement('div')) .attr({'class': 'error-message'}).text(message)) .appendTo('body') .fadeIn("slow") .delay(2000) .fadeOut("slow"); } /** Add a link the user uses to open the comments popup. */ $.fn.comment = function() { return this.each(function() { var id = $(this).attr('id').substring(1); var count = COMMENT_METADATA[id]; var title = count + ' comment' + (count == 1 ? '' : 's'); var image = count > 0 ? opts.commentBrightImage : opts.commentImage; var addcls = count == 0 ? ' nocomment' : ''; $(this) .append( $(document.createElement('a')).attr({ href: '#', 'class': 'sphinx-comment-open' + addcls, id: 'ao' + id }) .append($(document.createElement('img')).attr({ src: image, alt: 'comment', title: title })) .click(function(event) { event.preventDefault(); show($(this).attr('id').substring(2)); }) ) .append( $(document.createElement('a')).attr({ href: '#', 'class': 'sphinx-comment-close hidden', id: 'ah' + id }) .append($(document.createElement('img')).attr({ src: opts.closeCommentImage, alt: 'close', title: 'close' })) .click(function(event) { event.preventDefault(); hide($(this).attr('id').substring(2)); }) ); }); }; var opts = { processVoteURL: '/_process_vote', addCommentURL: '/_add_comment', getCommentsURL: '/_get_comments', acceptCommentURL: '/_accept_comment', deleteCommentURL: '/_delete_comment', commentImage: '/static/_static/comment.png', closeCommentImage: '/static/_static/comment-close.png', loadingImage: '/static/_static/ajax-loader.gif', commentBrightImage: '/static/_static/comment-bright.png', upArrow: '/static/_static/up.png', downArrow: '/static/_static/down.png', upArrowPressed: '/static/_static/up-pressed.png', downArrowPressed: '/static/_static/down-pressed.png', voting: false, moderator: false }; if (typeof COMMENT_OPTIONS != "undefined") { opts = jQuery.extend(opts, COMMENT_OPTIONS); } var popupTemplate = '\
\

\ Sort by:\ best rated\ newest\ oldest\

\
Comments
\
\ loading comments...
\
    \
    \

    Add a comment\ (markup):

    \
    \ reStructured text markup: *emph*, **strong**, \ ``code``, \ code blocks: :: and an indented block after blank line
    \
    \ \

    \ \ Propose a change ▹\ \ \ Propose a change ▿\ \

    \ \ \ \ \ \
    \
    '; var commentTemplate = '\
    \
    \
    \ \ \ \ \ \ \
    \
    \ \ \ \ \ \ \
    \
    \
    \

    \ <%username%>\ <%pretty_rating%>\ <%time.delta%>\

    \
    <#text#>
    \

    \ \ reply ▿\ proposal ▹\ proposal ▿\ \ \

    \
    \
    <#proposal_diff#>\
            
    \
      \
      \
      \
      \ '; var replyTemplate = '\
    • \
      \
      \ \ \ \ \ \ \
      \
    • '; $(document).ready(function() { init(); }); })(jQuery); $(document).ready(function() { // add comment anchors for all paragraphs that are commentable $('.sphinx-has-comment').comment(); // highlight search words in search results $("div.context").each(function() { var params = $.getQueryParameters(); var terms = (params.q) ? params.q[0].split(/\s+/) : []; var result = $(this); $.each(terms, function() { result.highlightText(this.toLowerCase(), 'highlighted'); }); }); // directly open comment window if requested var anchor = document.location.hash; if (anchor.substring(0, 9) == '#comment-') { $('#ao' + anchor.substring(9)).click(); document.location.hash = '#s' + anchor.substring(9); } }); slepc4py-3.7.0/docs/usrman/_static/down.png0000644000175000001440000000055312062620216021411 0ustar dalcinlusers00000000000000PNG  IHDRasRGBbKGDC pHYs B(xtIME"U{IDAT8ҡNCAJ, ++@4>/U^,~T&3M^^^PM6ٹs*RJa)eG*W<"F Fg78G>q OIp:sAj5GنyD^+yU:p_%G@D|aOs(yM,"msx:.b@D|`Vٟ۲иeKſ/G!IENDB`slepc4py-3.7.0/docs/usrman/_static/default.css0000644000175000001440000000771012720314514022076 0ustar dalcinlusers00000000000000/* * default.css_t * ~~~~~~~~~~~~~ * * Sphinx stylesheet -- default theme. * * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @import url("basic.css"); /* -- page layout ----------------------------------------------------------- */ body { font-family: sans-serif; font-size: 100%; background-color: #11303d; color: #000; margin: 0; padding: 0; } div.document { background-color: #1c4e63; } div.documentwrapper { float: left; width: 100%; } div.bodywrapper { margin: 0 0 0 230px; } div.body { background-color: #ffffff; color: #000000; padding: 0 20px 30px 20px; } div.footer { color: #ffffff; width: 100%; padding: 9px 0 9px 0; text-align: center; font-size: 75%; } div.footer a { color: #ffffff; text-decoration: underline; } div.related { background-color: #133f52; line-height: 30px; color: #ffffff; } div.related a { color: #ffffff; } div.sphinxsidebar { } div.sphinxsidebar h3 { font-family: 'Trebuchet MS', sans-serif; color: #ffffff; font-size: 1.4em; font-weight: normal; margin: 0; padding: 0; } div.sphinxsidebar h3 a { color: #ffffff; } div.sphinxsidebar h4 { font-family: 'Trebuchet MS', sans-serif; color: #ffffff; font-size: 1.3em; font-weight: normal; margin: 5px 0 0 0; padding: 0; } div.sphinxsidebar p { color: #ffffff; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; padding: 0; color: #ffffff; } div.sphinxsidebar a { color: #98dbcc; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } /* -- hyperlink styles ------------------------------------------------------ */ a { color: #355f7c; text-decoration: none; } a:visited { color: #355f7c; text-decoration: none; } a:hover { text-decoration: underline; } /* -- body styles ----------------------------------------------------------- */ div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: 'Trebuchet MS', sans-serif; background-color: #f2f2f2; font-weight: normal; color: #20435c; border-bottom: 1px solid #ccc; margin: 20px -20px 10px -20px; padding: 3px 0 3px 10px; } div.body h1 { margin-top: 0; font-size: 200%; } div.body h2 { font-size: 160%; } div.body h3 { font-size: 140%; } div.body h4 { font-size: 120%; } div.body h5 { font-size: 110%; } div.body h6 { font-size: 100%; } a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } a.headerlink:hover { background-color: #c60f0f; color: white; } div.body p, div.body dd, div.body li { text-align: justify; line-height: 130%; } div.admonition p.admonition-title + p { display: inline; } div.admonition p { margin-bottom: 5px; } div.admonition pre { margin-bottom: 5px; } div.admonition ul, div.admonition ol { margin-bottom: 5px; } div.note { background-color: #eee; border: 1px solid #ccc; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } div.warning { background-color: #ffe4e4; border: 1px solid #f66; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } pre { padding: 5px; background-color: #eeffcc; color: #333333; line-height: 120%; border: 1px solid #ac9; border-left: none; border-right: none; } tt { background-color: #ecf0f3; padding: 0 1px 0 1px; font-size: 0.95em; } th { background-color: #ede; } .warning tt { background: #efc2c2; } .note tt { background: #d6d6d6; } .viewcode-back { font-family: sans-serif; } div.viewcode-block:target { background-color: #f4debf; border-top: 1px solid #ac9; border-bottom: 1px solid #ac9; }slepc4py-3.7.0/docs/usrman/_static/pygments.css0000644000175000001440000001006512720314514022315 0ustar dalcinlusers00000000000000.highlight .hll { background-color: #ffffcc } .highlight { background: #eeffcc; } .highlight .c { color: #408090; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #007020; font-weight: bold } /* Keyword */ .highlight .o { color: #666666 } /* Operator */ .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #007020 } /* Comment.Preproc */ .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #FF0000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ .highlight .go { color: #333333 } /* Generic.Output */ .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .highlight .gt { color: #0044DD } /* Generic.Traceback */ .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #007020 } /* Keyword.Pseudo */ .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #902000 } /* Keyword.Type */ .highlight .m { color: #208050 } /* Literal.Number */ .highlight .s { color: #4070a0 } /* Literal.String */ .highlight .na { color: #4070a0 } /* Name.Attribute */ .highlight .nb { color: #007020 } /* Name.Builtin */ .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ .highlight .no { color: #60add5 } /* Name.Constant */ .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ .highlight .ne { color: #007020 } /* Name.Exception */ .highlight .nf { color: #06287e } /* Name.Function */ .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #bb60d5 } /* Name.Variable */ .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #208050 } /* Literal.Number.Bin */ .highlight .mf { color: #208050 } /* Literal.Number.Float */ .highlight .mh { color: #208050 } /* Literal.Number.Hex */ .highlight .mi { color: #208050 } /* Literal.Number.Integer */ .highlight .mo { color: #208050 } /* Literal.Number.Oct */ .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ .highlight .sc { color: #4070a0 } /* Literal.String.Char */ .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ .highlight .sx { color: #c65d09 } /* Literal.String.Other */ .highlight .sr { color: #235388 } /* Literal.String.Regex */ .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ .highlight .ss { color: #517918 } /* Literal.String.Symbol */ .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */slepc4py-3.7.0/docs/usrman/_static/basic.css0000644000175000001440000002040412720314514021526 0ustar dalcinlusers00000000000000/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox input[type="text"] { width: 170px; } div.sphinxsidebar #searchbox input[type="submit"] { width: 30px; } img { border: 0; max-width: 100%; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable dl, table.indextable dd { margin-top: 0; margin-bottom: 0; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- general body styles --------------------------------------------------- */ a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .field-list ul { padding-left: 1em; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table.docutils { border: 0; border-collapse: collapse; } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } table.field-list td, table.field-list th { border: 0 !important; } table.footnote td, table.footnote th { border: 0 !important; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, .highlighted { background-color: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .optional { font-size: 1.3em; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } tt.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } tt.descclassname { background-color: transparent; } tt.xref, a tt { background-color: transparent; font-weight: bold; } h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }slepc4py-3.7.0/docs/usrman/_static/sidebar.js0000644000175000001440000001130312720314514021700 0ustar dalcinlusers00000000000000/* * sidebar.js * ~~~~~~~~~~ * * This script makes the Sphinx sidebar collapsible. * * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton * used to collapse and expand the sidebar. * * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden * and the width of the sidebar and the margin-left of the document * are decreased. When the sidebar is expanded the opposite happens. * This script saves a per-browser/per-session cookie used to * remember the position of the sidebar among the pages. * Once the browser is closed the cookie is deleted and the position * reset to the default (expanded). * * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ $(function() { // global elements used by the functions. // the 'sidebarbutton' element is defined as global after its // creation, in the add_sidebar_button function var bodywrapper = $('.bodywrapper'); var sidebar = $('.sphinxsidebar'); var sidebarwrapper = $('.sphinxsidebarwrapper'); // for some reason, the document has no sidebar; do not run into errors if (!sidebar.length) return; // original margin-left of the bodywrapper and width of the sidebar // with the sidebar expanded var bw_margin_expanded = bodywrapper.css('margin-left'); var ssb_width_expanded = sidebar.width(); // margin-left of the bodywrapper and width of the sidebar // with the sidebar collapsed var bw_margin_collapsed = '.8em'; var ssb_width_collapsed = '.8em'; // colors used by the current theme var dark_color = $('.related').css('background-color'); var light_color = $('.document').css('background-color'); function sidebar_is_collapsed() { return sidebarwrapper.is(':not(:visible)'); } function toggle_sidebar() { if (sidebar_is_collapsed()) expand_sidebar(); else collapse_sidebar(); } function collapse_sidebar() { sidebarwrapper.hide(); sidebar.css('width', ssb_width_collapsed); bodywrapper.css('margin-left', bw_margin_collapsed); sidebarbutton.css({ 'margin-left': '0', 'height': bodywrapper.height() }); sidebarbutton.find('span').text('»'); sidebarbutton.attr('title', _('Expand sidebar')); document.cookie = 'sidebar=collapsed'; } function expand_sidebar() { bodywrapper.css('margin-left', bw_margin_expanded); sidebar.css('width', ssb_width_expanded); sidebarwrapper.show(); sidebarbutton.css({ 'margin-left': ssb_width_expanded-12, 'height': bodywrapper.height() }); sidebarbutton.find('span').text('«'); sidebarbutton.attr('title', _('Collapse sidebar')); document.cookie = 'sidebar=expanded'; } function add_sidebar_button() { sidebarwrapper.css({ 'float': 'left', 'margin-right': '0', 'width': ssb_width_expanded - 28 }); // create the button sidebar.append( '
      «
      ' ); var sidebarbutton = $('#sidebarbutton'); light_color = sidebarbutton.css('background-color'); // find the height of the viewport to center the '<<' in the page var viewport_height; if (window.innerHeight) viewport_height = window.innerHeight; else viewport_height = $(window).height(); sidebarbutton.find('span').css({ 'display': 'block', 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 }); sidebarbutton.click(toggle_sidebar); sidebarbutton.attr('title', _('Collapse sidebar')); sidebarbutton.css({ 'color': '#FFFFFF', 'border-left': '1px solid ' + dark_color, 'font-size': '1.2em', 'cursor': 'pointer', 'height': bodywrapper.height(), 'padding-top': '1px', 'margin-left': ssb_width_expanded - 12 }); sidebarbutton.hover( function () { $(this).css('background-color', dark_color); }, function () { $(this).css('background-color', light_color); } ); } function set_position_from_cookie() { if (!document.cookie) return; var items = document.cookie.split(';'); for(var k=0; k= 0 && !jQuery(node.parentNode).hasClass(className)) { var span = document.createElement("span"); span.className = className; span.appendChild(document.createTextNode(val.substr(pos, text.length))); node.parentNode.insertBefore(span, node.parentNode.insertBefore( document.createTextNode(val.substr(pos + text.length)), node.nextSibling)); node.nodeValue = val.substr(0, pos); } } else if (!jQuery(node).is("button, select, textarea")) { jQuery.each(node.childNodes, function() { highlight(this); }); } } return this.each(function() { highlight(this); }); }; /** * Small JavaScript module for the documentation. */ var Documentation = { init : function() { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); }, /** * i18n support */ TRANSLATIONS : {}, PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext : function(string) { var translated = Documentation.TRANSLATIONS[string]; if (typeof translated == 'undefined') return string; return (typeof translated == 'string') ? translated : translated[0]; }, ngettext : function(singular, plural, n) { var translated = Documentation.TRANSLATIONS[singular]; if (typeof translated == 'undefined') return (n == 1) ? singular : plural; return translated[Documentation.PLURALEXPR(n)]; }, addTranslations : function(catalog) { for (var key in catalog.messages) this.TRANSLATIONS[key] = catalog.messages[key]; this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); this.LOCALE = catalog.locale; }, /** * add context elements like header anchor links */ addContextElements : function() { $('div[id] > :header:first').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this headline')). appendTo(this); }); $('dt[id]').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this definition')). appendTo(this); }); }, /** * workaround a firefox stupidity */ fixFirefoxAnchorBug : function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }, /** * highlight the search words provided in the url in the text */ highlightSearchWords : function() { var params = $.getQueryParameters(); var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; if (terms.length) { var body = $('div.body'); if (!body.length) { body = $('body'); } window.setTimeout(function() { $.each(terms, function() { body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); $('') .appendTo($('#searchbox')); } }, /** * init the domain index toggle buttons */ initIndexTable : function() { var togglers = $('img.toggler').click(function() { var src = $(this).attr('src'); var idnum = $(this).attr('id').substr(7); $('tr.cg-' + idnum).toggle(); if (src.substr(-9) == 'minus.png') $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); else $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); }).css('display', ''); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { togglers.click(); } }, /** * helper function to hide the search marks again */ hideSearchWords : function() { $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, /** * make the url absolute */ makeURL : function(relativeURL) { return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; }, /** * get the current relative url */ getCurrentURL : function() { var path = document.location.pathname; var parts = path.split(/\//); $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { if (this == '..') parts.pop(); }); var url = parts.join('/'); return path.substring(url.lastIndexOf('/') + 1, path.length - 1); } }; // quick alias for translations _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); }); slepc4py-3.7.0/docs/usrman/searchindex.js0000644000175000001440000001452412720314514021146 0ustar dalcinlusers00000000000000Search.setIndex({envversion:42,terms:{represent:[0,2,1],all:[1,5,4],concept:1,partial:1,orthogon:[1,5],illustr:5,definit:1,global:5,signific:3,code:5,abil:1,follow:[1,5,4],row:5,privat:4,depend:[5,4],rayleigh:1,init:5,program:5,under:1,petsc_dir:4,emploi:4,mpd:5,sourc:[0,2],straightforward:5,mpi:[5,4],mechan:1,implicitli:1,relev:5,paz:3,tri:1,solver:[1,5],prefix:[5,4],iter:[1,5],"try":5,vector:[0,2,5,1],matric:[0,2,5,1],upv:0,refer:5,pleas:3,x86_64:4,getdimens:5,cfg:4,dimens:[1,5],direct:1,zero:5,pass:5,lisandro:0,mpi4pi:4,port:[0,2],spectral:[1,5],what:4,nonlinear:1,appear:1,defin:[1,5],section:[5,4],current:[1,5],version:4,nev:5,instanc:[1,5],symmetr:[1,5],"public":3,nep:1,full:5,subspac:1,gener:[1,5,4],coeffici:1,here:5,kler:3,address:1,path:4,modifi:4,implicit:[1,5],valu:[0,2,5,4,1],remark:1,shift:[1,5],host:4,precis:5,converg:[1,5],action:1,implement:[1,4],magnitud:[1,5],quotient:1,schur:[1,5],via:1,appli:4,approxim:1,deprec:4,instal:0,softw:1,select:5,highli:4,from:[1,5],describ:[0,2],would:5,memori:1,univers:4,two:5,next:[5,4],websit:4,few:1,call:[1,5],usr:4,recommend:4,slepc_dir:4,type:[1,5,4],more:5,site:[0,4],particular:5,unpack:4,must:[0,2,5],retriev:5,eps_view:5,scalabl:[1,3],setup:[5,4],work:4,can:[0,2,5,4,1],root:4,overrid:4,encapsul:1,tar:4,process:5,sudo:4,share:4,indic:[1,5,4],high:1,petsc_arch:4,want:[1,5,4],tarbal:4,gettyp:5,sinvert:5,cours:1,end:1,vicent:1,perhap:4,how:[1,5],simpl:[0,2,1],eps_typ:5,map:1,product:1,resourc:3,mat:5,singular:[0,2,1],after:[1,5,4],variant:1,mac:4,plane:1,sistema:1,mai:[0,5,4],eps_target:5,parallel:[0,3,2,4,1],harmon:[1,5],tutori:[0,2],ani:[5,4],setfromopt:5,minim:1,correspond:5,element:5,inform:[5,4],environ:4,allow:[1,5],advwatr:3,lambda:1,order:[1,5,4],softwar:[0,3,2,4],kbx:1,privileg:4,flexibl:[1,3],paramet:[1,5],binari:4,complex:[1,5],mpich:4,main:5,non:[1,5,4],fragment:5,initi:5,arnoldi:1,now:5,tridiagon:5,vidal:[1,3],lanczo:[1,5],edit:4,config:4,tran:1,exampl:[0,2,4],each:5,mean:[1,5],subset:1,getownershiprang:5,hard:4,getconverg:5,extract:[1,5],special:1,out:5,variabl:4,matrix:[0,2,5,1],space:1,gradient:1,facil:5,setsiz:5,rel:5,reader:5,print:5,correct:5,math:1,integr:1,linear:[0,2,1],advanc:[3,5],given:1,argv:5,standard:[1,4],small:1,releas:4,org:[0,3,4],eps_smallest_magnitud:5,basi:[1,5],could:5,exponenti:1,keep:5,thing:5,length:5,support:1,first:[1,5],oper:[1,5],"polit\u00e8cnica":1,rang:5,onc:[1,5],number:[1,5],date:0,alreadi:4,done:5,thick:1,open:4,hood:1,size:1,differ:[1,5],zxf:4,arch:4,macosx_deployment_target:4,system:[0,2,4,1],least:5,tol:5,arithmet:1,conveni:1,slepc:3,cite:3,store:5,eps_tol:5,shell:4,option:[5,4],tool:1,ncv:5,part:[1,5],off:5,st_:5,than:5,target:1,cyclic:1,provid:[1,5,4],structur:1,"final":4,project:[3,5,4],posit:[1,5],geteigenpair:5,comput:[0,3,2,5,1],rend:5,argument:5,krylov:[1,5],have:[5,4],need:[5,4],techniqu:1,lib:4,snow:4,note:5,also:[0,2,5,1],contact:0,which:[1,5],ex1:5,interior:[1,5],methodolog:1,davidson:1,even:1,sure:5,unless:4,distribut:[3,5,4],normal:5,previou:4,gyroscop:1,most:1,specifi:[1,5],pair:[0,2,1],alpha:1,"class":1,doi:3,dens:1,request:5,inde:5,fact:3,"12f":5,"12g":5,cheap:1,particularli:1,fine:1,find:5,setoper:5,access:[1,5],explicitli:1,locat:[1,4],just:4,transact:3,configur:4,solut:[0,3,2,5,1],should:[5,4],local:4,getvec:5,nconv:5,get:[5,4],stop:5,cheaper:1,acces:5,rest:1,restart:[1,5],st_type:5,method:[1,5],cosimo:3,whether:1,common:1,where:[1,4],view:5,set:[1,5,4],dalcinl:0,see:5,result:5,fail:5,contour:1,analog:1,gmail:0,wire:4,dalcin:[0,3],user:[1,5,4],smallest:[1,5],"import":5,altern:[1,4],spars:[0,2,1],jose:[0,1],numer:1,prior:5,mfnsolv:1,solv:[1,5],toler:5,behaviour:1,last:5,krylovschur:5,jroman:0,region:1,equal:5,roman:[0,3,1],eta:5,"val\u00e8ncia":1,equat:[0,2],mani:[1,5],com:0,comment:[0,2],point:5,overview:[0,2],universitat:1,assum:4,addition:1,invert:[1,5],romero:1,invers:1,been:[1,3,5],sinc:5,compon:[0,2],interpret:4,interest:1,basic:[0,2,5,1],hernandez:[1,3],both:5,imag:5,spectrum:[1,5],jacobi:1,togeth:[0,2],those:[1,5],"case":[1,5],schmidt:5,packag:[0,2,4,1],harder:1,rectangular:[0,2,1],eigenproblem:[1,5],"while":1,abov:5,error:5,dsic:[0,1],howev:5,opt:[5,4],readi:[5,4],demo:5,toolkit:[1,3],revis:1,sever:1,develop:4,author:0,make:5,belong:1,cross:[1,4],data:[1,5],python:3,petsc4pi:[0,2,5,4],eps_nev:5,split:1,largest:[1,5],document:[0,2,5],complet:1,finish:5,http:[0,3,4],closest:[1,5],leopard:4,companion:[0,2],rstart:5,eigenpair:5,refin:5,distutil:0,chang:5,tune:1,built:4,appropri:[5,4],kept:5,campo:1,thu:[0,2],well:[1,5],without:[1,4],command:[0,2,1],thi:[0,2,5,4,1],academ:3,usual:1,execut:5,when:1,obtain:1,mfn:1,detail:5,gettoler:5,computeerror:5,archflag:4,bidiagon:1,web:0,like:4,svec:5,conjug:1,script:5,other:[1,5],els:5,modul:5,match:4,real:[1,5],"inform\u00e1tico":1,five:1,bit:4,sdkroot:4,apart:5,insert:5,intel:4,manual:1,integ:5,collect:1,necessari:[1,5],singl:1,fill:5,output:5,often:5,acknowledg:3,some:[1,5,4],intern:[1,5],"export":4,mirror:1,librari:[0,2,5,4],scale:[0,2],lead:3,pep:1,"41957e":5,mathemat:[1,3],larg:[0,2,1],condit:5,eps_harmon:5,either:[1,4],object:[1,5],run:[1,5,4],imaginari:5,getiterationnumb:5,usag:[0,2],step:4,wget:4,about:5,column:5,acm:[1,3],petsc:[0,2,5,4,1],span:1,toma:1,processor:4,effici:1,numpi:[1,5,4],within:5,easy_instal:0,automat:5,diagon:5,hermitian:[1,5],storag:1,your:4,hep:5,log:4,wai:[1,5],problemtyp:5,transform:[1,5],avail:[1,5,4],reli:[0,2],"74118e":5,includ:[1,5],"function":[0,2,1],properli:4,form:1,decomposit:1,neutral:1,gain:5,line:[0,2,1],inlin:5,sdk:4,possibl:[1,5],"default":5,maximum:[1,5],getint:5,below:4,maxit:5,problem:[0,3,2,5,1],similar:5,eigenvector:[0,2,5],linux2:4,featur:[0,2],creat:5,classic:5,cover:1,dure:1,repres:5,file:4,pip:0,curl:4,gram:5,assembl:5,"34269e":5,"_steqr":5,water:3,setproblemtyp:5,setenv:4,test:5,you:[5,4],mpich1:4,intend:[1,5],"76012e":5,polynomi:1,eigenvalu:[0,3,2,5,1],consid:1,enhanc:1,toar:1,rqi:1,bitbucket:[0,4],slepc4pi:[0,2,5,4,1],algorithm:1,svd:1,portion:5,"computaci\u00f3n":1,auxiliari:1,potenti:5,time:[1,5],eigensolv:[1,5]},objtypes:{},objnames:{},filenames:["index","overview","manual","citing","install","tutorial"],titles:["SLEPc for Python","Overview","SLEPc for Python","Citations","Installation","Tutorial"],objects:{},titleterms:{comment:5,featur:1,citat:3,overview:1,"abstract":[0,2],easy_instal:4,pip:4,download:4,instal:4,content:0,compon:1,tutori:5,build:4,slepc:[0,2],sourc:5,python:[0,2],usag:5,line:5,distutil:4,requir:4,simpl:5,exampl:5,command:5}})slepc4py-3.7.0/docs/usrman/_sources/0000755000175000001440000000000012720314530020125 5ustar dalcinlusers00000000000000slepc4py-3.7.0/docs/usrman/_sources/tutorial.txt0000644000175000001440000001733612705464414022555 0ustar dalcinlusers00000000000000Tutorial ======== This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation. Commented source of a simple example ------------------------------------ In this section, we include the source code of example ``demo/ex1.py`` available in the slepc4py distribution, with comments inserted inline. The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accesing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls:: import sys, slepc4py slepc4py.init(sys.argv) Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well:: from petsc4py import PETSc from slepc4py import SLEPc import numpy At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument ``n`` with a default value of 30 (see the next section for example usage of command-line options):: opts = PETSc.Options() n = opts.getInt('n', 30) It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects:: A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0: A[0, :2] = [2, -1] rstart += 1 # last row if rend == n: A[n-1, -2:] = [-1, 2] rend -= 1 # other rows for i in range(rstart, rend): A[i, i-1:i+2] = [-1, 2, -1] A.assemble() The solver object is created in a similar way as other objects in petsc4py:: E = SLEPc.EPS(); E.create() Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the ``setFromOptions()`` operation, so that any options specified at run time in the command line are passed to the solver object:: E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions() After that, the ``solve()`` method will run the selected eigensolver, keeping the solution stored internally:: E.solve() Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object:: Print = PETSc.Sys.Print Print() Print("******************************") Print("*** SLEPc Solution Results ***") Print("******************************") Print() its = E.getIterationNumber() Print("Number of iterations of the method: %d" % its) eps_type = E.getType() Print("Solution method: %s" % eps_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %d" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision:: nconv = E.getConverged() Print("Number of converged eigenpairs %d" % nconv) For each of the ``nconv`` eigenpairs, we can retrieve the eigenvalue ``k``, and the eigenvector, which is represented by means of two petsc4py vectors ``vr`` and ``vi`` (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct:: if nconv > 0: # Create the results vectors vr, wr = A.getVecs() vi, wi = A.getVecs() # Print() Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, vr, vi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print() Example of command-line usage ----------------------------- Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py. A simple execution of the ``demo/ex1.py`` script will result in the following output:: $ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=100 Number of converged eigenpairs 4 k ||Ax-kx||/||kx|| ----------------- ------------------ 3.989739 5.76012e-09 3.959060 1.41957e-08 3.908279 6.74118e-08 3.837916 8.34269e-08 For specifying different setting for the solver parameters, we can use SLEPc command-line options with the ``-eps`` prefix. For instance, to change the number of requested eigenvalues and the tolerance:: $ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11 The method used by the solver object can also be set at run time:: $ python demo/ex1.py -eps_type lanczos All the above settings can also be change within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used:: $ python demo/ex1.py -eps_view EPS Object: 1 MPI processes type: krylovschur Krylov-Schur: 50% of basis vectors kept after restart problem type: symmetric eigenvalue problem selected portion of the spectrum: largest eigenvalues in magnitude number of eigenvalues (nev): 1 number of column vectors (ncv): 16 maximum dimension of projected problem (mpd): 16 maximum number of iterations: 100 tolerance: 1e-08 convergence test: relative to the eigenvalue BV Object: 1 MPI processes type: svec 17 columns of global length 30 orthogonalization method: classical Gram-Schmidt orthogonalization refinement: if needed (eta: 0.7071) DS Object: 1 MPI processes type: hep solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI processes type: shift shift: 0 number of matrices: 1 Note that for computing eigenvalues of smallest magnitude we can use the option ``-eps_smallest_magnitude``, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6:: $ python demo/ex1.py -eps_harmonic -eps_target 0.6 Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the ``-st_`` prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be:: $ python demo/ex1.py -st_type sinvert -eps_target 0.6 slepc4py-3.7.0/docs/usrman/_sources/citing.txt0000644000175000001440000000113012716604206022145 0ustar dalcinlusers00000000000000Citations ========= If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman, and V. Vidal, *SLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 slepc4py-3.7.0/docs/usrman/_sources/overview.txt0000644000175000001440000001553312705464414022555 0ustar dalcinlusers00000000000000Overview ======== *SLEPc for Python* (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc. SLEPc [1]_, [2]_ implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (polynomial or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector. SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available. .. [1] J. E. Roman, C. Campos, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014. .. [2] Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351-362, 2005. .. include:: links.txt Features -------- Currently, the following types of eigenproblems can be addressed: * Standard eigenvalue problem, *Ax=kx*, either for Hermitian or non-Hermitian matrices. * Generalized eigenvalue problem, *Ax=kBx*, either Hermitian positive-definite or not. * Partial singular value decomposition of a rectangular matrix, *Au=sv*. * Polynomial eigenvalue problem, *P(k)x=0*. * Nonlinear eigenvalue problem, *T(k)x=0*. * Computing the action of a matrix function on a vector, *w=f(alpha A)v*. For the linear eigenvalue problem, the following methods are available: * Krylov eigensolvers, particularly Krylov-Schur, Arnoldi, and Lanczos. * Davidson-type eigensolvers, including Generalized Davidson and Jacobi-Davidson. * Subspace iteration and single vector iterations (inverse iteration, RQI). * Conjugate gradient for the minimization of the Rayleigh quotient. * A contour integral solver. For singular value computations, the following alternatives can be used: * Use an eigensolver via the cross-product matrix *A'A* or the cyclic matrix *[0 A; A' 0]*. * Explicitly restarted Lanczos bidiagonalization. * Implicitly restarted Lanczos bidiagonalization (thick-restart Lanczos). For polynomial eigenvalue problems, the following methods are available: * Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization. * TOAR and Q-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems. Computation of interior eigenvalues is supported by means of the following methodologies: * Spectral transformations, such as shift-and-invert. This technique implicitly uses the inverse of the shifted matrix *(A-tI)* in order to compute eigenvalues closest to a given target value, *t*. * Harmonic extraction, a cheap alternative to shift-and-invert that also tries to approximate eigenvalues closest to a target, *t*, but without requiring a matrix inversion. Other remarkable features include: * High computational efficiency, by using NumPy and SLEPc under the hood. * Data-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix-vector products as user-defined Python functions. * Run-time flexibility, by specifying numerous setting at the command line. * Ability to do the computation in parallel. Components ---------- SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object. :EPS: The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation. :SVD: This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS. :PEP: This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic. :NEP: This component covers the case of general nonlinear eigenproblems, T(lambda)x=0. :MFN: This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential. :ST: The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift-and-invert, that allows for the computation of eigenvalues closest to a given target value. :BV: This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end-users. :DS: The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers. :FN: A component used to define mathematical functions. This is required by the end-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form. slepc4py-3.7.0/docs/usrman/_sources/manual.txt0000644000175000001440000000020012705464414022145 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ .. include:: abstract.txt .. include:: toctree.txt .. include:: links.txt slepc4py-3.7.0/docs/usrman/_sources/index.txt0000644000175000001440000000050212716603616022005 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ :Authors: Lisandro Dalcin, Jose E. Roman :Contact: dalcinl@gmail.com, jroman@dsic.upv.es :Web Site: https://bitbucket.org/slepc/slepc4py :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. include:: links.txt slepc4py-3.7.0/docs/usrman/_sources/install.txt0000644000175000001440000000773612705464414022363 0ustar dalcinlusers00000000000000Installation ============ Using **pip** or **easy_install** --------------------------------- You can use :program:`pip` to install :mod:`slepc4py` and its dependencies (:mod:`mpi4py` is optional but highly recommended):: $ pip install [--user] numpy mpi4py $ pip install [--user] petsc petsc4py $ pip install [--user] slepc slepc4py Alternatively, you can use :program:`easy_install` (deprecated):: $ easy_install [--user] slepc4py If you already have working PETSc and SLEPc installs, set environment variables :envvar:`SLEPC_DIR` and :envvar:`PETSC_DIR` (and perhaps :envvar:`PETSC_ARCH` for non-prefix installs) to appropriate values and next use :program:`pip`:: $ export SLEPC_DIR=/path/to/slepc $ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch-linux2-c-opt $ pip install [--user] petsc4py slepc4py Using **distutils** ------------------- Requirements ^^^^^^^^^^^^ You need to have the following software properly installed in order to build *SLEPc for Python*: * Any MPI_ implementation [#]_ (e.g., MPICH_ or `Open MPI`_), built with shared libraries. * A matching version of PETSc_ built with shared libraries. * A matching version of SLEPc_ built with shared libraries. * NumPy_ package. * petsc4py_ package. .. [#] Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option ``--with-mpi=0``). .. [#] You may need to use a parallelized version of the Python interpreter with some MPI-1 implementations (e.g. MPICH1). .. include:: links.txt Downloading ^^^^^^^^^^^ The *SLEPc for Python* package is available for download at the project website generously hosted by Bitbucket. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -O https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz * Using :program:`wget`:: $ wget https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz Building ^^^^^^^^ After unpacking the release tarball:: $ tar -zxf slepc4py-X.Y.tar.gz $ cd slepc4py-X.Y the distribution is ready for building. .. note:: **Mac OS X** users employing a Python distribution built with **universal binaries** may need to set the environment variables :envvar:`MACOSX_DEPLOYMENT_TARGET`, :envvar:`SDKROOT`, and :envvar:`ARCHFLAGS` to appropriate values. As an example, assume your Mac is running **Snow Leopard** on a **64-bit Intel** processor and you want to override the hard-wired cross-development SDK in Python configuration, your environment should be modified like this:: $ export MACOSX_DEPLOYMENT_TARGET=10.6 $ export SDKROOT=/ $ export ARCHFLAGS='-arch x86_64' Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using :command:`setenv`, :command:`export` or what applies to you shell or system) the environment variables :envvar:`SLEPC_DIR``, :envvar:`PETSC_DIR`, and :envvar:`PETSC_ARCH` indicating where you have built/installed SLEPc and PETSc:: $ export SLEPC_DIR=/usr/local/slepc $ export PETSC_DIR=/usr/local/petsc $ export PETSC_ARCH=arch-linux2-c-opt Alternatively, you can edit the file :file:`setup.cfg` and provide the required information below the ``[config]`` section:: [config] slepc_dir = /usr/local/slepc petsc_dir = /usr/local/petsc petsc_arch = arch-linux2-c-opt ... Finally, you can build the distribution by typing:: $ python setup.py build Installing ^^^^^^^^^^ After building, the distribution is ready for installation. If you have root privileges (either by log-in as the root user of by using :command:`sudo`) and you want to install *SLEPc for Python* in your system for all users, just do:: $ python setup.py install The previous steps will install the :mod:`slepc4py` package at standard location :file:`{prefix}/lib/python{X}.{X}/site-packages`. If you do not have root privileges or you want to install *SLEPc for Python* for your private use, just do:: $ python setup.py install --user slepc4py-3.7.0/docs/usrman/tutorial.html0000644000175000001440000005611012720314514021041 0ustar dalcinlusers00000000000000 Tutorial — SLEPc for Python 3.7.0 documentation

      Tutorial

      This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation.

      Commented source of a simple example

      In this section, we include the source code of example demo/ex1.py available in the slepc4py distribution, with comments inserted inline.

      The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accesing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls:

      import sys, slepc4py
      slepc4py.init(sys.argv)
      

      Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well:

      from petsc4py import PETSc
      from slepc4py import SLEPc
      import numpy
      

      At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument n with a default value of 30 (see the next section for example usage of command-line options):

      opts = PETSc.Options()
      n = opts.getInt('n', 30)
      

      It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects:

      A = PETSc.Mat().create()
      A.setSizes([n, n])
      A.setFromOptions()
      A.setUp()
      
      rstart, rend = A.getOwnershipRange()
      
      # first row
      if rstart == 0:
          A[0, :2] = [2, -1]
          rstart += 1
      # last row
      if rend == n:
          A[n-1, -2:] = [-1, 2]
          rend -= 1
      # other rows
      for i in range(rstart, rend):
          A[i, i-1:i+2] = [-1, 2, -1]
      
      A.assemble()
      

      The solver object is created in a similar way as other objects in petsc4py:

      E = SLEPc.EPS(); E.create()
      

      Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the setFromOptions() operation, so that any options specified at run time in the command line are passed to the solver object:

      E.setOperators(A)
      E.setProblemType(SLEPc.EPS.ProblemType.HEP)
      E.setFromOptions()
      

      After that, the solve() method will run the selected eigensolver, keeping the solution stored internally:

      E.solve()
      

      Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object:

      Print = PETSc.Sys.Print
      
      Print()
      Print("******************************")
      Print("*** SLEPc Solution Results ***")
      Print("******************************")
      Print()
      
      its = E.getIterationNumber()
      Print("Number of iterations of the method: %d" % its)
      
      eps_type = E.getType()
      Print("Solution method: %s" % eps_type)
      
      nev, ncv, mpd = E.getDimensions()
      Print("Number of requested eigenvalues: %d" % nev)
      
      tol, maxit = E.getTolerances()
      Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit))
      

      For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision:

      nconv = E.getConverged()
      Print("Number of converged eigenpairs %d" % nconv)
      

      For each of the nconv eigenpairs, we can retrieve the eigenvalue k, and the eigenvector, which is represented by means of two petsc4py vectors vr and vi (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct:

      if nconv > 0:
          # Create the results vectors
          vr, wr = A.getVecs()
          vi, wi = A.getVecs()
          #
          Print()
          Print("        k          ||Ax-kx||/||kx|| ")
          Print("----------------- ------------------")
          for i in range(nconv):
              k = E.getEigenpair(i, vr, vi)
              error = E.computeError(i)
              if k.imag != 0.0:
                  Print(" %9f%+9f j %12g" % (k.real, k.imag, error))
              else:
                  Print(" %12f      %12g" % (k.real, error))
          Print()
      

      Example of command-line usage

      Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py.

      A simple execution of the demo/ex1.py script will result in the following output:

      $ python demo/ex1.py
      
      ******************************
      *** SLEPc Solution Results ***
      ******************************
      
      Number of iterations of the method: 4
      Solution method: krylovschur
      Number of requested eigenvalues: 1
      Stopping condition: tol=1e-07, maxit=100
      Number of converged eigenpairs 4
      
          k          ||Ax-kx||/||kx||
      ----------------- ------------------
           3.989739        5.76012e-09
           3.959060        1.41957e-08
           3.908279        6.74118e-08
           3.837916        8.34269e-08
      

      For specifying different setting for the solver parameters, we can use SLEPc command-line options with the -eps prefix. For instance, to change the number of requested eigenvalues and the tolerance:

      $ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11
      

      The method used by the solver object can also be set at run time:

      $ python demo/ex1.py -eps_type lanczos
      

      All the above settings can also be change within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used:

      $ python demo/ex1.py -eps_view
      
      EPS Object: 1 MPI processes
        type: krylovschur
          Krylov-Schur: 50% of basis vectors kept after restart
        problem type: symmetric eigenvalue problem
        selected portion of the spectrum: largest eigenvalues in magnitude
        number of eigenvalues (nev): 1
        number of column vectors (ncv): 16
        maximum dimension of projected problem (mpd): 16
        maximum number of iterations: 100
        tolerance: 1e-08
        convergence test: relative to the eigenvalue
      BV Object: 1 MPI processes
        type: svec
        17 columns of global length 30
        orthogonalization method: classical Gram-Schmidt
        orthogonalization refinement: if needed (eta: 0.7071)
      DS Object: 1 MPI processes
        type: hep
        solving the problem with: Implicit QR method (_steqr)
      ST Object: 1 MPI processes
        type: shift
        shift: 0
        number of matrices: 1
      

      Note that for computing eigenvalues of smallest magnitude we can use the option -eps_smallest_magnitude, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6:

      $ python demo/ex1.py -eps_harmonic -eps_target 0.6
      

      Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the -st_ prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be:

      $ python demo/ex1.py -st_type sinvert -eps_target 0.6
      

      Table Of Contents

      Previous topic

      Overview

      Next topic

      Installation

      This Page

      slepc4py-3.7.0/docs/usrman/overview.html0000644000175000001440000003141212720314514021042 0ustar dalcinlusers00000000000000 Overview — SLEPc for Python 3.7.0 documentation

      Overview

      SLEPc for Python (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc.

      SLEPc [1], [2] implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (polynomial or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector.

      SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available.

      [1]J. E. Roman, C. Campos, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014.
      [2]Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351-362, 2005.

      Features

      Currently, the following types of eigenproblems can be addressed:

      • Standard eigenvalue problem, Ax=kx, either for Hermitian or non-Hermitian matrices.
      • Generalized eigenvalue problem, Ax=kBx, either Hermitian positive-definite or not.
      • Partial singular value decomposition of a rectangular matrix, Au=sv.
      • Polynomial eigenvalue problem, P(k)x=0.
      • Nonlinear eigenvalue problem, T(k)x=0.
      • Computing the action of a matrix function on a vector, w=f(alpha A)v.

      For the linear eigenvalue problem, the following methods are available:

      • Krylov eigensolvers, particularly Krylov-Schur, Arnoldi, and Lanczos.
      • Davidson-type eigensolvers, including Generalized Davidson and Jacobi-Davidson.
      • Subspace iteration and single vector iterations (inverse iteration, RQI).
      • Conjugate gradient for the minimization of the Rayleigh quotient.
      • A contour integral solver.

      For singular value computations, the following alternatives can be used:

      • Use an eigensolver via the cross-product matrix A’A or the cyclic matrix [0 A; A’ 0].
      • Explicitly restarted Lanczos bidiagonalization.
      • Implicitly restarted Lanczos bidiagonalization (thick-restart Lanczos).

      For polynomial eigenvalue problems, the following methods are available:

      • Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization.
      • TOAR and Q-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems.

      Computation of interior eigenvalues is supported by means of the following methodologies:

      • Spectral transformations, such as shift-and-invert. This technique implicitly uses the inverse of the shifted matrix (A-tI) in order to compute eigenvalues closest to a given target value, t.
      • Harmonic extraction, a cheap alternative to shift-and-invert that also tries to approximate eigenvalues closest to a target, t, but without requiring a matrix inversion.

      Other remarkable features include:

      • High computational efficiency, by using NumPy and SLEPc under the hood.
      • Data-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix-vector products as user-defined Python functions.
      • Run-time flexibility, by specifying numerous setting at the command line.
      • Ability to do the computation in parallel.

      Components

      SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object.

      EPS:The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation.
      SVD:This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS.
      PEP:This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic.
      NEP:This component covers the case of general nonlinear eigenproblems, T(lambda)x=0.
      MFN:This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential.
      ST:The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift-and-invert, that allows for the computation of eigenvalues closest to a given target value.
      BV:This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end-users.
      DS:The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers.
      FN:A component used to define mathematical functions. This is required by the end-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form.

      Table Of Contents

      Previous topic

      SLEPc for Python

      Next topic

      Tutorial

      This Page

      slepc4py-3.7.0/docs/usrman/install.html0000644000175000001440000003216612720314514020651 0ustar dalcinlusers00000000000000 Installation — SLEPc for Python 3.7.0 documentation

      Installation

      Using pip or easy_install

      You can use pip to install slepc4py and its dependencies (mpi4py is optional but highly recommended):

      $ pip install [--user] numpy mpi4py
      $ pip install [--user] petsc petsc4py
      $ pip install [--user] slepc slepc4py
      

      Alternatively, you can use easy_install (deprecated):

      $ easy_install [--user] slepc4py
      

      If you already have working PETSc and SLEPc installs, set environment variables SLEPC_DIR and PETSC_DIR (and perhaps PETSC_ARCH for non-prefix installs) to appropriate values and next use pip:

      $ export SLEPC_DIR=/path/to/slepc
      $ export PETSC_DIR=/path/to/petsc
      $ export PETSC_ARCH=arch-linux2-c-opt
      $ pip install [--user] petsc4py slepc4py
      

      Using distutils

      Requirements

      You need to have the following software properly installed in order to build SLEPc for Python:

      • Any MPI implementation [1] (e.g., MPICH or Open MPI), built with shared libraries.
      • A matching version of PETSc built with shared libraries.
      • A matching version of SLEPc built with shared libraries.
      • NumPy package.
      • petsc4py package.
      [1]Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option --with-mpi=0).
      [2]You may need to use a parallelized version of the Python interpreter with some MPI-1 implementations (e.g. MPICH1).

      Downloading

      The SLEPc for Python package is available for download at the project website generously hosted by Bitbucket. You can use curl or wget to get a release tarball.

      • Using curl:

        $ curl -O https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz
        
      • Using wget:

        $ wget https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-X.Y.tar.gz
        

      Building

      After unpacking the release tarball:

      $ tar -zxf slepc4py-X.Y.tar.gz
      $ cd slepc4py-X.Y
      

      the distribution is ready for building.

      Note

      Mac OS X users employing a Python distribution built with universal binaries may need to set the environment variables MACOSX_DEPLOYMENT_TARGET, SDKROOT, and ARCHFLAGS to appropriate values. As an example, assume your Mac is running Snow Leopard on a 64-bit Intel processor and you want to override the hard-wired cross-development SDK in Python configuration, your environment should be modified like this:

      $ export MACOSX_DEPLOYMENT_TARGET=10.6
      $ export SDKROOT=/
      $ export ARCHFLAGS='-arch x86_64'
      

      Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using setenv, export or what applies to you shell or system) the environment variables SLEPC_DIR`, PETSC_DIR, and PETSC_ARCH indicating where you have built/installed SLEPc and PETSc:

      $ export SLEPC_DIR=/usr/local/slepc
      $ export PETSC_DIR=/usr/local/petsc
      $ export PETSC_ARCH=arch-linux2-c-opt
      

      Alternatively, you can edit the file setup.cfg and provide the required information below the [config] section:

      [config]
      slepc_dir  = /usr/local/slepc
      petsc_dir  = /usr/local/petsc
      petsc_arch = arch-linux2-c-opt
      ...
      

      Finally, you can build the distribution by typing:

      $ python setup.py build
      

      Installing

      After building, the distribution is ready for installation.

      If you have root privileges (either by log-in as the root user of by using sudo) and you want to install SLEPc for Python in your system for all users, just do:

      $ python setup.py install
      

      The previous steps will install the slepc4py package at standard location prefix/lib/pythonX.X/site-packages.

      If you do not have root privileges or you want to install SLEPc for Python for your private use, just do:

      $ python setup.py install --user
      

      Table Of Contents

      Previous topic

      Tutorial

      Next topic

      Citations

      This Page

      slepc4py-3.7.0/docs/usrman/citing.html0000644000175000001440000001025212720314514020450 0ustar dalcinlusers00000000000000 Citations — SLEPc for Python 3.7.0 documentation

      Citations

      If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.

      Previous topic

      Installation

      This Page

      slepc4py-3.7.0/docs/usrman/.buildinfo0000644000175000001440000000034612720314514020264 0ustar dalcinlusers00000000000000# Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. config: f63cdeff1cd3914759980a6d91e1f35e tags: 645f666f9bcd5a90fca523b33c5a78b7 slepc4py-3.7.0/docs/index.rst0000644000175000001440000000340612716603414016651 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Online Documentation -------------------- + `User Manual (HTML)`_ (generated with Sphinx_). + `User Manual (PDF)`_ (generated with Sphinx_). + `API Reference`_ (generated with Epydoc_). .. _User Manual (HTML): usrman/index.html .. _User Manual (PDF): slepc4py.pdf .. _API Reference: apiref/index.html .. _Sphinx: http://sphinx.pocoo.org/ .. _Epydoc: http://epydoc.sourceforge.net/ Discussion and Support ---------------------- + Mailing Lists: petsc-users@mcs.anl.gov, slepc-maint@upv.es Downloads and Development ------------------------- + Project Site: https://bitbucket.org/slepc/slepc4py + Source Releases: https://bitbucket.org/slepc/slepc4py/downloads/ + Issue Tracker: https://bitbucket.org/slepc/slepc4py/issues/ + Git Repository: https://bitbucket.org/slepc/slepc4py.git Citations --------- If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman, and V. Vidal, *SLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 Acknowledgments --------------- This project was partially supported by the Extreme Computing Research Center (ECRC), Division of Computer, Electrical, and Mathematical Sciences & Engineering (CEMSE), King Abdullah University of Science and Technology (KAUST). slepc4py-3.7.0/docs/slepc4py.10000644000175000001440000005515212720314527016641 0ustar dalcinlusers00000000000000.\" Man page generated from reStructuredText. . .TH "SLEPC4PY" "1" "May 22, 2016" "3.7" "SLEPc for Python" .SH NAME slepc4py \- SLEPc for Python . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .INDENT 0.0 .TP .B Authors Lisandro Dalcin, Jose E. Roman .TP .B Contact \fI\%dalcinl@gmail.com\fP, \fI\%jroman@dsic.upv.es\fP .TP .B Web Site \fI\%https://bitbucket.org/slepc/slepc4py\fP .TP .B Date May 22, 2016 .UNINDENT .SS Abstract .sp This document describes \fI\%slepc4py\fP, a \fI\%Python\fP port to the \fI\%SLEPc\fP libraries. .sp \fI\%SLEPc\fP is a software package for the parallel solution of large\-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix. .sp \fI\%SLEPc\fP relies on \fI\%PETSc\fP for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, \fI\%slepc4py\fP must be used together with its companion \fI\%petsc4py\fP\&. .SH CONTENTS .SS Overview .sp \fISLEPc for Python\fP (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc. .sp SLEPc [1], [2] implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (polynomial or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector. .sp SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available. .IP [1] 5 J. E. Roman, C. Campos, E. Romero, A. Tomas. SLEPc Users Manual. DSIC\-II/24/02 \- Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014. .IP [2] 5 Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351\-362, 2005. .SS Features .sp Currently, the following types of eigenproblems can be addressed: .INDENT 0.0 .IP \(bu 2 Standard eigenvalue problem, \fIAx=kx\fP, either for Hermitian or non\-Hermitian matrices. .IP \(bu 2 Generalized eigenvalue problem, \fIAx=kBx\fP, either Hermitian positive\-definite or not. .IP \(bu 2 Partial singular value decomposition of a rectangular matrix, \fIAu=sv\fP\&. .IP \(bu 2 Polynomial eigenvalue problem, \fIP(k)x=0\fP\&. .IP \(bu 2 Nonlinear eigenvalue problem, \fIT(k)x=0\fP\&. .IP \(bu 2 Computing the action of a matrix function on a vector, \fIw=f(alpha A)v\fP\&. .UNINDENT .sp For the linear eigenvalue problem, the following methods are available: .INDENT 0.0 .IP \(bu 2 Krylov eigensolvers, particularly Krylov\-Schur, Arnoldi, and Lanczos. .IP \(bu 2 Davidson\-type eigensolvers, including Generalized Davidson and Jacobi\-Davidson. .IP \(bu 2 Subspace iteration and single vector iterations (inverse iteration, RQI). .IP \(bu 2 Conjugate gradient for the minimization of the Rayleigh quotient. .IP \(bu 2 A contour integral solver. .UNINDENT .sp For singular value computations, the following alternatives can be used: .INDENT 0.0 .IP \(bu 2 Use an eigensolver via the cross\-product matrix \fIA\(aqA\fP or the cyclic matrix \fI[0 A; A\(aq 0]\fP\&. .IP \(bu 2 Explicitly restarted Lanczos bidiagonalization. .IP \(bu 2 Implicitly restarted Lanczos bidiagonalization (thick\-restart Lanczos). .UNINDENT .sp For polynomial eigenvalue problems, the following methods are available: .INDENT 0.0 .IP \(bu 2 Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization. .IP \(bu 2 TOAR and Q\-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems. .UNINDENT .sp Computation of interior eigenvalues is supported by means of the following methodologies: .INDENT 0.0 .IP \(bu 2 Spectral transformations, such as shift\-and\-invert. This technique implicitly uses the inverse of the shifted matrix \fI(A\-tI)\fP in order to compute eigenvalues closest to a given target value, \fIt\fP\&. .IP \(bu 2 Harmonic extraction, a cheap alternative to shift\-and\-invert that also tries to approximate eigenvalues closest to a target, \fIt\fP, but without requiring a matrix inversion. .UNINDENT .sp Other remarkable features include: .INDENT 0.0 .IP \(bu 2 High computational efficiency, by using NumPy and SLEPc under the hood. .IP \(bu 2 Data\-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix\-vector products as user\-defined Python functions. .IP \(bu 2 Run\-time flexibility, by specifying numerous setting at the command line. .IP \(bu 2 Ability to do the computation in parallel. .UNINDENT .SS Components .sp SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object. .INDENT 0.0 .TP .B EPS The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation. .TP .B SVD This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS. .TP .B PEP This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic. .TP .B NEP This component covers the case of general nonlinear eigenproblems, T(lambda)x=0. .TP .B MFN This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential. .TP .B ST The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift\-and\-invert, that allows for the computation of eigenvalues closest to a given target value. .TP .B BV This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end\-users. .TP .B DS The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers. .TP .B FN A component used to define mathematical functions. This is required by the end\-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form. .UNINDENT .SS Tutorial .sp This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation. .SS Commented source of a simple example .sp In this section, we include the source code of example \fBdemo/ex1.py\fP available in the slepc4py distribution, with comments inserted inline. .sp The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accesing command\-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C import sys, slepc4py slepc4py.init(sys.argv) .ft P .fi .UNINDENT .UNINDENT .sp Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C from petsc4py import PETSc from slepc4py import SLEPc import numpy .ft P .fi .UNINDENT .UNINDENT .sp At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command\-line argument \fBn\fP with a default value of 30 (see the next section for example usage of command\-line options): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C opts = PETSc.Options() n = opts.getInt(\(aqn\(aq, 30) .ft P .fi .UNINDENT .UNINDENT .sp It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non\-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and \-1 in off\-diagonal positions. See petsc4py documentation for details about matrix objects: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0: A[0, :2] = [2, \-1] rstart += 1 # last row if rend == n: A[n\-1, \-2:] = [\-1, 2] rend \-= 1 # other rows for i in range(rstart, rend): A[i, i\-1:i+2] = [\-1, 2, \-1] A.assemble() .ft P .fi .UNINDENT .UNINDENT .sp The solver object is created in a similar way as other objects in petsc4py: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C E = SLEPc.EPS(); E.create() .ft P .fi .UNINDENT .UNINDENT .sp Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the \fBsetFromOptions()\fP operation, so that any options specified at run time in the command line are passed to the solver object: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions() .ft P .fi .UNINDENT .UNINDENT .sp After that, the \fBsolve()\fP method will run the selected eigensolver, keeping the solution stored internally: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C E.solve() .ft P .fi .UNINDENT .UNINDENT .sp Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C Print = PETSc.Sys.Print Print() Print("******************************") Print("*** SLEPc Solution Results ***") Print("******************************") Print() its = E.getIterationNumber() Print("Number of iterations of the method: %d" % its) eps_type = E.getType() Print("Solution method: %s" % eps_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %d" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) .ft P .fi .UNINDENT .UNINDENT .sp For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C nconv = E.getConverged() Print("Number of converged eigenpairs %d" % nconv) .ft P .fi .UNINDENT .UNINDENT .sp For each of the \fBnconv\fP eigenpairs, we can retrieve the eigenvalue \fBk\fP, and the eigenvector, which is represented by means of two petsc4py vectors \fBvr\fP and \fBvi\fP (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C if nconv > 0: # Create the results vectors vr, wr = A.getVecs() vi, wi = A.getVecs() # Print() Print(" k ||Ax\-kx||/||kx|| ") Print("\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-") for i in range(nconv): k = E.getEigenpair(i, vr, vi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print() .ft P .fi .UNINDENT .UNINDENT .SS Example of command\-line usage .sp Now we illustrate how to specify command\-line options in order to extract the full potential of slepc4py. .sp A simple execution of the \fBdemo/ex1.py\fP script will result in the following output: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e\-07, maxit=100 Number of converged eigenpairs 4 k ||Ax\-kx||/||kx|| \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- 3.989739 5.76012e\-09 3.959060 1.41957e\-08 3.908279 6.74118e\-08 3.837916 8.34269e\-08 .ft P .fi .UNINDENT .UNINDENT .sp For specifying different setting for the solver parameters, we can use SLEPc command\-line options with the \fB\-eps\fP prefix. For instance, to change the number of requested eigenvalues and the tolerance: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py \-eps_nev 10 \-eps_tol 1e\-11 .ft P .fi .UNINDENT .UNINDENT .sp The method used by the solver object can also be set at run time: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py \-eps_type lanczos .ft P .fi .UNINDENT .UNINDENT .sp All the above settings can also be change within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command\-line, it is often useful to view the particular settings that are currently being used: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py \-eps_view EPS Object: 1 MPI processes type: krylovschur Krylov\-Schur: 50% of basis vectors kept after restart problem type: symmetric eigenvalue problem selected portion of the spectrum: largest eigenvalues in magnitude number of eigenvalues (nev): 1 number of column vectors (ncv): 16 maximum dimension of projected problem (mpd): 16 maximum number of iterations: 100 tolerance: 1e\-08 convergence test: relative to the eigenvalue BV Object: 1 MPI processes type: svec 17 columns of global length 30 orthogonalization method: classical Gram\-Schmidt orthogonalization refinement: if needed (eta: 0.7071) DS Object: 1 MPI processes type: hep solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI processes type: shift shift: 0 number of matrices: 1 .ft P .fi .UNINDENT .UNINDENT .sp Note that for computing eigenvalues of smallest magnitude we can use the option \fB\-eps_smallest_magnitude\fP, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py \-eps_harmonic \-eps_target 0.6 .ft P .fi .UNINDENT .UNINDENT .sp Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command\-line, this is indicated with the \fB\-st_\fP prefix. For example, shift\-and\-invert with a value of the shift equal to 0.6 would be: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python demo/ex1.py \-st_type sinvert \-eps_target 0.6 .ft P .fi .UNINDENT .UNINDENT .SS Installation .SS Using \fBpip\fP or \fBeasy_install\fP .sp You can use \fBpip\fP to install \fBslepc4py\fP and its dependencies (\fBmpi4py\fP is optional but highly recommended): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ pip install [\-\-user] numpy mpi4py $ pip install [\-\-user] petsc petsc4py $ pip install [\-\-user] slepc slepc4py .ft P .fi .UNINDENT .UNINDENT .sp Alternatively, you can use \fBeasy_install\fP (deprecated): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ easy_install [\-\-user] slepc4py .ft P .fi .UNINDENT .UNINDENT .sp If you already have working PETSc and SLEPc installs, set environment variables \fBSLEPC_DIR\fP and \fBPETSC_DIR\fP (and perhaps \fBPETSC_ARCH\fP for non\-prefix installs) to appropriate values and next use \fBpip\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ export SLEPC_DIR=/path/to/slepc $ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch\-linux2\-c\-opt $ pip install [\-\-user] petsc4py slepc4py .ft P .fi .UNINDENT .UNINDENT .SS Using \fBdistutils\fP .SS Requirements .sp You need to have the following software properly installed in order to build \fISLEPc for Python\fP: .INDENT 0.0 .IP \(bu 2 Any \fI\%MPI\fP implementation [1] (e.g., \fI\%MPICH\fP or \fI\%Open MPI\fP), built with shared libraries. .IP \(bu 2 A matching version of \fI\%PETSc\fP built with shared libraries. .IP \(bu 2 A matching version of \fI\%SLEPc\fP built with shared libraries. .IP \(bu 2 \fI\%NumPy\fP package. .IP \(bu 2 \fI\%petsc4py\fP package. .UNINDENT .IP [1] 5 Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option \fB\-\-with\-mpi=0\fP). .IP [2] 5 You may need to use a parallelized version of the Python interpreter with some MPI\-1 implementations (e.g. MPICH1). .SS Downloading .sp The \fISLEPc for Python\fP package is available for download at the project website generously hosted by Bitbucket. You can use \fBcurl\fP or \fBwget\fP to get a release tarball. .INDENT 0.0 .IP \(bu 2 Using \fBcurl\fP: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ curl \-O https://bitbucket.org/slepc/slepc4py/downloads/slepc4py\-X.Y.tar.gz .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 Using \fBwget\fP: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ wget https://bitbucket.org/slepc/slepc4py/downloads/slepc4py\-X.Y.tar.gz .ft P .fi .UNINDENT .UNINDENT .UNINDENT .SS Building .sp After unpacking the release tarball: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ tar \-zxf slepc4py\-X.Y.tar.gz $ cd slepc4py\-X.Y .ft P .fi .UNINDENT .UNINDENT .sp the distribution is ready for building. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 \fBMac OS X\fP users employing a Python distribution built with \fBuniversal binaries\fP may need to set the environment variables \fBMACOSX_DEPLOYMENT_TARGET\fP, \fBSDKROOT\fP, and \fBARCHFLAGS\fP to appropriate values. As an example, assume your Mac is running \fBSnow Leopard\fP on a \fB64\-bit Intel\fP processor and you want to override the hard\-wired cross\-development SDK in Python configuration, your environment should be modified like this: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ export MACOSX_DEPLOYMENT_TARGET=10.6 $ export SDKROOT=/ $ export ARCHFLAGS=\(aq\-arch x86_64\(aq .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using \fBsetenv\fP, \fBexport\fP or what applies to you shell or system) the environment variables \fBSLEPC_DIR\(ga\fP, \fBPETSC_DIR\fP, and \fBPETSC_ARCH\fP indicating where you have built/installed SLEPc and PETSc: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ export SLEPC_DIR=/usr/local/slepc $ export PETSC_DIR=/usr/local/petsc $ export PETSC_ARCH=arch\-linux2\-c\-opt .ft P .fi .UNINDENT .UNINDENT .sp Alternatively, you can edit the file \fBsetup.cfg\fP and provide the required information below the \fB[config]\fP section: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C [config] slepc_dir = /usr/local/slepc petsc_dir = /usr/local/petsc petsc_arch = arch\-linux2\-c\-opt \&... .ft P .fi .UNINDENT .UNINDENT .sp Finally, you can build the distribution by typing: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py build .ft P .fi .UNINDENT .UNINDENT .SS Installing .sp After building, the distribution is ready for installation. .sp If you have root privileges (either by log\-in as the root user of by using \fBsudo\fP) and you want to install \fISLEPc for Python\fP in your system for all users, just do: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py install .ft P .fi .UNINDENT .UNINDENT .sp The previous steps will install the \fBslepc4py\fP package at standard location \fB\fIprefix\fP/lib/python\fIX\fP\&.\fIX\fP/site\-packages\fP\&. .sp If you do not have root privileges or you want to install \fISLEPc for Python\fP for your private use, just do: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py install \-\-user .ft P .fi .UNINDENT .UNINDENT .SS Citations .sp If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. .INDENT 0.0 .IP \(bu 2 L. Dalcin, P. Kler, R. Paz, and A. Cosimo, \fIParallel Distributed Computing using Python\fP, Advances in Water Resources, 34(9):1124\-1139, 2011. \fI\%http://dx.doi.org/10.1016/j.advwatres.2011.04.013\fP .IP \(bu 2 V. Hernandez, J.E. Roman, and V. Vidal, \fISLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems\fP, ACM Transactions on Mathematical Software, 31(3):351\-362, 2005. \fI\%http://dx.doi.org/10.1145/1089014.1089019\fP .UNINDENT .SH AUTHOR Lisandro Dalcin .SH COPYRIGHT 2016, Lisandro Dalcin .\" Generated by docutils manpage writer. . slepc4py-3.7.0/docs/CHANGES.html0000644000175000001440000002341312720314512016737 0ustar dalcinlusers00000000000000 CHANGES: SLEPc for Python

      CHANGES: SLEPc for Python

      Author: Lisandro Dalcin
      Contact: dalcinl@gmail.com

      Release 3.7.0

      • Update to SLEPc 3.7 release.

      Release 3.6.0

      • Update to SLEPc 3.6 release.

      Release 3.5.1

      • Add RG class introduced in SLEPc 3.5 release.

      • Add PySlepcXXX_New/Get C API functions.

      • Fix compilation problem with complex scalars on OS X.

      • Fix outdated SWIG interface file.

      Release 3.5

      • Update to SLEPc 3.5 release.

      Release 3.4

      • Update to SLEPc 3.4 release.

      Release 3.3.1

      • Regenerate the wrappers using Cython 0.18 and fix binary compatibility issues with petsc4py 3.3.1 .

      Release 3.3

      • Update to SLEPc 3.3 release.

      Release 1.2

      • Update to SLEPc 3.2 release.

      Release 1.1

      • Support for new QEP quadratic eigenproblem solver in SLEPc.

      • Support for pip install slepc4py to download and install SLEPc.

      • Support for PETSc/SLEPc static library builds (Linux-only).

      • Preliminar support for Python 3.

      Release 1.0.0

      This is the fist release of the all-new, Cython-based, implementation of SLEPc for Python.

      slepc4py-3.7.0/slepc4py.egg-info/0000755000175000001440000000000012720314530017303 5ustar dalcinlusers00000000000000slepc4py-3.7.0/slepc4py.egg-info/top_level.txt0000644000175000001440000000001112720314530022025 0ustar dalcinlusers00000000000000slepc4py slepc4py-3.7.0/slepc4py.egg-info/SOURCES.txt0000644000175000001440000002136612720314530021177 0ustar dalcinlusers00000000000000CHANGES.rst DESCRIPTION.rst LICENSE.rst MANIFEST.in README.rst setup.cfg setup.py conf/__init__.py conf/baseconf.py conf/cythonize.py conf/epydoc.cfg conf/epydocify.py conf/metadata.py conf/slepcconf.py demo/ex1.py demo/ex10.py demo/ex11.py demo/ex2.py demo/ex3.py demo/ex4.py demo/ex5.py demo/ex6.py demo/ex7.py demo/ex8.py demo/ex9.py demo/makefile docs/CHANGES.html docs/LICENSE.html docs/index.html docs/index.rst docs/slepc4py.1 docs/slepc4py.info docs/slepc4py.pdf docs/apiref/api-objects.txt docs/apiref/class-tree.html docs/apiref/class_hierarchy_for__p_mem.png docs/apiref/class_hierarchy_for_balance.png docs/apiref/class_hierarchy_for_basis.png docs/apiref/class_hierarchy_for_blocktype.png docs/apiref/class_hierarchy_for_bv.png docs/apiref/class_hierarchy_for_combinetyp.png docs/apiref/class_hierarchy_for_conv.png docs/apiref/class_hierarchy_for_conv_2.png docs/apiref/class_hierarchy_for_convergedr.png docs/apiref/class_hierarchy_for_convergedr_2.png docs/apiref/class_hierarchy_for_convergedr_3.png docs/apiref/class_hierarchy_for_convergedr_4.png docs/apiref/class_hierarchy_for_convergedr_5.png docs/apiref/class_hierarchy_for_ds.png docs/apiref/class_hierarchy_for_eps.png docs/apiref/class_hierarchy_for_errortype.png docs/apiref/class_hierarchy_for_errortype_2.png docs/apiref/class_hierarchy_for_errortype_3.png docs/apiref/class_hierarchy_for_errortype_4.png docs/apiref/class_hierarchy_for_extract.png docs/apiref/class_hierarchy_for_extraction.png docs/apiref/class_hierarchy_for_fn.png docs/apiref/class_hierarchy_for_lanczosreo.png docs/apiref/class_hierarchy_for_matmode.png docs/apiref/class_hierarchy_for_mattype.png docs/apiref/class_hierarchy_for_mfn.png docs/apiref/class_hierarchy_for_nep.png docs/apiref/class_hierarchy_for_orthogtype.png docs/apiref/class_hierarchy_for_pep.png docs/apiref/class_hierarchy_for_powershift.png docs/apiref/class_hierarchy_for_problemtyp.png docs/apiref/class_hierarchy_for_problemtyp_2.png docs/apiref/class_hierarchy_for_refine.png docs/apiref/class_hierarchy_for_refine_2.png docs/apiref/class_hierarchy_for_refinesche.png docs/apiref/class_hierarchy_for_refinesche_2.png docs/apiref/class_hierarchy_for_refinetype.png docs/apiref/class_hierarchy_for_rg.png docs/apiref/class_hierarchy_for_scale.png docs/apiref/class_hierarchy_for_st.png docs/apiref/class_hierarchy_for_statetype.png docs/apiref/class_hierarchy_for_svd.png docs/apiref/class_hierarchy_for_sys.png docs/apiref/class_hierarchy_for_type.png docs/apiref/class_hierarchy_for_type_10.png docs/apiref/class_hierarchy_for_type_2.png docs/apiref/class_hierarchy_for_type_3.png docs/apiref/class_hierarchy_for_type_4.png docs/apiref/class_hierarchy_for_type_5.png docs/apiref/class_hierarchy_for_type_6.png docs/apiref/class_hierarchy_for_type_7.png docs/apiref/class_hierarchy_for_type_8.png docs/apiref/class_hierarchy_for_type_9.png docs/apiref/class_hierarchy_for_which.png docs/apiref/class_hierarchy_for_which_2.png docs/apiref/class_hierarchy_for_which_3.png docs/apiref/class_hierarchy_for_which_4.png docs/apiref/crarr.png docs/apiref/epydoc.css docs/apiref/epydoc.js docs/apiref/frames.html docs/apiref/help.html docs/apiref/identifier-index.html docs/apiref/index.html docs/apiref/module-tree.html docs/apiref/redirect.html docs/apiref/slepc4py-module.html docs/apiref/slepc4py.SLEPc-module.html docs/apiref/slepc4py.SLEPc.BV-class.html docs/apiref/slepc4py.SLEPc.BV.BlockType-class.html docs/apiref/slepc4py.SLEPc.BV.OrthogType-class.html docs/apiref/slepc4py.SLEPc.BV.RefineType-class.html docs/apiref/slepc4py.SLEPc.BV.Type-class.html docs/apiref/slepc4py.SLEPc.DS-class.html docs/apiref/slepc4py.SLEPc.DS.MatType-class.html docs/apiref/slepc4py.SLEPc.DS.StateType-class.html docs/apiref/slepc4py.SLEPc.DS.Type-class.html docs/apiref/slepc4py.SLEPc.EPS-class.html docs/apiref/slepc4py.SLEPc.EPS.Balance-class.html docs/apiref/slepc4py.SLEPc.EPS.Conv-class.html docs/apiref/slepc4py.SLEPc.EPS.ConvergedReason-class.html docs/apiref/slepc4py.SLEPc.EPS.ErrorType-class.html docs/apiref/slepc4py.SLEPc.EPS.Extraction-class.html docs/apiref/slepc4py.SLEPc.EPS.LanczosReorthogType-class.html docs/apiref/slepc4py.SLEPc.EPS.PowerShiftType-class.html docs/apiref/slepc4py.SLEPc.EPS.ProblemType-class.html docs/apiref/slepc4py.SLEPc.EPS.Type-class.html docs/apiref/slepc4py.SLEPc.EPS.Which-class.html docs/apiref/slepc4py.SLEPc.FN-class.html docs/apiref/slepc4py.SLEPc.FN.CombineType-class.html docs/apiref/slepc4py.SLEPc.FN.Type-class.html docs/apiref/slepc4py.SLEPc.MFN-class.html docs/apiref/slepc4py.SLEPc.MFN.ConvergedReason-class.html docs/apiref/slepc4py.SLEPc.MFN.Type-class.html docs/apiref/slepc4py.SLEPc.NEP-class.html docs/apiref/slepc4py.SLEPc.NEP.ConvergedReason-class.html docs/apiref/slepc4py.SLEPc.NEP.ErrorType-class.html docs/apiref/slepc4py.SLEPc.NEP.Refine-class.html docs/apiref/slepc4py.SLEPc.NEP.RefineScheme-class.html docs/apiref/slepc4py.SLEPc.NEP.Type-class.html docs/apiref/slepc4py.SLEPc.NEP.Which-class.html docs/apiref/slepc4py.SLEPc.PEP-class.html docs/apiref/slepc4py.SLEPc.PEP.Basis-class.html docs/apiref/slepc4py.SLEPc.PEP.Conv-class.html docs/apiref/slepc4py.SLEPc.PEP.ConvergedReason-class.html docs/apiref/slepc4py.SLEPc.PEP.ErrorType-class.html docs/apiref/slepc4py.SLEPc.PEP.Extract-class.html docs/apiref/slepc4py.SLEPc.PEP.ProblemType-class.html docs/apiref/slepc4py.SLEPc.PEP.Refine-class.html docs/apiref/slepc4py.SLEPc.PEP.RefineScheme-class.html docs/apiref/slepc4py.SLEPc.PEP.Scale-class.html docs/apiref/slepc4py.SLEPc.PEP.Type-class.html docs/apiref/slepc4py.SLEPc.PEP.Which-class.html docs/apiref/slepc4py.SLEPc.RG-class.html docs/apiref/slepc4py.SLEPc.RG.Type-class.html docs/apiref/slepc4py.SLEPc.ST-class.html docs/apiref/slepc4py.SLEPc.ST.MatMode-class.html docs/apiref/slepc4py.SLEPc.ST.Type-class.html docs/apiref/slepc4py.SLEPc.SVD-class.html docs/apiref/slepc4py.SLEPc.SVD.ConvergedReason-class.html docs/apiref/slepc4py.SLEPc.SVD.ErrorType-class.html docs/apiref/slepc4py.SLEPc.SVD.Type-class.html docs/apiref/slepc4py.SLEPc.SVD.Which-class.html docs/apiref/slepc4py.SLEPc.Sys-class.html docs/apiref/slepc4py.SLEPc._p_mem-class.html docs/apiref/slepc4py.lib-module.html docs/apiref/toc-everything.html docs/apiref/toc-slepc4py-module.html docs/apiref/toc-slepc4py.SLEPc-module.html docs/apiref/toc-slepc4py.lib-module.html docs/apiref/toc.html docs/source/Makefile docs/source/abstract.txt docs/source/citing.rst docs/source/conf.py docs/source/index.rst docs/source/install.rst docs/source/links.txt docs/source/make.bat docs/source/manual.rst docs/source/overview.rst docs/source/sphinxfix.sty docs/source/toctree.txt docs/source/tutorial.rst docs/usrman/.buildinfo docs/usrman/citing.html docs/usrman/genindex.html docs/usrman/index.html docs/usrman/install.html docs/usrman/manual.html docs/usrman/objects.inv docs/usrman/overview.html docs/usrman/search.html docs/usrman/searchindex.js docs/usrman/tutorial.html docs/usrman/_sources/citing.txt docs/usrman/_sources/index.txt docs/usrman/_sources/install.txt docs/usrman/_sources/manual.txt docs/usrman/_sources/overview.txt docs/usrman/_sources/tutorial.txt docs/usrman/_static/ajax-loader.gif docs/usrman/_static/basic.css docs/usrman/_static/comment-bright.png docs/usrman/_static/comment-close.png docs/usrman/_static/comment.png docs/usrman/_static/default.css docs/usrman/_static/doctools.js docs/usrman/_static/down-pressed.png docs/usrman/_static/down.png docs/usrman/_static/file.png docs/usrman/_static/jquery.js docs/usrman/_static/minus.png docs/usrman/_static/plus.png docs/usrman/_static/pygments.css docs/usrman/_static/searchtools.js docs/usrman/_static/sidebar.js docs/usrman/_static/underscore.js docs/usrman/_static/up-pressed.png docs/usrman/_static/up.png docs/usrman/_static/websupport.js slepc4py.egg-info/PKG-INFO slepc4py.egg-info/SOURCES.txt slepc4py.egg-info/dependency_links.txt slepc4py.egg-info/not-zip-safe slepc4py.egg-info/requires.txt slepc4py.egg-info/top_level.txt src/SLEPc.c src/SLEPc.pxd src/SLEPc.py src/__init__.py src/__main__.py src/slepc4py.SLEPc.c src/slepc4py.SLEPc.pyx src/SLEPc/BV.pyx src/SLEPc/CAPI.pyx src/SLEPc/DS.pyx src/SLEPc/EPS.pyx src/SLEPc/FN.pyx src/SLEPc/MFN.pyx src/SLEPc/NEP.pyx src/SLEPc/PEP.pyx src/SLEPc/RG.pyx src/SLEPc/SLEPc.pyx src/SLEPc/ST.pyx src/SLEPc/SVD.pyx src/SLEPc/Sys.pyx src/SLEPc/allocate.pxi src/SLEPc/slepcbv.pxi src/SLEPc/slepcds.pxi src/SLEPc/slepceps.pxi src/SLEPc/slepcfn.pxi src/SLEPc/slepcmfn.pxi src/SLEPc/slepcmpi.pxi src/SLEPc/slepcnep.pxi src/SLEPc/slepcpep.pxi src/SLEPc/slepcrg.pxi src/SLEPc/slepcst.pxi src/SLEPc/slepcsvd.pxi src/SLEPc/slepcsys.pxi src/include/custom.h src/include/scalar.h src/include/slepc4py/SLEPc.pxd src/include/slepc4py/__init__.pxd src/include/slepc4py/__init__.pyx src/include/slepc4py/slepc4py.SLEPc.h src/include/slepc4py/slepc4py.SLEPc_api.h src/include/slepc4py/slepc4py.h src/include/slepc4py/slepc4py.i src/lib/__init__.py src/lib/slepc.cfg test/runtests.py test/test_object.pyslepc4py-3.7.0/slepc4py.egg-info/not-zip-safe0000644000175000001440000000000112720314504021532 0ustar dalcinlusers00000000000000 slepc4py-3.7.0/slepc4py.egg-info/requires.txt0000644000175000001440000000002312720314530021676 0ustar dalcinlusers00000000000000petsc4py>=3.7,<3.8 slepc4py-3.7.0/slepc4py.egg-info/dependency_links.txt0000644000175000001440000000000112720314530023351 0ustar dalcinlusers00000000000000 slepc4py-3.7.0/slepc4py.egg-info/PKG-INFO0000644000175000001440000000616012720314530020403 0ustar dalcinlusers00000000000000Metadata-Version: 1.1 Name: slepc4py Version: 3.7.0 Summary: SLEPc for Python Home-page: https://bitbucket.org/slepc/slepc4py/ Author: Lisandro Dalcin Author-email: dalcinl@gmail.com License: BSD Download-URL: https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-3.7.0.tar.gz Description: SLEPc for Python ================ Python bindings for SLEPc. Install ------- If you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, it highly recommended to install ``mpi4py`` first:: $ pip install mpi4py Ensure you have NumPy installed:: $ pip install numpy and finally:: $ pip install petsc petsc4py slepc slepc4py You can also install the in-development version of slepc4py with:: $ pip install Cython numpy mpi4py $ pip install --no-deps git+https://bitbucket.org/petsc/petsc $ pip install --no-deps git+https://bitbucket.org/petsc/petsc4py $ pip install --no-deps git+https://bitbucket.org/slepc/slepc $ pip install --no-deps git+https://bitbucket.org/slepc/slepc4py or:: $ pip install Cython numpy mpi4py $ pip install --no-deps https://bitbucket.org/petsc/petsc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/petsc/petsc4py/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc4py/get/master.tar.gz Citations --------- If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman and V. Vidal. *SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 Keywords: scientific computing,parallel computing,SLEPc,PETSc,MPI Platform: POSIX Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: POSIX Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research Classifier: Programming Language :: C Classifier: Programming Language :: C++ Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Scientific/Engineering Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Development Status :: 5 - Production/Stable Requires: petsc4py Provides: slepc4py slepc4py-3.7.0/CHANGES.rst0000644000175000001440000000230412720263362015655 0ustar dalcinlusers00000000000000========================= CHANGES: SLEPc for Python ========================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Release 3.7.0 ============= - Update to SLEPc 3.7 release. Release 3.6.0 ============= - Update to SLEPc 3.6 release. Release 3.5.1 ============= - Add RG class introduced in SLEPc 3.5 release. - Add PySlepcXXX_New/Get C API functions. - Fix compilation problem with complex scalars on OS X. - Fix outdated SWIG interface file. Release 3.5 =========== - Update to SLEPc 3.5 release. Release 3.4 =========== - Update to SLEPc 3.4 release. Release 3.3.1 ============= - Regenerate the wrappers using Cython 0.18 and fix binary compatibility issues with petsc4py 3.3.1 . Release 3.3 =========== - Update to SLEPc 3.3 release. Release 1.2 =========== - Update to SLEPc 3.2 release. Release 1.1 =========== * Support for new QEP quadratic eigenproblem solver in SLEPc. * Support for ``pip install slepc4py`` to download and install SLEPc. * Support for PETSc/SLEPc static library builds (Linux-only). * Preliminar support for Python 3. Release 1.0.0 ============= This is the fist release of the all-new, Cython-based, implementation of *SLEPc for Python*. slepc4py-3.7.0/setup.py0000755000175000001440000002032012716565625015602 0ustar dalcinlusers00000000000000#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """ SLEPc for Python """ import sys import os import re try: import setuptools except ImportError: setuptools = None pyver = sys.version_info[:2] if pyver < (2, 6) or (3, 0) <= pyver < (3, 2): raise RuntimeError("Python version 2.6, 2.7 or >= 3.2 required") # -------------------------------------------------------------------- # Metadata # -------------------------------------------------------------------- topdir = os.path.abspath(os.path.dirname(__file__)) from conf.metadata import metadata def name(): return 'slepc4py' def version(): with open(os.path.join(topdir, 'src', '__init__.py')) as f: m = re.search(r"__version__\s*=\s*'(.*)'", f.read()) return m.groups()[0] def description(): with open(os.path.join(topdir, 'DESCRIPTION.rst')) as f: return f.read() name = name() version = version() url = 'https://bitbucket.org/slepc/%(name)s/' % vars() download = url + 'downloads/%(name)s-%(version)s.tar.gz' % vars() devstat = ['Development Status :: 5 - Production/Stable'] keywords = ['SLEPc', 'PETSc', 'MPI'] metadata['name'] = name metadata['version'] = version metadata['description'] = __doc__.strip() metadata['long_description'] = description() metadata['keywords'] += keywords metadata['classifiers'] += devstat metadata['url'] = url metadata['download_url'] = download metadata['provides'] = ['slepc4py'] metadata['requires'] = ['petsc4py'] # -------------------------------------------------------------------- # Extension modules # -------------------------------------------------------------------- def get_ext_modules(Extension): from os import walk, path from glob import glob depends = [] for pth, dirs, files in walk('src'): depends += glob(path.join(pth, '*.h')) depends += glob(path.join(pth, '*.c')) try: import petsc4py petsc4py_includes = [petsc4py.get_include()] except ImportError: petsc4py_includes = [] return [Extension('slepc4py.lib.SLEPc', sources=['src/SLEPc.c',], include_dirs=['src/include', ] + petsc4py_includes, depends=depends)] # -------------------------------------------------------------------- # Setup # -------------------------------------------------------------------- from conf.slepcconf import setup, Extension from conf.slepcconf import config, build, build_src, build_ext, install from conf.slepcconf import clean, test, sdist CYTHON = '0.22' def run_setup(): setup_args = metadata.copy() if setuptools: setup_args['zip_safe'] = False vstr = setup_args['version'].split('.')[:2] x, y = int(vstr[0]), int(vstr[1]) PETSC = SLEPC = ">=%s.%s,<%s.%s" % (x, y, x, y+1) setup_args['install_requires'] = ['petsc4py'+PETSC] SLEPC_DIR = os.environ.get('SLEPC_DIR') if not (SLEPC_DIR and os.path.isdir(SLEPC_DIR)): setup_args['install_requires'] += ['slepc'+SLEPC] if setuptools: src = os.path.join('src', 'slepc4py.SLEPc.c') has_src = os.path.exists(os.path.join(topdir, src)) has_git = os.path.isdir(os.path.join(topdir, '.git')) has_hg = os.path.isdir(os.path.join(topdir, '.hg')) if not has_src or has_git or has_hg: setup_args['setup_requires'] = ['Cython>='+CYTHON] # setup(packages = ['slepc4py', 'slepc4py.lib',], package_dir = {'slepc4py' : 'src', 'slepc4py.lib' : 'src/lib'}, package_data = {'slepc4py' : ['include/slepc4py/*.h', 'include/slepc4py/*.i', 'include/slepc4py/*.pxd', 'include/slepc4py/*.pxi', 'include/slepc4py/*.pyx', 'SLEPc.pxd',], 'slepc4py.lib' : ['slepc.cfg'],}, ext_modules = get_ext_modules(Extension), cmdclass = {'config' : config, 'build' : build, 'build_src' : build_src, 'build_ext' : build_ext, 'install' : install, 'clean' : clean, 'test' : test, 'sdist' : sdist, }, **setup_args) def chk_cython(VERSION): from distutils import log from distutils.version import LooseVersion from distutils.version import StrictVersion warn = lambda msg='': sys.stderr.write(msg+'\n') # try: import Cython except ImportError: warn("*"*80) warn() warn(" You need to generate C source files with Cython!!") warn(" Download and install Cython ") warn() warn("*"*80) return False # try: CYTHON_VERSION = Cython.__version__ except AttributeError: from Cython.Compiler.Version import version as CYTHON_VERSION REQUIRED = VERSION m = re.match(r"(\d+\.\d+(?:\.\d+)?).*", CYTHON_VERSION) if m: Version = StrictVersion AVAILABLE = m.groups()[0] else: Version = LooseVersion AVAILABLE = CYTHON_VERSION if (REQUIRED is not None and Version(AVAILABLE) < Version(REQUIRED)): warn("*"*80) warn() warn(" You need to install Cython %s (you have version %s)" % (REQUIRED, CYTHON_VERSION)) warn(" Download and install Cython ") warn() warn("*"*80) return False # return True def run_cython(source, depends=(), includes=(), destdir_c=None, destdir_h=None, wdir=None, force=False, VERSION=None): from glob import glob from distutils import log from distutils import dep_util from distutils.errors import DistutilsError target = os.path.splitext(source)[0]+'.c' cwd = os.getcwd() try: if wdir: os.chdir(wdir) alldeps = [source] for dep in depends: alldeps += glob(dep) if not (force or dep_util.newer_group(alldeps, target)): log.debug("skipping '%s' -> '%s' (up-to-date)", source, target) return finally: os.chdir(cwd) if not chk_cython(VERSION): raise DistutilsError("requires Cython>=%s" % VERSION) log.info("cythonizing '%s' -> '%s'", source, target) from conf.cythonize import cythonize err = cythonize(source, includes=includes, destdir_c=destdir_c, destdir_h=destdir_h, wdir=wdir) if err: raise DistutilsError( "Cython failure: '%s' -> '%s'" % (source, target)) def build_sources(cmd): from os.path import exists, isdir, join if (exists(join('src', 'slepc4py.SLEPc.c')) and not (isdir('.hg') or isdir('.git')) and not cmd.force): return # slepc4py.SLEPc source = 'slepc4py.SLEPc.pyx' depends = ("include/*/*.pxd", "SLEPc/*.pyx", "SLEPc/*.pxi",) import petsc4py includes = ['include', petsc4py.get_include()] destdir_h = os.path.join('include', 'slepc4py') run_cython(source, depends, includes, destdir_c=None, destdir_h=destdir_h, wdir='src', force=cmd.force, VERSION=CYTHON) build_src.run = build_sources def run_testsuite(cmd): from distutils.errors import DistutilsError sys.path.insert(0, 'test') try: from runtests import main finally: del sys.path[0] if cmd.dry_run: return args = cmd.args[:] or [] if cmd.verbose < 1: args.insert(0,'-q') if cmd.verbose > 1: args.insert(0,'-v') err = main(args) if err: raise DistutilsError("test") test.run = run_testsuite # -------------------------------------------------------------------- def main(): run_setup() if __name__ == '__main__': main() # -------------------------------------------------------------------- slepc4py-3.7.0/test/0000755000175000001440000000000012720314530015025 5ustar dalcinlusers00000000000000slepc4py-3.7.0/test/test_object.py0000644000175000001440000001336212705464414017723 0ustar dalcinlusers00000000000000from slepc4py import SLEPc from petsc4py import PETSc import unittest # -------------------------------------------------------------------- class BaseTestObject(object): CLASS, FACTORY = None, 'create' TARGS, KARGS = (), {} BUILD = None def setUp(self): self.obj = self.CLASS() getattr(self.obj,self.FACTORY)(*self.TARGS, **self.KARGS) if not self.obj: self.obj.create() def tearDown(self): self.obj = None def testTypeRegistry(self): type_reg = PETSc.__type_registry__ classid = self.obj.getClassId() typeobj = self.CLASS if isinstance(self.obj, PETSc.DMDA): typeobj = PETSc.DM self.assertTrue(type_reg[classid] is typeobj ) def testLogClass(self): name = self.CLASS.__name__ logcls = PETSc.Log.Class(name) classid = self.obj.getClassId() self.assertEqual(logcls.id, classid) def testClass(self): self.assertTrue(isinstance(self.obj, self.CLASS)) self.assertTrue(type(self.obj) is self.CLASS) def testNonZero(self): self.assertTrue(bool(self.obj)) def testDestroy(self): self.assertTrue(bool(self.obj)) self.obj.destroy() self.assertFalse(bool(self.obj)) ## self.assertRaises(PETSc.Error, self.obj.destroy) ## self.assertTrue(self.obj.this is this) def testOptions(self): self.assertFalse(self.obj.getOptionsPrefix()) prefix1 = 'my_' self.obj.setOptionsPrefix(prefix1) self.assertEqual(self.obj.getOptionsPrefix(), prefix1) prefix2 = 'opt_' self.obj.setOptionsPrefix(prefix2) self.assertEqual(self.obj.getOptionsPrefix(), prefix2) ## self.obj.appendOptionsPrefix(prefix1) ## self.assertEqual(self.obj.getOptionsPrefix(), ## prefix2 + prefix1) ## self.obj.prependOptionsPrefix(prefix1) ## self.assertEqual(self.obj.getOptionsPrefix(), ## prefix1 + prefix2 + prefix1) self.obj.setFromOptions() def testName(self): oldname = self.obj.getName() newname = '%s-%s' %(oldname, oldname) self.obj.setName(newname) self.assertEqual(self.obj.getName(), newname) self.obj.setName(oldname) self.assertEqual(self.obj.getName(), oldname) def testComm(self): comm = self.obj.getComm() self.assertTrue(isinstance(comm, PETSc.Comm)) self.assertTrue(comm in [PETSc.COMM_SELF, PETSc.COMM_WORLD]) def testRefCount(self): self.assertEqual(self.obj.getRefCount(), 1) self.obj.incRef() self.assertEqual(self.obj.getRefCount(), 2) self.obj.incRef() self.assertEqual(self.obj.getRefCount(), 3) self.obj.decRef() self.assertEqual(self.obj.getRefCount(), 2) self.obj.decRef() self.assertEqual(self.obj.getRefCount(), 1) self.obj.decRef() self.assertFalse(bool(self.obj)) def testHandle(self): self.assertTrue(self.obj.handle) self.assertTrue(self.obj.fortran) h, f = self.obj.handle, self.obj.fortran if (h>0 and f>0) or (h<0 and f<0): self.assertEqual(h, f) self.obj.destroy() self.assertFalse(self.obj.handle) self.assertFalse(self.obj.fortran) def testComposeQuery(self): self.assertEqual(self.obj.getRefCount(), 1) self.obj.compose('myobj', self.obj) self.assertTrue(type(self.obj.query('myobj')) is self.CLASS) self.assertEqual(self.obj.query('myobj'), self.obj) self.assertEqual(self.obj.getRefCount(), 2) self.obj.compose('myobj', None) self.assertEqual(self.obj.getRefCount(), 1) self.assertEqual(self.obj.query('myobj'), None) def testProperties(self): self.assertEqual(self.obj.getClassId(), self.obj.classid) self.assertEqual(self.obj.getClassName(), self.obj.klass) self.assertEqual(self.obj.getType(), self.obj.type) self.assertEqual(self.obj.getName(), self.obj.name) self.assertEqual(self.obj.getComm(), self.obj.comm) self.assertEqual(self.obj.getRefCount(), self.obj.refcount) def testShallowCopy(self): import copy rc = self.obj.getRefCount() obj = copy.copy(self.obj) self.assertTrue(obj is not self.obj) self.assertTrue(obj == self.obj) self.assertTrue(type(obj) is type(self.obj)) self.assertEqual(obj.getRefCount(), rc+1) del obj self.assertEqual(self.obj.getRefCount(), rc) def testDeepCopy(self): self.obj.setFromOptions() import copy rc = self.obj.getRefCount() try: obj = copy.deepcopy(self.obj) except NotImplementedError: return self.assertTrue(obj is not self.obj) self.assertTrue(obj != self.obj) self.assertTrue(type(obj) is type(self.obj)) self.assertEqual(self.obj.getRefCount(), rc) self.assertEqual(obj.getRefCount(), 1) del obj # -------------------------------------------------------------------- class TestObjectST(BaseTestObject, unittest.TestCase): CLASS = SLEPc.ST class TestObjectBV(BaseTestObject, unittest.TestCase): CLASS = SLEPc.BV def testDeepCopy(self): pass class TestObjectEPS(BaseTestObject, unittest.TestCase): CLASS = SLEPc.EPS class TestObjectSVD(BaseTestObject, unittest.TestCase): CLASS = SLEPc.SVD class TestObjectPEP(BaseTestObject, unittest.TestCase): CLASS = SLEPc.PEP class TestObjectNEP(BaseTestObject, unittest.TestCase): CLASS = SLEPc.NEP class TestObjectMFN(BaseTestObject, unittest.TestCase): CLASS = SLEPc.MFN # -------------------------------------------------------------------- if __name__ == '__main__': unittest.main() slepc4py-3.7.0/test/runtests.py0000644000175000001440000001652212705464414017306 0ustar dalcinlusers00000000000000import sys, os import optparse import unittest def getoptionparser(): parser = optparse.OptionParser() parser.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", default=1, help="do not print status messages to stdout") parser.add_option("-v", "--verbose", action="store_const", const=2, dest="verbose", default=1, help="print status messages to stdout") parser.add_option("-i", "--include", type="string", action="append", dest="include", default=[], help="include tests matching PATTERN", metavar="PATTERN") parser.add_option("-e", "--exclude", type="string", action="append", dest="exclude", default=[], help="exclude tests matching PATTERN", metavar="PATTERN") parser.add_option("-f", "--failfast", action="store_true", dest="failfast", default=False, help="Stop on first failure") parser.add_option("--no-builddir", action="store_false", dest="builddir", default=True, help="disable testing from build directory") parser.add_option("--path", type="string", action="append", dest="path", default=[], help="prepend PATH to sys.path", metavar="PATH") parser.add_option("--refleaks", type="int", action="store", dest="repeats", default=3, help="run tests REPEAT times in a loop to catch leaks", metavar="REPEAT") parser.add_option("--arch", type="string", action="store", dest="arch", default=None, help="use PETSC_ARCH", metavar="PETSC_ARCH") parser.add_option("-s","--summary", action="store_true", dest="summary", default=0, help="print PETSc log summary") return parser def getbuilddir(): from distutils.util import get_platform s = os.path.join("build", "lib.%s-%.3s" % (get_platform(), sys.version)) if hasattr(sys, 'gettotalrefcount'): s += '-pydebug' return s def setup_python(options): rootdir = os.path.dirname(os.path.dirname(__file__)) builddir = os.path.join(rootdir, getbuilddir()) if options.builddir and os.path.exists(builddir): sys.path.insert(0, builddir) if options.path: path = options.path[:] path.reverse() for p in path: sys.path.insert(0, p) def setup_unittest(options): from unittest import TestSuite try: from unittest.runner import _WritelnDecorator except ImportError: from unittest import _WritelnDecorator # writeln_orig = _WritelnDecorator.writeln def writeln(self, message=''): try: self.stream.flush() except: pass writeln_orig(self, message) try: self.stream.flush() except: pass _WritelnDecorator.writeln = writeln def import_package(options, pkgname): args=[sys.argv[0], '-malloc', '-malloc_debug', '-malloc_dump', '-log_summary', ] if not options.summary: del args[-1] package = __import__(pkgname) package.init(args, arch=options.arch) return package def getprocessorinfo(): from petsc4py.PETSc import COMM_WORLD rank = COMM_WORLD.getRank() name = os.uname()[1] return (rank, name) def getpythoninfo(): x, y = sys.version_info[:2] return ("Python %d.%d (%s)" % (x, y, sys.executable)) def getlibraryinfo(): from petsc4py import PETSc (major, minor, micro), devel = \ PETSc.Sys.getVersion(devel=True) r = not devel if r: release = 'release' else: release = 'development' arch = PETSc.__arch__ petsc_info = ("PETSc %d.%d.%d %s (conf: '%s')" % (major, minor, micro, release, arch) ) from slepc4py import SLEPc (major, minor, micro), devel = \ SLEPc.Sys.getVersion(devel=True) r = not devel if r: release = 'release' else: release = 'development' arch = SLEPc.__arch__ slepc_info = ("SLEPc %d.%d.%d %s (conf: '%s')" % (major, minor, micro, release, arch) ) return [petsc_info, slepc_info] def getpackageinfo(pkgnames): packages = [__import__(pkg) for pkg in pkgnames] return ["%s %s (%s)" % (pkg.__name__, pkg.__version__, pkg.__path__[0]) for pkg in packages] def writeln(message='', endl='\n'): from petsc4py.PETSc import Sys Sys.syncPrint(message, endl=endl, flush=True) def print_banner(options, packages): r, n = getprocessorinfo() fmt = "[%d@%s] %s" if options.verbose: writeln(fmt % (r, n, getpythoninfo())) for libinfo in getlibraryinfo(): writeln(fmt % (r, n, libinfo)) for pkginfo in getpackageinfo(packages): writeln(fmt % (r, n, pkginfo)) def load_tests(options, args): from glob import glob import re testsuitedir = os.path.dirname(__file__) sys.path.insert(0, testsuitedir) pattern = 'test_*.py' wildcard = os.path.join(testsuitedir, pattern) testfiles = glob(wildcard) testfiles.sort() testsuite = unittest.TestSuite() testloader = unittest.TestLoader() include = exclude = None if options.include: include = re.compile('|'.join(options.include)).search if options.exclude: exclude = re.compile('|'.join(options.exclude)).search for testfile in testfiles: filename = os.path.basename(testfile) testname = os.path.splitext(filename)[0] if ((exclude and exclude(testname)) or (include and not include(testname))): continue module = __import__(testname) for arg in args: try: cases = testloader.loadTestsFromNames((arg,), module) testsuite.addTests(cases) except AttributeError: pass if not args: cases = testloader.loadTestsFromModule(module) testsuite.addTests(cases) return testsuite def run_tests(options, testsuite): runner = unittest.TextTestRunner(verbosity=options.verbose) runner.failfast = options.failfast result = runner.run(testsuite) return result.wasSuccessful() def run_tests_leaks(options, testsuite): from sys import gettotalrefcount from gc import collect rank, name = getprocessorinfo() r1 = r2 = 0 repeats = options.repeats while repeats: repeats -= 1 collect() r1 = gettotalrefcount() run_tests(options, testsuite) collect() r2 = gettotalrefcount() writeln('[%d@%s] refleaks: (%d - %d) --> %d' % (rank, name, r2, r1, r2-r1)) def main(args=None): parser = getoptionparser() (options, args) = parser.parse_args(args) setup_python(options) setup_unittest(options) package = import_package(options, 'slepc4py') print_banner(options, ['petsc4py', 'slepc4py']) testsuite = load_tests(options, args) success = run_tests(options, testsuite) if success and hasattr(sys, 'gettotalrefcount'): run_tests_leaks(options, testsuite) return not success if __name__ == '__main__': import sys sys.dont_write_bytecode = True sys.exit(main()) slepc4py-3.7.0/src/0000755000175000001440000000000012720314530014635 5ustar dalcinlusers00000000000000slepc4py-3.7.0/src/slepc4py.SLEPc.pyx0000644000175000001440000000027012705464414020060 0ustar dalcinlusers00000000000000#cython: embedsignature=True #cython: cdivision=True #cython: always_allow_keywords=True #cython: autotestdict=False #cython: warn.multiple_declarators=False include "SLEPc/SLEPc.pyx" slepc4py-3.7.0/src/include/0000755000175000001440000000000012720314530016260 5ustar dalcinlusers00000000000000slepc4py-3.7.0/src/include/slepc4py/0000755000175000001440000000000012720314530020023 5ustar dalcinlusers00000000000000slepc4py-3.7.0/src/include/slepc4py/__init__.pxd0000644000175000001440000000007012705464414022306 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com slepc4py-3.7.0/src/include/slepc4py/slepc4py.h0000644000175000001440000000050012705464414021744 0ustar dalcinlusers00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ #ifndef SLEPC4PY_H #define SLEPC4PY_H #include #include #include "slepc4py.SLEPc_api.h" static int import_slepc4py(void) { if (import_slepc4py__SLEPc() < 0) goto bad; return 0; bad: return -1; } #endif /* !SLEPC4PY_H */ slepc4py-3.7.0/src/include/slepc4py/slepc4py.SLEPc.h0000644000175000001440000001073012720314467022656 0ustar dalcinlusers00000000000000/* Generated by Cython 0.24 */ #ifndef __PYX_HAVE__slepc4py__SLEPc #define __PYX_HAVE__slepc4py__SLEPc struct PySlepcSTObject; struct PySlepcBVObject; struct PySlepcDSObject; struct PySlepcFNObject; struct PySlepcRGObject; struct PySlepcEPSObject; struct PySlepcSVDObject; struct PySlepcPEPObject; struct PySlepcNEPObject; struct PySlepcMFNObject; /* "slepc4py/SLEPc.pxd":42 * from petsc4py.PETSc cimport Object * * ctypedef public api class ST(Object) [ # <<<<<<<<<<<<<< * type PySlepcST_Type, * object PySlepcSTObject, */ struct PySlepcSTObject { struct PyPetscObjectObject __pyx_base; ST st; }; typedef struct PySlepcSTObject PySlepcSTObject; /* "slepc4py/SLEPc.pxd":48 * cdef SlepcST st * * ctypedef public api class BV(Object) [ # <<<<<<<<<<<<<< * type PySlepcBV_Type, * object PySlepcBVObject, */ struct PySlepcBVObject { struct PyPetscObjectObject __pyx_base; BV bv; }; typedef struct PySlepcBVObject PySlepcBVObject; /* "slepc4py/SLEPc.pxd":54 * cdef SlepcBV bv * * ctypedef public api class DS(Object) [ # <<<<<<<<<<<<<< * type PySlepcDS_Type, * object PySlepcDSObject, */ struct PySlepcDSObject { struct PyPetscObjectObject __pyx_base; DS ds; }; typedef struct PySlepcDSObject PySlepcDSObject; /* "slepc4py/SLEPc.pxd":60 * cdef SlepcDS ds * * ctypedef public api class FN(Object) [ # <<<<<<<<<<<<<< * type PySlepcFN_Type, * object PySlepcFNObject, */ struct PySlepcFNObject { struct PyPetscObjectObject __pyx_base; FN fn; }; typedef struct PySlepcFNObject PySlepcFNObject; /* "slepc4py/SLEPc.pxd":66 * cdef SlepcFN fn * * ctypedef public api class RG(Object) [ # <<<<<<<<<<<<<< * type PySlepcRG_Type, * object PySlepcRGObject, */ struct PySlepcRGObject { struct PyPetscObjectObject __pyx_base; RG rg; }; typedef struct PySlepcRGObject PySlepcRGObject; /* "slepc4py/SLEPc.pxd":72 * cdef SlepcRG rg * * ctypedef public api class EPS(Object) [ # <<<<<<<<<<<<<< * type PySlepcEPS_Type, * object PySlepcEPSObject, */ struct PySlepcEPSObject { struct PyPetscObjectObject __pyx_base; EPS eps; }; typedef struct PySlepcEPSObject PySlepcEPSObject; /* "slepc4py/SLEPc.pxd":78 * cdef SlepcEPS eps * * ctypedef public api class SVD(Object) [ # <<<<<<<<<<<<<< * type PySlepcSVD_Type, * object PySlepcSVDObject, */ struct PySlepcSVDObject { struct PyPetscObjectObject __pyx_base; SVD svd; }; typedef struct PySlepcSVDObject PySlepcSVDObject; /* "slepc4py/SLEPc.pxd":84 * cdef SlepcSVD svd * * ctypedef public api class PEP(Object) [ # <<<<<<<<<<<<<< * type PySlepcPEP_Type, * object PySlepcPEPObject, */ struct PySlepcPEPObject { struct PyPetscObjectObject __pyx_base; PEP pep; }; typedef struct PySlepcPEPObject PySlepcPEPObject; /* "slepc4py/SLEPc.pxd":90 * cdef SlepcPEP pep * * ctypedef public api class NEP(Object) [ # <<<<<<<<<<<<<< * type PySlepcNEP_Type, * object PySlepcNEPObject, */ struct PySlepcNEPObject { struct PyPetscObjectObject __pyx_base; NEP nep; }; typedef struct PySlepcNEPObject PySlepcNEPObject; /* "slepc4py/SLEPc.pxd":96 * cdef SlepcNEP nep * * ctypedef public api class MFN(Object) [ # <<<<<<<<<<<<<< * type PySlepcMFN_Type, * object PySlepcMFNObject, */ struct PySlepcMFNObject { struct PyPetscObjectObject __pyx_base; MFN mfn; }; typedef struct PySlepcMFNObject PySlepcMFNObject; #ifndef __PYX_HAVE_API__slepc4py__SLEPc #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(_T) _T #endif __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcST_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcBV_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcDS_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcFN_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcRG_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcEPS_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcSVD_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcPEP_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcNEP_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PySlepcMFN_Type; #endif /* !__PYX_HAVE_API__slepc4py__SLEPc */ #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initSLEPc(void); #else PyMODINIT_FUNC PyInit_SLEPc(void); #endif #endif /* !__PYX_HAVE__slepc4py__SLEPc */ slepc4py-3.7.0/src/include/slepc4py/slepc4py.SLEPc_api.h0000644000175000001440000003162212720314467023512 0ustar dalcinlusers00000000000000/* Generated by Cython 0.24 */ #ifndef __PYX_HAVE_API__slepc4py__SLEPc #define __PYX_HAVE_API__slepc4py__SLEPc #include "Python.h" #include "slepc4py.SLEPc.h" static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_ST = 0; #define PySlepcST_Type (*__pyx_ptype_8slepc4py_5SLEPc_ST) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_BV = 0; #define PySlepcBV_Type (*__pyx_ptype_8slepc4py_5SLEPc_BV) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_DS = 0; #define PySlepcDS_Type (*__pyx_ptype_8slepc4py_5SLEPc_DS) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_FN = 0; #define PySlepcFN_Type (*__pyx_ptype_8slepc4py_5SLEPc_FN) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_RG = 0; #define PySlepcRG_Type (*__pyx_ptype_8slepc4py_5SLEPc_RG) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_EPS = 0; #define PySlepcEPS_Type (*__pyx_ptype_8slepc4py_5SLEPc_EPS) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_SVD = 0; #define PySlepcSVD_Type (*__pyx_ptype_8slepc4py_5SLEPc_SVD) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_PEP = 0; #define PySlepcPEP_Type (*__pyx_ptype_8slepc4py_5SLEPc_PEP) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_NEP = 0; #define PySlepcNEP_Type (*__pyx_ptype_8slepc4py_5SLEPc_NEP) static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_MFN = 0; #define PySlepcMFN_Type (*__pyx_ptype_8slepc4py_5SLEPc_MFN) static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcST_New)(ST) = 0; #define PySlepcST_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcST_New static ST (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcST_Get)(PyObject *) = 0; #define PySlepcST_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcST_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_New)(BV) = 0; #define PySlepcBV_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_New static BV (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_Get)(PyObject *) = 0; #define PySlepcBV_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_New)(DS) = 0; #define PySlepcDS_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_New static DS (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_Get)(PyObject *) = 0; #define PySlepcDS_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_New)(FN) = 0; #define PySlepcFN_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_New static FN (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_Get)(PyObject *) = 0; #define PySlepcFN_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_New)(RG) = 0; #define PySlepcRG_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_New static RG (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_Get)(PyObject *) = 0; #define PySlepcRG_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_New)(EPS) = 0; #define PySlepcEPS_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_New static EPS (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_Get)(PyObject *) = 0; #define PySlepcEPS_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_New)(SVD) = 0; #define PySlepcSVD_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_New static SVD (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_Get)(PyObject *) = 0; #define PySlepcSVD_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_New)(PEP) = 0; #define PySlepcPEP_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_New static PEP (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_Get)(PyObject *) = 0; #define PySlepcPEP_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_New)(NEP) = 0; #define PySlepcNEP_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_New static NEP (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_Get)(PyObject *) = 0; #define PySlepcNEP_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_Get static PyObject *(*__pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_New)(MFN) = 0; #define PySlepcMFN_New __pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_New static MFN (*__pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_Get)(PyObject *) = 0; #define PySlepcMFN_Get __pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_Get #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", module_name, class_name, basicsize, size); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", module_name, class_name, basicsize, size); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static int import_slepc4py__SLEPc(void) { PyObject *module = 0; module = __Pyx_ImportModule("slepc4py.SLEPc"); if (!module) goto bad; if (__Pyx_ImportFunction(module, "PySlepcST_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcST_New, "PyObject *(ST)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcST_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcST_Get, "ST (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcBV_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_New, "PyObject *(BV)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcBV_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcBV_Get, "BV (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcDS_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_New, "PyObject *(DS)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcDS_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcDS_Get, "DS (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcFN_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_New, "PyObject *(FN)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcFN_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcFN_Get, "FN (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcRG_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_New, "PyObject *(RG)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcRG_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcRG_Get, "RG (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcEPS_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_New, "PyObject *(EPS)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcEPS_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcEPS_Get, "EPS (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcSVD_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_New, "PyObject *(SVD)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcSVD_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcSVD_Get, "SVD (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcPEP_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_New, "PyObject *(PEP)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcPEP_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcPEP_Get, "PEP (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcNEP_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_New, "PyObject *(NEP)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcNEP_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcNEP_Get, "NEP (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcMFN_New", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_New, "PyObject *(MFN)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PySlepcMFN_Get", (void (**)(void))&__pyx_api_f_8slepc4py_5SLEPc_PySlepcMFN_Get, "MFN (PyObject *)") < 0) goto bad; Py_DECREF(module); module = 0; __pyx_ptype_8slepc4py_5SLEPc_ST = __Pyx_ImportType("slepc4py.SLEPc", "ST", sizeof(struct PySlepcSTObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_ST) goto bad; __pyx_ptype_8slepc4py_5SLEPc_BV = __Pyx_ImportType("slepc4py.SLEPc", "BV", sizeof(struct PySlepcBVObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_BV) goto bad; __pyx_ptype_8slepc4py_5SLEPc_DS = __Pyx_ImportType("slepc4py.SLEPc", "DS", sizeof(struct PySlepcDSObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_DS) goto bad; __pyx_ptype_8slepc4py_5SLEPc_FN = __Pyx_ImportType("slepc4py.SLEPc", "FN", sizeof(struct PySlepcFNObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_FN) goto bad; __pyx_ptype_8slepc4py_5SLEPc_RG = __Pyx_ImportType("slepc4py.SLEPc", "RG", sizeof(struct PySlepcRGObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_RG) goto bad; __pyx_ptype_8slepc4py_5SLEPc_EPS = __Pyx_ImportType("slepc4py.SLEPc", "EPS", sizeof(struct PySlepcEPSObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_EPS) goto bad; __pyx_ptype_8slepc4py_5SLEPc_SVD = __Pyx_ImportType("slepc4py.SLEPc", "SVD", sizeof(struct PySlepcSVDObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_SVD) goto bad; __pyx_ptype_8slepc4py_5SLEPc_PEP = __Pyx_ImportType("slepc4py.SLEPc", "PEP", sizeof(struct PySlepcPEPObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_PEP) goto bad; __pyx_ptype_8slepc4py_5SLEPc_NEP = __Pyx_ImportType("slepc4py.SLEPc", "NEP", sizeof(struct PySlepcNEPObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_NEP) goto bad; __pyx_ptype_8slepc4py_5SLEPc_MFN = __Pyx_ImportType("slepc4py.SLEPc", "MFN", sizeof(struct PySlepcMFNObject), 1); if (!__pyx_ptype_8slepc4py_5SLEPc_MFN) goto bad; return 0; bad: Py_XDECREF(module); return -1; } #endif /* !__PYX_HAVE_API__slepc4py__SLEPc */ slepc4py-3.7.0/src/include/slepc4py/slepc4py.i0000644000175000001440000000302412705464414021751 0ustar dalcinlusers00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ /* ---------------------------------------------------------------- */ %include petsc4py/petsc4py.i /* ---------------------------------------------------------------- */ %header %{#include "slepc4py/slepc4py.h"%} %init %{import_slepc4py();%} %define SWIG_TYPECHECK_SLEPC_ST 550 %enddef %define SWIG_TYPECHECK_SLEPC_BV 551 %enddef %define SWIG_TYPECHECK_SLEPC_DS 552 %enddef %define SWIG_TYPECHECK_SLEPC_FN 553 %enddef %define SWIG_TYPECHECK_SLEPC_RG 554 %enddef %define SWIG_TYPECHECK_SLEPC_EPS 555 %enddef %define SWIG_TYPECHECK_SLEPC_SVD 556 %enddef %define SWIG_TYPECHECK_SLEPC_PEP 557 %enddef %define SWIG_TYPECHECK_SLEPC_NEP 558 %enddef %define SWIG_TYPECHECK_SLEPC_MFN 559 %enddef %define %slepc4py_objt(Pkg, PyType, Type, CODE) %petsc4py_objt(Pkg, PyType, Type, CODE) %enddef /* %slepc4py_objt */ /* ---------------------------------------------------------------- */ %slepc4py_objt( Slepc , ST , ST , SLEPC_ST ) %slepc4py_objt( Slepc , BV , BV , SLEPC_BV ) %slepc4py_objt( Slepc , DS , DS , SLEPC_DS ) %slepc4py_objt( Slepc , FN , FN , SLEPC_FN ) %slepc4py_objt( Slepc , RG , RG , SLEPC_RG ) %slepc4py_objt( Slepc , EPS , EPS , SLEPC_EPS ) %slepc4py_objt( Slepc , SVD , SVD , SLEPC_SVD ) %slepc4py_objt( Slepc , PEP , PEP , SLEPC_PEP ) %slepc4py_objt( Slepc , NEP , NEP , SLEPC_NEP ) %slepc4py_objt( Slepc , MFN , MFN , SLEPC_MFN ) /* ---------------------------------------------------------------- */ /* * Local Variables: * mode: C * End: */ slepc4py-3.7.0/src/include/slepc4py/__init__.pyx0000644000175000001440000000007012705464414022333 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com slepc4py-3.7.0/src/include/slepc4py/SLEPc.pxd0000644000175000001440000000413112705464414021457 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # ----------------------------------------------------------------------------- cdef extern from "slepc.h": struct _p_ST ctypedef _p_ST* SlepcST "ST" struct _p_BV ctypedef _p_BV* SlepcBV "BV" struct _p_DS ctypedef _p_DS* SlepcDS "DS" struct _p_FN ctypedef _p_FN* SlepcFN "FN" struct _p_RG ctypedef _p_RG* SlepcRG "RG" struct _p_EPS ctypedef _p_EPS* SlepcEPS "EPS" struct _p_SVD ctypedef _p_SVD* SlepcSVD "SVD" struct _p_PEP ctypedef _p_PEP* SlepcPEP "PEP" struct _p_NEP ctypedef _p_NEP* SlepcNEP "NEP" struct _p_MFN ctypedef _p_MFN* SlepcMFN "MFN" # ----------------------------------------------------------------------------- from petsc4py.PETSc cimport Object ctypedef public api class ST(Object) [ type PySlepcST_Type, object PySlepcSTObject, ]: cdef SlepcST st ctypedef public api class BV(Object) [ type PySlepcBV_Type, object PySlepcBVObject, ]: cdef SlepcBV bv ctypedef public api class DS(Object) [ type PySlepcDS_Type, object PySlepcDSObject, ]: cdef SlepcDS ds ctypedef public api class FN(Object) [ type PySlepcFN_Type, object PySlepcFNObject, ]: cdef SlepcFN fn ctypedef public api class RG(Object) [ type PySlepcRG_Type, object PySlepcRGObject, ]: cdef SlepcRG rg ctypedef public api class EPS(Object) [ type PySlepcEPS_Type, object PySlepcEPSObject, ]: cdef SlepcEPS eps ctypedef public api class SVD(Object) [ type PySlepcSVD_Type, object PySlepcSVDObject, ]: cdef SlepcSVD svd ctypedef public api class PEP(Object) [ type PySlepcPEP_Type, object PySlepcPEPObject, ]: cdef SlepcPEP pep ctypedef public api class NEP(Object) [ type PySlepcNEP_Type, object PySlepcNEPObject, ]: cdef SlepcNEP nep ctypedef public api class MFN(Object) [ type PySlepcMFN_Type, object PySlepcMFNObject, ]: cdef SlepcMFN mfn # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/include/custom.h0000644000175000001440000000134412705464414017757 0ustar dalcinlusers00000000000000#ifndef SLEPC4PY_CUSTOM_H #define SLEPC4PY_CUSTOM_H #undef __FUNCT__ #define __FUNCT__ "SlepcInitializePackageAll" static PetscErrorCode SlepcInitializePackageAll(void) { PetscErrorCode ierr; PetscFunctionBegin; ierr = EPSInitializePackage();CHKERRQ(ierr); ierr = SVDInitializePackage();CHKERRQ(ierr); ierr = PEPInitializePackage();CHKERRQ(ierr); ierr = NEPInitializePackage();CHKERRQ(ierr); ierr = MFNInitializePackage();CHKERRQ(ierr); ierr = STInitializePackage();CHKERRQ(ierr); ierr = BVInitializePackage();CHKERRQ(ierr); ierr = DSInitializePackage();CHKERRQ(ierr); ierr = FNInitializePackage();CHKERRQ(ierr); ierr = RGInitializePackage();CHKERRQ(ierr); PetscFunctionReturn(0); } #endif/*SLEPC4PY_CUSTOM_H*/ slepc4py-3.7.0/src/include/scalar.h0000644000175000001440000000107712705464414017715 0ustar dalcinlusers00000000000000static PyObject *PyPetscScalar_FromPetscScalar(PetscScalar s) { #if defined(PETSC_USE_COMPLEX) double a = (double) PetscRealPart(s); double b = (double) PetscImaginaryPart(s); return PyComplex_FromDoubles(a, b); #else return PyFloat_FromDouble((double)s); #endif } static PetscScalar PyPetscScalar_AsPetscScalar(PyObject *o) { #if defined(PETSC_USE_COMPLEX) Py_complex cval = PyComplex_AsCComplex(o); PetscReal a = (PetscReal) cval.real; PetscReal b = (PetscReal) cval.imag; return a + b * PETSC_i; #else return (PetscScalar) PyFloat_AsDouble(o); #endif } slepc4py-3.7.0/src/SLEPc.c0000644000175000001440000000012312705464414015715 0ustar dalcinlusers00000000000000#define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #include "slepc4py.SLEPc.c" slepc4py-3.7.0/src/SLEPc/0000755000175000001440000000000012720314530015543 5ustar dalcinlusers00000000000000slepc4py-3.7.0/src/SLEPc/SLEPc.pyx0000644000175000001440000001533412716553521017233 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- from petsc4py.PETSc import COMM_NULL from petsc4py.PETSc import COMM_SELF from petsc4py.PETSc import COMM_WORLD # ----------------------------------------------------------------------------- from petsc4py.PETSc cimport MPI_Comm from petsc4py.PETSc cimport PetscObject, PetscViewer from petsc4py.PETSc cimport PetscRandom from petsc4py.PETSc cimport PetscVec, PetscMat from petsc4py.PETSc cimport PetscKSP, PetscPC from petsc4py.PETSc cimport Comm from petsc4py.PETSc cimport Object, Viewer from petsc4py.PETSc cimport Random from petsc4py.PETSc cimport Vec, Mat from petsc4py.PETSc cimport KSP, PC # ----------------------------------------------------------------------------- cdef extern from *: ctypedef char const_char "const char" cdef inline object bytes2str(const_char p[]): if p == NULL: return None cdef bytes s = p if isinstance(s, str): return s else: return s.decode() cdef inline object str2bytes(object s, const_char *p[]): if s is None: p[0] = NULL return None if not isinstance(s, bytes): s = s.encode() p[0] = (s) return s cdef inline object S_(const_char p[]): if p == NULL: return None cdef object s = p return s if isinstance(s, str) else s.decode() include "allocate.pxi" # ----------------------------------------------------------------------------- # Vile hack for raising a exception and not contaminating traceback cdef extern from *: enum: PETSC_ERR_PYTHON "(-1)" cdef extern from *: void PyErr_SetObject(object, object) void *PyExc_RuntimeError cdef object PetscError = PyExc_RuntimeError from petsc4py.PETSc import Error as PetscError cdef inline int SETERR(int ierr) with gil: if (PetscError) != NULL: PyErr_SetObject(PetscError, ierr) else: PyErr_SetObject(PyExc_RuntimeError, ierr) return ierr cdef inline int CHKERR(int ierr) nogil except -1: if ierr == 0: return 0 # no error if ierr == PETSC_ERR_PYTHON: return -1 # Python error SETERR(ierr) return -1 # ----------------------------------------------------------------------------- cdef extern from "custom.h": pass cdef extern from *: ctypedef long PetscInt ctypedef double PetscReal ctypedef double PetscScalar ctypedef PetscInt const_PetscInt "const PetscInt" ctypedef PetscReal const_PetscReal "const PetscReal" ctypedef PetscScalar const_PetscScalar "const PetscScalar" cdef extern from "scalar.h": object PyPetscScalar_FromPetscScalar(PetscScalar) PetscScalar PyPetscScalar_AsPetscScalar(object) except* cdef inline object toInt(PetscInt value): return value cdef inline PetscInt asInt(object value) except? -1: return value cdef inline object toReal(PetscReal value): return value cdef inline PetscReal asReal(object value) except? -1: return value cdef inline object toScalar(PetscScalar value): return PyPetscScalar_FromPetscScalar(value) cdef inline PetscScalar asScalar(object value) except*: return PyPetscScalar_AsPetscScalar(value) # ----------------------------------------------------------------------------- cdef extern from "string.h" nogil: void* memset(void*,int,size_t) void* memcpy(void*,void*,size_t) char* strdup(char*) # ----------------------------------------------------------------------------- include "slepcmpi.pxi" include "slepcsys.pxi" include "slepcst.pxi" include "slepcbv.pxi" include "slepcds.pxi" include "slepcfn.pxi" include "slepcrg.pxi" include "slepceps.pxi" include "slepcsvd.pxi" include "slepcpep.pxi" include "slepcnep.pxi" include "slepcmfn.pxi" # ----------------------------------------------------------------------------- __doc__ = \ """ Scalable Library for Eigenvalue Problem Computations. """ DECIDE = PETSC_DECIDE DEFAULT = PETSC_DEFAULT DETERMINE = PETSC_DETERMINE include "Sys.pyx" include "ST.pyx" include "BV.pyx" include "DS.pyx" include "FN.pyx" include "RG.pyx" include "EPS.pyx" include "SVD.pyx" include "PEP.pyx" include "NEP.pyx" include "MFN.pyx" # ----------------------------------------------------------------------------- include "CAPI.pyx" # ----------------------------------------------------------------------------- cdef extern from "Python.h": int Py_AtExit(void (*)()) void PySys_WriteStderr(char*,...) cdef extern from "stdio.h" nogil: ctypedef struct FILE FILE *stderr int fprintf(FILE *, char *, ...) cdef int initialize(object args) except -1: if (SlepcInitializeCalled): return 1 # initialize SLEPC CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) ) # register finalization function if Py_AtExit(finalize) < 0: PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()", b"SlepcFinalize()") return 1 # and we are done, enjoy !! from petsc4py.PETSc cimport PyPetscType_Register cdef extern from *: int SlepcInitializePackageAll() ctypedef int PetscClassId PetscClassId SLEPC_ST_CLASSID "ST_CLASSID" PetscClassId SLEPC_BV_CLASSID "BV_CLASSID" PetscClassId SLEPC_DS_CLASSID "DS_CLASSID" PetscClassId SLEPC_FN_CLASSID "FN_CLASSID" PetscClassId SLEPC_RG_CLASSID "RG_CLASSID" PetscClassId SLEPC_EPS_CLASSID "EPS_CLASSID" PetscClassId SLEPC_SVD_CLASSID "SVD_CLASSID" PetscClassId SLEPC_PEP_CLASSID "PEP_CLASSID" PetscClassId SLEPC_NEP_CLASSID "NEP_CLASSID" PetscClassId SLEPC_MFN_CLASSID "MFN_CLASSID" cdef int register(char path[]) except -1: # make sure all SLEPc packages are initialized CHKERR( SlepcInitializePackageAll() ) # register Python types PyPetscType_Register(SLEPC_ST_CLASSID, ST) PyPetscType_Register(SLEPC_BV_CLASSID, BV) PyPetscType_Register(SLEPC_DS_CLASSID, DS) PyPetscType_Register(SLEPC_FN_CLASSID, FN) PyPetscType_Register(SLEPC_RG_CLASSID, RG) PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) PyPetscType_Register(SLEPC_MFN_CLASSID, MFN) return 0 cdef void finalize() nogil: # finalize SLEPc cdef int ierr = 0 ierr = SlepcFinalize() if ierr != 0: fprintf(stderr, "SlepcFinalize() failed " "[error code: %d]\n", ierr) # and we are done, see you later !! # ----------------------------------------------------------------------------- def _initialize(args=None): cdef int ready = initialize(args) if ready: register(NULL) def _finalize(): finalize() # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/allocate.pxi0000644000175000001440000000132212705464414020061 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- cdef extern from "Python.h": enum: PY_SSIZE_T_MAX void *PyMem_Malloc(size_t) void *PyMem_Realloc(void*, size_t) void PyMem_Free(void*) #@cython.final #@cython.internal cdef class _p_mem: cdef void *buf def __cinit__(self): self.buf = NULL def __dealloc__(self): PyMem_Free(self.buf) cdef inline object allocate(size_t n, void **buf): cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) ob.buf = PyMem_Malloc(n) if ob.buf == NULL: raise MemoryError if buf != NULL: buf[0] = ob.buf return ob # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/MFN.pyx0000644000175000001440000002264412717026107016743 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class MFNType(object): """ MFN type Action of a matrix function on a vector. - `KRYLOV`: Restarted Krylov solver. - `EXPOKIT`: Implementation of the method in Expokit. """ KRYLOV = S_(MFNKRYLOV) EXPOKIT = S_(MFNEXPOKIT) class MFNConvergedReason(object): CONVERGED_TOL = MFN_CONVERGED_TOL CONVERGED_ITS = MFN_CONVERGED_ITS DIVERGED_ITS = MFN_DIVERGED_ITS DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN CONVERGED_ITERATING = MFN_CONVERGED_ITERATING ITERATING = MFN_CONVERGED_ITERATING # ----------------------------------------------------------------------------- cdef class MFN(Object): """ MFN """ Type = MFNType ConvergedReason = MFNConvergedReason def __cinit__(self): self.obj = &self.mfn self.mfn = NULL def view(self, Viewer viewer=None): """ Prints the MFN data structure. Parameters ---------- viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( MFNView(self.mfn, vwr) ) def destroy(self): """ Destroys the MFN object. """ CHKERR( MFNDestroy(&self.mfn) ) self.mfn = NULL return self def reset(self): """ Resets the MFN object. """ CHKERR( MFNReset(self.mfn) ) def create(self, comm=None): """ Creates the MFN object. Parameters ---------- comm: Comm, optional. MPI communicator. If not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcMFN newmfn = NULL CHKERR( MFNCreate(ccomm, &newmfn) ) SlepcCLEAR(self.obj); self.mfn = newmfn return self def setType(self, mfn_type): """ Selects the particular solver to be used in the MFN object. Parameters ---------- mfn_type: `MFN.Type` enumerate The solver to be used. """ cdef SlepcMFNType cval = NULL mfn_type = str2bytes(mfn_type, &cval) CHKERR( MFNSetType(self.mfn, cval) ) def getType(self): """ Gets the MFN type of this object. Returns ------- type: `MFN.Type` enumerate The solver currently being used. """ cdef SlepcMFNType mfn_type = NULL CHKERR( MFNGetType(self.mfn, &mfn_type) ) return bytes2str(mfn_type) def getOptionsPrefix(self): """ Gets the prefix used for searching for all MFN options in the database. Returns ------- prefix: string The prefix string set for this MFN object. """ cdef const_char *prefix = NULL CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) ) return bytes2str(prefix) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all MFN options in the database. Parameters ---------- prefix: string The prefix string to prepend to all MFN option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) def appendOptionsPrefix(self, prefix): """ Appends to the prefix used for searching for all MFN options in the database. Parameters ---------- prefix: string The prefix string to prepend to all MFN option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) def setFromOptions(self): """ Sets MFN options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. """ CHKERR( MFNSetFromOptions(self.mfn) ) def getTolerances(self): """ Gets the tolerance and maximum iteration count used by the default MFN convergence tests. Returns ------- tol: float The convergence tolerance. max_it: int The maximum number of iterations """ cdef PetscReal rval = 0 cdef PetscInt ival = 0 CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) ) return (toReal(rval), toInt(ival)) def setTolerances(self, tol=None, max_it=None): """ Sets the tolerance and maximum iteration count used by the default MFN convergence tests. Parameters ---------- tol: float, optional The convergence tolerance. max_it: int, optional The maximum number of iterations """ cdef PetscReal rval = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT if tol is not None: rval = asReal(tol) if max_it is not None: ival = asInt(max_it) CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) def getDimensions(self): """ Gets the dimension of the subspace used by the solver. Returns ------- ncv: int Maximum dimension of the subspace to be used by the solver. """ cdef PetscInt ival = 0 CHKERR( MFNGetDimensions(self.mfn, &ival) ) return toInt(ival) def setDimensions(self, ncv): """ Sets the dimension of the subspace to be used by the solver. Parameters ---------- ncv: int Maximum dimension of the subspace to be used by the solver. """ cdef PetscInt ival = asInt(ncv) CHKERR( MFNSetDimensions(self.mfn, ival) ) def getFN(self): """ Obtain the math function object associated to the MFN object. Returns ------- fn: FN The math function context. """ cdef FN fn = FN() CHKERR( MFNGetFN(self.mfn, &fn.fn) ) PetscINCREF(fn.obj) return fn def setFN(self, FN fn not None): """ Associates a math function object to the MFN object. Parameters ---------- fn: FN The math function context. """ CHKERR( MFNSetFN(self.mfn, fn.fn) ) def getBV(self): """ Obtain the basis vector object associated to the MFN object. Returns ------- bv: BV The basis vectors context. """ cdef BV bv = BV() CHKERR( MFNGetBV(self.mfn, &bv.bv) ) PetscINCREF(bv.obj) return bv def setBV(self, BV bv not None): """ Associates a basis vector object to the MFN object. Parameters ---------- bv: BV The basis vectors context. """ CHKERR( MFNSetBV(self.mfn, bv.bv) ) def getOperator(self): """ Gets the matrix associated with the MFN object. Returns ------- A: Mat The matrix for which the matrix function is to be computed. """ cdef Mat A = Mat() CHKERR( MFNGetOperator(self.mfn, &A.mat) ) PetscINCREF(A.obj) return A def setOperator(self, Mat A not None): """ Sets the matrix associated with the MFN object. Parameters ---------- A: Mat The problem matrix. """ CHKERR( MFNSetOperator(self.mfn, A.mat) ) # def cancelMonitor(self): """ Clears all monitors for a MFN object. """ CHKERR( MFNMonitorCancel(self.mfn) ) # def setUp(self): """ Sets up all the internal data structures necessary for the execution of the eigensolver. """ CHKERR( MFNSetUp(self.mfn) ) def solve(self, Vec b not None, Vec x not None): """ Solves the matrix function problem. Given a vector b, the vector x = f(alpha*A)*b is returned. Parameters ---------- b: Vec The right hand side vector. x: Vec The solution. """ CHKERR( MFNSolve(self.mfn, b.vec, x.vec) ) def getIterationNumber(self): """ Gets the current iteration number. If the call to `solve()` is complete, then it returns the number of iterations carried out by the solution method. Returns ------- its: int Iteration number. """ cdef PetscInt ival = 0 CHKERR( MFNGetIterationNumber(self.mfn, &ival) ) return toInt(ival) def getConvergedReason(self): """ Gets the reason why the `solve()` iteration was stopped. Returns ------- reason: `MFN.ConvergedReason` enumerate Negative value indicates diverged, positive value converged. """ cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING CHKERR( MFNGetConvergedReason(self.mfn, &val) ) return val # ----------------------------------------------------------------------------- del MFNType del MFNConvergedReason # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/Sys.pyx0000644000175000001440000000367212705464414017105 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- cdef class Sys: @classmethod def getVersion(cls, patch=False, devel=False, date=False, author=False): cdef int cmajor = SLEPC_VERSION_MAJOR cdef int cminor = SLEPC_VERSION_MINOR cdef int cmicro = SLEPC_VERSION_SUBMINOR cdef int cpatch = SLEPC_VERSION_PATCH cdef int cdevel = not SLEPC_VERSION_RELEASE cdef const_char *cdate = SLEPC_VERSION_DATE cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO version = (cmajor, cminor, cmicro) out = version if patch or devel or date or author: out = [version] if patch: out.append(cpatch) if devel: out.append(cdevel) if date: out.append(bytes2str(cdate)) if author: author = bytes2str(cauthorinfo).split('\n') author = [s.strip() for s in author if s] out.append(author) return tuple(out) @classmethod def getVersionInfo(cls): cdef int cmajor = SLEPC_VERSION_MAJOR cdef int cminor = SLEPC_VERSION_MINOR cdef int cmicro = SLEPC_VERSION_SUBMINOR cdef int cpatch = SLEPC_VERSION_PATCH cdef int crelease = SLEPC_VERSION_RELEASE cdef const_char *cdate = SLEPC_VERSION_DATE cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO author = bytes2str(cauthorinfo).split('\n') author = [s.strip() for s in author if s] return dict(major = cmajor, minor = cminor, subminor = cmicro, patch = cpatch, release = crelease, date = bytes2str(cdate), authorinfo = author) # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcbv.pxi0000644000175000001440000000607512716553521017745 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcBVType "const char*" SlepcBVType BVMAT SlepcBVType BVSVEC SlepcBVType BVVECS SlepcBVType BVCONTIGUOUS ctypedef enum SlepcBVOrthogType "BVOrthogType": BV_ORTHOG_CGS BV_ORTHOG_MGS ctypedef enum SlepcBVOrthogRefineType "BVOrthogRefineType": BV_ORTHOG_REFINE_IFNEEDED BV_ORTHOG_REFINE_NEVER BV_ORTHOG_REFINE_ALWAYS ctypedef enum SlepcBVOrthogBlockType "BVOrthogBlockType": BV_ORTHOG_BLOCK_GS BV_ORTHOG_BLOCK_CHOL int BVCreate(MPI_Comm,SlepcBV*) int BVDuplicate(SlepcBV,SlepcBV*) int BVCopy(SlepcBV,SlepcBV) int BVView(SlepcBV,PetscViewer) int BVDestroy(SlepcBV*) int BVSetType(SlepcBV,SlepcBVType) int BVGetType(SlepcBV,SlepcBVType*) int BVSetSizes(SlepcBV,PetscInt,PetscInt,PetscInt) int BVSetSizesFromVec(SlepcBV,PetscVec,PetscInt) int BVGetSizes(SlepcBV,PetscInt*,PetscInt*,PetscInt*) int BVSetOptionsPrefix(SlepcBV,char[]) int BVGetOptionsPrefix(SlepcBV,char*[]) int BVAppendOptionsPrefix(SlepcBV,char[]) int BVSetFromOptions(SlepcBV) int BVSetOrthogonalization(SlepcBV,SlepcBVOrthogType,SlepcBVOrthogRefineType,PetscReal,SlepcBVOrthogBlockType) int BVGetOrthogonalization(SlepcBV,SlepcBVOrthogType*,SlepcBVOrthogRefineType*,PetscReal*,SlepcBVOrthogBlockType*) int BVSetRandom(SlepcBV) int BVSetMatrix(SlepcBV,PetscMat,PetscBool) int BVGetMatrix(SlepcBV,PetscMat*,PetscBool*) int BVApplyMatrix(SlepcBV,PetscVec,PetscVec) int BVSetActiveColumns(SlepcBV,PetscInt,PetscInt) int BVGetActiveColumns(SlepcBV,PetscInt*,PetscInt*) int BVInsertVec(SlepcBV,PetscInt,PetscVec) int BVInsertVecs(SlepcBV,PetscInt,PetscInt*,PetscVec*,PetscBool) int BVGetColumn(SlepcBV,PetscInt,PetscVec*) int BVRestoreColumn(SlepcBV,PetscInt,PetscVec*) int BVDot(SlepcBV,SlepcBV,PetscMat) int BVDotVec(SlepcBV,PetscVec,PetscScalar*) int BVMatProject(SlepcBV,PetscMat,SlepcBV,PetscMat) int BVMatMult(SlepcBV,PetscMat,SlepcBV) int BVMatMultHermitianTranspose(SlepcBV,PetscMat,SlepcBV) int BVMultVec(SlepcBV,PetscScalar,PetscScalar,PetscVec,PetscScalar*) int BVScaleColumn(SlepcBV,PetscInt,PetscScalar) int BVScale(SlepcBV,PetscScalar) int BVNormColumn(SlepcBV,PetscInt,PetscNormType,PetscReal*) int BVNorm(SlepcBV,PetscNormType,PetscReal*) int BVOrthogonalizeVec(SlepcBV,PetscVec,PetscScalar*,PetscReal*,PetscBool*) int BVOrthogonalize(SlepcBV,PetscMat) cdef inline int BV_Sizes( object size, PetscInt *_n, PetscInt *_N, ) except -1: # unpack and get local and global sizes cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE cdef object on, oN try: on, oN = size except (TypeError, ValueError): on = None; oN = size if on is not None: n = asInt(on) if oN is not None: N = asInt(oN) if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError( "local and global sizes cannot be both 'DECIDE'") # return result to the caller if _n != NULL: _n[0] = n if _N != NULL: _N[0] = N return 0 slepc4py-3.7.0/src/SLEPc/FN.pyx0000644000175000001440000001553012717026107016622 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class FNType(object): """ FN type """ COMBINE = S_(FNCOMBINE) RATIONAL = S_(FNRATIONAL) EXP = S_(FNEXP) LOG = S_(FNLOG) PHI = S_(FNPHI) SQRT = S_(FNSQRT) INVSQRT = S_(FNINVSQRT) class FNCombineType(object): """ FN type of combination of child functions - `ADD`: Addition f(x) = f1(x)+f2(x) - `MULTIPLY`: Multiplication f(x) = f1(x)*f2(x) - `DIVIDE`: Division f(x) = f1(x)/f2(x) - `COMPOSE`: Composition f(x) = f2(f1(x)) """ ADD = FN_COMBINE_ADD MULTIPLY = FN_COMBINE_MULTIPLY DIVIDE = FN_COMBINE_DIVIDE COMPOSE = FN_COMBINE_COMPOSE # ----------------------------------------------------------------------------- cdef class FN(Object): """ FN """ Type = FNType CombineType = FNCombineType def __cinit__(self): self.obj = &self.fn self.fn = NULL def view(self, Viewer viewer=None): """ Prints the FN data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( FNView(self.fn, vwr) ) def destroy(self): """ Destroys the FN object. """ CHKERR( FNDestroy(&self.fn) ) self.fn = NULL return self def create(self, comm=None): """ Creates the FN object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcFN newfn = NULL CHKERR( FNCreate(ccomm, &newfn) ) SlepcCLEAR(self.obj); self.fn = newfn return self def setType(self, fn_type): """ Selects the type for the FN object. Parameters ---------- fn_type: `FN.Type` enumerate The inner product type to be used. """ cdef SlepcFNType cval = NULL fn_type = str2bytes(fn_type, &cval) CHKERR( FNSetType(self.fn, cval) ) def getType(self): """ Gets the FN type of this object. Returns ------- type: `FN.Type` enumerate The inner product type currently being used. """ cdef SlepcFNType fn_type = NULL CHKERR( FNGetType(self.fn, &fn_type) ) return bytes2str(fn_type) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all FN options in the database. Parameters ---------- prefix: string The prefix string to prepend to all FN option requests. Notes ----- A hyphen (``-``) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( FNSetOptionsPrefix(self.fn, cval) ) def getOptionsPrefix(self): """ Gets the prefix used for searching for all FN options in the database. Returns ------- prefix: string The prefix string set for this FN object. """ cdef const_char *prefix = NULL CHKERR( FNGetOptionsPrefix(self.fn, &prefix) ) return bytes2str(prefix) def setFromOptions(self): """ Sets FN options from the options database. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( FNSetFromOptions(self.fn) ) # def evaluateFunction(self, x): """ Computes the value of the function f(x) for a given x. Parameters ---------- x: scalar Value where the function must be evaluated. Returns ------- y: scalar The result of f(x). """ cdef PetscScalar sval = 0 CHKERR( FNEvaluateFunction(self.fn, x, &sval) ) return toScalar(sval) def evaluateDerivative(self, x): """ Computes the value of the derivative f'(x) for a given x. Parameters ---------- x: scalar Value where the derivative must be evaluated. Returns ------- y: scalar The result of f'(x). """ cdef PetscScalar sval = 0 CHKERR( FNEvaluateDerivative(self.fn, x, &sval) ) return toScalar(sval) def setScale(self, alpha=None, beta=None): """ Sets the scaling parameters that define the matematical function. Parameters ---------- alpha: scalar (possibly complex) inner scaling (argument). beta: scalar (possibly complex) outer scaling (result). """ cdef PetscScalar aval = 1.0 cdef PetscScalar bval = 1.0 if alpha is not None: aval = asScalar(alpha) if beta is not None: bval = asScalar(beta) CHKERR( FNSetScale(self.fn, aval, bval) ) def getScale(self): """ Gets the scaling parameters that define the matematical function. Returns ------- alpha: scalar (possibly complex) inner scaling (argument). beta: scalar (possibly complex) outer scaling (result). """ cdef PetscScalar aval = 0, bval = 0 CHKERR( FNGetScale(self.fn, &aval, &bval) ) return (toScalar(aval), toScalar(bval)) # def setRationalNumerator(self, alpha not None): """ Sets the coefficients of the numerator of the rational function. Parameters ---------- alpha: array of scalars Coefficients. """ cdef PetscInt na = 0 cdef PetscScalar *a = NULL cdef object tmp1 = iarray_s(alpha, &na, &a) CHKERR( FNRationalSetNumerator(self.fn, na, a) ) def setRationalDenominator(self, alpha not None): """ Sets the coefficients of the denominator of the rational function. Parameters ---------- alpha: array of scalars Coefficients. """ cdef PetscInt na = 0 cdef PetscScalar *a = NULL cdef object tmp1 = iarray_s(alpha, &na, &a) CHKERR( FNRationalSetDenominator(self.fn, na, a) ) # ----------------------------------------------------------------------------- del FNType del FNCombineType # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/DS.pyx0000644000175000001440000003106512705464414016632 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class DSType(object): """ DS type """ HEP = S_(DSHEP) NHEP = S_(DSNHEP) GHEP = S_(DSGHEP) GHIEP = S_(DSGHIEP) GNHEP = S_(DSGNHEP) SVD = S_(DSSVD) PEP = S_(DSPEP) NEP = S_(DSNEP) class DSStateType(object): """ DS state types - `RAW`: Not processed yet. - `INTERMEDIATE`: Reduced to Hessenberg or tridiagonal form (or equivalent). - `CONDENSED`: Reduced to Schur or diagonal form (or equivalent). - `TRUNCATED`: Condensed form truncated to a smaller size. """ RAW = DS_STATE_RAW INTERMEDIATE = DS_STATE_INTERMEDIATE CONDENSED = DS_STATE_CONDENSED TRUNCATED = DS_STATE_TRUNCATED class DSMatType(object): """ To refer to one of the matrices stored internally in DS - `A`: first matrix of eigenproblem/singular value problem. - `B`: second matrix of a generalized eigenproblem. - `C`: third matrix of a quadratic eigenproblem. - `T`: tridiagonal matrix. - `D`: diagonal matrix. - `Q`: orthogonal matrix of (right) Schur vectors. - `Z`: orthogonal matrix of left Schur vectors. - `X`: right eigenvectors. - `Y`: left eigenvectors. - `U`: left singular vectors. - `VT`: right singular vectors. - `W`: workspace matrix. """ A = DS_MAT_A B = DS_MAT_B C = DS_MAT_C T = DS_MAT_T D = DS_MAT_D Q = DS_MAT_Q Z = DS_MAT_Z X = DS_MAT_X Y = DS_MAT_Y U = DS_MAT_U VT = DS_MAT_VT W = DS_MAT_W # ----------------------------------------------------------------------------- cdef class DS(Object): """ DS """ Type = DSType StateType = DSStateType MatType = DSMatType def __cinit__(self): self.obj = &self.ds self.ds = NULL def view(self, Viewer viewer=None): """ Prints the DS data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( DSView(self.ds, vwr) ) def destroy(self): """ Destroys the DS object. """ CHKERR( DSDestroy(&self.ds) ) self.ds = NULL return self def reset(self): """ Resets the DS object. """ CHKERR( DSReset(self.ds) ) def create(self, comm=None): """ Creates the DS object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcDS newds = NULL CHKERR( DSCreate(ccomm, &newds) ) SlepcCLEAR(self.obj); self.ds = newds return self def setType(self, ds_type): """ Selects the type for the DS object. Parameters ---------- ds_type: `DS.Type` enumerate The direct solver type to be used. """ cdef SlepcDSType cval = NULL ds_type = str2bytes(ds_type, &cval) CHKERR( DSSetType(self.ds, cval) ) def getType(self): """ Gets the DS type of this object. Returns ------- type: `DS.Type` enumerate The direct solver type currently being used. """ cdef SlepcDSType ds_type = NULL CHKERR( DSGetType(self.ds, &ds_type) ) return bytes2str(ds_type) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all DS options in the database. Parameters ---------- prefix: string The prefix string to prepend to all DS option requests. Notes ----- A hyphen (``-``) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( DSSetOptionsPrefix(self.ds, cval) ) def getOptionsPrefix(self): """ Gets the prefix used for searching for all DS options in the database. Returns ------- prefix: string The prefix string set for this DS object. """ cdef const_char *prefix = NULL CHKERR( DSGetOptionsPrefix(self.ds, &prefix) ) return bytes2str(prefix) def setFromOptions(self): """ Sets DS options from the options database. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( DSSetFromOptions(self.ds) ) # def allocate(self, ld): """ Allocates memory for internal storage or matrices in DS. Parameters ---------- ld: integer Leading dimension (maximum allowed dimension for the matrices, including the extra row if present). """ cdef PetscInt val = ld CHKERR( DSAllocate(self.ds, val) ) def getLeadingDimension(self): """ Returns the leading dimension of the allocated matrices. Returns ------- ld: integer Leading dimension (maximum allowed dimension for the matrices). """ cdef PetscInt val = 0 CHKERR( DSGetLeadingDimension(self.ds, &val) ) return val def setState(self, state): """ Change the state of the DS object. Parameters ---------- state: `DS.StateType` enumerate The new state. Notes ----- The state indicates that the dense system is in an initial state (raw), in an intermediate state (such as tridiagonal, Hessenberg or Hessenberg-triangular), in a condensed state (such as diagonal, Schur or generalized Schur), or in a truncated state. This function is normally used to return to the raw state when the condensed structure is destroyed. """ cdef SlepcDSStateType val = state CHKERR( DSSetState(self.ds, val) ) def getState(self): """ Returns the current state. Returns ------- state: `DS.StateType` enumerate The current state. """ cdef SlepcDSStateType val = DS_STATE_RAW CHKERR( DSGetState(self.ds, &val) ) return val def setDimensions(self, n=None, m=None, l=None, k=None): """ Resize the matrices in the DS object. Parameters ---------- n: int, optional The new size. m: int, optional The new column size (only for SVD). l: int, optional Number of locked (inactive) leading columns. k: int, optional Intermediate dimension (e.g., position of arrow). Notes ----- The internal arrays are not reallocated. The value `m` is not used except in the case of DS.SVD. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = 0 cdef PetscInt ival4 = 0 if n is not None: ival1 = asInt(n) if m is not None: ival2 = asInt(m) if l is not None: ival3 = asInt(l) if k is not None: ival4 = asInt(k) CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) def getDimensions(self): """ Returns the current dimensions. Returns ------- n: int The new size. m: int The new column size (only for SVD). l: int Number of locked (inactive) leading columns. k: int Intermediate dimension (e.g., position of arrow). t: int Truncated length. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 cdef PetscInt ival4 = 0 cdef PetscInt ival5 = 0 CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) ) return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) def setMethod(self, meth): """ Selects the method to be used to solve the problem. Parameters ---------- meth: int An index indentifying the method. """ cdef PetscInt val = meth CHKERR( DSSetMethod(self.ds, val) ) def getMethod(self): """ Gets the method currently used in the DS. Returns ------- meth: int Identifier of the method. """ cdef PetscInt val = 0 CHKERR( DSGetMethod(self.ds, &val) ) return val def setCompact(self, comp): """ Switch to compact storage of matrices. Parameters ---------- comp: boolean A boolean flag. Notes ----- Compact storage is used in some `DS` types such as `DS.Type.HEP` when the matrix is tridiagonal. This flag can be used to indicate whether the user provides the matrix entries via the compact form (the tridiagonal `DS.MatType.T`) or the non-compact one (`DS.MatType.A`). The default is ``False``. """ cdef PetscBool val = PETSC_FALSE if comp: val = PETSC_TRUE CHKERR( DSSetCompact(self.ds, val) ) def getCompact(self): """ Gets the compact storage flag. Returns ------- comp: boolean The flag. """ cdef PetscBool val = PETSC_FALSE CHKERR( DSGetCompact(self.ds, &val) ) return val def setExtraRow(self, ext): """ Sets a flag to indicate that the matrix has one extra row. Parameters ---------- ext: boolean A boolean flag. Notes ----- In Krylov methods it is useful that the matrix representing the direct solver has one extra row, i.e., has dimension (n+1) x n. If this flag is activated, all transformations applied to the right of the matrix also affect this additional row. In that case, (n+1) must be less or equal than the leading dimension. The default is ``False``. """ cdef PetscBool val = PETSC_FALSE if ext: val = PETSC_TRUE CHKERR( DSSetExtraRow(self.ds, val) ) def getExtraRow(self): """ Gets the extra row flag. Returns ------- comp: boolean The flag. """ cdef PetscBool val = PETSC_FALSE CHKERR( DSGetExtraRow(self.ds, &val) ) return val def setRefined(self, ref): """ Sets a flag to indicate that refined vectors must be computed. Parameters ---------- ref: boolean A boolean flag. Notes ----- Normally the vectors returned in `DS.MatType.X` are eigenvectors of the projected matrix. With this flag activated, `vectors()` will return the right singular vector of the smallest singular value of matrix At-theta*I, where At is the extended (n+1)xn matrix and theta is the Ritz value. This is used in the refined Ritz approximation. The default is ``False``. """ cdef PetscBool val = PETSC_FALSE if ref: val = PETSC_TRUE CHKERR( DSSetRefined(self.ds, val) ) def getRefined(self): """ Gets the refined vectors flag. Returns ------- comp: boolean The flag. """ cdef PetscBool val = PETSC_FALSE CHKERR( DSGetRefined(self.ds, &val) ) return val def truncate(self, n): """ Truncates the system represented in the DS object. Parameters ---------- n: integer The new size. """ cdef PetscInt val = n CHKERR( DSTruncate(self.ds, val) ) def updateExtraRow(self): """ Performs all necessary operations so that the extra row gets up-to-date after a call to `solve()`. """ CHKERR( DSUpdateExtraRow(self.ds) ) # ----------------------------------------------------------------------------- del DSType del DSStateType del DSMatType # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcsvd.pxi0000644000175000001440000000476412720263215020126 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcSVDType "const char*" SlepcSVDType SVDCROSS SlepcSVDType SVDCYCLIC SlepcSVDType SVDLAPACK SlepcSVDType SVDLANCZOS SlepcSVDType SVDTRLANCZOS ctypedef enum SlepcSVDWhich "SVDWhich": SVD_LARGEST SVD_SMALLEST ctypedef enum SlepcSVDErrorType "SVDErrorType": SVD_ERROR_ABSOLUTE SVD_ERROR_RELATIVE ctypedef enum SlepcSVDConvergedReason "SVDConvergedReason": SVD_CONVERGED_TOL SVD_CONVERGED_USER SVD_DIVERGED_ITS SVD_DIVERGED_BREAKDOWN SVD_CONVERGED_ITERATING int SVDCreate(MPI_Comm,SlepcSVD*) int SVDView(SlepcSVD,PetscViewer) int SVDDestroy(SlepcSVD*) int SVDReset(SlepcSVD) int SVDSetType(SlepcSVD,SlepcSVDType) int SVDGetType(SlepcSVD,SlepcSVDType*) int SVDSetOptionsPrefix(SlepcSVD,char[]) int SVDAppendOptionsPrefix(SlepcSVD,char[]) int SVDGetOptionsPrefix(SlepcSVD,char*[]) int SVDSetFromOptions(SlepcSVD) int SVDSetBV(SlepcSVD,SlepcBV,SlepcBV) int SVDGetBV(SlepcSVD,SlepcBV*,SlepcBV*) int SVDSetOperator(SlepcSVD,PetscMat) int SVDGetOperator(SlepcSVD,PetscMat*) int SVDSetInitialSpace(SlepcSVD,PetscInt,PetscVec*) int SVDSetImplicitTranspose(SlepcSVD,PetscBool) int SVDGetImplicitTranspose(SlepcSVD,PetscBool*) int SVDSetDimensions(SlepcSVD,PetscInt,PetscInt,PetscInt) int SVDGetDimensions(SlepcSVD,PetscInt*,PetscInt*,PetscInt*) int SVDSetTolerances(SlepcSVD,PetscReal,PetscInt) int SVDGetTolerances(SlepcSVD,PetscReal*,PetscInt*) int SVDSetWhichSingularTriplets(SlepcSVD,SlepcSVDWhich) int SVDGetWhichSingularTriplets(SlepcSVD,SlepcSVDWhich*) int SVDMonitorCancel(SlepcSVD) int SVDSetUp(SlepcSVD) int SVDSolve(SlepcSVD) int SVDGetIterationNumber(SlepcSVD,PetscInt*) int SVDGetConvergedReason(SlepcSVD,SlepcSVDConvergedReason*) int SVDGetConverged(SlepcSVD,PetscInt*) int SVDGetSingularTriplet(SlepcSVD,PetscInt,PetscReal*,PetscVec,PetscVec) int SVDComputeError(SlepcSVD,PetscInt,SlepcSVDErrorType,PetscReal*) int SVDErrorView(SlepcSVD,SlepcSVDErrorType,PetscViewer) int SVDCrossSetEPS(SlepcSVD,SlepcEPS) int SVDCrossGetEPS(SlepcSVD,SlepcEPS*) int SVDCyclicSetExplicitMatrix(SlepcSVD,PetscBool) int SVDCyclicGetExplicitMatrix(SlepcSVD,PetscBool*) int SVDCyclicSetEPS(SlepcSVD,SlepcEPS) int SVDCyclicGetEPS(SlepcSVD,SlepcEPS*) int SVDLanczosSetOneSide(SlepcSVD,PetscBool) int SVDTRLanczosSetOneSide(SlepcSVD,PetscBool) slepc4py-3.7.0/src/SLEPc/slepcsys.pxi0000644000175000001440000000460612716600661020150 0ustar dalcinlusers00000000000000cdef extern from * : enum: PETSC_DECIDE enum: PETSC_DEFAULT enum: PETSC_DETERMINE ctypedef enum PetscBool: PETSC_TRUE, PETSC_YES, PETSC_FALSE, PETSC_NO, ctypedef enum PetscNormType "NormType": PETSC_NORM_1 "NORM_1" PETSC_NORM_2 "NORM_2" PETSC_NORM_1_AND_2 "NORM_1_AND_2" PETSC_NORM_FROBENIUS "NORM_FROBENIUS" PETSC_NORM_INFINITY "NORM_INFINITY" PETSC_NORM_MAX "NORM_MAX" ctypedef enum PetscMatStructure "MatStructure": MAT_SAME_NONZERO_PATTERN "SAME_NONZERO_PATTERN" MAT_DIFFERENT_NONZERO_PATTERN "DIFFERENT_NONZERO_PATTERN" MAT_SUBSET_NONZERO_PATTERN "SUBSET_NONZERO_PATTERN" cdef extern from * nogil: int PetscMalloc(size_t,void*) int PetscFree(void*) int PetscMemcpy(void*,void*,size_t) int PetscMemzero(void*,size_t) cdef extern from * nogil: MPI_Comm PetscObjectComm(PetscObject) int PetscObjectReference(PetscObject) int PetscObjectDestroy(PetscObject*) int PetscObjectTypeCompare(PetscObject,char[],PetscBool*) cdef extern from * nogil: int MatGetSize(PetscMat,PetscInt*,PetscInt*) int MatGetLocalSize(PetscMat,PetscInt*,PetscInt*) cdef extern from * nogil: enum: SLEPC_VERSION_MAJOR enum: SLEPC_VERSION_MINOR enum: SLEPC_VERSION_SUBMINOR enum: SLEPC_VERSION_PATCH enum: SLEPC_VERSION_RELEASE char* SLEPC_VERSION_DATE char* SLEPC_AUTHOR_INFO int SlepcInitialize(int*,char***,char[],char[]) int SlepcFinalize() int SlepcInitializeCalled cdef inline PetscMatStructure matstructure(object structure) \ except (-1): if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN elif structure is True: return MAT_SAME_NONZERO_PATTERN else: return structure cdef inline int PetscINCREF(PetscObject *obj): if obj == NULL: return 0 if obj[0] == NULL: return 0 return PetscObjectReference(obj[0]) cdef inline int SlepcCLEAR(PetscObject* obj): if obj == NULL: return 0 if obj[0] == NULL: return 0 cdef PetscObject tmp tmp = obj[0]; obj[0] = NULL return PetscObjectDestroy(&tmp) cdef extern from * nogil: ctypedef enum SlepcFunction "SlepcFunction": SLEPC_FUNCTION_NONE SLEPC_FUNCTION_EXP SLEPC_FUNCTION_LAST slepc4py-3.7.0/src/SLEPc/slepcnep.pxi0000644000175000001440000001273512720263215020111 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcNEPType "const char*" SlepcNEPType NEPRII SlepcNEPType NEPSLP SlepcNEPType NEPNARNOLDI SlepcNEPType NEPCISS SlepcNEPType NEPINTERPOL SlepcNEPType NEPNLEIGS ctypedef enum SlepcNEPWhich "NEPWhich": NEP_LARGEST_MAGNITUDE NEP_SMALLEST_MAGNITUDE NEP_LARGEST_REAL NEP_SMALLEST_REAL NEP_LARGEST_IMAGINARY NEP_SMALLEST_IMAGINARY NEP_TARGET_MAGNITUDE NEP_TARGET_REAL NEP_TARGET_IMAGINARY NEP_ALL NEP_WHICH_USER ctypedef enum SlepcNEPErrorType "NEPErrorType": NEP_ERROR_ABSOLUTE NEP_ERROR_RELATIVE NEP_ERROR_BACKWARD ctypedef enum SlepcNEPRefine "NEPRefine": NEP_REFINE_NONE NEP_REFINE_SIMPLE NEP_REFINE_MULTIPLE ctypedef enum SlepcNEPRefineScheme "NEPRefineScheme": NEP_REFINE_SCHEME_SCHUR NEP_REFINE_SCHEME_MBE NEP_REFINE_SCHEME_EXPLICIT ctypedef enum SlepcNEPConvergedReason "NEPConvergedReason": NEP_CONVERGED_TOL NEP_CONVERGED_USER NEP_DIVERGED_ITS NEP_DIVERGED_BREAKDOWN NEP_DIVERGED_LINEAR_SOLVE NEP_CONVERGED_ITERATING ctypedef int (*SlepcNEPFunction)(SlepcNEP, PetscScalar, PetscMat, PetscMat, void*) except PETSC_ERR_PYTHON ctypedef int (*SlepcNEPJacobian)(SlepcNEP, PetscScalar, PetscMat, void*) except PETSC_ERR_PYTHON int NEPCreate(MPI_Comm,SlepcNEP*) int NEPDestroy(SlepcNEP*) int NEPReset(SlepcNEP) int NEPView(SlepcNEP,PetscViewer) int NEPSetType(SlepcNEP,SlepcNEPType) int NEPGetType(SlepcNEP,SlepcNEPType*) int NEPSetTarget(SlepcNEP,PetscScalar) int NEPGetTarget(SlepcNEP,PetscScalar*) int NEPSetOptionsPrefix(SlepcNEP,char*) int NEPGetOptionsPrefix(SlepcNEP,char*[]) int NEPSetFromOptions(SlepcNEP) int NEPAppendOptionsPrefix(SlepcNEP,char*) int NEPSetUp(SlepcNEP) int NEPSolve(SlepcNEP) int NEPSetFunction(SlepcNEP,PetscMat,PetscMat,SlepcNEPFunction,void*) int NEPGetFunction(SlepcNEP,PetscMat*,PetscMat*,SlepcNEPFunction*,void**) int NEPSetJacobian(SlepcNEP,PetscMat,SlepcNEPJacobian,void*) int NEPGetJacobian(SlepcNEP,PetscMat*,SlepcNEPJacobian*,void**) int NEPSetSplitOperator(SlepcNEP,PetscInt,PetscMat[],SlepcFN[],PetscMatStructure) int NEPGetSplitOperatorTerm(SlepcNEP,PetscInt,PetscMat*,SlepcFN*) int NEPGetSplitOperatorInfo(SlepcNEP,PetscInt*,PetscMatStructure*) int NEPSetBV(SlepcNEP,SlepcBV) int NEPGetBV(SlepcNEP,SlepcBV*) int NEPSetRG(SlepcNEP,SlepcRG) int NEPGetRG(SlepcNEP,SlepcRG*) int NEPSetTolerances(SlepcNEP,PetscReal,PetscInt) int NEPGetTolerances(SlepcNEP,PetscReal*,PetscInt*) int NEPSetTrackAll(SlepcNEP,PetscBool) int NEPGetTrackAll(SlepcNEP,PetscBool*) int NEPSetDimensions(SlepcNEP,PetscInt,PetscInt,PetscInt) int NEPGetDimensions(SlepcNEP,PetscInt*,PetscInt*,PetscInt*) int NEPRIISetLagPreconditioner(SlepcNEP,PetscInt) int NEPRIIGetLagPreconditioner(SlepcNEP,PetscInt*) int NEPRIISetConstCorrectionTol(SlepcNEP,PetscBool) int NEPRIIGetConstCorrectionTol(SlepcNEP,PetscBool*) int NEPGetConverged(SlepcNEP,PetscInt*) int NEPGetEigenpair(SlepcNEP,PetscInt,PetscScalar*,PetscScalar*,PetscVec,PetscVec) int NEPComputeError(SlepcNEP,PetscInt,SlepcNEPErrorType,PetscReal*) int NEPErrorView(SlepcNEP,SlepcNEPErrorType,PetscViewer) int NEPGetErrorEstimate(SlepcNEP,PetscInt,PetscReal*) int NEPMonitorCancel(SlepcNEP) int NEPGetIterationNumber(SlepcNEP,PetscInt*) int NEPSetInitialSpace(SlepcNEP,PetscInt,PetscVec*) int NEPSetWhichEigenpairs(SlepcNEP,SlepcNEPWhich) int NEPGetWhichEigenpairs(SlepcNEP,SlepcNEPWhich*) int NEPGetConvergedReason(SlepcNEP,SlepcNEPConvergedReason*) # ----------------------------------------------------------------------------- cdef inline Mat ref_Mat(PetscMat mat): cdef Mat ob = Mat() ob.mat = mat PetscINCREF(ob.obj) return ob # ----------------------------------------------------------------------------- cdef inline NEP ref_NEP(SlepcNEP nep): cdef NEP ob = NEP() ob.nep = nep PetscINCREF(ob.obj) return ob # ----------------------------------------------------------------------------- cdef int NEP_Function( SlepcNEP nep, PetscScalar mu, PetscMat A, PetscMat B, void* ctx, ) except PETSC_ERR_PYTHON with gil: cdef NEP Nep = ref_NEP(nep) cdef Mat Amat = ref_Mat(A) cdef Mat Bmat = ref_Mat(B) (function, args, kargs) = Nep.get_attr('__function__') retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) cdef PetscMat Atmp = NULL, Btmp = NULL Atmp = A; A = Amat.mat; Amat.mat = Atmp Btmp = B; B = Bmat.mat; Bmat.mat = Btmp return 0 # ----------------------------------------------------------------------------- cdef int NEP_Jacobian( SlepcNEP nep, PetscScalar mu, PetscMat J, void* ctx, ) except PETSC_ERR_PYTHON with gil: cdef NEP Nep = ref_NEP(nep) cdef Mat Jmat = ref_Mat(J) (jacobian, args, kargs) = Nep.get_attr('__jacobian__') retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) cdef PetscMat Jtmp = NULL Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp return 0 slepc4py-3.7.0/src/SLEPc/CAPI.pyx0000644000175000001440000000756512705464414017050 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- cdef inline int setref(void *d, void *s) except -1: cdef PetscObject *dest = d cdef PetscObject source = s CHKERR( PetscINCREF(&source) ) dest[0] = source return 0 # ----------------------------------------------------------------------------- # -- ST -- cdef api object PySlepcST_New(SlepcST arg): cdef ST retv = ST() setref(&retv.st, arg) return retv cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: cdef SlepcST retv = NULL cdef ST ob = arg retv = ob.st return retv # ----------------------------------------------------------------------------- # -- BV -- cdef api object PySlepcBV_New(SlepcBV arg): cdef BV retv = BV() setref(&retv.bv, arg) return retv cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: cdef SlepcBV retv = NULL cdef BV ob = arg retv = ob.bv return retv # ----------------------------------------------------------------------------- # -- DS -- cdef api object PySlepcDS_New(SlepcDS arg): cdef DS retv = DS() setref(&retv.ds, arg) return retv cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: cdef SlepcDS retv = NULL cdef DS ob = arg retv = ob.ds return retv # ----------------------------------------------------------------------------- # -- FN -- cdef api object PySlepcFN_New(SlepcFN arg): cdef FN retv = FN() setref(&retv.fn, arg) return retv cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: cdef SlepcFN retv = NULL cdef FN ob = arg retv = ob.fn return retv # ----------------------------------------------------------------------------- # -- RG -- cdef api object PySlepcRG_New(SlepcRG arg): cdef RG retv = RG() setref(&retv.rg, arg) return retv cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: cdef SlepcRG retv = NULL cdef RG ob = arg retv = ob.rg return retv # ----------------------------------------------------------------------------- # -- EPS -- cdef api object PySlepcEPS_New(SlepcEPS arg): cdef EPS retv = EPS() setref(&retv.eps, arg) return retv cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: cdef SlepcEPS retv = NULL cdef EPS ob = arg retv = ob.eps return retv # ----------------------------------------------------------------------------- # -- SVD -- cdef api object PySlepcSVD_New(SlepcSVD arg): cdef SVD retv = SVD() setref(&retv.svd, arg) return retv cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: cdef SlepcSVD retv = NULL cdef SVD ob = arg retv = ob.svd return retv # ----------------------------------------------------------------------------- # -- PEP -- cdef api object PySlepcPEP_New(SlepcPEP arg): cdef PEP retv = PEP() setref(&retv.pep, arg) return retv cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: cdef SlepcPEP retv = NULL cdef PEP ob = arg retv = ob.pep return retv # ----------------------------------------------------------------------------- # -- NEP -- cdef api object PySlepcNEP_New(SlepcNEP arg): cdef NEP retv = NEP() setref(&retv.nep, arg) return retv cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: cdef SlepcNEP retv = NULL cdef NEP ob = arg retv = ob.nep return retv # ----------------------------------------------------------------------------- # -- MFN -- cdef api object PySlepcMFN_New(SlepcMFN arg): cdef MFN retv = MFN() setref(&retv.mfn, arg) return retv cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: cdef SlepcMFN retv = NULL cdef MFN ob = arg retv = ob.mfn return retv # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcmfn.pxi0000644000175000001440000000270112717026107020102 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcMFNType "const char*" SlepcMFNType MFNKRYLOV SlepcMFNType MFNEXPOKIT ctypedef enum SlepcMFNConvergedReason "MFNConvergedReason": MFN_CONVERGED_TOL MFN_CONVERGED_ITS MFN_DIVERGED_ITS MFN_DIVERGED_BREAKDOWN MFN_CONVERGED_ITERATING int MFNCreate(MPI_Comm,SlepcMFN*) int MFNDestroy(SlepcMFN*) int MFNReset(SlepcMFN) int MFNView(SlepcMFN,PetscViewer) int MFNSetType(SlepcMFN,SlepcMFNType) int MFNGetType(SlepcMFN,SlepcMFNType*) int MFNSetFunction(SlepcMFN,SlepcFunction) int MFNGetFunction(SlepcMFN,SlepcFunction*) int MFNSetOperator(SlepcMFN,PetscMat) int MFNGetOperator(SlepcMFN,PetscMat*) int MFNSetOptionsPrefix(SlepcMFN,char*) int MFNGetOptionsPrefix(SlepcMFN,char*[]) int MFNSetFromOptions(SlepcMFN) int MFNAppendOptionsPrefix(SlepcMFN,char*) int MFNSetUp(SlepcMFN) int MFNSolve(SlepcMFN,PetscVec,PetscVec) int MFNSetBV(SlepcMFN,SlepcBV) int MFNGetBV(SlepcMFN,SlepcBV*) int MFNSetFN(SlepcMFN,SlepcFN) int MFNGetFN(SlepcMFN,SlepcFN*) int MFNSetTolerances(SlepcMFN,PetscReal,PetscInt) int MFNGetTolerances(SlepcMFN,PetscReal*,PetscInt*) int MFNSetDimensions(SlepcMFN,PetscInt) int MFNGetDimensions(SlepcMFN,PetscInt*) int MFNMonitorCancel(SlepcMFN) int MFNGetIterationNumber(SlepcMFN,PetscInt*) int MFNGetConvergedReason(SlepcMFN,SlepcMFNConvergedReason*) slepc4py-3.7.0/src/SLEPc/EPS.pyx0000644000175000001440000016152512720263215016751 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class EPSType(object): """ EPS type Native sparse eigensolvers. - `POWER`: Power Iteration, Inverse Iteration, RQI. - `SUBSPACE`: Subspace Iteration. - `ARNOLDI`: Arnoldi. - `LANCZOS`: Lanczos. - `KRYLOVSCHUR`: Krylov-Schur (default). - `GD`: Generalized Davidson. - `JD`: Jacobi-Davidson. - `RQCG`: Rayleigh Quotient Conjugate Gradient. - `LOBPCG`: Locally Optimal Block Preconditioned Conjugate Gradient. - `CISS`: Contour Integral Spectrum Slicing. - `LAPACK`: Wrappers to dense eigensolvers in Lapack. Wrappers to sparse eigensolvers (should be enabled during installation of SLEPc) - `ARPACK`: - `BLZPACK`: - `TRLAN`: - `BLOPEX`: - `PRIMME`: - `FEAST`: """ # provided implementations POWER = S_(EPSPOWER) SUBSPACE = S_(EPSSUBSPACE) ARNOLDI = S_(EPSARNOLDI) LANCZOS = S_(EPSLANCZOS) KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) GD = S_(EPSGD) JD = S_(EPSJD) RQCG = S_(EPSRQCG) LOBPCG = S_(EPSLOBPCG) CISS = S_(EPSCISS) LAPACK = S_(EPSLAPACK) # with external libraries ARPACK = S_(EPSARPACK) BLZPACK = S_(EPSBLZPACK) TRLAN = S_(EPSTRLAN) BLOPEX = S_(EPSBLOPEX) PRIMME = S_(EPSPRIMME) FEAST = S_(EPSFEAST) class EPSProblemType(object): """ EPS problem type - `HEP`: Hermitian eigenproblem. - `NHEP`: Non-Hermitian eigenproblem. - `GHEP`: Generalized Hermitian eigenproblem. - `GNHEP`: Generalized Non-Hermitian eigenproblem. - `PGNHEP`: Generalized Non-Hermitian eigenproblem with positive definite ``B``. - `GHIEP`: Generalized Hermitian-indefinite eigenproblem. """ HEP = EPS_HEP NHEP = EPS_NHEP GHEP = EPS_GHEP GNHEP = EPS_GNHEP PGNHEP = EPS_PGNHEP GHIEP = EPS_GHIEP class EPSExtraction(object): """ EPS extraction technique - `RITZ`: Standard Rayleigh-Ritz extraction. - `HARMONIC`: Harmonic extraction. - `HARMONIC_RELATIVE`: Harmonic extraction relative to the eigenvalue. - `HARMONIC_RIGHT`: Harmonic extraction for rightmost eigenvalues. - `HARMONIC_LARGEST`: Harmonic extraction for largest magnitude (without target). - `REFINED`: Refined extraction. - `REFINED_HARMONIC`: Refined harmonic extraction. """ RITZ = EPS_RITZ HARMONIC = EPS_HARMONIC HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE HARMONIC_RIGHT = EPS_HARMONIC_RIGHT HARMONIC_LARGEST = EPS_HARMONIC_LARGEST REFINED = EPS_REFINED REFINED_HARMONIC = EPS_REFINED_HARMONIC class EPSBalance(object): """ EPS type of balancing used for non-Hermitian problems - `NONE`: None. - `ONESIDE`: One-sided eigensolver, only right eigenvectors. - `TWOSIDE`: Two-sided eigensolver, right and left eigenvectors. - `USER`: User-defined. """ NONE = EPS_BALANCE_NONE ONESIDE = EPS_BALANCE_ONESIDE TWOSIDE = EPS_BALANCE_TWOSIDE USER = EPS_BALANCE_USER class EPSErrorType(object): """ EPS error type to assess accuracy of computed solutions - `ABSOLUTE`: Absolute error. - `RELATIVE`: Relative error. - `BACKWARD`: Backward error. """ ABSOLUTE = EPS_ERROR_ABSOLUTE RELATIVE = EPS_ERROR_RELATIVE BACKWARD = EPS_ERROR_BACKWARD class EPSWhich(object): """ EPS desired piece of spectrum - `LARGEST_MAGNITUDE`: Largest magnitude (default). - `LARGEST_REAL`: Largest real parts. - `LARGEST_IMAGINARY`: Largest imaginary parts in magnitude. - `SMALLEST_MAGNITUDE`: Smallest magnitude. - `SMALLEST_REAL`: Smallest real parts. - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude. - `TARGET_MAGNITUDE`: Closest to target (in magnitude). - `TARGET_REAL`: Real part closest to target. - `TARGET_IMAGINARY`: Imaginary part closest to target. - `ALL`: All eigenvalues in an interval. - `USER`: User defined ordering. """ LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE LARGEST_REAL = EPS_LARGEST_REAL LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE SMALLEST_REAL = EPS_SMALLEST_REAL SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE TARGET_REAL = EPS_TARGET_REAL TARGET_IMAGINARY = EPS_TARGET_IMAGINARY ALL = EPS_ALL USER = EPS_WHICH_USER class EPSConv(object): """ EPS convergence test - `ABS`: - `REL`: - `NORM`: - `USER`: """ ABS = EPS_CONV_ABS REL = EPS_CONV_REL NORM = EPS_CONV_NORM USER = EPS_CONV_USER class EPSConvergedReason(object): """ EPS convergence reasons - `CONVERGED_TOL`: - `CONVERGED_USER`: - `DIVERGED_ITS`: - `DIVERGED_BREAKDOWN`: - `DIVERGED_SYMMETRY_LOST`: - `CONVERGED_ITERATING`: """ CONVERGED_TOL = EPS_CONVERGED_TOL CONVERGED_USER = EPS_CONVERGED_USER DIVERGED_ITS = EPS_DIVERGED_ITS DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST CONVERGED_ITERATING = EPS_CONVERGED_ITERATING ITERATING = EPS_CONVERGED_ITERATING class EPSPowerShiftType(object): """ EPS Power shift type. - `CONSTANT`: - `RAYLEIGH`: - `WILKINSON`: """ CONSTANT = EPS_POWER_SHIFT_CONSTANT RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH WILKINSON = EPS_POWER_SHIFT_WILKINSON class EPSLanczosReorthogType(object): """ EPS Lanczos reorthogonalization type - `LOCAL`: - `FULL`: - `SELECTIVE`: - `PERIODIC`: - `PARTIAL`: - `DELAYED`: """ LOCAL = EPS_LANCZOS_REORTHOG_LOCAL FULL = EPS_LANCZOS_REORTHOG_FULL SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL DELAYED = EPS_LANCZOS_REORTHOG_DELAYED # ----------------------------------------------------------------------------- cdef class EPS(Object): """ EPS """ Type = EPSType ProblemType = EPSProblemType Extraction = EPSExtraction Balance = EPSBalance ErrorType = EPSErrorType Which = EPSWhich Conv = EPSConv ConvergedReason = EPSConvergedReason PowerShiftType = EPSPowerShiftType LanczosReorthogType = EPSLanczosReorthogType def __cinit__(self): self.obj = &self.eps self.eps = NULL def view(self, Viewer viewer=None): """ Prints the EPS data structure. Parameters ---------- viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( EPSView(self.eps, vwr) ) def destroy(self): """ Destroys the EPS object. """ CHKERR( EPSDestroy(&self.eps) ) self.eps = NULL return self def reset(self): """ Resets the EPS object. """ CHKERR( EPSReset(self.eps) ) def create(self, comm=None): """ Creates the EPS object. Parameters ---------- comm: MPI_Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcEPS neweps = NULL CHKERR( EPSCreate(ccomm, &neweps) ) SlepcCLEAR(self.obj); self.eps = neweps return self def setType(self, eps_type): """ Selects the particular solver to be used in the EPS object. Parameters ---------- eps_type: `EPS.Type` enumerate The solver to be used. Notes ----- See `EPS.Type` for available methods. The default is `EPS.Type.KRYLOVSCHUR`. Normally, it is best to use `setFromOptions()` and then set the EPS type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods. """ cdef SlepcEPSType cval = NULL eps_type = str2bytes(eps_type, &cval) CHKERR( EPSSetType(self.eps, cval) ) def getType(self): """ Gets the EPS type of this object. Returns ------- type: `EPS.Type` enumerate The solver currently being used. """ cdef SlepcEPSType eps_type = NULL CHKERR( EPSGetType(self.eps, &eps_type) ) return bytes2str(eps_type) def getOptionsPrefix(self): """ Gets the prefix used for searching for all EPS options in the database. Returns ------- prefix: string The prefix string set for this EPS object. """ cdef const_char *prefix = NULL CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) ) return bytes2str(prefix) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all EPS options in the database. Parameters ---------- prefix: string The prefix string to prepend to all EPS option requests. Notes ----- A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. For example, to distinguish between the runtime options for two different EPS contexts, one could call:: E1.setOptionsPrefix("eig1_") E2.setOptionsPrefix("eig2_") """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) def appendOptionsPrefix(self, prefix): """ Appends to the prefix used for searching for all EPS options in the database. Parameters ---------- prefix: string The prefix string to prepend to all EPS option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) def setFromOptions(self): """ Sets EPS options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( EPSSetFromOptions(self.eps) ) # def getProblemType(self): """ Gets the problem type from the EPS object. Returns ------- problem_type: `EPS.ProblemType` enumerate The problem type that was previously set. """ cdef SlepcEPSProblemType val = EPS_NHEP CHKERR( EPSGetProblemType(self.eps, &val) ) return val def setProblemType(self, problem_type): """ Specifies the type of the eigenvalue problem. Parameters ---------- problem_type: `EPS.ProblemType` enumerate The problem type to be set. Notes ----- Allowed values are: Hermitian (HEP), non-Hermitian (NHEP), generalized Hermitian (GHEP), generalized non-Hermitian (GNHEP), and generalized non-Hermitian with positive semi-definite B (PGNHEP). This function must be used to instruct SLEPc to exploit symmetry. If no problem type is specified, by default a non-Hermitian problem is assumed (either standard or generalized). If the user knows that the problem is Hermitian (i.e. ``A=A^H``) or generalized Hermitian (i.e. ``A=A^H``, ``B=B^H``, and ``B`` positive definite) then it is recommended to set the problem type so that eigensolver can exploit these properties. """ cdef SlepcEPSProblemType val = problem_type CHKERR( EPSSetProblemType(self.eps, val) ) def isGeneralized(self): """ Tells whether the EPS object corresponds to a generalized eigenvalue problem. Returns ------- flag: boolean True if two matrices were set with `setOperators()`. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSIsGeneralized(self.eps, &tval) ) return tval def isHermitian(self): """ Tells whether the EPS object corresponds to a Hermitian eigenvalue problem. Returns ------- flag: boolean True if the problem type set with `setProblemType()` was Hermitian. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSIsHermitian(self.eps, &tval) ) return tval def isPositive(self): """ Tells whether the EPS object corresponds to an eigenvalue problem type that requires a positive (semi-) definite matrix B. Returns ------- flag: boolean True if the problem type set with `setProblemType()` was positive. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSIsPositive(self.eps, &tval) ) return tval def getBalance(self): """ Gets the balancing type used by the EPS object, and the associated parameters. Returns ------- balance: `EPS.Balance` enumerate The balancing method iterations: integer Number of iterations of the balancing algorithm cutoff: real Cutoff value """ cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE cdef PetscInt ival = 0 cdef PetscReal rval = 0 CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) ) return (val, toInt(ival), toReal(rval)) def setBalance(self, balance=None, iterations=None, cutoff=None): """ Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it. Parameters ---------- balance: `EPS.Balance` enumerate The balancing method iterations: integer Number of iterations of the balancing algorithm cutoff: real Cutoff value """ cdef SlepcEPSBalance val = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT cdef PetscReal rval = PETSC_DEFAULT if balance is not None: val = balance if iterations is not None: ival = asInt(iterations) if cutoff is not None: rval = asReal(cutoff) CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) def getExtraction(self): """ Gets the extraction type used by the EPS object. Returns ------- extraction: `EPS.Extraction` enumerate The method of extraction. """ cdef SlepcEPSExtraction val = EPS_RITZ CHKERR( EPSGetExtraction(self.eps, &val) ) return val def setExtraction(self, extraction): """ Sets the extraction type used by the EPS object. Parameters ---------- extraction: `EPS.Extraction` enumerate The extraction method to be used by the solver. Notes ----- Not all eigensolvers support all types of extraction. See the SLEPc documentation for details. By default, a standard Rayleigh-Ritz extraction is used. Other extractions may be useful when computing interior eigenvalues. Harmonic-type extractions are used in combination with a *target*. See `setTarget()`. """ cdef SlepcEPSExtraction val = extraction CHKERR( EPSSetExtraction(self.eps, val) ) def getWhichEigenpairs(self): """ Returns which portion of the spectrum is to be sought. Returns ------- which: `EPS.Which` enumerate The portion of the spectrum to be sought by the solver. """ cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE CHKERR( EPSGetWhichEigenpairs(self.eps, &val) ) return val def setWhichEigenpairs(self, which): """ Specifies which portion of the spectrum is to be sought. Parameters ---------- which: `EPS.Which` enumerate The portion of the spectrum to be sought by the solver. Notes ----- Not all eigensolvers implemented in EPS account for all the possible values. Also, some values make sense only for certain types of problems. If SLEPc is compiled for real numbers `EPS.Which.LARGEST_IMAGINARY` and `EPS.Which.SMALLEST_IMAGINARY` use the absolute value of the imaginary part for eigenvalue selection. """ cdef SlepcEPSWhich val = which CHKERR( EPSSetWhichEigenpairs(self.eps, val) ) def getTarget(self): """ Gets the value of the target. Returns ------- target: float (real or complex) The value of the target. Notes ----- If the target was not set by the user, then zero is returned. """ cdef PetscScalar sval = 0 CHKERR( EPSGetTarget(self.eps, &sval) ) return toScalar(sval) def setTarget(self, target): """ Sets the value of the target. Parameters ---------- target: float (real or complex) The value of the target. Notes ----- The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with `setWhichEigenpairs()`. """ cdef PetscScalar sval = asScalar(target) CHKERR( EPSSetTarget(self.eps, sval) ) def getInterval(self): """ Gets the computational interval for spectrum slicing. Returns ------- inta: float The left end of the interval. intb: float The right end of the interval. Notes ----- If the interval was not set by the user, then zeros are returned. """ cdef PetscReal inta = 0 cdef PetscReal intb = 0 CHKERR( EPSGetInterval(self.eps, &inta, &intb) ) return (toReal(inta), toReal(intb)) def setInterval(self, inta, intb): """ Defines the computational interval for spectrum slicing. Parameters ---------- inta: float The left end of the interval. intb: float The right end of the interval. Notes ----- Spectrum slicing is a technique employed for computing all eigenvalues of symmetric eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with `EPS.Which.ALL`, see `setWhichEigenpairs()`. """ cdef PetscReal rval1 = asReal(inta) cdef PetscReal rval2 = asReal(intb) CHKERR( EPSSetInterval(self.eps, rval1, rval2) ) # def getTolerances(self): """ Gets the tolerance and maximum iteration count used by the default EPS convergence tests. Returns ------- tol: float The convergence tolerance. max_it: int The maximum number of iterations """ cdef PetscReal rval = 0 cdef PetscInt ival = 0 CHKERR( EPSGetTolerances(self.eps, &rval, &ival) ) return (toReal(rval), toInt(ival)) def setTolerances(self, tol=None, max_it=None): """ Sets the tolerance and maximum iteration count used by the default EPS convergence tests. Parameters ---------- tol: float, optional The convergence tolerance. max_it: int, optional The maximum number of iterations Notes ----- Use `DECIDE` for maxits to assign a reasonably good value, which is dependent on the solution method. """ cdef PetscReal rval = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT if tol is not None: rval = asReal(tol) if max_it is not None: ival = asInt(max_it) CHKERR( EPSSetTolerances(self.eps, rval, ival) ) def getConvergenceTest(self): """ Return the method used to compute the error estimate used in the convergence test. Returns ------- conv: EPS.Conv The method used to compute the error estimate used in the convergence test. """ cdef SlepcEPSConv conv = EPS_CONV_REL CHKERR( EPSGetConvergenceTest(self.eps, &conv) ) return conv def setConvergenceTest(self, conv): """ Specifies how to compute the error estimate used in the convergence test. Parameters ---------- conv: EPS.Conv The method used to compute the error estimate used in the convergence test. """ cdef SlepcEPSConv tconv = conv CHKERR( EPSSetConvergenceTest(self.eps, tconv) ) def getTrueResidual(self): """ Returns the flag indicating whether true residual must be computed explicitly or not. Returns ------- trueres: bool Whether the solver compute all residuals or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSGetTrueResidual(self.eps, &tval) ) return tval def setTrueResidual(self, trueres): """ Specifies if the solver must compute the true residual explicitly or not. Parameters ---------- trueres: bool Whether compute the true residual or not. """ cdef PetscBool tval = trueres CHKERR( EPSSetTrueResidual(self.eps, tval) ) def getTrackAll(self): """ Returns the flag indicating whether all residual norms must be computed or not. Returns ------- trackall: bool Whether the solver compute all residuals or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSGetTrackAll(self.eps, &tval) ) return tval def setTrackAll(self, trackall): """ Specifies if the solver must compute the residual of all approximate eigenpairs or not. Parameters ---------- trackall: bool Whether compute all residuals or not. """ cdef PetscBool tval = trackall CHKERR( EPSSetTrackAll(self.eps, tval) ) def getDimensions(self): """ Gets the number of eigenvalues to compute and the dimension of the subspace. Returns ------- nev: int Number of eigenvalues to compute. ncv: int Maximum dimension of the subspace to be used by the solver. mpd: int Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) def setDimensions(self, nev=None, ncv=None, mpd=None): """ Sets the number of eigenvalues to compute and the dimension of the subspace. Parameters ---------- nev: int, optional Number of eigenvalues to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem. Notes ----- Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good value, which is dependent on the solution method. The parameters `ncv` and `mpd` are intimately related, so that the user is advised to set one of them at most. Normal usage is the following: + In cases where `nev` is small, the user sets `ncv` (a reasonable default is 2 * `nev`). + In cases where `nev` is large, the user sets `mpd`. The value of `ncv` should always be between `nev` and (`nev` + `mpd`), typically `ncv` = `nev` + `mpd`. If `nev` is not too large, `mpd` = `nev` is a reasonable choice, otherwise a smaller value should be used. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = PETSC_DEFAULT if nev is not None: ival1 = asInt(nev) if ncv is not None: ival2 = asInt(ncv) if mpd is not None: ival3 = asInt(mpd) CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) def getST(self): """ Obtain the spectral transformation (`ST`) object associated to the eigensolver object. Returns ------- st: ST The spectral transformation. """ cdef ST st = ST() CHKERR( EPSGetST(self.eps, &st.st) ) PetscINCREF(st.obj) return st def setST(self, ST st not None): """ Associates a spectral transformation object to the eigensolver. Parameters ---------- st: ST The spectral transformation. """ CHKERR( EPSSetST(self.eps, st.st) ) def getBV(self): """ Obtain the basis vector objects associated to the eigensolver. Returns ------- bv: BV The basis vectors context. """ cdef BV bv = BV() CHKERR( EPSGetBV(self.eps, &bv.bv) ) PetscINCREF(bv.obj) return bv def setBV(self, BV bv not None): """ Associates a basis vectors object to the eigensolver. Parameters ---------- bv: BV The basis vectors context. """ CHKERR( EPSSetBV(self.eps, bv.bv) ) def getDS(self): """ Obtain the direct solver associated to the eigensolver. Returns ------- ds: DS The direct solver context. """ cdef DS ds = DS() CHKERR( EPSGetDS(self.eps, &ds.ds) ) PetscINCREF(ds.obj) return ds def setDS(self, DS ds not None): """ Associates a direct solver object to the eigensolver. Parameters ---------- ds: DS The direct solver context. """ CHKERR( EPSSetDS(self.eps, ds.ds) ) def getRG(self): """ Obtain the region object associated to the eigensolver. Returns ------- rg: RG The region context. """ cdef RG rg = RG() CHKERR( EPSGetRG(self.eps, &rg.rg) ) PetscINCREF(rg.obj) return rg def setRG(self, RG rg not None): """ Associates a region object to the eigensolver. Parameters ---------- rg: RG The region context. """ CHKERR( EPSSetRG(self.eps, rg.rg) ) def getOperators(self): """ Gets the matrices associated with the eigenvalue problem. Returns ------- A: Mat The matrix associated with the eigensystem. B: Mat The second matrix in the case of generalized eigenproblems. """ cdef Mat A = Mat() cdef Mat B = Mat() CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) PetscINCREF(A.obj) PetscINCREF(B.obj) return (A, B) def setOperators(self, Mat A not None, Mat B=None): """ Sets the matrices associated with the eigenvalue problem. Parameters ---------- A: Mat The matrix associated with the eigensystem. B: Mat, optional The second matrix in the case of generalized eigenproblems; if not provided, a standard eigenproblem is assumed. """ cdef PetscMat Bmat = NULL if B is not None: Bmat = B.mat CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) def setDeflationSpace(self, space): """ Add vectors to the basis of the deflation space. Parameters ---------- space: a Vec or an array of Vec Set of basis vectors to be added to the deflation space. Notes ----- When a deflation space is given, the eigensolver seeks the eigensolution in the restriction of the problem to the orthogonal complement of this space. This can be used for instance in the case that an invariant subspace is known beforehand (such as the nullspace of the matrix). The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally. These vectors do not persist from one `solve()` call to the other, so the deflation space should be set every time. """ if isinstance(space, Vec): space = [space] cdef PetscVec* vs = NULL cdef Py_ssize_t i = 0, ns = len(space) cdef tmp = allocate(ns*sizeof(Vec),&vs) for i in range(ns): vs[i] = (space[i]).vec CHKERR( EPSSetDeflationSpace(self.eps, ns, vs) ) # def setInitialSpace(self, space): """ Sets the initial space from which the eigensolver starts to iterate. Parameters ---------- space: Vec or sequence of Vec The initial space Notes ----- Some solvers start to iterate on a single vector (initial vector). In that case, the other vectors are ignored. In contrast to `setDeflationSpace()`, these vectors do not persist from one `solve()` call to the other, so the initial space should be set every time. The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally. Common usage of this function is when the user can provide a rough approximation of the wanted eigenspace. Then, convergence may be faster. """ if isinstance(space, Vec): space = [space] cdef PetscVec *vs = NULL cdef Py_ssize_t i = 0, ns = len(space) cdef tmp = allocate(ns*sizeof(Vec),&vs) for i in range(ns): vs[i] = (space[i]).vec CHKERR( EPSSetInitialSpace(self.eps, ns, vs) ) # def cancelMonitor(self): """ Clears all monitors for an EPS object. """ CHKERR( EPSMonitorCancel(self.eps) ) # def setUp(self): """ Sets up all the internal data structures necessary for the execution of the eigensolver. Notes ----- This function need not be called explicitly in most cases, since `solve()` calls it. It can be useful when one wants to measure the set-up time separately from the solve time. """ CHKERR( EPSSetUp(self.eps) ) def solve(self): """ Solves the eigensystem. """ CHKERR( EPSSolve(self.eps) ) def getIterationNumber(self): """ Gets the current iteration number. If the call to `solve()` is complete, then it returns the number of iterations carried out by the solution method. Returns ------- its: int Iteration number. """ cdef PetscInt ival = 0 CHKERR( EPSGetIterationNumber(self.eps, &ival) ) return toInt(ival) def getConvergedReason(self): """ Gets the reason why the `solve()` iteration was stopped. Returns ------- reason: `EPS.ConvergedReason` enumerate Negative value indicates diverged, positive value converged. """ cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING CHKERR( EPSGetConvergedReason(self.eps, &val) ) return val def getConverged(self): """ Gets the number of converged eigenpairs. Returns ------- nconv: int Number of converged eigenpairs. Notes ----- This function should be called after `solve()` has finished. """ cdef PetscInt ival = 0 CHKERR( EPSGetConverged(self.eps, &ival) ) return toInt(ival) def getEigenvalue(self, int i): """ Gets the i-th eigenvalue as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. Returns ------- e: scalar (possibly complex) The computed eigenvalue. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed according to the ordering criterion established with `setWhichEigenpairs()`. """ cdef PetscScalar sval1 = 0 cdef PetscScalar sval2 = 0 CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) return complex(toScalar(sval1), toScalar(sval2)) def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None): """ Gets the i-th eigenvector as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. Vr: Vec Placeholder for the returned eigenvector (real part). Vi: Vec, optional Placeholder for the returned eigenvector (imaginary part). Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed according to the ordering criterion established with `setWhichEigenpairs()`. """ cdef PetscVec vecr = NULL cdef PetscVec veci = NULL if Vr is not None: vecr = Vr.vec if Vi is not None: veci = Vi.vec CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): """ Gets the i-th solution of the eigenproblem as computed by `solve()`. The solution consists of both the eigenvalue and the eigenvector. Parameters ---------- i: int Index of the solution to be obtained. Vr: Vec Placeholder for the returned eigenvector (real part). Vi: Vec Placeholder for the returned eigenvector (imaginary part). Returns ------- e: scalar (possibly complex) The computed eigenvalue. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed according to the ordering criterion established with `setWhichEigenpairs()`. """ cdef PetscScalar sval1 = 0 cdef PetscScalar sval2 = 0 cdef PetscVec vecr = NULL cdef PetscVec veci = NULL if Vr is not None: vecr = Vr.vec if Vi is not None: veci = Vi.vec CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) return complex(toScalar(sval1), toScalar(sval2)) def getInvariantSubspace(self): """ Gets an orthonormal basis of the computed invariant subspace. Returns ------- subspace: list of Vec Basis of the invariant subspace. Notes ----- This function should be called after `solve()` has finished. The returned vectors span an invariant subspace associated with the computed eigenvalues. An invariant subspace ``X`` of ``A` satisfies ``A x`` in ``X`` for all ``x`` in ``X`` (a similar definition applies for generalized eigenproblems). """ cdef PetscInt i = 0, ncv = 0 cdef PetscVec v = NULL, *isp = NULL cdef list subspace = [] CHKERR( EPSGetConverged(self.eps, &ncv) ) if ncv == 0: return subspace cdef PetscMat A = NULL CHKERR( EPSGetOperators(self.eps, &A, NULL) ) CHKERR( MatCreateVecs(A, &v, NULL) ) cdef Vec V = None cdef object tmp = allocate(ncv*sizeof(Vec),&isp) for i in range(ncv): if i == 0: isp[0] = v if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) V = Vec(); V.vec = isp[i]; subspace.append(V) CHKERR( EPSGetInvariantSubspace(self.eps, isp) ) return subspace # def getErrorEstimate(self, int i): """ Returns the error estimate associated to the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. Returns ------- e: real Error estimate. Notes ----- This is the error estimate used internally by the eigensolver. The actual error bound can be computed with `computeError()`. """ cdef PetscReal rval = 0 CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) ) return toReal(rval) def computeError(self, int i, etype=None): """ Computes the error (based on the residual norm) associated with the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. etype: `EPS.ErrorType` enumerate The error type to compute. Returns ------- e: real The error bound, computed in various ways from the residual norm ``||Ax-kBx||_2`` where ``k`` is the eigenvalue and ``x`` is the eigenvector. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). """ cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE cdef PetscReal rval = 0 if etype is not None: et = etype CHKERR( EPSComputeError(self.eps, i, et, &rval) ) return toReal(rval) def errorView(self, etype=None, Viewer viewer=None): """ Displays the errors associated with the computed solution (as well as the eigenvalues). Parameters ---------- etype: `EPS.ErrorType` enumerate, optional The error type to compute. viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. Notes ----- By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ``ASCII_INFO_DETAIL`` then a table with eigenvalues and corresponding errors is printed. """ cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE if etype is not None: et = etype cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( EPSErrorView(self.eps, et, vwr) ) # def setPowerShiftType(self, shift): """ Sets the type of shifts used during the power iteration. This can be used to emulate the Rayleigh Quotient Iteration (RQI) method. Parameters ---------- shift: `EPS.PowerShiftType` enumerate The type of shift. Notes ----- This call is only relevant if the type was set to `EPS.Type.POWER` with `setType()`. By default, shifts are constant (`EPS.PowerShiftType.CONSTANT`) and the iteration is the simple power method (or inverse iteration if a shift-and-invert transformation is being used). A variable shift can be specified (`EPS.PowerShiftType.RAYLEIGH` or `EPS.PowerShiftType.WILKINSON`). In this case, the iteration behaves rather like a cubic converging method as RQI. """ cdef SlepcEPSPowerShiftType val = shift CHKERR( EPSPowerSetShiftType(self.eps, val) ) def getPowerShiftType(self): """ Gets the type of shifts used during the power iteration. Returns ------- shift: `EPS.PowerShiftType` enumerate The type of shift. """ cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT CHKERR( EPSPowerGetShiftType(self.eps, &val) ) return val def setArnoldiDelayed(self, delayed): """ Activates or deactivates delayed reorthogonalization in the Arnoldi iteration. Parameters ---------- delayed: boolean True if delayed reorthogonalization is to be used. Notes ----- This call is only relevant if the type was set to `EPS.Type.ARNOLDI` with `setType()`. Delayed reorthogonalization is an aggressive optimization for the Arnoldi eigensolver than may provide better scalability, but sometimes makes the solver converge less than the default algorithm. """ cdef PetscBool val = PETSC_FALSE if delayed: val = PETSC_TRUE CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) def getArnoldiDelayed(self): """ Gets the type of reorthogonalization used during the Arnoldi iteration. Returns ------- delayed: boolean True if delayed reorthogonalization is to be used. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) return tval def setLanczosReorthogType(self, reorthog): """ Sets the type of reorthogonalization used during the Lanczos iteration. Parameters ---------- reorthog: `EPS.LanczosReorthogType` enumerate The type of reorthogonalization. Notes ----- This call is only relevant if the type was set to `EPS.Type.LANCZOS` with `setType()`. """ cdef SlepcEPSLanczosReorthogType val = reorthog CHKERR( EPSLanczosSetReorthog(self.eps, val) ) def getLanczosReorthogType(self): """ Gets the type of reorthogonalization used during the Lanczos iteration. Returns ------- reorthog: `EPS.LanczosReorthogType` enumerate The type of reorthogonalization. """ cdef SlepcEPSLanczosReorthogType val = \ EPS_LANCZOS_REORTHOG_LOCAL CHKERR( EPSLanczosGetReorthog(self.eps, &val) ) return val # def setKrylovSchurRestart(self, keep): """ Sets the restart parameter for the Krylov-Schur method, in particular the proportion of basis vectors that must be kept after restart. Parameters ---------- keep: float The number of vectors to be kept at restart. Notes ----- Allowed values are in the range [0.1,0.9]. The default is 0.5. """ cdef PetscReal val = keep CHKERR( EPSKrylovSchurSetRestart(self.eps, val) ) def getKrylovSchurRestart(self): """ Gets the restart parameter used in the Krylov-Schur method. Returns ------- keep: float The number of vectors to be kept at restart. """ cdef PetscReal val = 0 CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) ) return val def setKrylovSchurLocking(self, lock): """ Choose between locking and non-locking variants of the Krylov-Schur method. Parameters ---------- lock: bool True if the locking variant must be selected. Notes ----- The default is to lock converged eigenpairs when the method restarts. This behaviour can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant). """ cdef PetscBool val = lock CHKERR( EPSKrylovSchurSetLocking(self.eps, val) ) def getKrylovSchurLocking(self): """ Gets the locking flag used in the Krylov-Schur method. Returns ------- lock: bool The locking flag. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) ) return tval def setKrylovSchurPartitions(self, npart): """ Sets the number of partitions for the case of doing spectrum slicing for a computational interval with the communicator split in several sub-communicators. Parameters ---------- npart: int The number of partitions. Notes ----- By default, npart=1 so all processes in the communicator participate in the processing of the whole interval. If npart>1 then the interval is divided into npart subintervals, each of them being processed by a subset of processes. """ cdef PetscInt val = npart CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) ) def getKrylovSchurPartitions(self): """ Gets the number of partitions of the communicator in case of spectrum slicing. Returns ------- npart: int The number of partitions. """ cdef PetscInt val = 0 CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) ) return val def setKrylovSchurDetectZeros(self, detect): """ Sets a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation. Parameters ---------- detect: bool True if zeros must checked for. Notes ----- A zero in the factorization indicates that a shift coincides with an eigenvalue. This flag is turned off by default, and may be necessary in some cases, especially when several partitions are being used. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS. """ cdef PetscBool val = detect CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) ) def getKrylovSchurDetectZeros(self): """ Gets the flag that enforces zero detection in spectrum slicing. Returns ------- detect: bool The zero detection flag. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) ) return tval def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None): """ Sets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. The meaning of the parameters is the same as in `setDimensions()`. Parameters ---------- nev: int, optional Number of eigenvalues to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = PETSC_DEFAULT if nev is not None: ival1 = asInt(nev) if ncv is not None: ival2 = asInt(ncv) if mpd is not None: ival3 = asInt(mpd) CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) def getKrylovSchurDimensions(self): """ Gets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. Returns ------- nev: int Number of eigenvalues to compute. ncv: int Maximum dimension of the subspace to be used by the solver. mpd: int Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) def getKrylovSchurSubcommInfo(self): """ Gets information related to the case of doing spectrum slicing for a computational interval with multiple communicators. Returns ------- k: int Number of the subinterval for the calling process. n: int Number of eigenvalues found in the k-th subinterval. v: Vec A vector owned by processes in the subcommunicator with dimensions compatible for locally computed eigenvectors. Notes ----- This function is only available for spectrum slicing runs. The returned Vec should be destroyed by the user. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef Vec vec vec = Vec() CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) ) return (toInt(ival1), toInt(ival2), vec) def getKrylovSchurSubcommPairs(self, int i, Vec V): """ Gets the i-th eigenpair stored internally in the multi-communicator to which the calling process belongs. Parameters ---------- i: int Index of the solution to be obtained. V: Vec Placeholder for the returned eigenvector. Returns ------- e: scalar The computed eigenvalue. Notes ----- The index ``i`` should be a value between ``0`` and ``n-1``, where ``n`` is the number of vectors in the local subinterval, see `getKrylovSchurSubcommInfo()`. """ cdef PetscScalar sval = 0 cdef PetscVec vec = NULL if V is not None: vec = V.vec CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) return toScalar(sval) def getKrylovSchurSubcommMats(self): """ Gets the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs. Returns ------- A: Mat The matrix associated with the eigensystem. B: Mat The second matrix in the case of generalized eigenproblems. Notes ----- This is the analog of `getOperators()`, but returns the matrices distributed differently (in the subcommunicator rather than in the parent communicator). These matrices should not be modified by the user. """ cdef Mat A = Mat() cdef Mat B = Mat() CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) PetscINCREF(A.obj) PetscINCREF(B.obj) return (A, B) def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False): """ Update the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs. Parameters ---------- s: float (real or complex) Scalar that multiplies the existing A matrix. a: float (real or complex) Scalar used in the axpy operation on A. Au: Mat, optional The matrix used in the axpy operation on A. t: float (real or complex) Scalar that multiplies the existing B matrix. b: float (real or complex) Scalar used in the axpy operation on B. Bu: Mat, optional The matrix used in the axpy operation on B. structure: `PETSc.Mat.Structure` enumerate Either same, different, or a subset of the non-zero sparsity pattern. globalup: bool Whether global matrices must be updated or not. Notes ----- This function modifies the eigenproblem matrices at subcommunicator level, and optionally updates the global matrices in the parent communicator. The updates are expressed as ``A <-- s*A + a*Au``, ``B <-- t*B + b*Bu``. It is possible to update one of the matrices, or both. The matrices `Au` and `Bu` must be equal in all subcommunicators. The `str` flag is passed to the `Mat.axpy()` operations to perform the updates. If `globalup` is True, communication is carried out to reconstruct the updated matrices in the parent communicator. """ cdef PetscMat Amat = NULL if Au is not None: Amat = Au.mat cdef PetscMat Bmat = NULL if Bu is not None: Bmat = Bu.mat cdef PetscMatStructure vstr = matstructure(structure) cdef PetscBool tval = globalup CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) def setKrylovSchurSubintervals(self, subint): """ Sets the subinterval boundaries for spectrum slicing with a computational interval. Parameters ---------- subint: list of real values specifying subintervals Notes ----- Logically Collective on EPS This function must be called after setKrylovSchurPartitions(). For npart partitions, the argument subint must contain npart+1 real values sorted in ascending order: subint_0, subint_1, ..., subint_npart, where the first and last values must coincide with the interval endpoints set with EPSSetInterval(). The subintervals are then defined by two consecutive points: [subint_0,subint_1], [subint_1,subint_2], and so on. """ cdef PetscBool match = PETSC_FALSE CHKERR( PetscObjectTypeCompare(self.eps, EPSKRYLOVSCHUR, &match) ) if match == PETSC_FALSE: return cdef PetscReal *subintarray = NULL cdef Py_ssize_t i = 0, n = len(subint) cdef PetscInt nparts = 0 CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) assert n >= nparts cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) for i in range(n): subintarray[i] = asReal(subint[i]) CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) def setRQCGReset(self, nrest): """ Sets the reset parameter of the RQCG iteration. Every nrest iterations, the solver performs a Rayleigh-Ritz projection step. Parameters ---------- nrest: integer The number of iterations between resets. """ cdef PetscInt val = nrest CHKERR( EPSRQCGSetReset(self.eps, val) ) def getRQCGReset(self): """ Gets the reset parameter used in the RQCG method. Returns ------- nrest: integer The number of iterations between resets. """ cdef PetscInt val = 0 CHKERR( EPSRQCGGetReset(self.eps, &val) ) return val # property problem_type: def __get__(self): return self.getProblemType() def __set__(self, value): self.setProblemType(value) property extraction: def __get__(self): return self.getExtraction() def __set__(self, value): self.setExtraction(value) property which: def __get__(self): return self.getWhichEigenpairs() def __set__(self, value): self.setWhichEigenpairs(value) property target: def __get__(self): return self.getTarget() def __set__(self, value): self.setTarget(value) property tol: def __get__(self): return self.getTolerances()[0] def __set__(self, value): self.setTolerances(tol=value) property max_it: def __get__(self): return self.getTolerances()[1] def __set__(self, value): self.setTolerances(max_it=value) property st: def __get__(self): return self.getST() def __set__(self, value): self.setST(value) property bv: def __get__(self): return self.getBV() def __set__(self, value): self.setBV(value) # ----------------------------------------------------------------------------- del EPSType del EPSProblemType del EPSExtraction del EPSBalance del EPSErrorType del EPSWhich del EPSConv del EPSConvergedReason del EPSPowerShiftType del EPSLanczosReorthogType # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcds.pxi0000644000175000001440000000462612705464414017744 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcDSType "const char*" SlepcDSType DSHEP SlepcDSType DSNHEP SlepcDSType DSGHEP SlepcDSType DSGHIEP SlepcDSType DSGNHEP SlepcDSType DSSVD SlepcDSType DSPEP SlepcDSType DSNEP ctypedef enum SlepcDSStateType "DSStateType": DS_STATE_RAW DS_STATE_INTERMEDIATE DS_STATE_CONDENSED DS_STATE_TRUNCATED ctypedef enum SlepcDSMatType "DSMatType": DS_MAT_A DS_MAT_B DS_MAT_C DS_MAT_T DS_MAT_D DS_MAT_Q DS_MAT_Z DS_MAT_X DS_MAT_Y DS_MAT_U DS_MAT_VT DS_MAT_W DS_NUM_MAT int DSCreate(MPI_Comm,SlepcDS*) int DSView(SlepcDS,PetscViewer) int DSDestroy(SlepcDS*) int DSReset(SlepcDS) int DSSetType(SlepcDS,SlepcDSType) int DSGetType(SlepcDS,SlepcDSType*) int DSSetOptionsPrefix(SlepcDS,char[]) int DSGetOptionsPrefix(SlepcDS,char*[]) int DSAppendOptionsPrefix(SlepcDS,char[]) int DSSetFromOptions(SlepcDS) int DSAllocate(SlepcDS,PetscInt) int DSGetLeadingDimension(SlepcDS,PetscInt*) int DSSetState(SlepcDS,SlepcDSStateType) int DSGetState(SlepcDS,SlepcDSStateType*) int DSSetDimensions(SlepcDS,PetscInt,PetscInt,PetscInt,PetscInt) int DSGetDimensions(SlepcDS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*) int DSTruncate(SlepcDS,PetscInt) int DSSetMethod(SlepcDS,PetscInt) int DSGetMethod(SlepcDS,PetscInt*) int DSSetCompact(SlepcDS,PetscBool) int DSGetCompact(SlepcDS,PetscBool*) int DSSetExtraRow(SlepcDS,PetscBool) int DSGetExtraRow(SlepcDS,PetscBool*) int DSSetRefined(SlepcDS,PetscBool) int DSGetRefined(SlepcDS,PetscBool*) int DSGetArray(SlepcDS,SlepcDSMatType,PetscScalar *a[]) int DSRestoreArray(SlepcDS,SlepcDSMatType,PetscScalar *a[]) int DSGetArrayReal(SlepcDS,SlepcDSMatType,PetscReal *a[]) int DSRestoreArrayReal(SlepcDS,SlepcDSMatType,PetscReal *a[]) int DSVectors(SlepcDS,SlepcDSMatType,PetscInt*,PetscReal*) int DSSolve(SlepcDS,PetscScalar*,PetscScalar*) int DSSort(SlepcDS,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscInt*) int DSUpdateExtraRow(SlepcDS) int DSCond(SlepcDS,PetscReal*) int DSTranslateHarmonic(SlepcDS,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*) int DSTranslateRKS(SlepcDS,PetscScalar) int DSNormalize(SlepcDS,SlepcDSMatType,PetscInt) slepc4py-3.7.0/src/SLEPc/slepceps.pxi0000644000175000001440000002142512720263215020112 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcEPSType "const char*" SlepcEPSType EPSPOWER SlepcEPSType EPSSUBSPACE SlepcEPSType EPSARNOLDI SlepcEPSType EPSLANCZOS SlepcEPSType EPSKRYLOVSCHUR SlepcEPSType EPSGD SlepcEPSType EPSJD SlepcEPSType EPSRQCG SlepcEPSType EPSLOBPCG SlepcEPSType EPSCISS SlepcEPSType EPSLAPACK SlepcEPSType EPSARPACK SlepcEPSType EPSBLZPACK SlepcEPSType EPSTRLAN SlepcEPSType EPSBLOPEX SlepcEPSType EPSPRIMME SlepcEPSType EPSFEAST ctypedef enum SlepcEPSProblemType "EPSProblemType": EPS_HEP EPS_GHEP EPS_NHEP EPS_GNHEP EPS_PGNHEP EPS_GHIEP ctypedef enum SlepcEPSExtraction "EPSExtraction": EPS_RITZ EPS_HARMONIC EPS_HARMONIC_RELATIVE EPS_HARMONIC_RIGHT EPS_HARMONIC_LARGEST EPS_REFINED EPS_REFINED_HARMONIC ctypedef enum SlepcEPSWhich "EPSWhich": EPS_LARGEST_MAGNITUDE EPS_LARGEST_REAL EPS_LARGEST_IMAGINARY EPS_SMALLEST_MAGNITUDE EPS_SMALLEST_REAL EPS_SMALLEST_IMAGINARY EPS_TARGET_MAGNITUDE EPS_TARGET_REAL EPS_TARGET_IMAGINARY EPS_ALL EPS_WHICH_USER ctypedef enum SlepcEPSBalance "EPSBalance": EPS_BALANCE_NONE EPS_BALANCE_ONESIDE EPS_BALANCE_TWOSIDE EPS_BALANCE_USER ctypedef enum SlepcEPSErrorType "EPSErrorType": EPS_ERROR_ABSOLUTE EPS_ERROR_RELATIVE EPS_ERROR_BACKWARD ctypedef enum SlepcEPSConv "EPSConv": EPS_CONV_ABS EPS_CONV_REL EPS_CONV_NORM EPS_CONV_USER ctypedef enum SlepcEPSConvergedReason "EPSConvergedReason": EPS_CONVERGED_TOL EPS_CONVERGED_USER EPS_DIVERGED_ITS EPS_DIVERGED_BREAKDOWN EPS_DIVERGED_SYMMETRY_LOST EPS_CONVERGED_ITERATING int EPSView(SlepcEPS,PetscViewer) int EPSDestroy(SlepcEPS*) int EPSReset(SlepcEPS) int EPSCreate(MPI_Comm,SlepcEPS*) int EPSSetType(SlepcEPS,SlepcEPSType) int EPSGetType(SlepcEPS,SlepcEPSType*) int EPSSetOptionsPrefix(SlepcEPS,char[]) int EPSAppendOptionsPrefix(SlepcEPS,char []) int EPSGetOptionsPrefix(SlepcEPS,char*[]) int EPSSetFromOptions(SlepcEPS) int EPSSetProblemType(SlepcEPS,SlepcEPSProblemType) int EPSGetProblemType(SlepcEPS,SlepcEPSProblemType*) int EPSIsGeneralized(SlepcEPS,PetscBool*) int EPSIsHermitian(SlepcEPS,PetscBool*) int EPSIsPositive(SlepcEPS,PetscBool*) int EPSSetExtraction(SlepcEPS,SlepcEPSExtraction) int EPSGetExtraction(SlepcEPS,SlepcEPSExtraction*) int EPSSetBalance(SlepcEPS,SlepcEPSBalance,PetscInt,PetscReal) int EPSGetBalance(SlepcEPS,SlepcEPSBalance*,PetscInt*,PetscReal*) int EPSSetWhichEigenpairs(SlepcEPS,SlepcEPSWhich) int EPSGetWhichEigenpairs(SlepcEPS,SlepcEPSWhich*) int EPSSetTarget(SlepcEPS,PetscScalar) int EPSGetTarget(SlepcEPS,PetscScalar*) int EPSSetInterval(SlepcEPS,PetscReal,PetscReal) int EPSGetInterval(SlepcEPS,PetscReal*,PetscReal*) int EPSSetTolerances(SlepcEPS,PetscReal,PetscInt) int EPSGetTolerances(SlepcEPS,PetscReal*,PetscInt*) int EPSSetDimensions(SlepcEPS,PetscInt,PetscInt,PetscInt) int EPSGetDimensions(SlepcEPS,PetscInt*,PetscInt*,PetscInt*) int EPSSetBV(SlepcEPS,SlepcBV) int EPSGetBV(SlepcEPS,SlepcBV*) int EPSSetDS(SlepcEPS,SlepcDS) int EPSGetDS(SlepcEPS,SlepcDS*) int EPSSetST(SlepcEPS,SlepcST) int EPSGetST(SlepcEPS,SlepcST*) int EPSSetRG(SlepcEPS,SlepcRG) int EPSGetRG(SlepcEPS,SlepcRG*) int EPSSetOperators(SlepcEPS,PetscMat,PetscMat) int EPSGetOperators(SlepcEPS,PetscMat*,PetscMat*) int EPSSetConvergenceTest(SlepcEPS,SlepcEPSConv) int EPSGetConvergenceTest(SlepcEPS,SlepcEPSConv*) int EPSSetTrueResidual(SlepcEPS,PetscBool) int EPSGetTrueResidual(SlepcEPS,PetscBool*) int EPSSetTrackAll(SlepcEPS,PetscBool) int EPSGetTrackAll(SlepcEPS,PetscBool*) int EPSSetDeflationSpace(SlepcEPS,PetscInt,PetscVec*) int EPSSetInitialSpace(SlepcEPS,PetscInt,PetscVec*) int EPSMonitorCancel(SlepcEPS) int EPSSetUp(SlepcEPS) int EPSSolve(SlepcEPS) int EPSGetIterationNumber(SlepcEPS,PetscInt*) int EPSGetConvergedReason(SlepcEPS,SlepcEPSConvergedReason*) int EPSGetConverged(SlepcEPS,PetscInt*) int EPSGetEigenvalue(SlepcEPS,PetscInt,PetscScalar*,PetscScalar*) int EPSGetEigenvector(SlepcEPS,PetscInt,PetscVec,PetscVec) int EPSGetEigenpair(SlepcEPS,PetscInt,PetscScalar*,PetscScalar*,PetscVec,PetscVec) int EPSGetInvariantSubspace(SlepcEPS,PetscVec*) int EPSGetErrorEstimate(SlepcEPS,PetscInt,PetscReal*) int EPSComputeError(SlepcEPS,PetscInt,SlepcEPSErrorType,PetscReal*) int EPSErrorView(SlepcEPS,SlepcEPSErrorType,PetscViewer) ctypedef enum SlepcEPSPowerShiftType "EPSPowerShiftType": EPS_POWER_SHIFT_CONSTANT EPS_POWER_SHIFT_RAYLEIGH EPS_POWER_SHIFT_WILKINSON int EPSPowerSetShiftType(SlepcEPS,SlepcEPSPowerShiftType) int EPSPowerGetShiftType(SlepcEPS,SlepcEPSPowerShiftType*) int EPSArnoldiSetDelayed(SlepcEPS,PetscBool) int EPSArnoldiGetDelayed(SlepcEPS,PetscBool*) int EPSKrylovSchurSetRestart(SlepcEPS,PetscReal) int EPSKrylovSchurGetRestart(SlepcEPS,PetscReal*) int EPSKrylovSchurSetLocking(SlepcEPS,PetscBool); int EPSKrylovSchurGetLocking(SlepcEPS,PetscBool*); int EPSKrylovSchurSetPartitions(SlepcEPS,PetscInt); int EPSKrylovSchurGetPartitions(SlepcEPS,PetscInt*); int EPSKrylovSchurSetDetectZeros(SlepcEPS,PetscBool); int EPSKrylovSchurGetDetectZeros(SlepcEPS,PetscBool*); int EPSKrylovSchurSetDimensions(SlepcEPS,PetscInt,PetscInt,PetscInt); int EPSKrylovSchurGetDimensions(SlepcEPS,PetscInt*,PetscInt*,PetscInt*); int EPSKrylovSchurGetSubcommInfo(SlepcEPS,PetscInt*,PetscInt*,PetscVec*); int EPSKrylovSchurGetSubcommPairs(SlepcEPS,PetscInt,PetscScalar*,PetscVec); int EPSKrylovSchurGetSubcommMats(SlepcEPS,PetscMat*,PetscMat*); int EPSKrylovSchurUpdateSubcommMats(SlepcEPS,PetscScalar,PetscScalar,PetscMat,PetscScalar,PetscScalar,PetscMat,PetscMatStructure,PetscBool); int EPSKrylovSchurSetSubintervals(SlepcEPS,PetscReal*); ctypedef enum SlepcEPSLanczosReorthogType "EPSLanczosReorthogType": EPS_LANCZOS_REORTHOG_LOCAL EPS_LANCZOS_REORTHOG_FULL EPS_LANCZOS_REORTHOG_SELECTIVE EPS_LANCZOS_REORTHOG_PERIODIC EPS_LANCZOS_REORTHOG_PARTIAL EPS_LANCZOS_REORTHOG_DELAYED int EPSLanczosSetReorthog(SlepcEPS,SlepcEPSLanczosReorthogType) int EPSLanczosGetReorthog(SlepcEPS,SlepcEPSLanczosReorthogType*) int EPSGDSetKrylovStart(SlepcEPS,PetscBool) int EPSGDGetKrylovStart(SlepcEPS,PetscBool*) int EPSGDSetBlockSize(SlepcEPS,PetscInt) int EPSGDGetBlockSize(SlepcEPS,PetscInt*) int EPSGDSetRestart(SlepcEPS,PetscInt,PetscInt) int EPSGDGetRestart(SlepcEPS,PetscInt*,PetscInt*) int EPSGDSetInitialSize(SlepcEPS,PetscInt) int EPSGDGetInitialSize(SlepcEPS,PetscInt*) int EPSGDSetBOrth(SlepcEPS,PetscBool) int EPSGDGetBOrth(SlepcEPS,PetscBool*) int EPSGDSetWindowSizes(SlepcEPS,PetscInt,PetscInt) int EPSGDGetWindowSizes(SlepcEPS,PetscInt*,PetscInt*) int EPSGDSetDoubleExpansion(SlepcEPS,PetscBool) int EPSGDGetDoubleExpansion(SlepcEPS,PetscBool*) int EPSJDSetKrylovStart(SlepcEPS,PetscBool) int EPSJDGetKrylovStart(SlepcEPS,PetscBool*) int EPSJDSetBlockSize(SlepcEPS,PetscInt) int EPSJDGetBlockSize(SlepcEPS,PetscInt*) int EPSJDSetRestart(SlepcEPS,PetscInt,PetscInt) int EPSJDGetRestart(SlepcEPS,PetscInt*,PetscInt*) int EPSJDSetInitialSize(SlepcEPS,PetscInt) int EPSJDGetInitialSize(SlepcEPS,PetscInt*) int EPSJDSetFix(SlepcEPS,PetscReal) int EPSJDGetFix(SlepcEPS,PetscReal*) int EPSJDSetConstantCorrectionTolerance(SlepcEPS,PetscBool) int EPSJDGetConstantCorrectionTolerance(SlepcEPS,PetscBool*) int EPSJDSetBOrth(SlepcEPS,PetscBool) int EPSJDGetBOrth(SlepcEPS,PetscBool*) int EPSJDGetWindowSizes(SlepcEPS,PetscInt*,PetscInt*) int EPSJDSetWindowSizes(SlepcEPS,PetscInt,PetscInt) int EPSRQCGSetReset(SlepcEPS,PetscInt) int EPSRQCGGetReset(SlepcEPS,PetscInt*) int EPSCISSSetRegion(SlepcEPS,PetscScalar,PetscReal,PetscReal) int EPSCISSGetRegion(SlepcEPS,PetscScalar*,PetscReal*,PetscReal*) int EPSCISSSetSizes(SlepcEPS,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool) int EPSCISSGetSizes(SlepcEPS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*) int EPSCISSSetThreshold(SlepcEPS,PetscReal,PetscReal) int EPSCISSGetThreshold(SlepcEPS,PetscReal*,PetscReal*) int EPSCISSSetRefinement(SlepcEPS,PetscInt,PetscInt,PetscInt) int EPSCISSGetRefinement(SlepcEPS,PetscInt*,PetscInt*,PetscInt*) cdef extern from * nogil: int VecDuplicate(PetscVec,PetscVec*) int MatCreateVecs(PetscMat,PetscVec*,PetscVec*) slepc4py-3.7.0/src/SLEPc/slepcmpi.pxi0000644000175000001440000000124612705464414020116 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- cdef extern from *: MPI_Comm MPI_COMM_NULL MPI_Comm MPI_COMM_SELF MPI_Comm MPI_COMM_WORLD cdef extern from *: MPI_Comm PETSC_COMM_SELF MPI_Comm PETSC_COMM_WORLD # ----------------------------------------------------------------------------- from petsc4py.PETSc cimport GetComm cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *: return GetComm(comm, defv) from petsc4py.PETSc cimport GetCommDefault cdef inline MPI_Comm SLEPC_COMM_DEFAULT(): return GetCommDefault() # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcrg.pxi0000644000175000001440000000170312705464414017737 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcRGType "const char*" SlepcRGType RGINTERVAL SlepcRGType RGPOLYGON SlepcRGType RGELLIPSE SlepcRGType RGRING int RGCreate(MPI_Comm,SlepcRG*) int RGView(SlepcRG,PetscViewer) int RGDestroy(SlepcRG*) int RGSetType(SlepcRG,SlepcRGType) int RGGetType(SlepcRG,SlepcRGType*) int RGSetOptionsPrefix(SlepcRG,char[]) int RGGetOptionsPrefix(SlepcRG,char*[]) int RGAppendOptionsPrefix(SlepcRG,char[]) int RGSetFromOptions(SlepcRG) int RGIsTrivial(SlepcRG,PetscBool*) int RGSetComplement(SlepcRG,PetscBool) int RGGetComplement(SlepcRG,PetscBool*) int RGEllipseSetParameters(SlepcRG,PetscScalar,PetscReal,PetscReal) int RGEllipseGetParameters(SlepcRG,PetscScalar*,PetscReal*,PetscReal*) int RGIntervalSetEndpoints(SlepcRG,PetscReal,PetscReal,PetscReal,PetscReal) int RGIntervalGetEndpoints(SlepcRG,PetscReal*,PetscReal*,PetscReal*,PetscReal*) slepc4py-3.7.0/src/SLEPc/slepcst.pxi0000644000175000001440000000273312716553521017761 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcSTType "const char*" SlepcSTType STSHELL SlepcSTType STSHIFT SlepcSTType STSINVERT SlepcSTType STCAYLEY SlepcSTType STPRECOND ctypedef enum SlepcSTMatMode "STMatMode": ST_MATMODE_COPY ST_MATMODE_INPLACE ST_MATMODE_SHELL int STView(SlepcST,PetscViewer) int STDestroy(SlepcST*) int STReset(SlepcST) int STCreate(MPI_Comm,SlepcST*) int STGetType(SlepcST,SlepcSTType*) int STSetType(SlepcST,SlepcSTType) int STGetOptionsPrefix(SlepcST,char*[]) int STSetOptionsPrefix(SlepcST,char[]) int STAppendOptionsPrefix(SlepcST,char[]) int STSetFromOptions(SlepcST) int STGetShift(SlepcST,PetscScalar*) int STSetShift(SlepcST,PetscScalar) int STGetKSP(SlepcST,PetscKSP*) int STSetKSP(SlepcST,PetscKSP) int STGetNumMatrices(SlepcST,PetscInt*) int STGetOperators(SlepcST,PetscInt,PetscMat*) int STSetOperators(SlepcST,PetscInt,PetscMat*) int STSetMatStructure(SlepcST,PetscMatStructure) int STGetOperationCounters(SlepcST,PetscInt*,PetscInt*) int STResetOperationCounters(SlepcST) int STSetTransform(SlepcST,PetscBool) int STGetTransform(SlepcST,PetscBool*) int STGetMatMode(SlepcST,SlepcSTMatMode*) int STSetMatMode(SlepcST,SlepcSTMatMode) int STSetUp(SlepcST) int STApply(SlepcST,PetscVec,PetscVec) int STApplyTranspose(SlepcST,PetscVec,PetscVec) int STCayleySetAntishift(SlepcST,PetscScalar) slepc4py-3.7.0/src/SLEPc/SVD.pyx0000644000175000001440000006112212720263215016746 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class SVDType(object): """ SVD types - `CROSS`: Eigenproblem with the cross-product matrix. - `CYCLIC`: Eigenproblem with the cyclic matrix. - `LAPACK`: Wrappers to dense SVD solvers in Lapack. - `LANCZOS`: Lanczos. - `TRLANCZOS`: Thick-restart Lanczos. """ CROSS = S_(SVDCROSS) CYCLIC = S_(SVDCYCLIC) LAPACK = S_(SVDLAPACK) LANCZOS = S_(SVDLANCZOS) TRLANCZOS = S_(SVDTRLANCZOS) class SVDErrorType(object): """ SVD error type to assess accuracy of computed solutions - `ABSOLUTE`: Absolute error. - `RELATIVE`: Relative error. """ ABSOLUTE = SVD_ERROR_ABSOLUTE RELATIVE = SVD_ERROR_RELATIVE class SVDWhich(object): """ SVD desired piece of spectrum - `LARGEST`: largest singular values. - `SMALLEST`: smallest singular values. """ LARGEST = SVD_LARGEST SMALLEST = SVD_SMALLEST class SVDConvergedReason(object): """ SVD convergence reasons - `CONVERGED_TOL`: - `CONVERGED_USER`: - `DIVERGED_ITS`: - `DIVERGED_BREAKDOWN`: - `CONVERGED_ITERATING`: """ CONVERGED_TOL = SVD_CONVERGED_TOL CONVERGED_USER = SVD_CONVERGED_USER DIVERGED_ITS = SVD_DIVERGED_ITS DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN CONVERGED_ITERATING = SVD_CONVERGED_ITERATING ITERATING = SVD_CONVERGED_ITERATING # ----------------------------------------------------------------------------- cdef class SVD(Object): """ SVD """ Type = SVDType ErrorType = SVDErrorType Which = SVDWhich ConvergedReason = SVDConvergedReason def __cinit__(self): self.obj = &self.svd self.svd = NULL def view(self, Viewer viewer=None): """ Prints the SVD data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( SVDView(self.svd, vwr) ) def destroy(self): """ Destroys the SVD object. """ CHKERR( SVDDestroy(&self.svd) ) self.svd = NULL return self def reset(self): """ Resets the SVD object. """ CHKERR( SVDReset(self.svd) ) def create(self, comm=None): """ Creates the SVD object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcSVD newsvd = NULL CHKERR( SVDCreate(ccomm, &newsvd) ) SlepcCLEAR(self.obj); self.svd = newsvd return self def setType(self, svd_type): """ Selects the particular solver to be used in the SVD object. Parameters ---------- svd_type: `SVD.Type` enumerate The solver to be used. Notes ----- See `SVD.Type` for available methods. The default is CROSS. Normally, it is best to use `setFromOptions()` and then set the SVD type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods. """ cdef SlepcSVDType cval = NULL svd_type = str2bytes(svd_type, &cval) CHKERR( SVDSetType(self.svd, cval) ) def getType(self): """ Gets the SVD type of this object. Returns ------- type: `SVD.Type` enumerate The solver currently being used. """ cdef SlepcSVDType svd_type = NULL CHKERR( SVDGetType(self.svd, &svd_type) ) return bytes2str(svd_type) def getOptionsPrefix(self): """ Gets the prefix used for searching for all SVD options in the database. Returns ------- prefix: string The prefix string set for this SVD object. """ cdef const_char *prefix = NULL CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) ) return bytes2str(prefix) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all SVD options in the database. Parameters ---------- prefix: string The prefix string to prepend to all SVD option requests. Notes ----- A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. For example, to distinguish between the runtime options for two different SVD contexts, one could call:: S1.setOptionsPrefix("svd1_") S2.setOptionsPrefix("svd2_") """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) def appendOptionsPrefix(self, prefix): """ Appends to the prefix used for searching for all SVD options in the database. Parameters ---------- prefix: string The prefix string to prepend to all SVD option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) def setFromOptions(self): """ Sets SVD options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( SVDSetFromOptions(self.svd) ) # def getImplicitTranspose(self): """ Gets the mode used to handle the transpose of the matrix associated with the singular value problem. Returns ------- impl: boolean How to handle the transpose (implicitly or not). """ cdef PetscBool val = PETSC_FALSE CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) return val def setImplicitTranspose(self, mode): """ Indicates how to handle the transpose of the matrix associated with the singular value problem. Parameters ---------- impl: boolean How to handle the transpose (implicitly or not). Notes ----- By default, the transpose of the matrix is explicitly built (if the matrix has defined the MatTranspose operation). If this flag is set to true, the solver does not build the transpose, but handles it implicitly via MatMultTranspose(). """ cdef PetscBool val = mode CHKERR( SVDSetImplicitTranspose(self.svd, val) ) def getWhichSingularTriplets(self): """ Returns which singular triplets are to be sought. Returns ------- which: `SVD.Which` enumerate The singular values to be sought (either largest or smallest). """ cdef SlepcSVDWhich val = SVD_LARGEST CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) ) return val def setWhichSingularTriplets(self, which): """ Specifies which singular triplets are to be sought. Parameters ---------- which: `SVD.Which` enumerate The singular values to be sought (either largest or smallest). """ cdef SlepcSVDWhich val = which CHKERR( SVDSetWhichSingularTriplets(self.svd, val) ) # def getTolerances(self): """ Gets the tolerance and maximum iteration count used by the default SVD convergence tests. Returns ------- tol: float The convergence tolerance. max_it: int The maximum number of iterations """ cdef PetscReal rval = 0 cdef PetscInt ival = 0 CHKERR( SVDGetTolerances(self.svd, &rval, &ival) ) return (toReal(rval), toInt(ival)) def setTolerances(self, tol=None, max_it=None): """ Sets the tolerance and maximum iteration count used by the default SVD convergence tests. Parameters ---------- tol: float, optional The convergence tolerance. max_it: int, optional The maximum number of iterations Notes ----- Use `DECIDE` for `max_it` to assign a reasonably good value, which is dependent on the solution method. """ cdef PetscReal rval = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT if tol is not None: rval = asReal(tol) if max_it is not None: ival = asInt(max_it) CHKERR( SVDSetTolerances(self.svd, rval, ival) ) def getDimensions(self): """ Gets the number of singular values to compute and the dimension of the subspace. Returns ------- nsv: int Number of singular values to compute. ncv: int Maximum dimension of the subspace to be used by the solver. mpd: int Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) def setDimensions(self, nsv=None, ncv=None, mpd=None): """ Sets the number of singular values to compute and the dimension of the subspace. Parameters ---------- nsv: int, optional Number of singular values to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem. Notes ----- Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good value, which is dependent on the solution method. The parameters `ncv` and `mpd` are intimately related, so that the user is advised to set one of them at most. Normal usage is the following: - In cases where `nsv` is small, the user sets `ncv` (a reasonable default is 2 * `nsv`). - In cases where `nsv` is large, the user sets `mpd`. The value of `ncv` should always be between `nsv` and (`nsv` + `mpd`), typically `ncv` = `nsv` + `mpd`. If `nsv` is not too large, `mpd` = `nsv` is a reasonable choice, otherwise a smaller value should be used. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = PETSC_DEFAULT if nsv is not None: ival1 = asInt(nsv) if ncv is not None: ival2 = asInt(ncv) if mpd is not None: ival3 = asInt(mpd) CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) def getBV(self): """ Obtain the basis vectors objects associated to the SVD object. Returns ------- V: BV The basis vectors context for right singular vectors. U: BV The basis vectors context for left singular vectors. """ cdef BV V = BV() cdef BV U = BV() CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) PetscINCREF(V.obj) PetscINCREF(U.obj) return (V,U) def setBV(self, BV V not None,BV U=None): """ Associates basis vectors objects to the SVD solver. Parameters ---------- V: BV The basis vectors context for right singular vectors. U: BV The basis vectors context for left singular vectors. """ cdef SlepcBV VBV = V.bv cdef SlepcBV UBV = NULL if U is not None: UBV = U.bv CHKERR( SVDSetBV(self.svd, VBV, UBV) ) def getOperator(self): """ Gets the matrix associated with the singular value problem. Returns ------- A: Mat The matrix associated with the singular value problem. """ cdef Mat A = Mat() CHKERR( SVDGetOperator(self.svd, &A.mat) ) PetscINCREF(A.obj) return A def setOperator(self, Mat A not None): """ Sets the matrix associated with the singular value problem. Parameters ---------- A: Mat The matrix associated with the singular value problem. """ CHKERR( SVDSetOperator(self.svd, A.mat) ) # def setInitialSpace(self, space): """ Sets the initial space from which the SVD solver starts to iterate. Parameters ---------- space: an sequence of Vec The initial space. """ if isinstance(space, Vec): space = [space] cdef PetscVec *vs = NULL cdef Py_ssize_t i = 0, ns = len(space) cdef tmp = allocate(ns*sizeof(Vec),&vs) for i in range(ns): vs[i] = (space[i]).vec CHKERR( SVDSetInitialSpace(self.svd, ns, vs) ) # def cancelMonitor(self): """ Clears all monitors for an SVD object. """ CHKERR( SVDMonitorCancel(self.svd) ) # def setUp(self): """ Sets up all the internal data structures necessary for the execution of the singular value solver. Notes ----- This function need not be called explicitly in most cases, since `solve()` calls it. It can be useful when one wants to measure the set-up time separately from the solve time. """ CHKERR( SVDSetUp(self.svd) ) def solve(self): """ Solves the singular value problem. """ CHKERR( SVDSolve(self.svd) ) def getIterationNumber(self): """ Gets the current iteration number. If the call to `solve()` is complete, then it returns the number of iterations carried out by the solution method. Returns ------- its: int Iteration number. """ cdef PetscInt ival = 0 CHKERR( SVDGetIterationNumber(self.svd, &ival) ) return toInt(ival) def getConvergedReason(self): """ Gets the reason why the `solve()` iteration was stopped. Returns ------- reason: `SVD.ConvergedReason` enumerate Negative value indicates diverged, positive value converged. """ cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING CHKERR( SVDGetConvergedReason(self.svd, &val) ) return val def getConverged(self): """ Gets the number of converged singular triplets. Returns ------- nconv: int Number of converged singular triplets. Notes ----- This function should be called after `solve()` has finished. """ cdef PetscInt ival = 0 CHKERR( SVDGetConverged(self.svd, &ival) ) return toInt(ival) def getValue(self, int i): """ Gets the i-th singular value as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. Returns ------- s: float The computed singular value. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`. Singular triplets are indexed according to the ordering criterion established with `setWhichSingularTriplets()`. """ cdef PetscReal rval = 0 CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) return toReal(rval) def getVectors(self, int i, Vec U not None, Vec V not None): """ Gets the i-th left and right singular vectors as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. U: Vec Placeholder for the returned left singular vector. V: Vec Placeholder for the returned right singular vector. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`. Singular triplets are indexed according to the ordering criterion established with `setWhichSingularTriplets()`. """ cdef PetscReal dummy = 0 CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) def getSingularTriplet(self, int i, Vec U=None, Vec V=None): """ Gets the i-th triplet of the singular value decomposition as computed by `solve()`. The solution consists of the singular value and its left and right singular vectors. Parameters ---------- i: int Index of the solution to be obtained. U: Vec Placeholder for the returned left singular vector. V: Vec Placeholder for the returned right singular vector. Returns ------- s: float The computed singular value. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`. Singular triplets are indexed according to the ordering criterion established with `setWhichSingularTriplets()`. """ cdef PetscReal rval = 0 cdef PetscVec Uvec = NULL cdef PetscVec Vvec = NULL if U is not None: Uvec = U.vec if V is not None: Vvec = V.vec CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) return toReal(rval) # def computeError(self, int i, etype=None): """ Computes the error (based on the residual norm) associated with the i-th singular triplet. Parameters ---------- i: int Index of the solution to be considered. etype: `SVD.ErrorType` enumerate The error type to compute. Returns ------- e: real The relative error bound, computed in various ways from the residual norm ``sqrt(n1^2+n2^2)`` where ``n1 = ||A*v-sigma*u||_2``, ``n2 = ||A^T*u-sigma*v||_2``, ``sigma`` is the singular value, ``u`` and ``v`` are the left and right singular vectors. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). """ cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE cdef PetscReal rval = 0 if etype is not None: et = etype CHKERR( SVDComputeError(self.svd, i, et, &rval) ) return toReal(rval) def errorView(self, etype=None, Viewer viewer=None): """ Displays the errors associated with the computed solution (as well as the eigenvalues). Parameters ---------- etype: `SVD.ErrorType` enumerate, optional The error type to compute. viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. Notes ----- By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ``ASCII_INFO_DETAIL`` then a table with eigenvalues and corresponding errors is printed. """ cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE if etype is not None: et = etype cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( SVDErrorView(self.svd, et, vwr) ) # def setCrossEPS(self, EPS eps not None): """ Associate an eigensolver object (`EPS`) to the singular value solver. Parameters ---------- eps: EPS The eigensolver object. """ CHKERR( SVDCrossSetEPS(self.svd, eps.eps) ) def getCrossEPS(self): """ Retrieve the eigensolver object (`EPS`) associated to the singular value solver. Returns ------- eps: EPS The eigensolver object. """ cdef EPS eps = EPS() CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) PetscINCREF(eps.obj) return eps def setCyclicEPS(self, EPS eps not None): """ Associate an eigensolver object (`EPS`) to the singular value solver. Parameters ---------- eps: EPS The eigensolver object. """ CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) ) def getCyclicEPS(self): """ Retrieve the eigensolver object (`EPS`) associated to the singular value solver. Returns ------- eps: EPS The eigensolver object. """ cdef EPS eps = EPS() CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) PetscINCREF(eps.obj) return eps def setCyclicExplicitMatrix(self, flag=True): """ Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0 ]`` must be computed explicitly. Parameters ---------- flag: boolean True if ``H(A)`` is built explicitly. """ cdef PetscBool tval = PETSC_FALSE if flag: tval = PETSC_TRUE CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) def getCyclicExplicitMatrix(self): """ Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is built explicitly. Returns ------- flag: boolean True if ``H(A)`` is built explicitly. """ cdef PetscBool tval = PETSC_FALSE CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) return tval def setLanczosOneSide(self, flag=True): """ Indicate if the variant of the Lanczos method to be used is one-sided or two-sided. Parameters ---------- flag: boolean True if the method is one-sided. Notes ----- By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors. It also saves the memory required for storing such vectors. """ cdef PetscBool tval = PETSC_FALSE if flag: tval = PETSC_TRUE CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) def setTRLanczosOneSide(self, flag=True): """ Indicate if the variant of the thick-restart Lanczos method to be used is one-sided or two-sided. Parameters ---------- flag: boolean True if the method is one-sided. Notes ----- By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors. """ cdef PetscBool tval = PETSC_FALSE if flag: tval = PETSC_TRUE CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) # property transpose_mode: def __get__(self): return self.getTransposeMode() def __set__(self, value): self.setTransposeMode(value) property which: def __get__(self): return self.getWhichSingularTriplets() def __set__(self, value): self.setWhichSingularTriplets(value) property tol: def __get__(self): return self.getTolerances()[0] def __set__(self, value): self.setTolerances(tol=value) property max_it: def __get__(self): return self.getTolerances()[1] def __set__(self, value): self.setTolerances(max_it=value) property bv: def __get__(self): return self.getBV() def __set__(self, value): self.setBV(value) # ----------------------------------------------------------------------------- del SVDType del SVDErrorType del SVDWhich del SVDConvergedReason # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/BV.pyx0000644000175000001440000006173612720314150016627 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class BVType(object): """ BV type """ MAT = S_(BVMAT) SVEC = S_(BVSVEC) VECS = S_(BVVECS) CONTIGUOUS = S_(BVCONTIGUOUS) class BVOrthogType(object): """ BV orthogonalization types - `CGS`: Classical Gram-Schmidt. - `MGS`: Modified Gram-Schmidt. """ CGS = BV_ORTHOG_CGS MGS = BV_ORTHOG_MGS class BVOrthogRefineType(object): """ BV orthogonalization refinement types - `IFNEEDED`: Reorthogonalize if a criterion is satisfied. - `NEVER`: Never reorthogonalize. - `ALWAYS`: Always reorthogonalize. """ IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED NEVER = BV_ORTHOG_REFINE_NEVER ALWAYS = BV_ORTHOG_REFINE_ALWAYS class BVOrthogBlockType(object): """ BV block-orthogonalization types - `GS`: Gram-Schmidt. - `CHOL`: Cholesky. """ GS = BV_ORTHOG_BLOCK_GS CHOL = BV_ORTHOG_BLOCK_CHOL # ----------------------------------------------------------------------------- cdef class BV(Object): """ BV """ Type = BVType OrthogType = BVOrthogType OrthogRefineType = BVOrthogRefineType RefineType = BVOrthogRefineType OrthogBlockType = BVOrthogBlockType BlockType = BVOrthogBlockType def __cinit__(self): self.obj = &self.bv self.bv = NULL def view(self, Viewer viewer=None): """ Prints the BV data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( BVView(self.bv, vwr) ) def destroy(self): """ Destroys the BV object. """ CHKERR( BVDestroy(&self.bv) ) self.bv = NULL return self def create(self, comm=None): """ Creates the BV object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcBV newbv = NULL CHKERR( BVCreate(ccomm, &newbv) ) SlepcCLEAR(self.obj); self.bv = newbv return self def duplicate(self): """ Duplicate the BV object with the same type and dimensions. """ cdef BV bv = type(self)() CHKERR( BVDuplicate(self.bv, &bv.bv) ) return bv def copy(self, BV result=None): if result is None: result = type(self)() if result.bv == NULL: CHKERR( BVDuplicate(self.bv, &result.bv) ) CHKERR( BVCopy(self.bv, result.bv) ) return result def setType(self, bv_type): """ Selects the type for the BV object. Parameters ---------- bv_type: `BV.Type` enumerate The inner product type to be used. """ cdef SlepcBVType cval = NULL bv_type = str2bytes(bv_type, &cval) CHKERR( BVSetType(self.bv, cval) ) def getType(self): """ Gets the BV type of this object. Returns ------- type: `BV.Type` enumerate The inner product type currently being used. """ cdef SlepcBVType bv_type = NULL CHKERR( BVGetType(self.bv, &bv_type) ) return bytes2str(bv_type) def setSizes(self, sizes, m): """ Sets the local and global sizes, and the number of columns. Parameters ---------- sizes: int or two-tuple of int The global size ``N`` or a two-tuple ``(n, N)`` with the local and global sizes. m: int The number of columns. Notes ----- Either ``n`` or ``N`` (but not both) can be ``PETSc.DECIDE`` or ``None`` to have it automatically set. """ cdef PetscInt n=0, N=0 cdef PetscInt ival = asInt(m) BV_Sizes(sizes, &n, &N) CHKERR( BVSetSizes(self.bv, n, N, ival) ) def setSizesFromVec(self, Vec w not None, m): """ Sets the local and global sizes, and the number of columns. Local and global sizes are specified indirectly by passing a template vector. Parameters ---------- w: Vec The template vector. m: int The number of columns. """ cdef PetscInt ival = asInt(m) CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) ) def getSizes(self): """ Returns the local and global sizes, and the number of columns. Returns ------- sizes: two-tuple of int The local and global sizes ``(n, N)``. m: int The number of columns. """ cdef PetscInt n=0, N=0, m=0 CHKERR( BVGetSizes(self.bv, &n, &N, &m) ) return ((toInt(n), toInt(N)), toInt(m)) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all BV options in the database. Parameters ---------- prefix: string The prefix string to prepend to all BV option requests. Notes ----- A hyphen (``-``) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( BVSetOptionsPrefix(self.bv, cval) ) def getOptionsPrefix(self): """ Gets the prefix used for searching for all BV options in the database. Returns ------- prefix: string The prefix string set for this BV object. """ cdef const_char *prefix = NULL CHKERR( BVGetOptionsPrefix(self.bv, &prefix) ) return bytes2str(prefix) def setFromOptions(self): """ Sets BV options from the options database. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( BVSetFromOptions(self.bv) ) # def getOrthogonalization(self): """ Gets the orthogonalization settings from the BV object. Returns ------- type: `BV.OrthogType` enumerate The type of orthogonalization technique. refine: `BV.OrthogRefineType` enumerate The type of refinement. eta: float Parameter for selective refinement (used when the the refinement type `BV.OrthogRefineType.IFNEEDED`). block: `BV.OrthogBlockType` enumerate The type of block orthogonalization . """ cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS cdef PetscReal rval = PETSC_DEFAULT CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) return (val1, val2, toReal(rval), val3) def setOrthogonalization(self, type=None, refine=None, eta=None, block=None): """ Specifies the method used for the orthogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors). Parameters ---------- type: `BV.OrthogType` enumerate, optional The type of orthogonalization technique. refine: `BV.OrthogRefineType` enumerate, optional The type of refinement. eta: float, optional Parameter for selective refinement. block: `BV.OrthogBlockType` enumerate, optional The type of block orthogonalization. Notes ----- The default settings work well for most problems. The parameter `eta` should be a real value between ``0`` and ``1`` (or `DEFAULT`). The value of `eta` is used only when the refinement type is `BV.OrthogRefineType.IFNEEDED`. When using several processors, `BV.OrthogType.MGS` is likely to result in bad scalability. If the method set for block orthogonalization is GS, then the computation is done column by column with the vector orthogonalization. """ cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS cdef PetscReal rval = PETSC_DEFAULT CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) if type is not None: val1 = type if refine is not None: val2 = refine if block is not None: val3 = block if eta is not None: rval = asReal(eta) CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) ) # def getMatrix(self): """ Retrieves the matrix representation of the inner product. Returns ------- mat: the matrix of the inner product """ cdef Mat mat = Mat() cdef PetscBool indef = PETSC_FALSE CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) PetscINCREF(mat.obj) return mat, indef def setMatrix(self, Mat mat, bint indef): """ Sets the bilinear form to be used for inner products. Parameters ---------- mat: Mat, optional The matrix of the inner product. indef: bool, optional Whether the matrix is indefinite """ cdef PetscMat m = NULL if mat is None else mat.mat cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE CHKERR( BVSetMatrix(self.bv, m, tval) ) def applyMatrix(self, Vec x not None, Vec y not None): """ Multiplies a vector with the matrix associated to the bilinear form. Parameters ---------- x: Vec The input vector. y: Vec The result vector. Notes ----- If the bilinear form has no associated matrix this function copies the vector. """ CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) ) def setActiveColumns(self, int l, int k): """ Specify the columns that will be involved in operations. Parameters ---------- l: int The leading number of columns. k: int The active number of columns. """ CHKERR( BVSetActiveColumns(self.bv, l, k) ) def getActiveColumns(self): """ Returns the current active dimensions. Returns ------- l: int The leading number of columns. k: int The active number of columns. """ cdef PetscInt l=0, k=0 CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) return (toInt(l), toInt(k)) def scaleColumn(self, int j, alpha): """ Scale column j by alpha Parameters ---------- j: int column number to be scaled. alpha: float scaling factor. """ cdef PetscScalar sval = asScalar(alpha) CHKERR( BVScaleColumn(self.bv, j, sval) ) def scale(self, alpha): """ Multiply the entries by a scalar value. Parameters ---------- alpha: float scaling factor. Notes ----- All active columns (except the leading ones) are scaled. """ cdef PetscScalar sval = asScalar(alpha) CHKERR( BVScale(self.bv, sval) ) def insertVec(self, int j, Vec w not None): """ Insert a vector into the specified column. Parameters ---------- j: int The column to be overwritten. w: Vec The vector to be copied. """ CHKERR( BVInsertVec(self.bv, j, w.vec) ) def insertVecs(self, int s, W not None, bint orth): """ Insert a set of vectors into specified columns. Parameters ---------- s: int The first column to be overwritten. W: Vec or sequence of Vec. Set of vectors to be copied. orth: Flag indicating if the vectors must be orthogonalized. Returns ------- m: int Number of linearly independent vectors. Notes ----- Copies the contents of vectors W into self(:,s:s+n), where n is the length of W. If orthogonalization flag is set then the vectors are copied one by one then orthogonalized against the previous one. If any are linearly dependent then it is discared and the value of m is decreased. """ if isinstance(W, Vec): W = [W] cdef PetscVec *ws = NULL cdef Py_ssize_t i = 0, ns = len(W) cdef tmp = allocate(ns*sizeof(Vec),&ws) for i in range(ns): ws[i] = (W[i]).vec cdef PetscInt m = ns cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE CHKERR( BVInsertVecs(self.bv, s, &m, ws, tval) ) return toInt(m) def dotVec(self, Vec v not None): """ Computes multiple dot products of a vector against all the column vectors of a BV. Parameters ---------- v: Vec A vector. Returns ------- m: Vec A vector with the results. This is analogue to VecMDot(), but using BV to represent a collection of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note that here X is transposed as opposed to BVDot(). If a non-standard inner product has been specified with BVSetMatrix(), then the result is m = X^H*B*y. """ l, k = self.getActiveColumns() cdef PetscScalar* mval = NULL cdef tmp = allocate((k - l)*sizeof(PetscScalar),&mval) CHKERR( BVDotVec(self.bv, v.vec, mval) ) v = Vec().create(COMM_SELF) v.setType('seq') v.setSizes((DECIDE,k-l)) v.setArray([mval[i] for i in range(0, k - l)]) v.ghostUpdate() return v def getColumn(self, int j): """ Returns a Vec object that contains the entries of the requested column of the basis vectors object. Parameters ---------- j: int The index of the requested column. Returns ------- v: Vec The vector containing the jth column. Notes ----- Modifying the returned Vec will change the BV entries as well. """ cdef Vec v = Vec() CHKERR( BVGetColumn(self.bv, j, &v.vec) ) return v def restoreColumn(self, int j, Vec v not None): """ Restore a column obtained with BVGetColumn(). Parameters ---------- j: int The index of the requested column. v: Vec The vector obtained with BVGetColumn(). Notes ----- The arguments must match the corresponding call to BVGetColumn(). """ CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) def dot(self, BV Y not None): """ Computes the 'block-dot' product of two basis vectors objects. M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X Parameters ---------- Y: BV Left basis vectors, can be the same as self, giving M = X^H X. Returns ------- M: Mat The resulting matrix. Notes ----- This is the generalization of VecDot() for a collection of vectors, M = Y^H*X. The result is a matrix M whose entry m_ij is equal to y_i^H x_j (where y_i^H denotes the conjugate transpose of y_i). X and Y can be the same object. If a non-standard inner product has been specified with setMatrix(), then the result is M = Y^H*B*X. In this case, both X and Y must have the same associated matrix. Only rows (resp. columns) of M starting from ly (resp. lx) are computed, where ly (resp. lx) is the number of leading columns of Y (resp. X). """ cdef BV X = self cdef PetscInt ky=0, kx=0 CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() CHKERR( BVDot(X.bv, Y.bv, M.mat) ) return M def matProject(self, Mat A, BV Y not None): """ Computes the projection of a matrix onto a subspace. M = Y^H A X Parameters ---------- A: Mat or None Matrix to be projected. Y: BV Left basis vectors, can be the same as self, giving M = X^H A X. Returns ------- M: Mat Projection of the matrix A onto the subspace. """ cdef BV X = self cdef PetscInt ky=0, kx=0 CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() cdef PetscMat Amat = NULL if A is None else A.mat CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) return M def matMult(self, Mat A not None, BV Y=None): """ Computes the matrix-vector product for each column, Y = A*V. Parameters ---------- A: Mat The matrix. Returns ------- Y: BV The result. Notes ----- Only active columns (excluding the leading ones) are processed. It is possible to choose whether the computation is done column by column or using dense matrices using the options database keys: -bv_matmult_vecs -bv_matmult_mat The default is bv_matmult_mat. """ cdef MPI_Comm comm = PetscObjectComm(self.bv) cdef SlepcBVType bv_type = NULL cdef PetscInt n=0, N=0, m=0 cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS cdef PetscReal rval = PETSC_DEFAULT if Y is None: Y = BV() if Y.bv == NULL: CHKERR( BVGetType(self.bv, &bv_type) ) CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) CHKERR( MatGetSize(A.mat, &N, NULL) ) CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) if Y.bv == NULL: CHKERR( BVCreate(comm, &Y.bv) ) CHKERR( BVSetType(Y.bv, bv_type) ) CHKERR( BVSetSizes(Y.bv, n, N, m) ) CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) return Y def matMultHermitianTranspose(self, Mat A not None, BV Y=None): """ Computes the matrix-vector product with the conjugate transpose of a matrix for each column, Y=A^H*V. Parameters ---------- A: Mat The matrix. Returns ------- Y: BV The result. Notes ----- Only active columns (excluding the leading ones) are processed. As opoosed to matMult(), this operation is always done by column by column, with a sequence of calls to MatMultHermitianTranspose(). """ cdef MPI_Comm comm = PetscObjectComm(self.bv) cdef SlepcBVType bv_type = NULL cdef PetscInt n=0, N=0, m=0 cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS cdef PetscReal rval = PETSC_DEFAULT if Y is None: Y = BV() if Y.bv == NULL: CHKERR( BVGetType(self.bv, &bv_type) ) CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) CHKERR( MatGetSize(A.mat, &N, NULL) ) CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) if Y.bv == NULL: CHKERR( BVCreate(comm, &Y.bv) ) CHKERR( BVSetType(Y.bv, bv_type) ) CHKERR( BVSetSizes(Y.bv, n, N, m) ) CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) ) return Y def multVec(self, alpha, beta, Vec y not None, q): """ Computes y = beta*y + alpha*X*q. Parameter --------- alpha: scalar beta: scalar q: scalar or sequence of scalars Return ------ y: Vec The result. """ cdef PetscScalar sval1 = asScalar(alpha) cdef PetscScalar sval2 = asScalar(beta) cdef PetscInt nq = 0 cdef PetscScalar* qval = NULL cdef tmp = iarray_s(q, &nq, &qval) cdef PetscInt l=0, k=0 CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) assert nq == k-l CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) def normColumn(self, int j, norm_type=None): """ Computes the matrix norm of the BV. Parameters ---------- j: int Index of column. norm_type: PETSc.NormType (int) The norm type. Returns ------- norm: float Notes ----- The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY). If a non-standard inner product has been specified with BVSetMatrix(), then the returned value is ``sqrt(V[j]'* B*V[j])``, where B is the inner product matrix (argument 'type' is ignored). """ cdef PetscNormType ntype = PETSC_NORM_2 if norm_type is not None: ntype = norm_type cdef PetscReal norm = 0 CHKERR( BVNormColumn(self.bv, j, ntype, &norm) ) return toReal(norm) def norm(self, norm_type=None): """ Computes the matrix norm of the BV. Parameters ---------- norm_type: PETSC.NormType enumerate The norm type. Returns ------- norm: float Notes ----- All active columns (except the leading ones) are considered as a matrix. The allowed norms are NORM_1, NORM_FROBENIUS, and NORM_INFINITY. This operation fails if a non-standard inner product has been specified with BVSetMatrix(). """ cdef PetscNormType ntype = PETSC_NORM_FROBENIUS if norm_type is not None: ntype = norm_type cdef PetscReal norm = 0 CHKERR( BVNorm(self.bv, ntype, &norm) ) return toReal(norm) def setRandom(self): """ Set the active columns of BV to random numbers. Notes ----- All active columns (except the leading ones) are modified. """ CHKERR( BVSetRandom(self.bv) ) def orthogonalizeVec(self, Vec v not None): """ Orthogonalize a vector with respect to a set of vectors. Parameters ---------- v: Vec Vector to be orthogonalized, modified on return. Returns ------- norm: float The norm of the resulting vector. lindep: boolean Flag indicating that refinement did not improve the quality of orthogonalization. Notes ----- This function applies an orthogonal projector to project vector ``v`` onto the orthogonal complement of the span of the columns of the BV. This routine does not normalize the resulting vector. """ cdef PetscReal norm = 0 cdef PetscBool ldep = PETSC_FALSE CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) return (toReal(norm), ldep) def orthogonalize(self, Mat R=None, **kargs): """ Orthogonalize all columns (except leading ones), that is, compute the QR decomposition. Parameters ---------- R: Mat or None A sequential dense matrix. Notes ----- The output satisfies ``V0 = V*R`` (where V0 represent the input V) and ``V'*V = I``. """ if kargs: self.setOrthogonalization(**kargs) cdef PetscMat Rmat = NULL if R is None else R.mat CHKERR( BVOrthogonalize(self.bv, Rmat) ) # ----------------------------------------------------------------------------- del BVType del BVOrthogType del BVOrthogRefineType del BVOrthogBlockType # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/PEP.pyx0000644000175000001440000007453212720263215016747 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class PEPType(object): """ PEP type Polynomial eigensolvers. - `LINEAR`: Linearization via EPS. - `QARNOLDI`: Q-Arnoldi for quadratic problems. - `TOAR`: Two-level orthogonal Arnoldi. - `STOAR`: Symmetric TOAR. - `JD`: Polynomial Jacobi-Davidson. """ LINEAR = S_(PEPLINEAR) QARNOLDI = S_(PEPQARNOLDI) TOAR = S_(PEPTOAR) STOAR = S_(PEPSTOAR) JD = S_(PEPJD) class PEPProblemType(object): """ PEP problem type - `GENERAL`: No structure. - `HERMITIAN`: Hermitian structure. - `GYROSCOPIC`: Hamiltonian structure. """ GENERAL = PEP_GENERAL HERMITIAN = PEP_HERMITIAN GYROSCOPIC = PEP_GYROSCOPIC class PEPWhich(object): """ PEP desired part of spectrum - `LARGEST_MAGNITUDE`: Largest magnitude (default). - `LARGEST_REAL`: Largest real parts. - `LARGEST_IMAGINARY`: Largest imaginary parts in magnitude. - `SMALLEST_MAGNITUDE`: Smallest magnitude. - `SMALLEST_REAL`: Smallest real parts. - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude. - `TARGET_MAGNITUDE`: Closest to target (in magnitude). - `TARGET_REAL`: Real part closest to target. - `TARGET_IMAGINARY`: Imaginary part closest to target. - `USER`: User-defined criterion. """ LARGEST_MAGNITUDE = PEP_LARGEST_MAGNITUDE SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE LARGEST_REAL = PEP_LARGEST_REAL SMALLEST_REAL = PEP_SMALLEST_REAL LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE TARGET_REAL = PEP_TARGET_REAL TARGET_IMAGINARY = PEP_TARGET_IMAGINARY USER = PEP_WHICH_USER class PEPBasis(object): MONOMIAL = PEP_BASIS_MONOMIAL CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 LEGENDRE = PEP_BASIS_LEGENDRE LAGUERRE = PEP_BASIS_LAGUERRE HERMITE = PEP_BASIS_HERMITE class PEPScale(object): """ PEP scaling strategy - `NONE`: No scaling. - `SCALAR`: Parameter scaling. - `DIAGONAL`: Diagonal scaling. - `BOTH`: Both parameter and diagonal scaling. """ NONE = PEP_SCALE_NONE SCALAR = PEP_SCALE_SCALAR DIAGONAL = PEP_SCALE_DIAGONAL BOTH = PEP_SCALE_BOTH class PEPRefine(object): """ PEP refinement strategy - `NONE`: No refinement. - `SIMPLE`: Refine eigenpairs one by one. - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair). """ NONE = PEP_REFINE_NONE SIMPLE = PEP_REFINE_SIMPLE MULTIPLE = PEP_REFINE_MULTIPLE class PEPRefineScheme(object): """ Scheme for solving linear systems during iterative refinement - `SCHUR`: Schur complement. - `MBE`: Mixed block elimination. - `EXPLICIT`: Build the explicit matrix. """ SCHUR = PEP_REFINE_SCHEME_SCHUR MBE = PEP_REFINE_SCHEME_MBE EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT class PEPExtract(object): """ Extraction strategy used to obtain eigenvectors of the PEP from the eigenvectors of the linearization - `NONE`: Use the first block. - `NORM`: Use the first or last block depending on norm of H. - `RESIDUAL`: Use the block with smallest residual. - `STRUCTURED`: Combine all blocks in a certain way. """ NONE = PEP_EXTRACT_NONE NORM = PEP_EXTRACT_NORM RESIDUAL = PEP_EXTRACT_RESIDUAL STRUCTURED = PEP_EXTRACT_STRUCTURED class PEPErrorType(object): """ PEP error type to assess accuracy of computed solutions - `ABSOLUTE`: Absolute error. - `RELATIVE`: Relative error. - `BACKWARD`: Backward error. """ ABSOLUTE = PEP_ERROR_ABSOLUTE RELATIVE = PEP_ERROR_RELATIVE BACKWARD = PEP_ERROR_BACKWARD class PEPConv(object): """ PEP convergence test - `ABS`: - `REL`: - `NORM`: - `USER`: """ ABS = PEP_CONV_ABS REL = PEP_CONV_REL NORM = PEP_CONV_NORM USER = PEP_CONV_USER class PEPConvergedReason(object): """ PEP convergence reasons - `CONVERGED_TOL`: - `CONVERGED_USER`: - `DIVERGED_ITS`: - `DIVERGED_BREAKDOWN`: - `DIVERGED_SYMMETRY_LOST`: - `CONVERGED_ITERATING`: """ CONVERGED_TOL = PEP_CONVERGED_TOL CONVERGED_USER = PEP_CONVERGED_USER DIVERGED_ITS = PEP_DIVERGED_ITS DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST CONVERGED_ITERATING = PEP_CONVERGED_ITERATING ITERATING = PEP_CONVERGED_ITERATING # ----------------------------------------------------------------------------- cdef class PEP(Object): """ PEP """ Type = PEPType ProblemType = PEPProblemType Which = PEPWhich Basis = PEPBasis Scale = PEPScale Refine = PEPRefine RefineScheme = PEPRefineScheme Extract = PEPExtract ErrorType = PEPErrorType Conv = PEPConv ConvergedReason = PEPConvergedReason def __cinit__(self): self.obj = &self.pep self.pep = NULL def view(self, Viewer viewer=None): """ Prints the PEP data structure. Parameters ---------- viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( PEPView(self.pep, vwr) ) def destroy(self): """ Destroys the PEP object. """ CHKERR( PEPDestroy(&self.pep) ) self.pep = NULL return self def reset(self): """ Resets the PEP object. """ CHKERR( PEPReset(self.pep) ) def create(self, comm=None): """ Creates the PEP object. Parameters ---------- comm: Comm, optional. MPI communicator. If not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcPEP newpep = NULL CHKERR( PEPCreate(ccomm, &newpep) ) SlepcCLEAR(self.obj); self.pep = newpep return self def setType(self, pep_type): """ Selects the particular solver to be used in the PEP object. Parameters ---------- pep_type: `PEP.Type` enumerate The solver to be used. """ cdef SlepcPEPType cval = NULL pep_type = str2bytes(pep_type, &cval) CHKERR( PEPSetType(self.pep, cval) ) def getType(self): """ Gets the PEP type of this object. Returns ------- type: `PEP.Type` enumerate The solver currently being used. """ cdef SlepcPEPType pep_type = NULL CHKERR( PEPGetType(self.pep, &pep_type) ) return bytes2str(pep_type) def getOptionsPrefix(self): """ Gets the prefix used for searching for all PEP options in the database. Returns ------- prefix: string The prefix string set for this PEP object. """ cdef const_char *prefix = NULL CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) ) return bytes2str(prefix) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all PEP options in the database. Parameters ---------- prefix: string The prefix string to prepend to all PEP option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) def appendOptionsPrefix(self, prefix): """ Appends to the prefix used for searching for all PEP options in the database. Parameters ---------- prefix: string The prefix string to prepend to all PEP option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) def setFromOptions(self): """ Sets PEP options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. """ CHKERR( PEPSetFromOptions(self.pep) ) def getBasis(self): """ Gets the type of polynomial basis used to describe the polynomial eigenvalue problem. Returns ------- basis: `PEP.Basis` enumerate the basis that was previously set. """ cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL CHKERR( PEPGetBasis(self.pep, &val) ) return val def setBasis(self, basis): """ Specifies the type of polynomial basis used to describe the polynomial eigenvalue problem. Parameters ---------- basis: `PEP.Basis` enumerate the basis to be set. """ cdef SlepcPEPBasis val = basis CHKERR( PEPSetBasis(self.pep, val) ) def getProblemType(self): """ Gets the problem type from the PEP object. Returns ------- problem_type: `PEP.ProblemType` enumerate The problem type that was previously set. """ cdef SlepcPEPProblemType val = PEP_GENERAL CHKERR( PEPGetProblemType(self.pep, &val) ) return val def setProblemType(self, problem_type): """ Specifies the type of the eigenvalue problem. Parameters ---------- problem_type: `PEP.ProblemType` enumerate The problem type to be set. """ cdef SlepcPEPProblemType val = problem_type CHKERR( PEPSetProblemType(self.pep, val) ) def getWhichEigenpairs(self): """ Returns which portion of the spectrum is to be sought. Returns ------- which: `PEP.Which` enumerate The portion of the spectrum to be sought by the solver. """ cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE CHKERR( PEPGetWhichEigenpairs(self.pep, &val) ) return val def setWhichEigenpairs(self, which): """ Specifies which portion of the spectrum is to be sought. Parameters ---------- which: `PEP.Which` enumerate The portion of the spectrum to be sought by the solver. """ cdef SlepcPEPWhich val = which CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) def getTolerances(self): """ Gets the tolerance and maximum iteration count used by the default PEP convergence tests. Returns ------- tol: float The convergence tolerance. max_it: int The maximum number of iterations """ cdef PetscReal rval = 0 cdef PetscInt ival = 0 CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) return (toReal(rval), toInt(ival)) def setTolerances(self, tol=None, max_it=None): """ Sets the tolerance and maximum iteration count used by the default PEP convergence tests. Parameters ---------- tol: float, optional The convergence tolerance. max_it: int, optional The maximum number of iterations """ cdef PetscReal rval = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT if tol is not None: rval = asReal(tol) if max_it is not None: ival = asInt(max_it) CHKERR( PEPSetTolerances(self.pep, rval, ival) ) def getConvergenceTest(self): """ Return the method used to compute the error estimate used in the convergence test. Returns ------- conv: PEP.Conv The method used to compute the error estimate used in the convergence test. """ cdef SlepcPEPConv conv = PEP_CONV_REL CHKERR( PEPGetConvergenceTest(self.pep, &conv) ) return conv def setConvergenceTest(self, conv): """ Specifies how to compute the error estimate used in the convergence test. Parameters ---------- conv: PEP.Conv The method used to compute the error estimate used in the convergence test. """ cdef SlepcPEPConv tconv = conv CHKERR( PEPSetConvergenceTest(self.pep, tconv) ) def getRefine(self): """ Gets the refinement strategy used by the PEP object, and the associated parameters. Returns ------- ref: PEP.Refine The refinement type. npart: int The number of partitions of the communicator. tol: real The convergence tolerance. its: int The maximum number of refinement iterations. scheme: PEP.RefineScheme Scheme for solving linear systems """ cdef SlepcPEPRefine ref = PEP_REFINE_NONE cdef PetscInt npart = 1 cdef PetscReal tol = PETSC_DEFAULT cdef PetscInt its = PETSC_DEFAULT cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) ) return (ref, toInt(npart), toReal(tol), toInt(its), scheme) def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None): """ Sets the refinement strategy used by the PEP object, and the associated parameters. Parameters ---------- ref: PEP.Refine The refinement type. npart: int, optional The number of partitions of the communicator. tol: real, optional The convergence tolerance. its: int, optional The maximum number of refinement iterations. scheme: PEP.RefineScheme, optional Scheme for linear system solves """ cdef SlepcPEPRefine tref = ref cdef PetscInt tnpart = 1 cdef PetscReal ttol = PETSC_DEFAULT cdef PetscInt tits = PETSC_DEFAULT cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE if npart is not None: tnpart = asInt(npart) if tol is not None: ttol = asReal(tol) if its is not None: tits = asInt(its) if scheme is not None: tscheme = scheme CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) def getTrackAll(self): """ Returns the flag indicating whether all residual norms must be computed or not. Returns ------- trackall: bool Whether the solver compute all residuals or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( PEPGetTrackAll(self.pep, &tval) ) return tval def setTrackAll(self, trackall): """ Specifies if the solver must compute the residual of all approximate eigenpairs or not. Parameters ---------- trackall: bool Whether compute all residuals or not. """ cdef PetscBool tval = trackall CHKERR( PEPSetTrackAll(self.pep, tval) ) def getDimensions(self): """ Gets the number of eigenvalues to compute and the dimension of the subspace. Returns ------- nev: int Number of eigenvalues to compute. ncv: int Maximum dimension of the subspace to be used by the solver. mpd: int Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) def setDimensions(self, nev=None, ncv=None, mpd=None): """ Sets the number of eigenvalues to compute and the dimension of the subspace. Parameters ---------- nev: int, optional Number of eigenvalues to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = PETSC_DEFAULT if nev is not None: ival1 = asInt(nev) if ncv is not None: ival2 = asInt(ncv) if mpd is not None: ival3 = asInt(mpd) CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) def getST(self): """ Obtain the spectral transformation (`ST`) object associated to the eigensolver object. Returns ------- st: ST The spectral transformation. """ cdef ST st = ST() CHKERR( PEPGetST(self.pep, &st.st) ) PetscINCREF(st.obj) return st def setST(self, ST st not None): """ Associates a spectral transformation object to the eigensolver. Parameters ---------- st: ST The spectral transformation. """ CHKERR( PEPSetST(self.pep, st.st) ) def getScale(self, Vec Dl=None, Vec Dr=None): """ Gets the strategy used for scaling the polynomial eigenproblem. Parameters ---------- Dl: Vec, optional Placeholder for the returned left diagonal matrix. Dr: Vec, optional Placeholder for the returned right diagonal matrix. Returns ------- scale: `PEP.Scale` enumerate The scaling strategy. alpha: real The scaling factor. its: integer The number of iteration of diagonal scaling. lbda: real Approximation of the wanted eigenvalues (modulus). """ cdef SlepcPEPScale scale = PEP_SCALE_NONE cdef PetscReal alpha = 0 cdef PetscInt its = 0 cdef PetscReal lbda = 0 cdef PetscVec vecl = NULL cdef PetscVec vecr = NULL CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) if Dl.vec != NULL: if vecl != NULL: CHKERR( VecCopy(vecl, Dl.vec) ) else: CHKERR( VecSet(Dl.vec, 1.0) ) if Dr.vec != NULL: if vecr != NULL: CHKERR( VecCopy(vecr, Dr.vec) ) else: CHKERR( VecSet(Dr.vec, 1.0) ) CHKERR( VecDestroy(&vecl) ) CHKERR( VecDestroy(&vecr) ) return (scale, toReal(alpha), toInt(its), toReal(lbda)) def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None): """ Sets the scaling strategy to be used for scaling the polynomial problem before attempting to solve. Parameters ---------- scale: `PEP.Scale` enumerate The scaling strategy. alpha: real, optional The scaling factor. Dl: Vec, optional The left diagonal matrix. Dr: Vec, optional The right diagonal matrix. its: integer, optional The number of iteration of diagonal scaling. lbda: real, optional Approximation of the wanted eigenvalues (modulus). """ cdef SlepcPEPScale senum = scale cdef PetscReal rval1 = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT cdef PetscReal rval2 = PETSC_DEFAULT cdef PetscVec vecl = NULL cdef PetscVec vecr = NULL if alpha is not None: rval1 = asReal(alpha) if Dl is not None: vecl = Dl.vec if Dr is not None: vecr = Dr.vec if its is not None: ival = asInt(its) if lbda is not None: rval2 = asReal(lbda) CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) def getBV(self): """ Obtain the basis vectors object associated to the eigensolver. Returns ------- bv: BV The basis vectors context. """ cdef BV bv = BV() CHKERR( PEPGetBV(self.pep, &bv.bv) ) PetscINCREF(bv.obj) return bv def setBV(self, BV bv not None): """ Associates a basis vectors object to the eigensolver. Parameters ---------- bv: BV The basis vectors context. """ CHKERR( PEPSetBV(self.pep, bv.bv) ) def getRG(self): """ Obtain the region object associated to the eigensolver. Returns ------- rg: RG The region context. """ cdef RG rg = RG() CHKERR( PEPGetRG(self.pep, &rg.rg) ) PetscINCREF(rg.obj) return rg def setRG(self, RG rg not None): """ Associates a region object to the eigensolver. Parameters ---------- rg: RG The region context. """ CHKERR( PEPSetRG(self.pep, rg.rg) ) def getOperators(self): """ Gets the matrices associated with the eigenvalue problem. Returns ------- operators: tuple of Mat The matrices associated with the eigensystem. """ cdef Mat A cdef PetscMat mat = NULL cdef PetscInt k=0, n=0 CHKERR( PEPGetNumMatrices(self.pep, &n) ) cdef object operators = [] for k from 0 <= k < n: CHKERR( PEPGetOperators(self.pep, k, &mat) ) A = Mat(); A.mat = mat; PetscINCREF(A.obj) operators.append(A) return tuple(operators) def setOperators(self, operators): """ Sets the matrices associated with the eigenvalue problem. Parameters ---------- operators: sequence of Mat The matrices associated with the eigensystem. """ operators = tuple(operators) cdef PetscMat *mats = NULL cdef Py_ssize_t k=0, n = len(operators) cdef tmp = allocate(n*sizeof(PetscMat),&mats) for k from 0 <= k < n: mats[k] = (operators[k]).mat CHKERR( PEPSetOperators(self.pep, n, mats) ) # def setInitialSpace(self, space): """ Sets the initial space from which the eigensolver starts to iterate. Parameters ---------- space: Vec or sequence of Vec The initial space """ if isinstance(space, Vec): space = [space] cdef PetscVec *vs = NULL cdef Py_ssize_t i = 0, ns = len(space) cdef tmp = allocate(ns*sizeof(Vec),&vs) for i in range(ns): vs[i] = (space[i]).vec CHKERR( PEPSetInitialSpace(self.pep, ns, vs) ) # def cancelMonitor(self): """ Clears all monitors for a PEP object. """ CHKERR( PEPMonitorCancel(self.pep) ) # def setUp(self): """ Sets up all the internal data structures necessary for the execution of the eigensolver. """ CHKERR( PEPSetUp(self.pep) ) def solve(self): """ Solves the eigensystem. """ CHKERR( PEPSolve(self.pep) ) def getIterationNumber(self): """ Gets the current iteration number. If the call to `solve()` is complete, then it returns the number of iterations carried out by the solution method. Returns ------- its: int Iteration number. """ cdef PetscInt ival = 0 CHKERR( PEPGetIterationNumber(self.pep, &ival) ) return toInt(ival) def getConvergedReason(self): """ Gets the reason why the `solve()` iteration was stopped. Returns ------- reason: `PEP.ConvergedReason` enumerate Negative value indicates diverged, positive value converged. """ cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING CHKERR( PEPGetConvergedReason(self.pep, &val) ) return val def getConverged(self): """ Gets the number of converged eigenpairs. Returns ------- nconv: int Number of converged eigenpairs. """ cdef PetscInt ival = 0 CHKERR( PEPGetConverged(self.pep, &ival) ) return toInt(ival) def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): """ Gets the i-th solution of the eigenproblem as computed by `solve()`. The solution consists of both the eigenvalue and the eigenvector. Parameters ---------- i: int Index of the solution to be obtained. Vr: Vec, optional Placeholder for the returned eigenvector (real part). Vi: Vec, optional Placeholder for the returned eigenvector (imaginary part). Returns ------- e: scalar (possibly complex) The computed eigenvalue. """ cdef PetscScalar sval1 = 0 cdef PetscScalar sval2 = 0 cdef PetscVec vecr = NULL cdef PetscVec veci = NULL if Vr is not None: vecr = Vr.vec if Vi is not None: veci = Vi.vec CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) return complex(toScalar(sval1), toScalar(sval2)) def getErrorEstimate(self, int i): """ Returns the error estimate associated to the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. Returns ------- error: real Error estimate. """ cdef PetscReal rval = 0 CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) ) return toReal(rval) def computeError(self, int i, etype=None): """ Computes the error (based on the residual norm) associated with the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. etype: `PEP.ErrorType` enumerate The error type to compute. Returns ------- error: real The error bound, computed in various ways from the residual norm ``||P(l)x||_2`` where ``l`` is the eigenvalue and ``x`` is the eigenvector. Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). """ cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD cdef PetscReal rval = 0 if etype is not None: et = etype CHKERR( PEPComputeError(self.pep, i, et, &rval) ) return toReal(rval) def errorView(self, etype=None, Viewer viewer=None): """ Displays the errors associated with the computed solution (as well as the eigenvalues). Parameters ---------- etype: `PEP.ErrorType` enumerate, optional The error type to compute. viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. Notes ----- By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ``ASCII_INFO_DETAIL`` then a table with eigenvalues and corresponding errors is printed. """ cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE if etype is not None: et = etype cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( PEPErrorView(self.pep, et, vwr) ) # def setLinearEPS(self, EPS eps not None): """ Associate an eigensolver object (EPS) to the polynomial eigenvalue solver. Parameters ---------- eps: EPS The linear eigensolver. """ CHKERR( PEPLinearSetEPS(self.pep, eps.eps) ) def getLinearEPS(self): """ Retrieve the eigensolver object (EPS) associated to the polynomial eigenvalue solver. Returns ------- eps: EPS The linear eigensolver. """ cdef EPS eps = EPS() CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) PetscINCREF(eps.obj) return eps def setLinearCompanionForm(self, cform not None): """ Choose between the two companion forms available for the linearization of a quadratic eigenproblem. Parameters ---------- cform: integer 1 or 2 (first or second companion form). """ CHKERR( PEPLinearSetCompanionForm(self.pep, cform) ) def getLinearCompanionForm(self): """ Returns the number of the companion form that will be used for the linearization of a quadratic eigenproblem. Returns ------- cform: integer 1 or 2 (first or second companion form). """ cdef PetscInt cform = 0 CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) ) return cform def setLinearExplicitMatrix(self, flag not None): """ Indicate if the matrices A and B for the linearization of the problem must be built explicitly. Parameters ---------- flag: boolean boolean flag indicating if the matrices are built explicitly . """ cdef PetscBool sval = flag CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) def getLinearExplicitMatrix(self): """ Returns the flag indicating if the matrices A and B for the linearization are built explicitly. Returns ------- flag: boolean """ cdef PetscBool sval = PETSC_FALSE CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) return sval # ----------------------------------------------------------------------------- del PEPType del PEPProblemType del PEPWhich del PEPBasis del PEPScale del PEPRefine del PEPRefineScheme del PEPExtract del PEPErrorType del PEPConv del PEPConvergedReason # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/ST.pyx0000644000175000001440000003344312716553521016654 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class STType(object): """ ST types - `SHELL`: User-defined. - `SHIFT`: Shift from origin. - `SINVERT`: Shift-and-invert. - `CAYLEY`: Cayley transform. - `PRECOND`: Preconditioner. """ SHELL = S_(STSHELL) SHIFT = S_(STSHIFT) SINVERT = S_(STSINVERT) CAYLEY = S_(STCAYLEY) PRECOND = S_(STPRECOND) class STMatMode(object): """ ST matrix mode - `COPY`: A working copy of the matrix is created. - `INPLACE`: The operation is computed in-place. - `SHELL`: The matrix ``A-sigma*B`` is handled as an implicit matrix. """ COPY = ST_MATMODE_COPY INPLACE = ST_MATMODE_INPLACE SHELL = ST_MATMODE_SHELL # ----------------------------------------------------------------------------- cdef class ST(Object): """ ST """ Type = STType MatMode = STMatMode def __cinit__(self): self.obj = &self.st self.st = NULL def view(self, Viewer viewer=None): """ Prints the ST data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( STView(self.st, vwr) ) def destroy(self): """ Destroys the ST object. """ CHKERR( STDestroy(&self.st) ) self.st = NULL return self def reset(self): """ Resets the ST object. """ CHKERR( STReset(self.st) ) def create(self, comm=None): """ Creates the ST object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcST newst = NULL CHKERR( STCreate(ccomm, &newst) ) SlepcCLEAR(self.obj); self.st = newst return self def setType(self, st_type): """ Builds ST for a particular spectral transformation. Parameters ---------- st_type: `ST.Type` enumerate The spectral transformation to be used. Notes ----- See `ST.Type` for available methods. The default is `ST.Type.SHIFT` with a zero shift. Normally, it is best to use `setFromOptions()` and then set the ST type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods. """ cdef SlepcSTType cval = NULL st_type = str2bytes(st_type, &cval) CHKERR( STSetType(self.st, cval) ) def getType(self): """ Gets the ST type of this object. Returns ------- type: `ST.Type` enumerate The spectral transformation currently being used. """ cdef SlepcSTType st_type = NULL CHKERR( STGetType(self.st, &st_type) ) return bytes2str(st_type) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all ST options in the database. Parameters ---------- prefix: string The prefix string to prepend to all ST option requests. Notes ----- A hyphen (``-``) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( STSetOptionsPrefix(self.st, cval) ) def getOptionsPrefix(self): """ Gets the prefix used for searching for all ST options in the database. Returns ------- prefix: string The prefix string set for this ST object. """ cdef const_char *prefix = NULL CHKERR( STGetOptionsPrefix(self.st, &prefix) ) return bytes2str(prefix) def setFromOptions(self): """ Sets ST options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. Notes ----- To see all options, run your program with the -help option. """ CHKERR( STSetFromOptions(self.st) ) # def setShift(self, shift): """ Sets the shift associated with the spectral transformation. Parameters ---------- shift: scalar (possibly complex) The value of the shift. Notes ----- In some spectral transformations, changing the shift may have associated a lot of work, for example recomputing a factorization. """ cdef PetscScalar sval = asScalar(shift) CHKERR( STSetShift(self.st, sval) ) def getShift(self): """ Gets the shift associated with the spectral transformation. Returns ------- shift: scalar (possibly complex) The value of the shift. """ cdef PetscScalar sval = 0 CHKERR( STGetShift(self.st, &sval) ) return toScalar(sval) def setTransform(self, flag): """ Sets a flag to indicate whether the transformed matrices are computed or not. Parameters ---------- flag: boolean This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem. """ cdef PetscBool sval = flag CHKERR( STSetTransform(self.st, sval) ) def getTransform(self): """ Gets the flag indicating whether the transformed matrices are computed or not. Returns ------- flag: boolean This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem. """ cdef PetscBool sval = PETSC_FALSE CHKERR( STGetTransform(self.st, &sval) ) return sval def setMatMode(self, mode): """ Sets a flag to indicate how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations. Parameters ---------- mode: `ST.MatMode` enumerate The mode flag. Notes ----- By default (`ST.MatMode.COPY`), a copy of matrix ``A`` is made and then this copy is shifted explicitly, e.g. ``A <- (A - s B)``. With `ST.MatMode.INPLACE`, the original matrix ``A`` is shifted at `setUp()` and unshifted at the end of the computations. With respect to the previous one, this mode avoids a copy of matrix ``A``. However, a backdraw is that the recovered matrix might be slightly different from the original one (due to roundoff). With `ST.MatMode.SHELL`, the solver works with an implicit shell matrix that represents the shifted matrix. This mode is the most efficient in creating the shifted matrix but it places serious limitations to the linear solves performed in each iteration of the eigensolver (typically, only interative solvers with Jacobi preconditioning can be used). In the case of generalized problems, in the two first modes the matrix ``A - s B`` has to be computed explicitly. The efficiency of this computation can be controlled with `setMatStructure()`. """ cdef SlepcSTMatMode val = mode CHKERR( STSetMatMode(self.st, val) ) def getMatMode(self): """ Gets a flag that indicates how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations. Returns ------- mode: `ST.MatMode` enumerate The mode flag. """ cdef SlepcSTMatMode val = ST_MATMODE_INPLACE CHKERR( STGetMatMode(self.st, &val) ) return val def setOperators(self, operators): """ Sets the matrices associated with the eigenvalue problem. Parameters ---------- operators: sequence of Mat The matrices associated with the eigensystem. """ operators = tuple(operators) cdef PetscMat *mats = NULL cdef Py_ssize_t k=0, n = len(operators) cdef tmp = allocate(n*sizeof(PetscMat),&mats) for k from 0 <= k < n: mats[k] = (operators[k]).mat CHKERR( STSetOperators(self.st, n, mats) ) def getOperators(self): """ Gets the matrices associated with the eigenvalue problem. Returns ------- operators: tuple of Mat The matrices associated with the eigensystem. """ cdef Mat A cdef PetscMat mat = NULL cdef PetscInt k=0, n=0 CHKERR( STGetNumMatrices(self.st, &n) ) cdef object operators = [] for k from 0 <= k < n: CHKERR( STGetOperators(self.st, k, &mat) ) A = Mat(); A.mat = mat; PetscINCREF(A.obj) operators.append(A) return tuple(operators) def setMatStructure(self, structure): """ Sets an internal Mat.Structure attribute to indicate which is the relation of the sparsity pattern of the two matrices ``A`` and ``B`` constituting the generalized eigenvalue problem. This function has no effect in the case of standard eigenproblems. Parameters ---------- structure: `PETSc.Mat.Structure` enumerate Either same, different, or a subset of the non-zero sparsity pattern. Notes ----- By default, the sparsity patterns are assumed to be different. If the patterns are equal or a subset then it is recommended to set this attribute for efficiency reasons (in particular, for internal *AXPY()* matrix operations). """ cdef PetscMatStructure val = matstructure(structure) CHKERR( STSetMatStructure(self.st, val) ) def setKSP(self, KSP ksp not None): """ Sets the KSP object associated with the spectral transformation. Parameters ---------- ksp: KSP The linear solver object. """ CHKERR( STSetKSP(self.st, ksp.ksp) ) def getKSP(self): """ Gets the KSP object associated with the spectral transformation. Returns ------- ksp: KSP The linear solver object. Notes ----- On output, the internal value of KSP can be ``NULL`` if the combination of eigenproblem type and selected transformation does not require to solve a linear system of equations. """ cdef KSP ksp = KSP() CHKERR( STGetKSP(self.st, &ksp.ksp) ) PetscINCREF(ksp.obj) return ksp # def setUp(self): """ Prepares for the use of a spectral transformation. """ CHKERR( STSetUp(self.st) ) def apply(self, Vec x not None, Vec y not None): """ Applies the spectral transformation operator to a vector, for instance ``(A - sB)^-1 B`` in the case of the shift-and-invert tranformation and generalized eigenproblem. Parameters ---------- x: Vec The input vector. y: Vec The result vector. """ CHKERR( STApply(self.st, x.vec, y.vec) ) def applyTranspose(self, Vec x not None, Vec y not None): """ Applies the transpose of the operator to a vector, for instance ``B^T(A - sB)^-T`` in the case of the shift-and-invert tranformation and generalized eigenproblem. Parameters ---------- x: Vec The input vector. y: Vec The result vector. """ CHKERR( STApplyTranspose(self.st, x.vec, y.vec) ) # def setCayleyAntishift(self, tau): """ Sets the value of the anti-shift for the Cayley spectral transformation. Parameters ---------- tau: scalar (possibly complex) The anti-shift. Notes ----- In the generalized Cayley transform, the operator can be expressed as ``OP = inv(A - sigma B)*(A + tau B)``. This function sets the value of `tau`. Use `setShift()` for setting ``sigma``. """ cdef PetscScalar sval = asScalar(tau) CHKERR( STCayleySetAntishift(self.st, sval) ) # property shift: def __get__(self): return self.getShift() def __set__(self, value): self.setShift(value) property mat_mode: def __get__(self): return self.getMatMode() def __set__(self, value): self.setMatMode(value) property ksp: def __get__(self): return self.getKSP() def __set__(self, value): self.setKSP(value) # ----------------------------------------------------------------------------- del STType del STMatMode # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/RG.pyx0000644000175000001440000001620512705464414016633 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class RGType(object): """ RG type """ INTERVAL = S_(RGINTERVAL) POLYGON = S_(RGPOLYGON) ELLIPSE = S_(RGELLIPSE) RING = S_(RGRING) # ----------------------------------------------------------------------------- cdef class RG(Object): """ RG """ Type = RGType def __cinit__(self): self.obj = &self.rg self.rg = NULL def view(self, Viewer viewer=None): """ Prints the RG data structure. Parameters ---------- viewer: Viewer, optional Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( RGView(self.rg, vwr) ) def destroy(self): """ Destroys the RG object. """ CHKERR( RGDestroy(&self.rg) ) self.rg = NULL return self def create(self, comm=None): """ Creates the RG object. Parameters ---------- comm: Comm, optional MPI communicator; if not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcRG newrg = NULL CHKERR( RGCreate(ccomm, &newrg) ) SlepcCLEAR(self.obj); self.rg = newrg return self def setType(self, rg_type): """ Selects the type for the RG object. Parameters ---------- rg_type: `RG.Type` enumerate The inner product type to be used. """ cdef SlepcRGType cval = NULL rg_type = str2bytes(rg_type, &cval) CHKERR( RGSetType(self.rg, cval) ) def getType(self): """ Gets the RG type of this object. Returns ------- type: `RG.Type` enumerate The inner product type currently being used. """ cdef SlepcRGType rg_type = NULL CHKERR( RGGetType(self.rg, &rg_type) ) return bytes2str(rg_type) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all RG options in the database. Parameters ---------- prefix: string The prefix string to prepend to all RG option requests. Notes ----- A hyphen (``-``) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( RGSetOptionsPrefix(self.rg, cval) ) def getOptionsPrefix(self): """ Gets the prefix used for searching for all RG options in the database. Returns ------- prefix: string The prefix string set for this RG object. """ cdef const_char *prefix = NULL CHKERR( RGGetOptionsPrefix(self.rg, &prefix) ) return bytes2str(prefix) def setFromOptions(self): """ Sets RG options from the options database. Notes ----- To see all options, run your program with the ``-help`` option. """ CHKERR( RGSetFromOptions(self.rg) ) # def isTrivial(self): """ Tells whether it is the trivial region (whole complex plane). Returns ------- flag: boolean True if the region is equal to the whole complex plane, e.g., an interval region with all four endpoints unbounded or an ellipse with infinite radius. """ cdef PetscBool tval = PETSC_FALSE CHKERR( RGIsTrivial(self.rg, &tval) ) return tval def getComplement(self): """ Returns the flag indicating whether the region is complemented or not. Returns ------- flg: bool Whether the region is complemented or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( RGGetComplement(self.rg, &tval) ) return tval def setComplement(self, comp): """ Sets a flag to indicate that the region is the complement of the specified one. Parameters ---------- comp: bool Activate/deactivate the complementation of the region. """ cdef PetscBool tval = comp CHKERR( RGSetComplement(self.rg, tval) ) # def setEllipseParameters(self, center, radius, vscale): """ Sets the parameters defining the ellipse region. Parameters ---------- center: float (real or complex) The center. radius: float The radius. vscale: float The vertical scale. """ cdef PetscScalar sval = asScalar(center) cdef PetscReal val1 = radius cdef PetscReal val2 = vscale CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) def getEllipseParameters(self): """ Gets the parameters that define the ellipse region. Returns ------- center: float (real or complex) The center. radius: float The radius. vscale: float The vertical scale. """ cdef PetscScalar sval = 0 cdef PetscReal val1 = 0 cdef PetscReal val2 = 0 CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) ) return (toScalar(sval), toReal(val1), toReal(val2)) def setIntervalEndpoints(self, a, b, c, d): """ Sets the parameters defining the interval region. Parameters ---------- a: float The left endpoint in the real axis. b: float The right endpoint in the real axis. c: float The upper endpoint in the imaginary axis. d: float The lower endpoint in the imaginary axis. """ cdef PetscReal va = a cdef PetscReal vb = b cdef PetscReal vc = c cdef PetscReal vd = d CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) def getIntervalEndpoints(self): """ Gets the parameters that define the interval region. Returns ------- a: float The left endpoint in the real axis. b: float The right endpoint in the real axis. c: float The upper endpoint in the imaginary axis. d: float The lower endpoint in the imaginary axis. """ cdef PetscReal va = 0 cdef PetscReal vb = 0 cdef PetscReal vc = 0 cdef PetscReal vd = 0 CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) ) return (toReal(va), toReal(vb), toReal(vc), toReal(vd)) # ----------------------------------------------------------------------------- del RGType # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/NEP.pyx0000644000175000001440000005000412720263215016731 0ustar dalcinlusers00000000000000# ----------------------------------------------------------------------------- class NEPType(object): """ NEP type Nonlinear eigensolvers. - `RII`: Residual inverse iteration. - `SLP`: Successive linear problems. - `NARNOLDI`: Nonlinear Arnoldi. - `CISS`: Contour integral spectrum slice. - `INTERPOL`: Polynomial interpolation. - `NLEIGS`: Fully rational Krylov method for nonlinear eigenproblems. """ RII = S_(NEPRII) SLP = S_(NEPSLP) NARNOLDI = S_(NEPNARNOLDI) CISS = S_(NEPCISS) INTERPOL = S_(NEPINTERPOL) NLEIGS = S_(NEPNLEIGS) class NEPErrorType(object): """ NEP error type to assess accuracy of computed solutions - `ABSOLUTE`: Absolute error. - `RELATIVE`: Relative error. - `BACKWARD`: Backward error. """ ABSOLUTE = NEP_ERROR_ABSOLUTE RELATIVE = NEP_ERROR_RELATIVE BACKWARD = NEP_ERROR_BACKWARD class NEPWhich(object): LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE LARGEST_REAL = NEP_LARGEST_REAL SMALLEST_REAL = NEP_SMALLEST_REAL LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE TARGET_REAL = NEP_TARGET_REAL TARGET_IMAGINARY = NEP_TARGET_IMAGINARY ALL = NEP_ALL USER = NEP_WHICH_USER class NEPConvergedReason(object): CONVERGED_TOL = NEP_CONVERGED_TOL CONVERGED_USER = NEP_CONVERGED_USER DIVERGED_ITS = NEP_DIVERGED_ITS DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE CONVERGED_ITERATING = NEP_CONVERGED_ITERATING ITERATING = NEP_CONVERGED_ITERATING class NEPRefine(object): """ NEP refinement strategy - `NONE`: No refinement. - `SIMPLE`: Refine eigenpairs one by one. - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair). """ NONE = NEP_REFINE_NONE SIMPLE = NEP_REFINE_SIMPLE MULTIPLE = NEP_REFINE_MULTIPLE class NEPRefineScheme(object): """ Scheme for solving linear systems during iterative refinement - `SCHUR`: Schur complement. - `MBE`: Mixed block elimination. - `EXPLICIT`: Build the explicit matrix. """ SCHUR = NEP_REFINE_SCHEME_SCHUR MBE = NEP_REFINE_SCHEME_MBE EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT # ----------------------------------------------------------------------------- cdef class NEP(Object): """ NEP """ Type = NEPType ErrorType = NEPErrorType Which = NEPWhich ConvergedReason = NEPConvergedReason Refine = NEPRefine RefineScheme = NEPRefineScheme def __cinit__(self): self.obj = &self.nep self.nep = NULL def view(self, Viewer viewer=None): """ Prints the NEP data structure. Parameters ---------- viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. """ cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( NEPView(self.nep, vwr) ) def destroy(self): """ Destroys the NEP object. """ CHKERR( NEPDestroy(&self.nep) ) self.nep = NULL return self def reset(self): """ Resets the NEP object. """ CHKERR( NEPReset(self.nep) ) def create(self, comm=None): """ Creates the NEP object. Parameters ---------- comm: Comm, optional. MPI communicator. If not provided, it defaults to all processes. """ cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) cdef SlepcNEP newnep = NULL CHKERR( NEPCreate(ccomm, &newnep) ) SlepcCLEAR(self.obj); self.nep = newnep return self def setType(self, nep_type): """ Selects the particular solver to be used in the NEP object. Parameters ---------- nep_type: `NEP.Type` enumerate The solver to be used. """ cdef SlepcNEPType cval = NULL nep_type = str2bytes(nep_type, &cval) CHKERR( NEPSetType(self.nep, cval) ) def getType(self): """ Gets the NEP type of this object. Returns ------- type: `NEP.Type` enumerate The solver currently being used. """ cdef SlepcNEPType nep_type = NULL CHKERR( NEPGetType(self.nep, &nep_type) ) return bytes2str(nep_type) def getOptionsPrefix(self): """ Gets the prefix used for searching for all NEP options in the database. Returns ------- prefix: string The prefix string set for this NEP object. """ cdef const_char *prefix = NULL CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) ) return bytes2str(prefix) def setOptionsPrefix(self, prefix): """ Sets the prefix used for searching for all NEP options in the database. Parameters ---------- prefix: string The prefix string to prepend to all NEP option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) def appendOptionsPrefix(self, prefix): """ Appends to the prefix used for searching for all NEP options in the database. Parameters ---------- prefix: string The prefix string to prepend to all NEP option requests. """ cdef const_char *cval = NULL prefix = str2bytes(prefix, &cval) CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) def setFromOptions(self): """ Sets NEP options from the options database. This routine must be called before `setUp()` if the user is to be allowed to set the solver type. """ CHKERR( NEPSetFromOptions(self.nep) ) def getWhichEigenpairs(self): """ Returns which portion of the spectrum is to be sought. Returns ------- which: `NEP.Which` enumerate The portion of the spectrum to be sought by the solver. """ cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE CHKERR( NEPGetWhichEigenpairs(self.nep, &val) ) return val def setWhichEigenpairs(self, which): """ Specifies which portion of the spectrum is to be sought. Parameters ---------- which: `NEP.Which` enumerate The portion of the spectrum to be sought by the solver. """ cdef SlepcNEPWhich val = which CHKERR( NEPSetWhichEigenpairs(self.nep, val) ) def getTolerances(self): """ Gets the tolerance and maximum iteration count used by the default NEP convergence tests. Returns ------- tol: float The convergence tolerance. maxit: int The maximum number of iterations. """ cdef PetscReal rval = 0 cdef PetscInt ival = 0 CHKERR( NEPGetTolerances(self.nep, &rval, &ival) ) return (toReal(rval), toInt(ival)) def setTolerances(self, tol=None, maxit=None): """ Sets the tolerance and maximum iteration count used in convergence tests. Parameters ---------- tol: float, optional The convergence tolerance. maxit: int, optional The maximum number of iterations. """ cdef PetscReal rval = PETSC_DEFAULT cdef PetscInt ival = PETSC_DEFAULT if tol is not None: rval = asReal(tol) if maxit is not None: ival = asInt(maxit) CHKERR( NEPSetTolerances(self.nep, rval, ival) ) def getRIILagPreconditioner(self): """ Indicates how often the preconditioner is rebuilt. Returns ------- lag: int The lag parameter. """ cdef PetscInt ival = 0 CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) ) return ival def setRIILagPreconditioner(self, lag): """ Determines when the preconditioner is rebuilt in the nonlinear solve. Parameters ---------- lag: int 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc. """ cdef PetscInt ival = lag CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) ) def getTrackAll(self): """ Returns the flag indicating whether all residual norms must be computed or not. Returns ------- trackall: bool Whether the solver compute all residuals or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( NEPGetTrackAll(self.nep, &tval) ) return tval def setTrackAll(self, trackall): """ Specifies if the solver must compute the residual of all approximate eigenpairs or not. Parameters ---------- trackall: bool Whether compute all residuals or not. """ cdef PetscBool tval = trackall CHKERR( NEPSetTrackAll(self.nep, tval) ) def getDimensions(self): """ Gets the number of eigenvalues to compute and the dimension of the subspace. Returns ------- nev: int Number of eigenvalues to compute. ncv: int Maximum dimension of the subspace to be used by the solver. mpd: int Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = 0 cdef PetscInt ival2 = 0 cdef PetscInt ival3 = 0 CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) def setDimensions(self, nev=None, ncv=None, mpd=None): """ Sets the number of eigenvalues to compute and the dimension of the subspace. Parameters ---------- nev: int, optional Number of eigenvalues to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem. """ cdef PetscInt ival1 = PETSC_DEFAULT cdef PetscInt ival2 = PETSC_DEFAULT cdef PetscInt ival3 = PETSC_DEFAULT if nev is not None: ival1 = asInt(nev) if ncv is not None: ival2 = asInt(ncv) if mpd is not None: ival3 = asInt(mpd) CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) def getBV(self): """ Obtain the basis vectors object associated to the eigensolver. Returns ------- bv: BV The basis vectors context. """ cdef BV bv = BV() CHKERR( NEPGetBV(self.nep, &bv.bv) ) PetscINCREF(bv.obj) return bv def setBV(self, BV bv not None): """ Associates a basis vectors object to the eigensolver. Parameters ---------- bv: BV The basis vectors context. """ CHKERR( NEPSetBV(self.nep, bv.bv) ) def getRG(self): """ Obtain the region object associated to the eigensolver. Returns ------- rg: RG The region context. """ cdef RG rg = RG() CHKERR( NEPGetRG(self.nep, &rg.rg) ) PetscINCREF(rg.obj) return rg def setRG(self, RG rg not None): """ Associates a region object to the eigensolver. Parameters ---------- rg: RG The region context. """ CHKERR( NEPSetRG(self.nep, rg.rg) ) # def setInitialSpace(self, space): """ Sets the initial space from which the eigensolver starts to iterate. Parameters ---------- space: Vec or sequence of Vec The initial space """ if isinstance(space, Vec): space = [space] cdef PetscVec *vs = NULL cdef Py_ssize_t i = 0, ns = len(space) cdef tmp = allocate(ns*sizeof(Vec),&vs) for i in range(ns): vs[i] = (space[i]).vec CHKERR( NEPSetInitialSpace(self.nep, ns, vs) ) # def cancelMonitor(self): """ Clears all monitors for a NEP object. """ CHKERR( NEPMonitorCancel(self.nep) ) # def setUp(self): """ Sets up all the internal data structures necessary for the execution of the eigensolver. """ CHKERR( NEPSetUp(self.nep) ) def solve(self): """ Solves the eigensystem. """ CHKERR( NEPSolve(self.nep) ) def getIterationNumber(self): """ Gets the current iteration number. If the call to `solve()` is complete, then it returns the number of iterations carried out by the solution method. Returns ------- its: int Iteration number. """ cdef PetscInt ival = 0 CHKERR( NEPGetIterationNumber(self.nep, &ival) ) return toInt(ival) def getConvergedReason(self): """ Gets the reason why the `solve()` iteration was stopped. Returns ------- reason: `NEP.ConvergedReason` enumerate Negative value indicates diverged, positive value converged. """ cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING CHKERR( NEPGetConvergedReason(self.nep, &val) ) return val def getConverged(self): """ Gets the number of converged eigenpairs. Returns ------- nconv: int Number of converged eigenpairs. """ cdef PetscInt ival = 0 CHKERR( NEPGetConverged(self.nep, &ival) ) return toInt(ival) def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): """ Gets the i-th solution of the eigenproblem as computed by `solve()`. The solution consists of both the eigenvalue and the eigenvector. Parameters ---------- i: int Index of the solution to be obtained. Vr: Vec, optional Placeholder for the returned eigenvector (real part). Vi: Vec, optional Placeholder for the returned eigenvector (imaginary part). Returns ------- e: scalar (possibly complex) The computed eigenvalue. """ cdef PetscScalar sval1 = 0 cdef PetscScalar sval2 = 0 cdef PetscVec vecr = NULL cdef PetscVec veci = NULL if Vr is not None: vecr = Vr.vec if Vi is not None: veci = Vi.vec CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) return complex(toScalar(sval1), toScalar(sval2)) def getErrorEstimate(self, int i): """ Returns the error estimate associated to the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. Returns ------- error: real Error estimate. """ cdef PetscReal rval = 0 CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) ) return toReal(rval) def computeError(self, int i, etype=None): """ Computes the error (based on the residual norm) associated with the i-th computed eigenpair. Parameters ---------- i: int Index of the solution to be considered. etype: `NEP.ErrorType` enumerate The error type to compute. Returns ------- error: real The error bound, computed in various ways from the residual norm ``||T(lambda)x||_2`` where ``lambda`` is the eigenvalue and ``x`` is the eigenvector. """ cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE cdef PetscReal rval = 0 if etype is not None: et = etype CHKERR( NEPComputeError(self.nep, i, et, &rval) ) return toReal(rval) def errorView(self, etype=None, Viewer viewer=None): """ Displays the errors associated with the computed solution (as well as the eigenvalues). Parameters ---------- etype: `NEP.ErrorType` enumerate, optional The error type to compute. viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. Notes ----- By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ``ASCII_INFO_DETAIL`` then a table with eigenvalues and corresponding errors is printed. """ cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE if etype is not None: et = etype cdef PetscViewer vwr = NULL if viewer is not None: vwr = viewer.vwr CHKERR( NEPErrorView(self.nep, et, vwr) ) def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None): """ Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix. Parameters ---------- function: Function evaluation routine F: Mat Function matrix P: Mat preconditioner matrix (usually same as the Function) """ cdef PetscMat Fmat=NULL if F is not None: Fmat = F.mat cdef PetscMat Pmat=Fmat if P is not None: Pmat = P.mat CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) if args is None: args = () if kargs is None: kargs = {} self.set_attr('__function__', (function, args, kargs)) def setJacobian(self, jacobian, Mat J, args=None, kargs=None): """ Sets the function to compute Jacobian T'(lambda) as well as the location to store the matrix. Parameters ---------- jacobian: Jacobian evaluation routine J: Mat Jacobian matrix """ cdef PetscMat Jmat=NULL if J is not None: Jmat = J.mat CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) if args is None: args = () if kargs is None: kargs = {} self.set_attr('__jacobian__', (jacobian, args, kargs)) def setSplitOperator(self, A, f, structure=None): """ Sets the operator of the nonlinear eigenvalue problem in split form. Parameters ---------- A: Mat or sequence of Mat Coefficient matrices of the split form. f: sequence of FN Scalar functions of the split form. structure: `PETSc.Mat.Structure` enumerate, optional Structure flag for matrices. """ if isinstance(A, Mat): A = [A] if isinstance(f, FN): f = [f] cdef PetscMat *As = NULL cdef SlepcFN *Fs = NULL cdef Py_ssize_t i = 0, n = len(A) cdef PetscMatStructure mstr = matstructure(structure) assert n == len(f) cdef tmp1 = allocate(n*sizeof(Mat),&As) cdef tmp2 = allocate(n*sizeof(FN),&Fs) for i in range(n): As[i] = (A[i]).mat Fs[i] = (f[i]).fn CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) # ----------------------------------------------------------------------------- del NEPType del NEPErrorType del NEPWhich del NEPConvergedReason del NEPRefine del NEPRefineScheme # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/SLEPc/slepcpep.pxi0000644000175000001440000001136512720263215020111 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcPEPType "const char*" SlepcPEPType PEPLINEAR SlepcPEPType PEPQARNOLDI SlepcPEPType PEPTOAR SlepcPEPType PEPSTOAR SlepcPEPType PEPJD ctypedef enum SlepcPEPProblemType "PEPProblemType": PEP_GENERAL PEP_HERMITIAN PEP_GYROSCOPIC ctypedef enum SlepcPEPRefine "PEPRefine": PEP_REFINE_NONE PEP_REFINE_SIMPLE PEP_REFINE_MULTIPLE ctypedef enum SlepcPEPExtract "PEPExtract": PEP_EXTRACT_NONE PEP_EXTRACT_NORM PEP_EXTRACT_RESIDUAL PEP_EXTRACT_STRUCTURED ctypedef enum SlepcPEPRefineScheme "PEPRefineScheme": PEP_REFINE_SCHEME_EXPLICIT PEP_REFINE_SCHEME_MBE PEP_REFINE_SCHEME_SCHUR ctypedef enum SlepcPEPErrorType "PEPErrorType": PEP_ERROR_ABSOLUTE PEP_ERROR_RELATIVE PEP_ERROR_BACKWARD ctypedef enum SlepcPEPWhich "PEPWhich": PEP_LARGEST_MAGNITUDE PEP_SMALLEST_MAGNITUDE PEP_LARGEST_REAL PEP_SMALLEST_REAL PEP_LARGEST_IMAGINARY PEP_SMALLEST_IMAGINARY PEP_TARGET_MAGNITUDE PEP_TARGET_REAL PEP_TARGET_IMAGINARY PEP_WHICH_USER ctypedef enum SlepcPEPBasis "PEPBasis": PEP_BASIS_MONOMIAL PEP_BASIS_CHEBYSHEV1 PEP_BASIS_CHEBYSHEV2 PEP_BASIS_LEGENDRE PEP_BASIS_LAGUERRE PEP_BASIS_HERMITE ctypedef enum SlepcPEPScale "PEPScale": PEP_SCALE_NONE PEP_SCALE_SCALAR PEP_SCALE_DIAGONAL PEP_SCALE_BOTH ctypedef enum SlepcPEPConv "PEPConv": PEP_CONV_ABS PEP_CONV_REL PEP_CONV_NORM PEP_CONV_USER ctypedef enum SlepcPEPConvergedReason "PEPConvergedReason": PEP_CONVERGED_TOL PEP_CONVERGED_USER PEP_DIVERGED_ITS PEP_DIVERGED_BREAKDOWN PEP_DIVERGED_SYMMETRY_LOST PEP_CONVERGED_ITERATING int PEPCreate(MPI_Comm,SlepcPEP*) int PEPDestroy(SlepcPEP*) int PEPReset(SlepcPEP) int PEPView(SlepcPEP,PetscViewer) int PEPSetType(SlepcPEP,SlepcPEPType) int PEPGetType(SlepcPEP,SlepcPEPType*) int PEPSetBasis(SlepcPEP,SlepcPEPBasis) int PEPGetBasis(SlepcPEP,SlepcPEPBasis*) int PEPSetProblemType(SlepcPEP,SlepcPEPProblemType) int PEPGetProblemType(SlepcPEP,SlepcPEPProblemType*) int PEPSetOperators(SlepcPEP,PetscInt,PetscMat*) int PEPGetOperators(SlepcPEP,PetscInt,PetscMat*) int PEPGetNumMatrices(SlepcPEP,PetscInt*) int PEPSetOptionsPrefix(SlepcPEP,char*) int PEPGetOptionsPrefix(SlepcPEP,char*[]) int PEPSetFromOptions(SlepcPEP) int PEPAppendOptionsPrefix(SlepcPEP,char*) int PEPSetUp(SlepcPEP) int PEPSolve(SlepcPEP) int PEPSetBV(SlepcPEP,SlepcBV) int PEPGetBV(SlepcPEP,SlepcBV*) int PEPSetTolerances(SlepcPEP,PetscReal,PetscInt) int PEPGetTolerances(SlepcPEP,PetscReal*,PetscInt*) int PEPSetST(SlepcPEP,SlepcST) int PEPGetST(SlepcPEP,SlepcST*) int PEPSetRG(SlepcPEP,SlepcRG) int PEPGetRG(SlepcPEP,SlepcRG*) int PEPSetTrackAll(SlepcPEP,PetscBool) int PEPGetTrackAll(SlepcPEP,PetscBool*) int PEPSetDimensions(SlepcPEP,PetscInt,PetscInt,PetscInt) int PEPGetDimensions(SlepcPEP,PetscInt*,PetscInt*,PetscInt*) int PEPSetScale(SlepcPEP,SlepcPEPScale,PetscReal,PetscVec,PetscVec,PetscInt,PetscReal) int PEPGetScale(SlepcPEP,SlepcPEPScale*,PetscReal*,PetscVec*,PetscVec*,PetscInt*,PetscReal*) int PEPGetConverged(SlepcPEP,PetscInt*) int PEPGetEigenpair(SlepcPEP,PetscInt,PetscScalar*,PetscScalar*,PetscVec,PetscVec) int PEPComputeError(SlepcPEP,PetscInt,SlepcPEPErrorType,PetscReal*) int PEPErrorView(SlepcPEP,SlepcPEPErrorType,PetscViewer) int PEPGetErrorEstimate(SlepcPEP,PetscInt,PetscReal*) int PEPSetConvergenceTest(SlepcPEP,SlepcPEPConv) int PEPGetConvergenceTest(SlepcPEP,SlepcPEPConv*) int PEPSetRefine(SlepcPEP,SlepcPEPRefine,PetscInt,PetscReal,PetscInt,SlepcPEPRefineScheme) int PEPGetRefine(SlepcPEP,SlepcPEPRefine*,PetscInt*,PetscReal*,PetscInt*,SlepcPEPRefineScheme*) int PEPMonitorCancel(SlepcPEP) int PEPGetIterationNumber(SlepcPEP,PetscInt*) int PEPSetInitialSpace(SlepcPEP,PetscInt,PetscVec*) int PEPSetWhichEigenpairs(SlepcPEP,SlepcPEPWhich) int PEPGetWhichEigenpairs(SlepcPEP,SlepcPEPWhich*) int PEPGetConvergedReason(SlepcPEP,SlepcPEPConvergedReason*) int PEPLinearSetCompanionForm(SlepcPEP,PetscInt) int PEPLinearGetCompanionForm(SlepcPEP,PetscInt*) int PEPLinearSetExplicitMatrix(SlepcPEP,PetscBool) int PEPLinearGetExplicitMatrix(SlepcPEP,PetscBool*) int PEPLinearSetEPS(SlepcPEP,SlepcEPS) int PEPLinearGetEPS(SlepcPEP,SlepcEPS*) cdef extern from * nogil: int VecCopy(PetscVec,PetscVec) int VecSet(PetscVec,PetscScalar) int VecDestroy(PetscVec*) slepc4py-3.7.0/src/SLEPc/slepcfn.pxi0000644000175000001440000000356612717026107017737 0ustar dalcinlusers00000000000000cdef extern from * nogil: ctypedef char* SlepcFNType "const char*" SlepcFNType FNCOMBINE SlepcFNType FNRATIONAL SlepcFNType FNEXP SlepcFNType FNLOG SlepcFNType FNPHI SlepcFNType FNSQRT SlepcFNType FNINVSQRT ctypedef enum SlepcFNCombineType "FNCombineType": FN_COMBINE_ADD FN_COMBINE_MULTIPLY FN_COMBINE_DIVIDE FN_COMBINE_COMPOSE int FNCreate(MPI_Comm,SlepcFN*) int FNView(SlepcFN,PetscViewer) int FNDestroy(SlepcFN*) int FNReset(SlepcFN) int FNSetType(SlepcFN,SlepcFNType) int FNGetType(SlepcFN,SlepcFNType*) int FNSetOptionsPrefix(SlepcFN,char[]) int FNGetOptionsPrefix(SlepcFN,char*[]) int FNAppendOptionsPrefix(SlepcFN,char[]) int FNSetFromOptions(SlepcFN) int FNSetScale(SlepcFN,PetscScalar,PetscScalar) int FNGetScale(SlepcFN,PetscScalar*,PetscScalar*) int FNEvaluateFunction(SlepcFN,PetscScalar,PetscScalar*) int FNEvaluateDerivative(SlepcFN,PetscScalar,PetscScalar*) int FNEvaluateFunctionMat(SlepcFN,PetscMat,PetscMat*) int FNRationalSetNumerator(SlepcFN,PetscInt,PetscScalar[]) int FNRationalGetNumerator(SlepcFN,PetscInt*,PetscScalar*[]) int FNRationalSetDenominator(SlepcFN,PetscInt,PetscScalar[]) int FNRationalGetDenominator(SlepcFN,PetscInt*,PetscScalar*[]) int FNCombineSetChildren(SlepcFN,SlepcFNCombineType,SlepcFN,SlepcFN) int FNCombineGetChildren(SlepcFN,SlepcFNCombineType*,SlepcFN*,SlepcFN*) int FNPhiSetIndex(SlepcFN,PetscInt) int FNPhiGetIndex(SlepcFN,PetscInt*) cdef object iarray_s(object array, PetscInt* size, PetscScalar** data): cdef Py_ssize_t i = 0, n = len(array) cdef PetscScalar *a = NULL cdef object mem = allocate(n*sizeof(PetscScalar),&a) for i from 0 <= i < n: a[i] = asScalar(array[i]) if size != NULL: size[0] = n if data != NULL: data[0] = a return mem slepc4py-3.7.0/src/lib/0000755000175000001440000000000012720314530015403 5ustar dalcinlusers00000000000000slepc4py-3.7.0/src/lib/slepc.cfg0000644000175000001440000000012212705464414017177 0ustar dalcinlusers00000000000000SLEPC_DIR = %(SLEPC_DIR)s PETSC_DIR = %(PETSC_DIR)s PETSC_ARCH = %(PETSC_ARCH)s slepc4py-3.7.0/src/lib/__init__.py0000644000175000001440000000322612705464414017531 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # ----------------------------------------------------------------------------- """ Extension modules for different SLEPc configurations. SLEPc can be configured with different options (eg. debug/optimized, single/double precisionm, C/C++ compilers, external packages). Each configuration variant is associated to a name, frequently available as an environmental variable named ``PETSC_ARCH``. This package is a holds all the available variants of the SLEPc extension module built agaist specific SLEPc configurations. It also provides a convenience function using of the builtin ``imp`` module for easily importing any of the available extension modules depending on the value of a user-provided configuration name, the ``PETSC_ARCH`` environmental variable, or a configuration file. """ # ----------------------------------------------------------------------------- from petsc4py.lib import ImportPETSc from petsc4py.lib import Import, getPathArch, getInitArgs def ImportSLEPc(arch=None): """ Import the SLEPc extension module for a given configuration name. """ path, arch = getPathArchSLEPc(arch) PETSc = ImportPETSc(arch) return Import('slepc4py', 'SLEPc', path, arch) def getPathArchSLEPc(arch=None): """ Undocumented. """ import sys, os PETSc = sys.modules.get('petsc4py.PETSc') arch = getattr(PETSc, '__arch__', arch) path = os.path.dirname(__file__) rcvar, rcfile = 'PETSC_ARCH', 'slepc.cfg' path, arch = getPathArch(path, arch, rcvar, rcfile) return (path, arch) # ----------------------------------------------------------------------------- slepc4py-3.7.0/src/slepc4py.SLEPc.c0000644000175000001440001341567412720314467017507 0ustar dalcinlusers00000000000000/* Generated by Cython 0.24 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_24" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { \ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ } #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__slepc4py__SLEPc #define __PYX_HAVE_API__slepc4py__SLEPc #include "slepc.h" #include "petsc.h" #include "custom.h" #include "scalar.h" #include "string.h" #include "stdio.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "SLEPc/ST.pyx", "SLEPc/allocate.pxi", "SLEPc/slepcbv.pxi", "SLEPc/BV.pyx", "SLEPc/SLEPc.pyx", "SLEPc/slepcmpi.pxi", "SLEPc/slepcsys.pxi", "SLEPc/slepcfn.pxi", "SLEPc/slepcnep.pxi", "SLEPc/Sys.pyx", "SLEPc/DS.pyx", "SLEPc/FN.pyx", "SLEPc/RG.pyx", "SLEPc/EPS.pyx", "SLEPc/SVD.pyx", "SLEPc/PEP.pyx", "SLEPc/NEP.pyx", "SLEPc/MFN.pyx", "SLEPc/CAPI.pyx", "slepc4py.SLEPc.pyx", "PETSc.pxd", }; /*--- Type declarations ---*/ struct PyPetscCommObject; struct PyPetscObjectObject; struct PyPetscViewerObject; struct PyPetscRandomObject; struct PyPetscISObject; struct PyPetscLGMapObject; struct PyPetscSFObject; struct PyPetscVecObject; struct PyPetscScatterObject; struct PyPetscSectionObject; struct PyPetscMatObject; struct PyPetscNullSpaceObject; struct PyPetscPCObject; struct PyPetscKSPObject; struct PyPetscSNESObject; struct PyPetscTSObject; struct PyPetscTAOObject; struct PyPetscAOObject; struct PyPetscDMObject; struct PyPetscPartitionerObject; struct PySlepcSTObject; struct PySlepcBVObject; struct PySlepcDSObject; struct PySlepcFNObject; struct PySlepcRGObject; struct PySlepcEPSObject; struct PySlepcSVDObject; struct PySlepcPEPObject; struct PySlepcNEPObject; struct PySlepcMFNObject; struct __pyx_obj_8slepc4py_5SLEPc__p_mem; struct __pyx_obj_8slepc4py_5SLEPc_Sys; /* "petsc4py/PETSc.pxd":70 * # -------------------------------------------------------------------- * * ctypedef public api class Comm [ # <<<<<<<<<<<<<< * type PyPetscComm_Type, * object PyPetscCommObject, */ struct PyPetscCommObject { PyObject_HEAD MPI_Comm comm; int isdup; PyObject *base; }; typedef struct PyPetscCommObject PyPetscCommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscComm_Type; /* "petsc4py/PETSc.pxd":78 * cdef object base * * ctypedef public api class Object [ # <<<<<<<<<<<<<< * type PyPetscObject_Type, * object PyPetscObjectObject, */ struct PyPetscObjectObject { PyObject_HEAD struct __pyx_vtabstruct_8petsc4py_5PETSc_Object *__pyx_vtab; PyObject *__weakref__; PyObject *__pyx___dummy__; PetscObject oval; PetscObject *obj; }; typedef struct PyPetscObjectObject PyPetscObjectObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscObject_Type; /* "petsc4py/PETSc.pxd":90 * cdef object get_dict(self) * * ctypedef public api class Viewer(Object) [ # <<<<<<<<<<<<<< * type PyPetscViewer_Type, * object PyPetscViewerObject, */ struct PyPetscViewerObject { struct PyPetscObjectObject __pyx_base; PetscViewer vwr; }; typedef struct PyPetscViewerObject PyPetscViewerObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscViewer_Type; /* "petsc4py/PETSc.pxd":96 * cdef PetscViewer vwr * * ctypedef public api class Random(Object) [ # <<<<<<<<<<<<<< * type PyPetscRandom_Type, * object PyPetscRandomObject, */ struct PyPetscRandomObject { struct PyPetscObjectObject __pyx_base; PetscRandom rnd; }; typedef struct PyPetscRandomObject PyPetscRandomObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscRandom_Type; /* "petsc4py/PETSc.pxd":102 * cdef PetscRandom rnd * * ctypedef public api class IS(Object) [ # <<<<<<<<<<<<<< * type PyPetscIS_Type, * object PyPetscISObject, */ struct PyPetscISObject { struct PyPetscObjectObject __pyx_base; IS iset; }; typedef struct PyPetscISObject PyPetscISObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscIS_Type; /* "petsc4py/PETSc.pxd":108 * cdef PetscIS iset * * ctypedef public api class LGMap(Object) [ # <<<<<<<<<<<<<< * type PyPetscLGMap_Type, * object PyPetscLGMapObject, */ struct PyPetscLGMapObject { struct PyPetscObjectObject __pyx_base; ISLocalToGlobalMapping lgm; }; typedef struct PyPetscLGMapObject PyPetscLGMapObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscLGMap_Type; /* "petsc4py/PETSc.pxd":114 * cdef PetscLGMap lgm * * ctypedef public api class SF(Object) [ # <<<<<<<<<<<<<< * type PyPetscSF_Type, * object PyPetscSFObject, */ struct PyPetscSFObject { struct PyPetscObjectObject __pyx_base; PetscSF sf; }; typedef struct PyPetscSFObject PyPetscSFObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSF_Type; /* "petsc4py/PETSc.pxd":120 * cdef PetscSF sf * * ctypedef public api class Vec(Object) [ # <<<<<<<<<<<<<< * type PyPetscVec_Type, * object PyPetscVecObject, */ struct PyPetscVecObject { struct PyPetscObjectObject __pyx_base; Vec vec; }; typedef struct PyPetscVecObject PyPetscVecObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscVec_Type; /* "petsc4py/PETSc.pxd":126 * cdef PetscVec vec * * ctypedef public api class Scatter(Object) [ # <<<<<<<<<<<<<< * type PyPetscScatter_Type, * object PyPetscScatterObject, */ struct PyPetscScatterObject { struct PyPetscObjectObject __pyx_base; VecScatter sct; }; typedef struct PyPetscScatterObject PyPetscScatterObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscScatter_Type; /* "petsc4py/PETSc.pxd":132 * cdef PetscScatter sct * * ctypedef public api class Section(Object) [ # <<<<<<<<<<<<<< * type PyPetscSection_Type, * object PyPetscSectionObject, */ struct PyPetscSectionObject { struct PyPetscObjectObject __pyx_base; PetscSection sec; }; typedef struct PyPetscSectionObject PyPetscSectionObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSection_Type; /* "petsc4py/PETSc.pxd":138 * cdef PetscSection sec * * ctypedef public api class Mat(Object) [ # <<<<<<<<<<<<<< * type PyPetscMat_Type, * object PyPetscMatObject, */ struct PyPetscMatObject { struct PyPetscObjectObject __pyx_base; Mat mat; }; typedef struct PyPetscMatObject PyPetscMatObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscMat_Type; /* "petsc4py/PETSc.pxd":144 * cdef PetscMat mat * * ctypedef public api class NullSpace(Object) [ # <<<<<<<<<<<<<< * type PyPetscNullSpace_Type, * object PyPetscNullSpaceObject, */ struct PyPetscNullSpaceObject { struct PyPetscObjectObject __pyx_base; MatNullSpace nsp; }; typedef struct PyPetscNullSpaceObject PyPetscNullSpaceObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscNullSpace_Type; /* "petsc4py/PETSc.pxd":150 * cdef PetscNullSpace nsp * * ctypedef public api class PC(Object) [ # <<<<<<<<<<<<<< * type PyPetscPC_Type, * object PyPetscPCObject, */ struct PyPetscPCObject { struct PyPetscObjectObject __pyx_base; PC pc; }; typedef struct PyPetscPCObject PyPetscPCObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPC_Type; /* "petsc4py/PETSc.pxd":156 * cdef PetscPC pc * * ctypedef public api class KSP(Object) [ # <<<<<<<<<<<<<< * type PyPetscKSP_Type, * object PyPetscKSPObject, */ struct PyPetscKSPObject { struct PyPetscObjectObject __pyx_base; KSP ksp; }; typedef struct PyPetscKSPObject PyPetscKSPObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscKSP_Type; /* "petsc4py/PETSc.pxd":162 * cdef PetscKSP ksp * * ctypedef public api class SNES(Object) [ # <<<<<<<<<<<<<< * type PyPetscSNES_Type, * object PyPetscSNESObject, */ struct PyPetscSNESObject { struct PyPetscObjectObject __pyx_base; SNES snes; }; typedef struct PyPetscSNESObject PyPetscSNESObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSNES_Type; /* "petsc4py/PETSc.pxd":168 * cdef PetscSNES snes * * ctypedef public api class TS(Object) [ # <<<<<<<<<<<<<< * type PyPetscTS_Type, * object PyPetscTSObject, */ struct PyPetscTSObject { struct PyPetscObjectObject __pyx_base; TS ts; }; typedef struct PyPetscTSObject PyPetscTSObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTS_Type; /* "petsc4py/PETSc.pxd":174 * cdef PetscTS ts * * ctypedef public api class TAO(Object) [ # <<<<<<<<<<<<<< * type PyPetscTAO_Type, * object PyPetscTAOObject, */ struct PyPetscTAOObject { struct PyPetscObjectObject __pyx_base; Tao tao; }; typedef struct PyPetscTAOObject PyPetscTAOObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTAO_Type; /* "petsc4py/PETSc.pxd":180 * cdef PetscTAO tao * * ctypedef public api class AO(Object) [ # <<<<<<<<<<<<<< * type PyPetscAO_Type, * object PyPetscAOObject, */ struct PyPetscAOObject { struct PyPetscObjectObject __pyx_base; AO ao; }; typedef struct PyPetscAOObject PyPetscAOObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscAO_Type; /* "petsc4py/PETSc.pxd":186 * cdef PetscAO ao * * ctypedef public api class DM(Object) [ # <<<<<<<<<<<<<< * type PyPetscDM_Type, * object PyPetscDMObject, */ struct PyPetscDMObject { struct PyPetscObjectObject __pyx_base; DM dm; }; typedef struct PyPetscDMObject PyPetscDMObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDM_Type; /* "petsc4py/PETSc.pxd":192 * cdef PetscDM dm * * ctypedef public api class Partitioner(Object) [ # <<<<<<<<<<<<<< * type PyPetscPartitioner_Type, * object PyPetscPartitionerObject, */ struct PyPetscPartitionerObject { struct PyPetscObjectObject __pyx_base; PetscPartitioner part; }; typedef struct PyPetscPartitionerObject PyPetscPartitionerObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPartitioner_Type; /* "slepc4py/SLEPc.pxd":42 * from petsc4py.PETSc cimport Object * * ctypedef public api class ST(Object) [ # <<<<<<<<<<<<<< * type PySlepcST_Type, * object PySlepcSTObject, */ struct PySlepcSTObject { struct PyPetscObjectObject __pyx_base; ST st; }; typedef struct PySlepcSTObject PySlepcSTObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcST_Type; /* "slepc4py/SLEPc.pxd":48 * cdef SlepcST st * * ctypedef public api class BV(Object) [ # <<<<<<<<<<<<<< * type PySlepcBV_Type, * object PySlepcBVObject, */ struct PySlepcBVObject { struct PyPetscObjectObject __pyx_base; BV bv; }; typedef struct PySlepcBVObject PySlepcBVObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcBV_Type; /* "slepc4py/SLEPc.pxd":54 * cdef SlepcBV bv * * ctypedef public api class DS(Object) [ # <<<<<<<<<<<<<< * type PySlepcDS_Type, * object PySlepcDSObject, */ struct PySlepcDSObject { struct PyPetscObjectObject __pyx_base; DS ds; }; typedef struct PySlepcDSObject PySlepcDSObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcDS_Type; /* "slepc4py/SLEPc.pxd":60 * cdef SlepcDS ds * * ctypedef public api class FN(Object) [ # <<<<<<<<<<<<<< * type PySlepcFN_Type, * object PySlepcFNObject, */ struct PySlepcFNObject { struct PyPetscObjectObject __pyx_base; FN fn; }; typedef struct PySlepcFNObject PySlepcFNObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcFN_Type; /* "slepc4py/SLEPc.pxd":66 * cdef SlepcFN fn * * ctypedef public api class RG(Object) [ # <<<<<<<<<<<<<< * type PySlepcRG_Type, * object PySlepcRGObject, */ struct PySlepcRGObject { struct PyPetscObjectObject __pyx_base; RG rg; }; typedef struct PySlepcRGObject PySlepcRGObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcRG_Type; /* "slepc4py/SLEPc.pxd":72 * cdef SlepcRG rg * * ctypedef public api class EPS(Object) [ # <<<<<<<<<<<<<< * type PySlepcEPS_Type, * object PySlepcEPSObject, */ struct PySlepcEPSObject { struct PyPetscObjectObject __pyx_base; EPS eps; }; typedef struct PySlepcEPSObject PySlepcEPSObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcEPS_Type; /* "slepc4py/SLEPc.pxd":78 * cdef SlepcEPS eps * * ctypedef public api class SVD(Object) [ # <<<<<<<<<<<<<< * type PySlepcSVD_Type, * object PySlepcSVDObject, */ struct PySlepcSVDObject { struct PyPetscObjectObject __pyx_base; SVD svd; }; typedef struct PySlepcSVDObject PySlepcSVDObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcSVD_Type; /* "slepc4py/SLEPc.pxd":84 * cdef SlepcSVD svd * * ctypedef public api class PEP(Object) [ # <<<<<<<<<<<<<< * type PySlepcPEP_Type, * object PySlepcPEPObject, */ struct PySlepcPEPObject { struct PyPetscObjectObject __pyx_base; PEP pep; }; typedef struct PySlepcPEPObject PySlepcPEPObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcPEP_Type; /* "slepc4py/SLEPc.pxd":90 * cdef SlepcPEP pep * * ctypedef public api class NEP(Object) [ # <<<<<<<<<<<<<< * type PySlepcNEP_Type, * object PySlepcNEPObject, */ struct PySlepcNEPObject { struct PyPetscObjectObject __pyx_base; NEP nep; }; typedef struct PySlepcNEPObject PySlepcNEPObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcNEP_Type; /* "slepc4py/SLEPc.pxd":96 * cdef SlepcNEP nep * * ctypedef public api class MFN(Object) [ # <<<<<<<<<<<<<< * type PySlepcMFN_Type, * object PySlepcMFNObject, */ struct PySlepcMFNObject { struct PyPetscObjectObject __pyx_base; MFN mfn; }; typedef struct PySlepcMFNObject PySlepcMFNObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcMFN_Type; /* "SLEPc/allocate.pxi":11 * #@cython.final * #@cython.internal * cdef class _p_mem: # <<<<<<<<<<<<<< * cdef void *buf * def __cinit__(self): */ struct __pyx_obj_8slepc4py_5SLEPc__p_mem { PyObject_HEAD void *buf; }; /* "SLEPc/Sys.pyx":3 * # ----------------------------------------------------------------------------- * * cdef class Sys: # <<<<<<<<<<<<<< * * @classmethod */ struct __pyx_obj_8slepc4py_5SLEPc_Sys { PyObject_HEAD }; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscObject_Type; /* "petsc4py/PETSc.pxd":78 * cdef object base * * ctypedef public api class Object [ # <<<<<<<<<<<<<< * type PyPetscObject_Type, * object PyPetscObjectObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Object { PyObject *(*get_attr)(struct PyPetscObjectObject *, char *); PyObject *(*set_attr)(struct PyPetscObjectObject *, char *, PyObject *); PyObject *(*get_dict)(struct PyPetscObjectObject *); }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Object *__pyx_vtabptr_8petsc4py_5PETSc_Object; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscViewer_Type; /* "petsc4py/PETSc.pxd":90 * cdef object get_dict(self) * * ctypedef public api class Viewer(Object) [ # <<<<<<<<<<<<<< * type PyPetscViewer_Type, * object PyPetscViewerObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer *__pyx_vtabptr_8petsc4py_5PETSc_Viewer; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscRandom_Type; /* "petsc4py/PETSc.pxd":96 * cdef PetscViewer vwr * * ctypedef public api class Random(Object) [ # <<<<<<<<<<<<<< * type PyPetscRandom_Type, * object PyPetscRandomObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Random { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Random *__pyx_vtabptr_8petsc4py_5PETSc_Random; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscIS_Type; /* "petsc4py/PETSc.pxd":102 * cdef PetscRandom rnd * * ctypedef public api class IS(Object) [ # <<<<<<<<<<<<<< * type PyPetscIS_Type, * object PyPetscISObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_IS { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_IS *__pyx_vtabptr_8petsc4py_5PETSc_IS; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscLGMap_Type; /* "petsc4py/PETSc.pxd":108 * cdef PetscIS iset * * ctypedef public api class LGMap(Object) [ # <<<<<<<<<<<<<< * type PyPetscLGMap_Type, * object PyPetscLGMapObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap *__pyx_vtabptr_8petsc4py_5PETSc_LGMap; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSF_Type; /* "petsc4py/PETSc.pxd":114 * cdef PetscLGMap lgm * * ctypedef public api class SF(Object) [ # <<<<<<<<<<<<<< * type PyPetscSF_Type, * object PyPetscSFObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_SF { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_SF *__pyx_vtabptr_8petsc4py_5PETSc_SF; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscVec_Type; /* "petsc4py/PETSc.pxd":120 * cdef PetscSF sf * * ctypedef public api class Vec(Object) [ # <<<<<<<<<<<<<< * type PyPetscVec_Type, * object PyPetscVecObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec *__pyx_vtabptr_8petsc4py_5PETSc_Vec; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscScatter_Type; /* "petsc4py/PETSc.pxd":126 * cdef PetscVec vec * * ctypedef public api class Scatter(Object) [ # <<<<<<<<<<<<<< * type PyPetscScatter_Type, * object PyPetscScatterObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter *__pyx_vtabptr_8petsc4py_5PETSc_Scatter; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSection_Type; /* "petsc4py/PETSc.pxd":132 * cdef PetscScatter sct * * ctypedef public api class Section(Object) [ # <<<<<<<<<<<<<< * type PyPetscSection_Type, * object PyPetscSectionObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Section { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Section *__pyx_vtabptr_8petsc4py_5PETSc_Section; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscMat_Type; /* "petsc4py/PETSc.pxd":138 * cdef PetscSection sec * * ctypedef public api class Mat(Object) [ # <<<<<<<<<<<<<< * type PyPetscMat_Type, * object PyPetscMatObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat *__pyx_vtabptr_8petsc4py_5PETSc_Mat; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscNullSpace_Type; /* "petsc4py/PETSc.pxd":144 * cdef PetscMat mat * * ctypedef public api class NullSpace(Object) [ # <<<<<<<<<<<<<< * type PyPetscNullSpace_Type, * object PyPetscNullSpaceObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace *__pyx_vtabptr_8petsc4py_5PETSc_NullSpace; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPC_Type; /* "petsc4py/PETSc.pxd":150 * cdef PetscNullSpace nsp * * ctypedef public api class PC(Object) [ # <<<<<<<<<<<<<< * type PyPetscPC_Type, * object PyPetscPCObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_PC { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_PC *__pyx_vtabptr_8petsc4py_5PETSc_PC; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscKSP_Type; /* "petsc4py/PETSc.pxd":156 * cdef PetscPC pc * * ctypedef public api class KSP(Object) [ # <<<<<<<<<<<<<< * type PyPetscKSP_Type, * object PyPetscKSPObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP *__pyx_vtabptr_8petsc4py_5PETSc_KSP; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSNES_Type; /* "petsc4py/PETSc.pxd":162 * cdef PetscKSP ksp * * ctypedef public api class SNES(Object) [ # <<<<<<<<<<<<<< * type PyPetscSNES_Type, * object PyPetscSNESObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES *__pyx_vtabptr_8petsc4py_5PETSc_SNES; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTS_Type; /* "petsc4py/PETSc.pxd":168 * cdef PetscSNES snes * * ctypedef public api class TS(Object) [ # <<<<<<<<<<<<<< * type PyPetscTS_Type, * object PyPetscTSObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_TS { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_TS *__pyx_vtabptr_8petsc4py_5PETSc_TS; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTAO_Type; /* "petsc4py/PETSc.pxd":174 * cdef PetscTS ts * * ctypedef public api class TAO(Object) [ # <<<<<<<<<<<<<< * type PyPetscTAO_Type, * object PyPetscTAOObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO *__pyx_vtabptr_8petsc4py_5PETSc_TAO; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscAO_Type; /* "petsc4py/PETSc.pxd":180 * cdef PetscTAO tao * * ctypedef public api class AO(Object) [ # <<<<<<<<<<<<<< * type PyPetscAO_Type, * object PyPetscAOObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_AO { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_AO *__pyx_vtabptr_8petsc4py_5PETSc_AO; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDM_Type; /* "petsc4py/PETSc.pxd":186 * cdef PetscAO ao * * ctypedef public api class DM(Object) [ # <<<<<<<<<<<<<< * type PyPetscDM_Type, * object PyPetscDMObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_DM { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_DM *__pyx_vtabptr_8petsc4py_5PETSc_DM; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPartitioner_Type; /* "petsc4py/PETSc.pxd":192 * cdef PetscDM dm * * ctypedef public api class Partitioner(Object) [ # <<<<<<<<<<<<<< * type PyPetscPartitioner_Type, * object PyPetscPartitionerObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner *__pyx_vtabptr_8petsc4py_5PETSc_Partitioner; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcST_Type; /* "SLEPc/ST.pyx":34 * # ----------------------------------------------------------------------------- * * cdef class ST(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_ST { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_ST *__pyx_vtabptr_8slepc4py_5SLEPc_ST; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcBV_Type; /* "SLEPc/BV.pyx":46 * # ----------------------------------------------------------------------------- * * cdef class BV(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV *__pyx_vtabptr_8slepc4py_5SLEPc_BV; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcDS_Type; /* "SLEPc/DS.pyx":62 * # ----------------------------------------------------------------------------- * * cdef class DS(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS *__pyx_vtabptr_8slepc4py_5SLEPc_DS; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcFN_Type; /* "SLEPc/FN.pyx":31 * # ----------------------------------------------------------------------------- * * cdef class FN(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN *__pyx_vtabptr_8slepc4py_5SLEPc_FN; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcRG_Type; /* "SLEPc/RG.pyx":14 * # ----------------------------------------------------------------------------- * * cdef class RG(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG *__pyx_vtabptr_8slepc4py_5SLEPc_RG; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcEPS_Type; /* "SLEPc/EPS.pyx":209 * # ----------------------------------------------------------------------------- * * cdef class EPS(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *__pyx_vtabptr_8slepc4py_5SLEPc_EPS; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcSVD_Type; /* "SLEPc/SVD.pyx":58 * # ----------------------------------------------------------------------------- * * cdef class SVD(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD *__pyx_vtabptr_8slepc4py_5SLEPc_SVD; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcPEP_Type; /* "SLEPc/PEP.pyx":167 * # ----------------------------------------------------------------------------- * * cdef class PEP(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP *__pyx_vtabptr_8slepc4py_5SLEPc_PEP; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcNEP_Type; /* "SLEPc/NEP.pyx":83 * # ----------------------------------------------------------------------------- * * cdef class NEP(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *__pyx_vtabptr_8slepc4py_5SLEPc_NEP; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcMFN_Type; /* "SLEPc/MFN.pyx":25 * # ----------------------------------------------------------------------------- * * cdef class MFN(Object): # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN *__pyx_vtabptr_8slepc4py_5SLEPc_MFN; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* decode_c_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* decode_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_bytes( PyObject* string, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { return __Pyx_decode_c_bytes( PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), start, stop, encoding, errors, decode_func); } /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* KeywordStringCheck.proto */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* PyThreadStateGet.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET(); #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #endif /* PyErrFetchRestore.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* SaveResetException.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* PyErrExceptionMatches.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetException.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* ListAppend.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* ListCompAppend.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* ArgTypeTest.proto */ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* GetModuleGlobalName.proto */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /* CallNextTpDealloc.proto */ static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); /* CallNextTpTraverse.proto */ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); /* CallNextTpClear.proto */ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); /* GetVTable.proto */ static void* __Pyx_GetVtable(PyObject *dict); /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* GetNameInClass.proto */ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* PyObjectSetAttrStr.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* PyIdentifierFromString.proto */ #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif /* ModuleImport.proto */ static PyObject *__Pyx_ImportModule(const char *name); /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); static int __Pyx_RegisterCleanup(void); /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_STMatMode(STMatMode value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogType(BVOrthogType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogRefineType(BVOrthogRefineType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogBlockType(BVOrthogBlockType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSStateType(DSStateType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSMatType(DSMatType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FNCombineType(FNCombineType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSProblemType(EPSProblemType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSExtraction(EPSExtraction value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSBalance(EPSBalance value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSErrorType(EPSErrorType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSWhich(EPSWhich value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConv(EPSConv value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConvergedReason(EPSConvergedReason value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSPowerShiftType(EPSPowerShiftType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSLanczosReorthogType(EPSLanczosReorthogType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDErrorType(SVDErrorType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDWhich(SVDWhich value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDConvergedReason(SVDConvergedReason value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPProblemType(PEPProblemType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPWhich(PEPWhich value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPBasis(PEPBasis value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPScale(PEPScale value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefine(PEPRefine value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefineScheme(PEPRefineScheme value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPExtract(PEPExtract value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPErrorType(PEPErrorType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConv(PEPConv value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConvergedReason(PEPConvergedReason value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPErrorType(NEPErrorType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPWhich(NEPWhich value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPConvergedReason(NEPConvergedReason value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefine(NEPRefine value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefineScheme(NEPRefineScheme value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MFNConvergedReason(MFNConvergedReason value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscInt(PetscInt value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value); /* ClassMethod.proto */ #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PetscInt __Pyx_PyInt_As_PetscInt(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE MatStructure __Pyx_PyInt_As_MatStructure(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE STMatMode __Pyx_PyInt_As_STMatMode(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE BVOrthogType __Pyx_PyInt_As_BVOrthogType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE BVOrthogRefineType __Pyx_PyInt_As_BVOrthogRefineType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE BVOrthogBlockType __Pyx_PyInt_As_BVOrthogBlockType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE NormType __Pyx_PyInt_As_NormType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE DSStateType __Pyx_PyInt_As_DSStateType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSProblemType __Pyx_PyInt_As_EPSProblemType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSBalance __Pyx_PyInt_As_EPSBalance(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSExtraction __Pyx_PyInt_As_EPSExtraction(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSWhich __Pyx_PyInt_As_EPSWhich(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSConv __Pyx_PyInt_As_EPSConv(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSErrorType __Pyx_PyInt_As_EPSErrorType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSPowerShiftType __Pyx_PyInt_As_EPSPowerShiftType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE EPSLanczosReorthogType __Pyx_PyInt_As_EPSLanczosReorthogType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SVDWhich __Pyx_PyInt_As_SVDWhich(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE SVDErrorType __Pyx_PyInt_As_SVDErrorType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPBasis __Pyx_PyInt_As_PEPBasis(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPProblemType __Pyx_PyInt_As_PEPProblemType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPWhich __Pyx_PyInt_As_PEPWhich(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPConv __Pyx_PyInt_As_PEPConv(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPRefine __Pyx_PyInt_As_PEPRefine(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPRefineScheme __Pyx_PyInt_As_PEPRefineScheme(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPScale __Pyx_PyInt_As_PEPScale(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PEPErrorType __Pyx_PyInt_As_PEPErrorType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE NEPWhich __Pyx_PyInt_As_NEPWhich(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE NEPErrorType __Pyx_PyInt_As_NEPErrorType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* FunctionExport.proto */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /* TypeImport.proto */ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /* FunctionImport.proto */ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'petsc4py.PETSc' */ static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Comm = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Object = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Viewer = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Random = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_IS = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_LGMap = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SF = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Vec = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Scatter = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Section = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Mat = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_NullSpace = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_PC = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_KSP = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SNES = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TS = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TAO = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_AO = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DM = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Partitioner = 0; static MPI_Comm (*__pyx_f_8petsc4py_5PETSc_GetComm)(PyObject *, MPI_Comm); /*proto*/ static MPI_Comm (*__pyx_f_8petsc4py_5PETSc_GetCommDefault)(void); /*proto*/ static int (*__pyx_f_8petsc4py_5PETSc_PyPetscType_Register)(int, PyTypeObject *); /*proto*/ /* Module declarations from 'slepc4py.SLEPc' */ static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_ST = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_BV = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_DS = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_FN = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_RG = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_EPS = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_SVD = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_PEP = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_NEP = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_MFN = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc__p_mem = 0; static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_Sys = 0; static PyObject *__pyx_v_8slepc4py_5SLEPc_PetscError = 0; static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_bytes2str(const char *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_str2bytes(PyObject *, const char **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_S_(const char *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_allocate(size_t, void **); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SETERR(int); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_CHKERR(int); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toInt(PetscInt); /*proto*/ static CYTHON_INLINE PetscInt __pyx_f_8slepc4py_5SLEPc_asInt(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toReal(PetscReal); /*proto*/ static CYTHON_INLINE PetscReal __pyx_f_8slepc4py_5SLEPc_asReal(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toScalar(PetscScalar); /*proto*/ static CYTHON_INLINE PetscScalar __pyx_f_8slepc4py_5SLEPc_asScalar(PyObject *); /*proto*/ static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_def_Comm(PyObject *, MPI_Comm); /*proto*/ static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT(void); /*proto*/ static CYTHON_INLINE MatStructure __pyx_f_8slepc4py_5SLEPc_matstructure(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_PetscINCREF(PetscObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(PetscObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_BV_Sizes(PyObject *, PetscInt *, PetscInt *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_iarray_s(PyObject *, PetscInt *, PetscScalar **); /*proto*/ static CYTHON_INLINE struct PyPetscMatObject *__pyx_f_8slepc4py_5SLEPc_ref_Mat(Mat); /*proto*/ static CYTHON_INLINE struct PySlepcNEPObject *__pyx_f_8slepc4py_5SLEPc_ref_NEP(NEP); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_NEP_Function(NEP, PetscScalar, Mat, Mat, void *); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian(NEP, PetscScalar, Mat, void *); /*proto*/ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_setref(void *, void *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcST_New(ST); /*proto*/ static ST __pyx_f_8slepc4py_5SLEPc_PySlepcST_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New(BV); /*proto*/ static BV __pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New(DS); /*proto*/ static DS __pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New(FN); /*proto*/ static FN __pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New(RG); /*proto*/ static RG __pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New(EPS); /*proto*/ static EPS __pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New(SVD); /*proto*/ static SVD __pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New(PEP); /*proto*/ static PEP __pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New(NEP); /*proto*/ static NEP __pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New(MFN); /*proto*/ static MFN __pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get(PyObject *); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_initialize(PyObject *); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_register(char *); /*proto*/ static void __pyx_f_8slepc4py_5SLEPc_finalize(void); /*proto*/ #define __Pyx_MODULE_NAME "slepc4py.SLEPc" int __pyx_module_is_main_slepc4py__SLEPc = 0; /* Implementation of 'slepc4py.SLEPc' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static const char __pyx_k_A[] = "A"; static const char __pyx_k_B[] = "B"; static const char __pyx_k_C[] = "C"; static const char __pyx_k_D[] = "D"; static const char __pyx_k_F[] = "F"; static const char __pyx_k_J[] = "J"; static const char __pyx_k_P[] = "P"; static const char __pyx_k_Q[] = "Q"; static const char __pyx_k_R[] = "R"; static const char __pyx_k_T[] = "T"; static const char __pyx_k_U[] = "U"; static const char __pyx_k_V[] = "V"; static const char __pyx_k_W[] = "W"; static const char __pyx_k_X[] = "X"; static const char __pyx_k_Y[] = "Y"; static const char __pyx_k_Z[] = "Z"; static const char __pyx_k_a[] = "a"; static const char __pyx_k_b[] = "b"; static const char __pyx_k_c[] = "c"; static const char __pyx_k_d[] = "d"; static const char __pyx_k_f[] = "f"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_j[] = "j"; static const char __pyx_k_k[] = "k"; static const char __pyx_k_l[] = "l"; static const char __pyx_k_m[] = "m"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_q[] = "q"; static const char __pyx_k_s[] = "s"; static const char __pyx_k_t[] = "t"; static const char __pyx_k_v[] = "v"; static const char __pyx_k_w[] = "w"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_y[] = "y"; static const char __pyx_k_Au[] = "Au"; static const char __pyx_k_Bu[] = "Bu"; static const char __pyx_k_Dl[] = "Dl"; static const char __pyx_k_Dr[] = "Dr"; static const char __pyx_k_GD[] = "GD"; static const char __pyx_k_GS[] = "GS"; static const char __pyx_k_JD[] = "JD"; static const char __pyx_k_VT[] = "VT"; static const char __pyx_k_Vi[] = "Vi"; static const char __pyx_k_Vr[] = "Vr"; static const char __pyx_k__2[] = "\n"; static const char __pyx_k_bv[] = "bv"; static const char __pyx_k_ds[] = "ds"; static const char __pyx_k_fn[] = "fn"; static const char __pyx_k_ld[] = "ld"; static const char __pyx_k_rg[] = "rg"; static const char __pyx_k_st[] = "st"; static const char __pyx_k_ABS[] = "ABS"; static const char __pyx_k_ADD[] = "ADD"; static const char __pyx_k_ALL[] = "ALL"; static const char __pyx_k_CGS[] = "CGS"; static const char __pyx_k_EXP[] = "EXP"; static const char __pyx_k_HEP[] = "HEP"; static const char __pyx_k_LOG[] = "LOG"; static const char __pyx_k_MAT[] = "MAT"; static const char __pyx_k_MBE[] = "MBE"; static const char __pyx_k_MGS[] = "MGS"; static const char __pyx_k_NEP[] = "NEP"; static const char __pyx_k_PEP[] = "PEP"; static const char __pyx_k_PHI[] = "PHI"; static const char __pyx_k_RAW[] = "RAW"; static const char __pyx_k_REL[] = "REL"; static const char __pyx_k_RII[] = "RII"; static const char __pyx_k_SLP[] = "SLP"; static const char __pyx_k_SVD[] = "SVD"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_eps[] = "eps"; static const char __pyx_k_eta[] = "eta"; static const char __pyx_k_ext[] = "ext"; static const char __pyx_k_its[] = "its"; static const char __pyx_k_ksp[] = "ksp"; static const char __pyx_k_lag[] = "lag"; static const char __pyx_k_mat[] = "mat"; static const char __pyx_k_mpd[] = "mpd"; static const char __pyx_k_ncv[] = "ncv"; static const char __pyx_k_nev[] = "nev"; static const char __pyx_k_nsv[] = "nsv"; static const char __pyx_k_ref[] = "ref"; static const char __pyx_k_seq[] = "seq"; static const char __pyx_k_tau[] = "tau"; static const char __pyx_k_tol[] = "tol"; static const char __pyx_k_BOTH[] = "BOTH"; static const char __pyx_k_CHOL[] = "CHOL"; static const char __pyx_k_CISS[] = "CISS"; static const char __pyx_k_COPY[] = "COPY"; static const char __pyx_k_Conv[] = "Conv"; static const char __pyx_k_FULL[] = "FULL"; static const char __pyx_k_GHEP[] = "GHEP"; static const char __pyx_k_NHEP[] = "NHEP"; static const char __pyx_k_NONE[] = "NONE"; static const char __pyx_k_NORM[] = "NORM"; static const char __pyx_k_RING[] = "RING"; static const char __pyx_k_RITZ[] = "RITZ"; static const char __pyx_k_RQCG[] = "RQCG"; static const char __pyx_k_SQRT[] = "SQRT"; static const char __pyx_k_SVEC[] = "SVEC"; static const char __pyx_k_TOAR[] = "TOAR"; static const char __pyx_k_Type[] = "Type"; static const char __pyx_k_USER[] = "USER"; static const char __pyx_k_VECS[] = "VECS"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_beta[] = "beta"; static const char __pyx_k_comm[] = "comm"; static const char __pyx_k_comp[] = "comp"; static const char __pyx_k_conv[] = "conv"; static const char __pyx_k_date[] = "date"; static const char __pyx_k_flag[] = "flag"; static const char __pyx_k_inta[] = "inta"; static const char __pyx_k_intb[] = "intb"; static const char __pyx_k_keep[] = "keep"; static const char __pyx_k_lbda[] = "lbda"; static const char __pyx_k_lock[] = "lock"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_meth[] = "meth"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_orth[] = "orth"; static const char __pyx_k_type[] = "type"; static const char __pyx_k_Basis[] = "Basis"; static const char __pyx_k_CROSS[] = "CROSS"; static const char __pyx_k_Error[] = "Error"; static const char __pyx_k_FEAST[] = "FEAST"; static const char __pyx_k_GHIEP[] = "GHIEP"; static const char __pyx_k_GNHEP[] = "GNHEP"; static const char __pyx_k_LOCAL[] = "LOCAL"; static const char __pyx_k_NEVER[] = "NEVER"; static const char __pyx_k_POWER[] = "POWER"; static const char __pyx_k_SCHUR[] = "SCHUR"; static const char __pyx_k_SHELL[] = "SHELL"; static const char __pyx_k_SHIFT[] = "SHIFT"; static const char __pyx_k_STOAR[] = "STOAR"; static const char __pyx_k_Scale[] = "Scale"; static const char __pyx_k_TRLAN[] = "TRLAN"; static const char __pyx_k_Which[] = "Which"; static const char __pyx_k_alpha[] = "alpha"; static const char __pyx_k_basis[] = "basis"; static const char __pyx_k_block[] = "block"; static const char __pyx_k_cform[] = "cform"; static const char __pyx_k_devel[] = "devel"; static const char __pyx_k_etype[] = "etype"; static const char __pyx_k_getBV[] = "getBV"; static const char __pyx_k_getST[] = "getST"; static const char __pyx_k_indef[] = "indef"; static const char __pyx_k_kargs[] = "kargs"; static const char __pyx_k_major[] = "major"; static const char __pyx_k_maxit[] = "maxit"; static const char __pyx_k_minor[] = "minor"; static const char __pyx_k_npart[] = "npart"; static const char __pyx_k_nrest[] = "nrest"; static const char __pyx_k_patch[] = "patch"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_ready[] = "ready"; static const char __pyx_k_scale[] = "scale"; static const char __pyx_k_setBV[] = "setBV"; static const char __pyx_k_setST[] = "setST"; static const char __pyx_k_setUp[] = "setUp"; static const char __pyx_k_shift[] = "shift"; static const char __pyx_k_sizes[] = "sizes"; static const char __pyx_k_space[] = "space"; static const char __pyx_k_split[] = "split"; static const char __pyx_k_state[] = "state"; static const char __pyx_k_strip[] = "strip"; static const char __pyx_k_which[] = "which"; static const char __pyx_k_ALWAYS[] = "ALWAYS"; static const char __pyx_k_ARPACK[] = "ARPACK"; static const char __pyx_k_BLOPEX[] = "BLOPEX"; static const char __pyx_k_BVType[] = "BVType"; static const char __pyx_k_CAYLEY[] = "CAYLEY"; static const char __pyx_k_CYCLIC[] = "CYCLIC"; static const char __pyx_k_DECIDE[] = "DECIDE"; static const char __pyx_k_DIVIDE[] = "DIVIDE"; static const char __pyx_k_DSType[] = "DSType"; static const char __pyx_k_FNType[] = "FNType"; static const char __pyx_k_KRYLOV[] = "KRYLOV"; static const char __pyx_k_LAPACK[] = "LAPACK"; static const char __pyx_k_LINEAR[] = "LINEAR"; static const char __pyx_k_LOBPCG[] = "LOBPCG"; static const char __pyx_k_NLEIGS[] = "NLEIGS"; static const char __pyx_k_PGNHEP[] = "PGNHEP"; static const char __pyx_k_PRIMME[] = "PRIMME"; static const char __pyx_k_RGType[] = "RGType"; static const char __pyx_k_Refine[] = "Refine"; static const char __pyx_k_SCALAR[] = "SCALAR"; static const char __pyx_k_SIMPLE[] = "SIMPLE"; static const char __pyx_k_STType[] = "STType"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_author[] = "author"; static const char __pyx_k_center[] = "center"; static const char __pyx_k_create[] = "create"; static const char __pyx_k_cutoff[] = "cutoff"; static const char __pyx_k_decode[] = "decode"; static const char __pyx_k_detect[] = "detect"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_getKSP[] = "getKSP"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_max_it[] = "max_it"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_object[] = "object"; static const char __pyx_k_prefix[] = "prefix"; static const char __pyx_k_radius[] = "radius"; static const char __pyx_k_refine[] = "refine"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_scheme[] = "scheme"; static const char __pyx_k_setKSP[] = "setKSP"; static const char __pyx_k_subint[] = "subint"; static const char __pyx_k_target[] = "target"; static const char __pyx_k_viewer[] = "viewer"; static const char __pyx_k_vscale[] = "vscale"; static const char __pyx_k_ARNOLDI[] = "ARNOLDI"; static const char __pyx_k_BLZPACK[] = "BLZPACK"; static const char __pyx_k_BV_type[] = "\n BV type\n "; static const char __pyx_k_Balance[] = "Balance"; static const char __pyx_k_COMBINE[] = "COMBINE"; static const char __pyx_k_COMPOSE[] = "COMPOSE"; static const char __pyx_k_DEFAULT[] = "DEFAULT"; static const char __pyx_k_DELAYED[] = "DELAYED"; static const char __pyx_k_DS_type[] = "\n DS type\n "; static const char __pyx_k_ELLIPSE[] = "ELLIPSE"; static const char __pyx_k_EPSConv[] = "EPSConv"; static const char __pyx_k_EPSType[] = "EPSType"; static const char __pyx_k_EXPOKIT[] = "EXPOKIT"; static const char __pyx_k_Extract[] = "Extract"; static const char __pyx_k_FN_type[] = "\n FN type\n "; static const char __pyx_k_GENERAL[] = "GENERAL"; static const char __pyx_k_HERMITE[] = "HERMITE"; static const char __pyx_k_INPLACE[] = "INPLACE"; static const char __pyx_k_INVSQRT[] = "INVSQRT"; static const char __pyx_k_LANCZOS[] = "LANCZOS"; static const char __pyx_k_LARGEST[] = "LARGEST"; static const char __pyx_k_MFNType[] = "MFNType"; static const char __pyx_k_MatMode[] = "MatMode"; static const char __pyx_k_MatType[] = "MatType"; static const char __pyx_k_NEPType[] = "NEPType"; static const char __pyx_k_ONESIDE[] = "ONESIDE"; static const char __pyx_k_PARTIAL[] = "PARTIAL"; static const char __pyx_k_PEPConv[] = "PEPConv"; static const char __pyx_k_PEPType[] = "PEPType"; static const char __pyx_k_POLYGON[] = "POLYGON"; static const char __pyx_k_PRECOND[] = "PRECOND"; static const char __pyx_k_REFINED[] = "REFINED"; static const char __pyx_k_RG_type[] = "\n RG type\n "; static const char __pyx_k_SINVERT[] = "SINVERT"; static const char __pyx_k_SVDType[] = "SVDType"; static const char __pyx_k_TWOSIDE[] = "TWOSIDE"; static const char __pyx_k_balance[] = "balance"; static const char __pyx_k_bv_type[] = "bv_type"; static const char __pyx_k_delayed[] = "delayed"; static const char __pyx_k_ds_type[] = "ds_type"; static const char __pyx_k_fn_type[] = "fn_type"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_release[] = "release"; static const char __pyx_k_rg_type[] = "rg_type"; static const char __pyx_k_setType[] = "setType"; static const char __pyx_k_st_type[] = "st_type"; static const char __pyx_k_trueres[] = "trueres"; static const char __pyx_k_ABSOLUTE[] = "ABSOLUTE"; static const char __pyx_k_BACKWARD[] = "BACKWARD"; static const char __pyx_k_CONSTANT[] = "CONSTANT"; static const char __pyx_k_DIAGONAL[] = "DIAGONAL"; static const char __pyx_k_EPSWhich[] = "EPSWhich"; static const char __pyx_k_EXPLICIT[] = "EXPLICIT"; static const char __pyx_k_HARMONIC[] = "HARMONIC"; static const char __pyx_k_IFNEEDED[] = "IFNEEDED"; static const char __pyx_k_INTERPOL[] = "INTERPOL"; static const char __pyx_k_INTERVAL[] = "INTERVAL"; static const char __pyx_k_LAGUERRE[] = "LAGUERRE"; static const char __pyx_k_LEGENDRE[] = "LEGENDRE"; static const char __pyx_k_MONOMIAL[] = "MONOMIAL"; static const char __pyx_k_MULTIPLE[] = "MULTIPLE"; static const char __pyx_k_MULTIPLY[] = "MULTIPLY"; static const char __pyx_k_NARNOLDI[] = "NARNOLDI"; static const char __pyx_k_NEPWhich[] = "NEPWhich"; static const char __pyx_k_PEPBasis[] = "PEPBasis"; static const char __pyx_k_PEPScale[] = "PEPScale"; static const char __pyx_k_PEPWhich[] = "PEPWhich"; static const char __pyx_k_PERIODIC[] = "PERIODIC"; static const char __pyx_k_QARNOLDI[] = "QARNOLDI"; static const char __pyx_k_RATIONAL[] = "RATIONAL"; static const char __pyx_k_RAYLEIGH[] = "RAYLEIGH"; static const char __pyx_k_RELATIVE[] = "RELATIVE"; static const char __pyx_k_RESIDUAL[] = "RESIDUAL"; static const char __pyx_k_SMALLEST[] = "SMALLEST"; static const char __pyx_k_SUBSPACE[] = "SUBSPACE"; static const char __pyx_k_SVDWhich[] = "SVDWhich"; static const char __pyx_k_eps_type[] = "eps_type"; static const char __pyx_k_finalize[] = "_finalize"; static const char __pyx_k_function[] = "function"; static const char __pyx_k_getShift[] = "getShift"; static const char __pyx_k_globalup[] = "globalup"; static const char __pyx_k_jacobian[] = "jacobian"; static const char __pyx_k_mfn_type[] = "mfn_type"; static const char __pyx_k_nep_type[] = "nep_type"; static const char __pyx_k_pep_type[] = "pep_type"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_reorthog[] = "reorthog"; static const char __pyx_k_setArray[] = "setArray"; static const char __pyx_k_setShift[] = "setShift"; static const char __pyx_k_setSizes[] = "setSizes"; static const char __pyx_k_subminor[] = "subminor"; static const char __pyx_k_svd_type[] = "svd_type"; static const char __pyx_k_trackall[] = "trackall"; static const char __pyx_k_BlockType[] = "BlockType"; static const char __pyx_k_COMM_NULL[] = "COMM_NULL"; static const char __pyx_k_COMM_SELF[] = "COMM_SELF"; static const char __pyx_k_CONDENSED[] = "CONDENSED"; static const char __pyx_k_DETERMINE[] = "DETERMINE"; static const char __pyx_k_DSMatType[] = "DSMatType"; static const char __pyx_k_ErrorType[] = "ErrorType"; static const char __pyx_k_HERMITIAN[] = "HERMITIAN"; static const char __pyx_k_ITERATING[] = "ITERATING"; static const char __pyx_k_NEPRefine[] = "NEPRefine"; static const char __pyx_k_PEPRefine[] = "PEPRefine"; static const char __pyx_k_SELECTIVE[] = "SELECTIVE"; static const char __pyx_k_STMatMode[] = "STMatMode"; static const char __pyx_k_StateType[] = "StateType"; static const char __pyx_k_TRLANCZOS[] = "TRLANCZOS"; static const char __pyx_k_TRUNCATED[] = "TRUNCATED"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_WILKINSON[] = "WILKINSON"; static const char __pyx_k_getTarget[] = "getTarget"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_norm_type[] = "norm_type"; static const char __pyx_k_operators[] = "operators"; static const char __pyx_k_setTarget[] = "setTarget"; static const char __pyx_k_structure[] = "structure"; static const char __pyx_k_CHEBYSHEV1[] = "CHEBYSHEV1"; static const char __pyx_k_CHEBYSHEV2[] = "CHEBYSHEV2"; static const char __pyx_k_COMM_WORLD[] = "COMM_WORLD"; static const char __pyx_k_CONTIGUOUS[] = "CONTIGUOUS"; static const char __pyx_k_EPSBalance[] = "EPSBalance"; static const char __pyx_k_Extraction[] = "Extraction"; static const char __pyx_k_GYROSCOPIC[] = "GYROSCOPIC"; static const char __pyx_k_OrthogType[] = "OrthogType"; static const char __pyx_k_PEPExtract[] = "PEPExtract"; static const char __pyx_k_RefineType[] = "RefineType"; static const char __pyx_k_STRUCTURED[] = "STRUCTURED"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_authorinfo[] = "authorinfo"; static const char __pyx_k_extraction[] = "extraction"; static const char __pyx_k_getMatMode[] = "getMatMode"; static const char __pyx_k_getVersion[] = "getVersion"; static const char __pyx_k_initialize[] = "_initialize"; static const char __pyx_k_iterations[] = "iterations"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_setMatMode[] = "setMatMode"; static const char __pyx_k_CombineType[] = "CombineType"; static const char __pyx_k_DSStateType[] = "DSStateType"; static const char __pyx_k_KRYLOVSCHUR[] = "KRYLOVSCHUR"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_ProblemType[] = "ProblemType"; static const char __pyx_k_TARGET_REAL[] = "TARGET_REAL"; static const char __pyx_k_createDense[] = "createDense"; static const char __pyx_k_ghostUpdate[] = "ghostUpdate"; static const char __pyx_k_BVOrthogType[] = "BVOrthogType"; static const char __pyx_k_DIVERGED_ITS[] = "DIVERGED_ITS"; static const char __pyx_k_EPSErrorType[] = "EPSErrorType"; static const char __pyx_k_INTERMEDIATE[] = "INTERMEDIATE"; static const char __pyx_k_LARGEST_REAL[] = "LARGEST_REAL"; static const char __pyx_k_NEPErrorType[] = "NEPErrorType"; static const char __pyx_k_PEPErrorType[] = "PEPErrorType"; static const char __pyx_k_RefineScheme[] = "RefineScheme"; static const char __pyx_k_SVDErrorType[] = "SVDErrorType"; static const char __pyx_k_problem_type[] = "problem_type"; static const char __pyx_k_CONVERGED_ITS[] = "CONVERGED_ITS"; static const char __pyx_k_CONVERGED_TOL[] = "CONVERGED_TOL"; static const char __pyx_k_EPSExtraction[] = "EPSExtraction"; static const char __pyx_k_FNCombineType[] = "FNCombineType"; static const char __pyx_k_SMALLEST_REAL[] = "SMALLEST_REAL"; static const char __pyx_k_getExtraction[] = "getExtraction"; static const char __pyx_k_getTolerances[] = "getTolerances"; static const char __pyx_k_setExtraction[] = "setExtraction"; static const char __pyx_k_setTolerances[] = "setTolerances"; static const char __pyx_k_CONVERGED_USER[] = "CONVERGED_USER"; static const char __pyx_k_EPSProblemType[] = "EPSProblemType"; static const char __pyx_k_HARMONIC_RIGHT[] = "HARMONIC_RIGHT"; static const char __pyx_k_PEPProblemType[] = "PEPProblemType"; static const char __pyx_k_PowerShiftType[] = "PowerShiftType"; static const char __pyx_k_getProblemType[] = "getProblemType"; static const char __pyx_k_getVersionInfo[] = "getVersionInfo"; static const char __pyx_k_petsc4py_PETSc[] = "petsc4py.PETSc"; static const char __pyx_k_setProblemType[] = "setProblemType"; static const char __pyx_k_slepc4py_SLEPc[] = "slepc4py.SLEPc"; static const char __pyx_k_ConvergedReason[] = "ConvergedReason"; static const char __pyx_k_NEPRefineScheme[] = "NEPRefineScheme"; static const char __pyx_k_OrthogBlockType[] = "OrthogBlockType"; static const char __pyx_k_PEPRefineScheme[] = "PEPRefineScheme"; static const char __pyx_k_HARMONIC_LARGEST[] = "HARMONIC_LARGEST"; static const char __pyx_k_OrthogRefineType[] = "OrthogRefineType"; static const char __pyx_k_REFINED_HARMONIC[] = "REFINED_HARMONIC"; static const char __pyx_k_TARGET_IMAGINARY[] = "TARGET_IMAGINARY"; static const char __pyx_k_TARGET_MAGNITUDE[] = "TARGET_MAGNITUDE"; static const char __pyx_k_getActiveColumns[] = "getActiveColumns"; static const char __pyx_k_getTransposeMode[] = "getTransposeMode"; static const char __pyx_k_setTransposeMode[] = "setTransposeMode"; static const char __pyx_k_BVOrthogBlockType[] = "BVOrthogBlockType"; static const char __pyx_k_EPSPowerShiftType[] = "EPSPowerShiftType"; static const char __pyx_k_HARMONIC_RELATIVE[] = "HARMONIC_RELATIVE"; static const char __pyx_k_LARGEST_IMAGINARY[] = "LARGEST_IMAGINARY"; static const char __pyx_k_LARGEST_MAGNITUDE[] = "LARGEST_MAGNITUDE"; static const char __pyx_k_BVOrthogRefineType[] = "BVOrthogRefineType"; static const char __pyx_k_DIVERGED_BREAKDOWN[] = "DIVERGED_BREAKDOWN"; static const char __pyx_k_EPSConvergedReason[] = "EPSConvergedReason"; static const char __pyx_k_MFNConvergedReason[] = "MFNConvergedReason"; static const char __pyx_k_NEPConvergedReason[] = "NEPConvergedReason"; static const char __pyx_k_PEPConvergedReason[] = "PEPConvergedReason"; static const char __pyx_k_SMALLEST_IMAGINARY[] = "SMALLEST_IMAGINARY"; static const char __pyx_k_SMALLEST_MAGNITUDE[] = "SMALLEST_MAGNITUDE"; static const char __pyx_k_SVDConvergedReason[] = "SVDConvergedReason"; static const char __pyx_k_getWhichEigenpairs[] = "getWhichEigenpairs"; static const char __pyx_k_setWhichEigenpairs[] = "setWhichEigenpairs"; static const char __pyx_k_CONVERGED_ITERATING[] = "CONVERGED_ITERATING"; static const char __pyx_k_LanczosReorthogType[] = "LanczosReorthogType"; static const char __pyx_k_setOrthogonalization[] = "setOrthogonalization"; static const char __pyx_k_DIVERGED_LINEAR_SOLVE[] = "DIVERGED_LINEAR_SOLVE"; static const char __pyx_k_DIVERGED_SYMMETRY_LOST[] = "DIVERGED_SYMMETRY_LOST"; static const char __pyx_k_EPSLanczosReorthogType[] = "EPSLanczosReorthogType"; static const char __pyx_k_getWhichSingularTriplets[] = "getWhichSingularTriplets"; static const char __pyx_k_setWhichSingularTriplets[] = "setWhichSingularTriplets"; static const char __pyx_k_BV_orthogonalization_types_CGS[] = "\n BV orthogonalization types\n\n - `CGS`: Classical Gram-Schmidt.\n - `MGS`: Modified Gram-Schmidt.\n "; static const char __pyx_k_EPS_problem_type_HEP_Hermitian[] = "\n EPS problem type\n\n - `HEP`: Hermitian eigenproblem.\n - `NHEP`: Non-Hermitian eigenproblem.\n - `GHEP`: Generalized Hermitian eigenproblem.\n - `GNHEP`: Generalized Non-Hermitian eigenproblem.\n - `PGNHEP`: Generalized Non-Hermitian eigenproblem\n with positive definite ``B``.\n - `GHIEP`: Generalized Hermitian-indefinite eigenproblem.\n "; static const char __pyx_k_EPS_type_of_balancing_used_for[] = "\n EPS type of balancing used for non-Hermitian problems\n\n - `NONE`: None.\n - `ONESIDE`: One-sided eigensolver, only right eigenvectors.\n - `TWOSIDE`: Two-sided eigensolver, right and left eigenvectors.\n - `USER`: User-defined.\n "; static const char __pyx_k_BV_block_orthogonalization_type[] = "\n BV block-orthogonalization types\n\n - `GS`: Gram-Schmidt.\n - `CHOL`: Cholesky.\n "; static const char __pyx_k_BV_orthogonalization_refinement[] = "\n BV orthogonalization refinement types\n\n - `IFNEEDED`: Reorthogonalize if a criterion is satisfied.\n - `NEVER`: Never reorthogonalize.\n - `ALWAYS`: Always reorthogonalize.\n "; static const char __pyx_k_DS_state_types_RAW_Not_processe[] = "\n DS state types\n\n - `RAW`: Not processed yet.\n - `INTERMEDIATE`: Reduced to Hessenberg or tridiagonal form (or equivalent).\n - `CONDENSED`: Reduced to Schur or diagonal form (or equivalent).\n - `TRUNCATED`: Condensed form truncated to a smaller size.\n "; static const char __pyx_k_EPS_Lanczos_reorthogonalization[] = "\n EPS Lanczos reorthogonalization type\n\n - `LOCAL`:\n - `FULL`:\n - `SELECTIVE`:\n - `PERIODIC`:\n - `PARTIAL`:\n - `DELAYED`:\n "; static const char __pyx_k_EPS_Power_shift_type_CONSTANT_R[] = "\n EPS Power shift type.\n\n - `CONSTANT`:\n - `RAYLEIGH`:\n - `WILKINSON`:\n "; static const char __pyx_k_EPS_convergence_reasons_CONVERG[] = "\n EPS convergence reasons\n\n - `CONVERGED_TOL`:\n - `CONVERGED_USER`:\n - `DIVERGED_ITS`:\n - `DIVERGED_BREAKDOWN`:\n - `DIVERGED_SYMMETRY_LOST`:\n - `CONVERGED_ITERATING`:\n "; static const char __pyx_k_EPS_convergence_test_ABS_REL_NO[] = "\n EPS convergence test\n\n - `ABS`:\n - `REL`:\n - `NORM`:\n - `USER`:\n "; static const char __pyx_k_EPS_desired_piece_of_spectrum_L[] = "\n EPS desired piece of spectrum\n\n - `LARGEST_MAGNITUDE`: Largest magnitude (default).\n - `LARGEST_REAL`: Largest real parts.\n - `LARGEST_IMAGINARY`: Largest imaginary parts in magnitude.\n - `SMALLEST_MAGNITUDE`: Smallest magnitude.\n - `SMALLEST_REAL`: Smallest real parts.\n - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude.\n - `TARGET_MAGNITUDE`: Closest to target (in magnitude).\n - `TARGET_REAL`: Real part closest to target.\n - `TARGET_IMAGINARY`: Imaginary part closest to target.\n - `ALL`: All eigenvalues in an interval.\n - `USER`: User defined ordering.\n "; static const char __pyx_k_EPS_error_type_to_assess_accura[] = "\n EPS error type to assess accuracy of computed solutions\n\n - `ABSOLUTE`: Absolute error.\n - `RELATIVE`: Relative error.\n - `BACKWARD`: Backward error.\n "; static const char __pyx_k_EPS_extraction_technique_RITZ_S[] = "\n EPS extraction technique\n\n - `RITZ`: Standard Rayleigh-Ritz extraction.\n - `HARMONIC`: Harmonic extraction.\n - `HARMONIC_RELATIVE`: Harmonic extraction relative to the eigenvalue.\n - `HARMONIC_RIGHT`: Harmonic extraction for rightmost eigenvalues.\n - `HARMONIC_LARGEST`: Harmonic extraction for largest magnitude (without target).\n - `REFINED`: Refined extraction.\n - `REFINED_HARMONIC`: Refined harmonic extraction.\n "; static const char __pyx_k_EPS_type_Native_sparse_eigensol[] = "\n EPS type\n\n Native sparse eigensolvers.\n\n - `POWER`: Power Iteration, Inverse Iteration, RQI.\n - `SUBSPACE`: Subspace Iteration.\n - `ARNOLDI`: Arnoldi.\n - `LANCZOS`: Lanczos.\n - `KRYLOVSCHUR`: Krylov-Schur (default).\n - `GD`: Generalized Davidson.\n - `JD`: Jacobi-Davidson.\n - `RQCG`: Rayleigh Quotient Conjugate Gradient.\n - `LOBPCG`: Locally Optimal Block Preconditioned Conjugate Gradient.\n - `CISS`: Contour Integral Spectrum Slicing.\n - `LAPACK`: Wrappers to dense eigensolvers in Lapack.\n\n Wrappers to sparse eigensolvers\n (should be enabled during installation of SLEPc)\n\n - `ARPACK`:\n - `BLZPACK`:\n - `TRLAN`:\n - `BLOPEX`:\n - `PRIMME`:\n - `FEAST`:\n "; static const char __pyx_k_Extraction_strategy_used_to_obt[] = "\n Extraction strategy used to obtain eigenvectors of the PEP from the\n eigenvectors of the linearization\n\n - `NONE`: Use the first block.\n - `NORM`: Use the first or last block depending on norm of H.\n - `RESIDUAL`: Use the block with smallest residual.\n - `STRUCTURED`: Combine all blocks in a certain way.\n "; static const char __pyx_k_FN_type_of_combination_of_child[] = "\n FN type of combination of child functions\n\n - `ADD`: Addition f(x) = f1(x)+f2(x)\n - `MULTIPLY`: Multiplication f(x) = f1(x)*f2(x)\n - `DIVIDE`: Division f(x) = f1(x)/f2(x)\n - `COMPOSE`: Composition f(x) = f2(f1(x))\n "; static const char __pyx_k_MFN_type_Action_of_a_matrix_fun[] = "\n MFN type\n\n Action of a matrix function on a vector.\n\n - `KRYLOV`: Restarted Krylov solver.\n - `EXPOKIT`: Implementation of the method in Expokit.\n "; static const char __pyx_k_NEP_error_type_to_assess_accura[] = "\n NEP error type to assess accuracy of computed solutions\n\n - `ABSOLUTE`: Absolute error.\n - `RELATIVE`: Relative error.\n - `BACKWARD`: Backward error.\n "; static const char __pyx_k_NEP_refinement_strategy_NONE_No[] = "\n NEP refinement strategy\n\n - `NONE`: No refinement.\n - `SIMPLE`: Refine eigenpairs one by one.\n - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).\n "; static const char __pyx_k_NEP_type_Nonlinear_eigensolvers[] = "\n NEP type\n\n Nonlinear eigensolvers.\n\n - `RII`: Residual inverse iteration.\n - `SLP`: Successive linear problems.\n - `NARNOLDI`: Nonlinear Arnoldi.\n - `CISS`: Contour integral spectrum slice.\n - `INTERPOL`: Polynomial interpolation.\n - `NLEIGS`: Fully rational Krylov method for nonlinear eigenproblems.\n "; static const char __pyx_k_PEP_convergence_reasons_CONVERG[] = "\n PEP convergence reasons\n\n - `CONVERGED_TOL`:\n - `CONVERGED_USER`:\n - `DIVERGED_ITS`:\n - `DIVERGED_BREAKDOWN`:\n - `DIVERGED_SYMMETRY_LOST`:\n - `CONVERGED_ITERATING`:\n "; static const char __pyx_k_PEP_convergence_test_ABS_REL_NO[] = "\n PEP convergence test\n\n - `ABS`:\n - `REL`:\n - `NORM`:\n - `USER`:\n "; static const char __pyx_k_PEP_desired_part_of_spectrum_LA[] = "\n PEP desired part of spectrum\n\n - `LARGEST_MAGNITUDE`: Largest magnitude (default).\n - `LARGEST_REAL`: Largest real parts.\n - `LARGEST_IMAGINARY`: Largest imaginary parts in magnitude.\n - `SMALLEST_MAGNITUDE`: Smallest magnitude.\n - `SMALLEST_REAL`: Smallest real parts.\n - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude.\n - `TARGET_MAGNITUDE`: Closest to target (in magnitude).\n - `TARGET_REAL`: Real part closest to target.\n - `TARGET_IMAGINARY`: Imaginary part closest to target.\n - `USER`: User-defined criterion.\n "; static const char __pyx_k_PEP_error_type_to_assess_accura[] = "\n PEP error type to assess accuracy of computed solutions\n\n - `ABSOLUTE`: Absolute error.\n - `RELATIVE`: Relative error.\n - `BACKWARD`: Backward error.\n "; static const char __pyx_k_PEP_problem_type_GENERAL_No_str[] = "\n PEP problem type\n\n - `GENERAL`: No structure.\n - `HERMITIAN`: Hermitian structure.\n - `GYROSCOPIC`: Hamiltonian structure.\n "; static const char __pyx_k_PEP_refinement_strategy_NONE_No[] = "\n PEP refinement strategy\n\n - `NONE`: No refinement.\n - `SIMPLE`: Refine eigenpairs one by one.\n - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).\n "; static const char __pyx_k_PEP_scaling_strategy_NONE_No_sc[] = "\n PEP scaling strategy\n\n - `NONE`: No scaling.\n - `SCALAR`: Parameter scaling.\n - `DIAGONAL`: Diagonal scaling.\n - `BOTH`: Both parameter and diagonal scaling.\n "; static const char __pyx_k_PEP_type_Polynomial_eigensolver[] = "\n PEP type\n\n Polynomial eigensolvers.\n\n - `LINEAR`: Linearization via EPS.\n - `QARNOLDI`: Q-Arnoldi for quadratic problems.\n - `TOAR`: Two-level orthogonal Arnoldi.\n - `STOAR`: Symmetric TOAR.\n - `JD`: Polynomial Jacobi-Davidson.\n "; static const char __pyx_k_ST_matrix_mode_COPY_A_working_c[] = "\n ST matrix mode\n\n - `COPY`: A working copy of the matrix is created.\n - `INPLACE`: The operation is computed in-place.\n - `SHELL`: The matrix ``A-sigma*B`` is handled as an\n implicit matrix.\n "; static const char __pyx_k_ST_types_SHELL_User_defined_SHI[] = "\n ST types\n\n - `SHELL`: User-defined.\n - `SHIFT`: Shift from origin.\n - `SINVERT`: Shift-and-invert.\n - `CAYLEY`: Cayley transform.\n - `PRECOND`: Preconditioner.\n "; static const char __pyx_k_SVD_convergence_reasons_CONVERG[] = "\n SVD convergence reasons\n\n - `CONVERGED_TOL`:\n - `CONVERGED_USER`:\n - `DIVERGED_ITS`:\n - `DIVERGED_BREAKDOWN`:\n - `CONVERGED_ITERATING`:\n "; static const char __pyx_k_SVD_desired_piece_of_spectrum_L[] = "\n SVD desired piece of spectrum\n\n - `LARGEST`: largest singular values.\n - `SMALLEST`: smallest singular values.\n "; static const char __pyx_k_SVD_error_type_to_assess_accura[] = "\n SVD error type to assess accuracy of computed solutions\n\n - `ABSOLUTE`: Absolute error.\n - `RELATIVE`: Relative error.\n "; static const char __pyx_k_SVD_types_CROSS_Eigenproblem_wi[] = "\n SVD types\n\n - `CROSS`: Eigenproblem with the cross-product matrix.\n - `CYCLIC`: Eigenproblem with the cyclic matrix.\n - `LAPACK`: Wrappers to dense SVD solvers in Lapack.\n - `LANCZOS`: Lanczos.\n - `TRLANCZOS`: Thick-restart Lanczos.\n "; static const char __pyx_k_Scalable_Library_for_Eigenvalue[] = "\nScalable Library for Eigenvalue Problem Computations.\n"; static const char __pyx_k_Scheme_for_solving_linear_syste[] = "\n Scheme for solving linear systems during iterative refinement\n\n - `SCHUR`: Schur complement.\n - `MBE`: Mixed block elimination.\n - `EXPLICIT`: Build the explicit matrix.\n "; static const char __pyx_k_To_refer_to_one_of_the_matrices[] = "\n To refer to one of the matrices stored internally in DS\n\n - `A`: first matrix of eigenproblem/singular value problem.\n - `B`: second matrix of a generalized eigenproblem.\n - `C`: third matrix of a quadratic eigenproblem.\n - `T`: tridiagonal matrix.\n - `D`: diagonal matrix.\n - `Q`: orthogonal matrix of (right) Schur vectors.\n - `Z`: orthogonal matrix of left Schur vectors.\n - `X`: right eigenvectors.\n - `Y`: left eigenvectors.\n - `U`: left singular vectors.\n - `VT`: right singular vectors.\n - `W`: workspace matrix.\n "; static const char __pyx_k_home_dalcinl_Devel_slepc4py_dev[] = "/home/dalcinl/Devel/slepc4py-dev/src/SLEPc/SLEPc.pyx"; static const char __pyx_k_local_and_global_sizes_cannot_be[] = "local and global sizes cannot be both 'DECIDE'"; static PyObject *__pyx_n_s_A; static PyObject *__pyx_n_s_ABS; static PyObject *__pyx_n_s_ABSOLUTE; static PyObject *__pyx_n_s_ADD; static PyObject *__pyx_n_s_ALL; static PyObject *__pyx_n_s_ALWAYS; static PyObject *__pyx_n_s_ARNOLDI; static PyObject *__pyx_n_s_ARPACK; static PyObject *__pyx_n_s_Au; static PyObject *__pyx_n_s_B; static PyObject *__pyx_n_s_BACKWARD; static PyObject *__pyx_n_s_BLOPEX; static PyObject *__pyx_n_s_BLZPACK; static PyObject *__pyx_n_s_BOTH; static PyObject *__pyx_n_s_BVOrthogBlockType; static PyObject *__pyx_n_s_BVOrthogRefineType; static PyObject *__pyx_n_s_BVOrthogType; static PyObject *__pyx_n_s_BVType; static PyObject *__pyx_kp_s_BV_block_orthogonalization_type; static PyObject *__pyx_kp_s_BV_orthogonalization_refinement; static PyObject *__pyx_kp_s_BV_orthogonalization_types_CGS; static PyObject *__pyx_kp_s_BV_type; static PyObject *__pyx_n_s_Balance; static PyObject *__pyx_n_s_Basis; static PyObject *__pyx_n_s_BlockType; static PyObject *__pyx_n_s_Bu; static PyObject *__pyx_n_s_C; static PyObject *__pyx_n_s_CAYLEY; static PyObject *__pyx_n_s_CGS; static PyObject *__pyx_n_s_CHEBYSHEV1; static PyObject *__pyx_n_s_CHEBYSHEV2; static PyObject *__pyx_n_s_CHOL; static PyObject *__pyx_n_s_CISS; static PyObject *__pyx_n_s_COMBINE; static PyObject *__pyx_n_s_COMM_NULL; static PyObject *__pyx_n_s_COMM_SELF; static PyObject *__pyx_n_s_COMM_WORLD; static PyObject *__pyx_n_s_COMPOSE; static PyObject *__pyx_n_s_CONDENSED; static PyObject *__pyx_n_s_CONSTANT; static PyObject *__pyx_n_s_CONTIGUOUS; static PyObject *__pyx_n_s_CONVERGED_ITERATING; static PyObject *__pyx_n_s_CONVERGED_ITS; static PyObject *__pyx_n_s_CONVERGED_TOL; static PyObject *__pyx_n_s_CONVERGED_USER; static PyObject *__pyx_n_s_COPY; static PyObject *__pyx_n_s_CROSS; static PyObject *__pyx_n_s_CYCLIC; static PyObject *__pyx_n_s_CombineType; static PyObject *__pyx_n_s_Conv; static PyObject *__pyx_n_s_ConvergedReason; static PyObject *__pyx_n_s_D; static PyObject *__pyx_n_s_DECIDE; static PyObject *__pyx_n_s_DEFAULT; static PyObject *__pyx_n_s_DELAYED; static PyObject *__pyx_n_s_DETERMINE; static PyObject *__pyx_n_s_DIAGONAL; static PyObject *__pyx_n_s_DIVERGED_BREAKDOWN; static PyObject *__pyx_n_s_DIVERGED_ITS; static PyObject *__pyx_n_s_DIVERGED_LINEAR_SOLVE; static PyObject *__pyx_n_s_DIVERGED_SYMMETRY_LOST; static PyObject *__pyx_n_s_DIVIDE; static PyObject *__pyx_n_s_DSMatType; static PyObject *__pyx_n_s_DSStateType; static PyObject *__pyx_n_s_DSType; static PyObject *__pyx_kp_s_DS_state_types_RAW_Not_processe; static PyObject *__pyx_kp_s_DS_type; static PyObject *__pyx_n_s_Dl; static PyObject *__pyx_n_s_Dr; static PyObject *__pyx_n_s_ELLIPSE; static PyObject *__pyx_n_s_EPSBalance; static PyObject *__pyx_n_s_EPSConv; static PyObject *__pyx_n_s_EPSConvergedReason; static PyObject *__pyx_n_s_EPSErrorType; static PyObject *__pyx_n_s_EPSExtraction; static PyObject *__pyx_n_s_EPSLanczosReorthogType; static PyObject *__pyx_n_s_EPSPowerShiftType; static PyObject *__pyx_n_s_EPSProblemType; static PyObject *__pyx_n_s_EPSType; static PyObject *__pyx_n_s_EPSWhich; static PyObject *__pyx_kp_s_EPS_Lanczos_reorthogonalization; static PyObject *__pyx_kp_s_EPS_Power_shift_type_CONSTANT_R; static PyObject *__pyx_kp_s_EPS_convergence_reasons_CONVERG; static PyObject *__pyx_kp_s_EPS_convergence_test_ABS_REL_NO; static PyObject *__pyx_kp_s_EPS_desired_piece_of_spectrum_L; static PyObject *__pyx_kp_s_EPS_error_type_to_assess_accura; static PyObject *__pyx_kp_s_EPS_extraction_technique_RITZ_S; static PyObject *__pyx_kp_s_EPS_problem_type_HEP_Hermitian; static PyObject *__pyx_kp_s_EPS_type_Native_sparse_eigensol; static PyObject *__pyx_kp_s_EPS_type_of_balancing_used_for; static PyObject *__pyx_n_s_EXP; static PyObject *__pyx_n_s_EXPLICIT; static PyObject *__pyx_n_s_EXPOKIT; static PyObject *__pyx_n_s_Error; static PyObject *__pyx_n_s_ErrorType; static PyObject *__pyx_n_s_Extract; static PyObject *__pyx_n_s_Extraction; static PyObject *__pyx_kp_s_Extraction_strategy_used_to_obt; static PyObject *__pyx_n_s_F; static PyObject *__pyx_n_s_FEAST; static PyObject *__pyx_n_s_FNCombineType; static PyObject *__pyx_n_s_FNType; static PyObject *__pyx_kp_s_FN_type; static PyObject *__pyx_kp_s_FN_type_of_combination_of_child; static PyObject *__pyx_n_s_FULL; static PyObject *__pyx_n_s_GD; static PyObject *__pyx_n_s_GENERAL; static PyObject *__pyx_n_s_GHEP; static PyObject *__pyx_n_s_GHIEP; static PyObject *__pyx_n_s_GNHEP; static PyObject *__pyx_n_s_GS; static PyObject *__pyx_n_s_GYROSCOPIC; static PyObject *__pyx_n_s_HARMONIC; static PyObject *__pyx_n_s_HARMONIC_LARGEST; static PyObject *__pyx_n_s_HARMONIC_RELATIVE; static PyObject *__pyx_n_s_HARMONIC_RIGHT; static PyObject *__pyx_n_s_HEP; static PyObject *__pyx_n_s_HERMITE; static PyObject *__pyx_n_s_HERMITIAN; static PyObject *__pyx_n_s_IFNEEDED; static PyObject *__pyx_n_s_INPLACE; static PyObject *__pyx_n_s_INTERMEDIATE; static PyObject *__pyx_n_s_INTERPOL; static PyObject *__pyx_n_s_INTERVAL; static PyObject *__pyx_n_s_INVSQRT; static PyObject *__pyx_n_s_ITERATING; static PyObject *__pyx_n_s_J; static PyObject *__pyx_n_s_JD; static PyObject *__pyx_n_s_KRYLOV; static PyObject *__pyx_n_s_KRYLOVSCHUR; static PyObject *__pyx_n_s_LAGUERRE; static PyObject *__pyx_n_s_LANCZOS; static PyObject *__pyx_n_s_LAPACK; static PyObject *__pyx_n_s_LARGEST; static PyObject *__pyx_n_s_LARGEST_IMAGINARY; static PyObject *__pyx_n_s_LARGEST_MAGNITUDE; static PyObject *__pyx_n_s_LARGEST_REAL; static PyObject *__pyx_n_s_LEGENDRE; static PyObject *__pyx_n_s_LINEAR; static PyObject *__pyx_n_s_LOBPCG; static PyObject *__pyx_n_s_LOCAL; static PyObject *__pyx_n_s_LOG; static PyObject *__pyx_n_s_LanczosReorthogType; static PyObject *__pyx_n_s_MAT; static PyObject *__pyx_n_s_MBE; static PyObject *__pyx_n_s_MFNConvergedReason; static PyObject *__pyx_n_s_MFNType; static PyObject *__pyx_kp_s_MFN_type_Action_of_a_matrix_fun; static PyObject *__pyx_n_s_MGS; static PyObject *__pyx_n_s_MONOMIAL; static PyObject *__pyx_n_s_MULTIPLE; static PyObject *__pyx_n_s_MULTIPLY; static PyObject *__pyx_n_s_MatMode; static PyObject *__pyx_n_s_MatType; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_NARNOLDI; static PyObject *__pyx_n_s_NEP; static PyObject *__pyx_n_s_NEPConvergedReason; static PyObject *__pyx_n_s_NEPErrorType; static PyObject *__pyx_n_s_NEPRefine; static PyObject *__pyx_n_s_NEPRefineScheme; static PyObject *__pyx_n_s_NEPType; static PyObject *__pyx_n_s_NEPWhich; static PyObject *__pyx_kp_s_NEP_error_type_to_assess_accura; static PyObject *__pyx_kp_s_NEP_refinement_strategy_NONE_No; static PyObject *__pyx_kp_s_NEP_type_Nonlinear_eigensolvers; static PyObject *__pyx_n_s_NEVER; static PyObject *__pyx_n_s_NHEP; static PyObject *__pyx_n_s_NLEIGS; static PyObject *__pyx_n_s_NONE; static PyObject *__pyx_n_s_NORM; static PyObject *__pyx_n_s_ONESIDE; static PyObject *__pyx_n_s_OrthogBlockType; static PyObject *__pyx_n_s_OrthogRefineType; static PyObject *__pyx_n_s_OrthogType; static PyObject *__pyx_n_s_P; static PyObject *__pyx_n_s_PARTIAL; static PyObject *__pyx_n_s_PEP; static PyObject *__pyx_n_s_PEPBasis; static PyObject *__pyx_n_s_PEPConv; static PyObject *__pyx_n_s_PEPConvergedReason; static PyObject *__pyx_n_s_PEPErrorType; static PyObject *__pyx_n_s_PEPExtract; static PyObject *__pyx_n_s_PEPProblemType; static PyObject *__pyx_n_s_PEPRefine; static PyObject *__pyx_n_s_PEPRefineScheme; static PyObject *__pyx_n_s_PEPScale; static PyObject *__pyx_n_s_PEPType; static PyObject *__pyx_n_s_PEPWhich; static PyObject *__pyx_kp_s_PEP_convergence_reasons_CONVERG; static PyObject *__pyx_kp_s_PEP_convergence_test_ABS_REL_NO; static PyObject *__pyx_kp_s_PEP_desired_part_of_spectrum_LA; static PyObject *__pyx_kp_s_PEP_error_type_to_assess_accura; static PyObject *__pyx_kp_s_PEP_problem_type_GENERAL_No_str; static PyObject *__pyx_kp_s_PEP_refinement_strategy_NONE_No; static PyObject *__pyx_kp_s_PEP_scaling_strategy_NONE_No_sc; static PyObject *__pyx_kp_s_PEP_type_Polynomial_eigensolver; static PyObject *__pyx_n_s_PERIODIC; static PyObject *__pyx_n_s_PGNHEP; static PyObject *__pyx_n_s_PHI; static PyObject *__pyx_n_s_POLYGON; static PyObject *__pyx_n_s_POWER; static PyObject *__pyx_n_s_PRECOND; static PyObject *__pyx_n_s_PRIMME; static PyObject *__pyx_n_s_PowerShiftType; static PyObject *__pyx_n_s_ProblemType; static PyObject *__pyx_n_s_Q; static PyObject *__pyx_n_s_QARNOLDI; static PyObject *__pyx_n_s_R; static PyObject *__pyx_n_s_RATIONAL; static PyObject *__pyx_n_s_RAW; static PyObject *__pyx_n_s_RAYLEIGH; static PyObject *__pyx_n_s_REFINED; static PyObject *__pyx_n_s_REFINED_HARMONIC; static PyObject *__pyx_n_s_REL; static PyObject *__pyx_n_s_RELATIVE; static PyObject *__pyx_n_s_RESIDUAL; static PyObject *__pyx_n_s_RGType; static PyObject *__pyx_kp_s_RG_type; static PyObject *__pyx_n_s_RII; static PyObject *__pyx_n_s_RING; static PyObject *__pyx_n_s_RITZ; static PyObject *__pyx_n_s_RQCG; static PyObject *__pyx_n_s_Refine; static PyObject *__pyx_n_s_RefineScheme; static PyObject *__pyx_n_s_RefineType; static PyObject *__pyx_n_s_SCALAR; static PyObject *__pyx_n_s_SCHUR; static PyObject *__pyx_n_s_SELECTIVE; static PyObject *__pyx_n_s_SHELL; static PyObject *__pyx_n_s_SHIFT; static PyObject *__pyx_n_s_SIMPLE; static PyObject *__pyx_n_s_SINVERT; static PyObject *__pyx_n_s_SLP; static PyObject *__pyx_n_s_SMALLEST; static PyObject *__pyx_n_s_SMALLEST_IMAGINARY; static PyObject *__pyx_n_s_SMALLEST_MAGNITUDE; static PyObject *__pyx_n_s_SMALLEST_REAL; static PyObject *__pyx_n_s_SQRT; static PyObject *__pyx_n_s_STMatMode; static PyObject *__pyx_n_s_STOAR; static PyObject *__pyx_n_s_STRUCTURED; static PyObject *__pyx_n_s_STType; static PyObject *__pyx_kp_s_ST_matrix_mode_COPY_A_working_c; static PyObject *__pyx_kp_s_ST_types_SHELL_User_defined_SHI; static PyObject *__pyx_n_s_SUBSPACE; static PyObject *__pyx_n_s_SVD; static PyObject *__pyx_n_s_SVDConvergedReason; static PyObject *__pyx_n_s_SVDErrorType; static PyObject *__pyx_n_s_SVDType; static PyObject *__pyx_n_s_SVDWhich; static PyObject *__pyx_kp_s_SVD_convergence_reasons_CONVERG; static PyObject *__pyx_kp_s_SVD_desired_piece_of_spectrum_L; static PyObject *__pyx_kp_s_SVD_error_type_to_assess_accura; static PyObject *__pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi; static PyObject *__pyx_n_s_SVEC; static PyObject *__pyx_kp_s_Scalable_Library_for_Eigenvalue; static PyObject *__pyx_n_s_Scale; static PyObject *__pyx_kp_s_Scheme_for_solving_linear_syste; static PyObject *__pyx_n_s_StateType; static PyObject *__pyx_n_s_T; static PyObject *__pyx_n_s_TARGET_IMAGINARY; static PyObject *__pyx_n_s_TARGET_MAGNITUDE; static PyObject *__pyx_n_s_TARGET_REAL; static PyObject *__pyx_n_s_TOAR; static PyObject *__pyx_n_s_TRLAN; static PyObject *__pyx_n_s_TRLANCZOS; static PyObject *__pyx_n_s_TRUNCATED; static PyObject *__pyx_n_s_TWOSIDE; static PyObject *__pyx_kp_s_To_refer_to_one_of_the_matrices; static PyObject *__pyx_n_s_Type; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_U; static PyObject *__pyx_n_s_USER; static PyObject *__pyx_n_s_V; static PyObject *__pyx_n_s_VECS; static PyObject *__pyx_n_s_VT; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_Vi; static PyObject *__pyx_n_s_Vr; static PyObject *__pyx_n_s_W; static PyObject *__pyx_n_s_WILKINSON; static PyObject *__pyx_n_s_Which; static PyObject *__pyx_n_s_X; static PyObject *__pyx_n_s_Y; static PyObject *__pyx_n_s_Z; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_n_s_a; static PyObject *__pyx_n_s_alpha; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_author; static PyObject *__pyx_n_s_authorinfo; static PyObject *__pyx_n_s_b; static PyObject *__pyx_n_s_balance; static PyObject *__pyx_n_s_basis; static PyObject *__pyx_n_s_beta; static PyObject *__pyx_n_s_block; static PyObject *__pyx_n_s_bv; static PyObject *__pyx_n_s_bv_type; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_s_center; static PyObject *__pyx_n_s_cform; static PyObject *__pyx_n_s_comm; static PyObject *__pyx_n_s_comp; static PyObject *__pyx_n_s_conv; static PyObject *__pyx_n_s_create; static PyObject *__pyx_n_s_createDense; static PyObject *__pyx_n_s_cutoff; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_s_date; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_delayed; static PyObject *__pyx_n_s_detect; static PyObject *__pyx_n_s_devel; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_ds; static PyObject *__pyx_n_s_ds_type; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_eps; static PyObject *__pyx_n_s_eps_type; static PyObject *__pyx_n_s_eta; static PyObject *__pyx_n_s_etype; static PyObject *__pyx_n_s_ext; static PyObject *__pyx_n_s_extraction; static PyObject *__pyx_n_s_f; static PyObject *__pyx_n_s_finalize; static PyObject *__pyx_n_s_flag; static PyObject *__pyx_n_s_fn; static PyObject *__pyx_n_s_fn_type; static PyObject *__pyx_n_s_function; static PyObject *__pyx_n_s_getActiveColumns; static PyObject *__pyx_n_s_getBV; static PyObject *__pyx_n_s_getExtraction; static PyObject *__pyx_n_s_getKSP; static PyObject *__pyx_n_s_getMatMode; static PyObject *__pyx_n_s_getProblemType; static PyObject *__pyx_n_s_getST; static PyObject *__pyx_n_s_getShift; static PyObject *__pyx_n_s_getTarget; static PyObject *__pyx_n_s_getTolerances; static PyObject *__pyx_n_s_getTransposeMode; static PyObject *__pyx_n_s_getVersion; static PyObject *__pyx_n_s_getVersionInfo; static PyObject *__pyx_n_s_getWhichEigenpairs; static PyObject *__pyx_n_s_getWhichSingularTriplets; static PyObject *__pyx_n_s_ghostUpdate; static PyObject *__pyx_n_s_globalup; static PyObject *__pyx_kp_s_home_dalcinl_Devel_slepc4py_dev; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_indef; static PyObject *__pyx_n_s_initialize; static PyObject *__pyx_n_s_inta; static PyObject *__pyx_n_s_intb; static PyObject *__pyx_n_s_iterations; static PyObject *__pyx_n_s_its; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_jacobian; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_kargs; static PyObject *__pyx_n_s_keep; static PyObject *__pyx_n_s_ksp; static PyObject *__pyx_n_s_l; static PyObject *__pyx_n_s_lag; static PyObject *__pyx_n_s_lbda; static PyObject *__pyx_n_s_ld; static PyObject *__pyx_kp_s_local_and_global_sizes_cannot_be; static PyObject *__pyx_n_s_lock; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_major; static PyObject *__pyx_n_s_mat; static PyObject *__pyx_n_s_max_it; static PyObject *__pyx_n_s_maxit; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_meth; static PyObject *__pyx_n_s_mfn_type; static PyObject *__pyx_n_s_minor; static PyObject *__pyx_n_s_mode; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_mpd; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_ncv; static PyObject *__pyx_n_s_nep_type; static PyObject *__pyx_n_s_nev; static PyObject *__pyx_n_s_norm_type; static PyObject *__pyx_n_s_npart; static PyObject *__pyx_n_s_nrest; static PyObject *__pyx_n_s_nsv; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_operators; static PyObject *__pyx_n_s_orth; static PyObject *__pyx_n_s_patch; static PyObject *__pyx_n_s_pep_type; static PyObject *__pyx_n_s_petsc4py_PETSc; static PyObject *__pyx_n_s_prefix; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_problem_type; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_q; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_radius; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_ready; static PyObject *__pyx_n_s_ref; static PyObject *__pyx_n_s_refine; static PyObject *__pyx_n_s_release; static PyObject *__pyx_n_s_reorthog; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_rg; static PyObject *__pyx_n_s_rg_type; static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_scale; static PyObject *__pyx_n_s_scheme; static PyObject *__pyx_n_s_seq; static PyObject *__pyx_n_s_setArray; static PyObject *__pyx_n_s_setBV; static PyObject *__pyx_n_s_setExtraction; static PyObject *__pyx_n_s_setKSP; static PyObject *__pyx_n_s_setMatMode; static PyObject *__pyx_n_s_setOrthogonalization; static PyObject *__pyx_n_s_setProblemType; static PyObject *__pyx_n_s_setST; static PyObject *__pyx_n_s_setShift; static PyObject *__pyx_n_s_setSizes; static PyObject *__pyx_n_s_setTarget; static PyObject *__pyx_n_s_setTolerances; static PyObject *__pyx_n_s_setTransposeMode; static PyObject *__pyx_n_s_setType; static PyObject *__pyx_n_s_setUp; static PyObject *__pyx_n_s_setWhichEigenpairs; static PyObject *__pyx_n_s_setWhichSingularTriplets; static PyObject *__pyx_n_s_shift; static PyObject *__pyx_n_s_sizes; static PyObject *__pyx_n_s_slepc4py_SLEPc; static PyObject *__pyx_n_s_space; static PyObject *__pyx_n_s_split; static PyObject *__pyx_n_s_st; static PyObject *__pyx_n_s_st_type; static PyObject *__pyx_n_s_state; static PyObject *__pyx_n_s_strip; static PyObject *__pyx_n_s_structure; static PyObject *__pyx_n_s_subint; static PyObject *__pyx_n_s_subminor; static PyObject *__pyx_n_s_svd_type; static PyObject *__pyx_n_s_t; static PyObject *__pyx_n_s_target; static PyObject *__pyx_n_s_tau; static PyObject *__pyx_n_s_tol; static PyObject *__pyx_n_s_trackall; static PyObject *__pyx_n_s_trueres; static PyObject *__pyx_n_s_type; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_viewer; static PyObject *__pyx_n_s_vscale; static PyObject *__pyx_n_s_w; static PyObject *__pyx_n_s_which; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_y; static int __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self); /* proto */ static void __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_patch, PyObject *__pyx_v_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(CYTHON_UNUSED PyTypeObject *__pyx_v_cls); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_2view(struct PySlepcSTObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_6reset(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8create(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_10setType(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_st_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_12getType(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_shift); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_structure); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(struct PySlepcSTObject *__pyx_v_self, struct PyPetscKSPObject *__pyx_v_ksp); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44apply(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_tau); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_2view(struct PySlepcBVObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_6create(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10copy(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_result); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_12setType(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_bv_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14getType(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_m); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_w, PyObject *__pyx_v_m); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_refine, PyObject *__pyx_v_eta, PyObject *__pyx_v_block); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_mat, int __pyx_v_indef); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_alpha); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_44scale(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_s, PyObject *__pyx_v_W, int __pyx_v_orth); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_56dot(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta, struct PyPetscVecObject *__pyx_v_y, PyObject *__pyx_v_q); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_norm_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_68norm(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_norm_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_R, PyObject *__pyx_v_kargs); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_2view(struct PySlepcDSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_6reset(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_8create(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_10setType(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ds_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_12getType(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ld); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_24setState(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_26getState(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_m, PyObject *__pyx_v_l, PyObject *__pyx_v_k); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_meth); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comp); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ext); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ref); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(struct PySlepcDSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_2view(struct PySlepcFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_6create(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_8setType(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_fn_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_10getType(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(struct PySlepcFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_2view(struct PySlepcRGObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_6create(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_8setType(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_rg_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_10getType(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comp); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_radius, PyObject *__pyx_v_vscale); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(struct PySlepcRGObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2view(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_8create(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_eps_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_problem_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_balance, PyObject *__pyx_v_iterations, PyObject *__pyx_v_cutoff); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_extraction); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_inta, PyObject *__pyx_v_intb); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trueres); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_shift); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_reorthog); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_keep); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_lock); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_npart); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_detect); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_V); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_a, struct PyPetscMatObject *__pyx_v_Au, PyObject *__pyx_v_t, PyObject *__pyx_v_b, struct PyPetscMatObject *__pyx_v_Bu, PyObject *__pyx_v_structure, PyObject *__pyx_v_globalup); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_subint); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nrest); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2view(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_8create(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_svd_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_nsv, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_V, struct PySlepcBVObject *__pyx_v_U); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_2view(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_8create(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_pep_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_basis); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_problem_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_alpha, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr, PyObject *__pyx_v_its, PyObject *__pyx_v_lbda); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_cform); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_2view(struct PySlepcNEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_8create(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nep_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxit); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_lag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_function, struct PyPetscMatObject *__pyx_v_F, struct PyPetscMatObject *__pyx_v_P, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_jacobian, struct PyPetscMatObject *__pyx_v_J, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_A, PyObject *__pyx_v_f, PyObject *__pyx_v_structure); /* proto */ static int __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_2view(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_8create(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_mfn_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_ncv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcFNObject *__pyx_v_fn); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_b, struct PyPetscVecObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(struct PySlepcMFNObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc__initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2_finalize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_ST(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_BV(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_DS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_FN(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_RG(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_EPS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_SVD(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_PEP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_NEP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_MFN(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc__p_mem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_Sys(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_float_1_0; static PyObject *__pyx_int_0; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_codeobj__7; static PyObject *__pyx_codeobj__8; /* "SLEPc/SLEPc.pyx":26 * ctypedef char const_char "const char" * * cdef inline object bytes2str(const_char p[]): # <<<<<<<<<<<<<< * if p == NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_bytes2str(const char *__pyx_v_p) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("bytes2str", 0); /* "SLEPc/SLEPc.pyx":27 * * cdef inline object bytes2str(const_char p[]): * if p == NULL: # <<<<<<<<<<<<<< * return None * cdef bytes s = p */ __pyx_t_1 = ((__pyx_v_p == NULL) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":28 * cdef inline object bytes2str(const_char p[]): * if p == NULL: * return None # <<<<<<<<<<<<<< * cdef bytes s = p * if isinstance(s, str): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":27 * * cdef inline object bytes2str(const_char p[]): * if p == NULL: # <<<<<<<<<<<<<< * return None * cdef bytes s = p */ } /* "SLEPc/SLEPc.pyx":29 * if p == NULL: * return None * cdef bytes s = p # <<<<<<<<<<<<<< * if isinstance(s, str): * return s */ __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)__pyx_v_p)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_s = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":30 * return None * cdef bytes s = p * if isinstance(s, str): # <<<<<<<<<<<<<< * return s * else: */ __pyx_t_1 = PyString_Check(__pyx_v_s); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "SLEPc/SLEPc.pyx":31 * cdef bytes s = p * if isinstance(s, str): * return s # <<<<<<<<<<<<<< * else: * return s.decode() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":30 * return None * cdef bytes s = p * if isinstance(s, str): # <<<<<<<<<<<<<< * return s * else: */ } /* "SLEPc/SLEPc.pyx":33 * return s * else: * return s.decode() # <<<<<<<<<<<<<< * * cdef inline object str2bytes(object s, const_char *p[]): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_s, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "SLEPc/SLEPc.pyx":26 * ctypedef char const_char "const char" * * cdef inline object bytes2str(const_char p[]): # <<<<<<<<<<<<<< * if p == NULL: * return None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.bytes2str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":35 * return s.decode() * * cdef inline object str2bytes(object s, const_char *p[]): # <<<<<<<<<<<<<< * if s is None: * p[0] = NULL */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_str2bytes(PyObject *__pyx_v_s, const char **__pyx_v_p) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; __Pyx_RefNannySetupContext("str2bytes", 0); __Pyx_INCREF(__pyx_v_s); /* "SLEPc/SLEPc.pyx":36 * * cdef inline object str2bytes(object s, const_char *p[]): * if s is None: # <<<<<<<<<<<<<< * p[0] = NULL * return None */ __pyx_t_1 = (__pyx_v_s == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "SLEPc/SLEPc.pyx":37 * cdef inline object str2bytes(object s, const_char *p[]): * if s is None: * p[0] = NULL # <<<<<<<<<<<<<< * return None * if not isinstance(s, bytes): */ (__pyx_v_p[0]) = NULL; /* "SLEPc/SLEPc.pyx":38 * if s is None: * p[0] = NULL * return None # <<<<<<<<<<<<<< * if not isinstance(s, bytes): * s = s.encode() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":36 * * cdef inline object str2bytes(object s, const_char *p[]): * if s is None: # <<<<<<<<<<<<<< * p[0] = NULL * return None */ } /* "SLEPc/SLEPc.pyx":39 * p[0] = NULL * return None * if not isinstance(s, bytes): # <<<<<<<<<<<<<< * s = s.encode() * p[0] = (s) */ __pyx_t_2 = PyBytes_Check(__pyx_v_s); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":40 * return None * if not isinstance(s, bytes): * s = s.encode() # <<<<<<<<<<<<<< * p[0] = (s) * return s */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 40, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SLEPc.pyx":39 * p[0] = NULL * return None * if not isinstance(s, bytes): # <<<<<<<<<<<<<< * s = s.encode() * p[0] = (s) */ } /* "SLEPc/SLEPc.pyx":41 * if not isinstance(s, bytes): * s = s.encode() * p[0] = (s) # <<<<<<<<<<<<<< * return s * */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_s); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(4, 41, __pyx_L1_error) (__pyx_v_p[0]) = ((const char *)((char *)__pyx_t_6)); /* "SLEPc/SLEPc.pyx":42 * s = s.encode() * p[0] = (s) * return s # <<<<<<<<<<<<<< * * cdef inline object S_(const_char p[]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":35 * return s.decode() * * cdef inline object str2bytes(object s, const_char *p[]): # <<<<<<<<<<<<<< * if s is None: * p[0] = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.str2bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":44 * return s * * cdef inline object S_(const_char p[]): # <<<<<<<<<<<<<< * if p == NULL: return None * cdef object s = p */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_S_(const char *__pyx_v_p) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("S_", 0); /* "SLEPc/SLEPc.pyx":45 * * cdef inline object S_(const_char p[]): * if p == NULL: return None # <<<<<<<<<<<<<< * cdef object s = p * return s if isinstance(s, str) else s.decode() */ __pyx_t_1 = ((__pyx_v_p == NULL) != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /* "SLEPc/SLEPc.pyx":46 * cdef inline object S_(const_char p[]): * if p == NULL: return None * cdef object s = p # <<<<<<<<<<<<<< * return s if isinstance(s, str) else s.decode() * */ __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)__pyx_v_p)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_s = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":47 * if p == NULL: return None * cdef object s = p * return s if isinstance(s, str) else s.decode() # <<<<<<<<<<<<<< * * include "allocate.pxi" */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyString_Check(__pyx_v_s); if ((__pyx_t_1 != 0)) { __Pyx_INCREF(__pyx_v_s); __pyx_t_2 = __pyx_v_s; } else { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 47, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":44 * return s * * cdef inline object S_(const_char p[]): # <<<<<<<<<<<<<< * if p == NULL: return None * cdef object s = p */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.S_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/allocate.pxi":13 * cdef class _p_mem: * cdef void *buf * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * def __dealloc__(self): */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/allocate.pxi":14 * cdef void *buf * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * def __dealloc__(self): * PyMem_Free(self.buf) */ __pyx_v_self->buf = NULL; /* "SLEPc/allocate.pxi":13 * cdef class _p_mem: * cdef void *buf * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * def __dealloc__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/allocate.pxi":15 * def __cinit__(self): * self.buf = NULL * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.buf) * */ /* Python wrapper */ static void __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "SLEPc/allocate.pxi":16 * self.buf = NULL * def __dealloc__(self): * PyMem_Free(self.buf) # <<<<<<<<<<<<<< * * cdef inline object allocate(size_t n, void **buf): */ PyMem_Free(__pyx_v_self->buf); /* "SLEPc/allocate.pxi":15 * def __cinit__(self): * self.buf = NULL * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.buf) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "SLEPc/allocate.pxi":18 * PyMem_Free(self.buf) * * cdef inline object allocate(size_t n, void **buf): # <<<<<<<<<<<<<< * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_allocate(size_t __pyx_v_n, void **__pyx_v_buf) { struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_ob = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; void *__pyx_t_4; __Pyx_RefNannySetupContext("allocate", 0); /* "SLEPc/allocate.pxi":19 * * cdef inline object allocate(size_t n, void **buf): * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) # <<<<<<<<<<<<<< * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError */ __pyx_t_1 = __pyx_tp_new_8slepc4py_5SLEPc__p_mem(((PyTypeObject *)__pyx_ptype_8slepc4py_5SLEPc__p_mem), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ob = ((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/allocate.pxi":20 * cdef inline object allocate(size_t n, void **buf): * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) # <<<<<<<<<<<<<< * if ob.buf == NULL: raise MemoryError * if buf != NULL: buf[0] = ob.buf */ __pyx_v_ob->buf = PyMem_Malloc(((size_t)__pyx_v_n)); /* "SLEPc/allocate.pxi":21 * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError # <<<<<<<<<<<<<< * if buf != NULL: buf[0] = ob.buf * return ob */ __pyx_t_3 = ((__pyx_v_ob->buf == NULL) != 0); if (__pyx_t_3) { PyErr_NoMemory(); __PYX_ERR(1, 21, __pyx_L1_error) } /* "SLEPc/allocate.pxi":22 * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError * if buf != NULL: buf[0] = ob.buf # <<<<<<<<<<<<<< * return ob * */ __pyx_t_3 = ((__pyx_v_buf != NULL) != 0); if (__pyx_t_3) { __pyx_t_4 = __pyx_v_ob->buf; (__pyx_v_buf[0]) = __pyx_t_4; } /* "SLEPc/allocate.pxi":23 * if ob.buf == NULL: raise MemoryError * if buf != NULL: buf[0] = ob.buf * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ob)); __pyx_r = ((PyObject *)__pyx_v_ob); goto __pyx_L0; /* "SLEPc/allocate.pxi":18 * PyMem_Free(self.buf) * * cdef inline object allocate(size_t n, void **buf): # <<<<<<<<<<<<<< * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":65 * from petsc4py.PETSc import Error as PetscError * * cdef inline int SETERR(int ierr) with gil: # <<<<<<<<<<<<<< * if (PetscError) != NULL: * PyErr_SetObject(PetscError, ierr) */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SETERR(int __pyx_v_ierr) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("SETERR", 0); /* "SLEPc/SLEPc.pyx":66 * * cdef inline int SETERR(int ierr) with gil: * if (PetscError) != NULL: # <<<<<<<<<<<<<< * PyErr_SetObject(PetscError, ierr) * else: */ __pyx_t_1 = ((((void *)__pyx_v_8slepc4py_5SLEPc_PetscError) != NULL) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":67 * cdef inline int SETERR(int ierr) with gil: * if (PetscError) != NULL: * PyErr_SetObject(PetscError, ierr) # <<<<<<<<<<<<<< * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) */ __pyx_t_2 = __pyx_v_8slepc4py_5SLEPc_PetscError; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); PyErr_SetObject(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SLEPc.pyx":66 * * cdef inline int SETERR(int ierr) with gil: * if (PetscError) != NULL: # <<<<<<<<<<<<<< * PyErr_SetObject(PetscError, ierr) * else: */ goto __pyx_L3; } /* "SLEPc/SLEPc.pyx":69 * PyErr_SetObject(PetscError, ierr) * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) # <<<<<<<<<<<<<< * return ierr * */ /*else*/ { __pyx_t_3 = ((PyObject *)PyExc_RuntimeError); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); PyErr_SetObject(__pyx_t_3, __pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "SLEPc/SLEPc.pyx":70 * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) * return ierr # <<<<<<<<<<<<<< * * cdef inline int CHKERR(int ierr) nogil except -1: */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":65 * from petsc4py.PETSc import Error as PetscError * * cdef inline int SETERR(int ierr) with gil: # <<<<<<<<<<<<<< * if (PetscError) != NULL: * PyErr_SetObject(PetscError, ierr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("slepc4py.SLEPc.SETERR", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/SLEPc.pyx":72 * return ierr * * cdef inline int CHKERR(int ierr) nogil except -1: # <<<<<<<<<<<<<< * if ierr == 0: * return 0 # no error */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_CHKERR(int __pyx_v_ierr) { int __pyx_r; int __pyx_t_1; /* "SLEPc/SLEPc.pyx":73 * * cdef inline int CHKERR(int ierr) nogil except -1: * if ierr == 0: # <<<<<<<<<<<<<< * return 0 # no error * if ierr == PETSC_ERR_PYTHON: */ __pyx_t_1 = ((__pyx_v_ierr == 0) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":74 * cdef inline int CHKERR(int ierr) nogil except -1: * if ierr == 0: * return 0 # no error # <<<<<<<<<<<<<< * if ierr == PETSC_ERR_PYTHON: * return -1 # Python error */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":73 * * cdef inline int CHKERR(int ierr) nogil except -1: * if ierr == 0: # <<<<<<<<<<<<<< * return 0 # no error * if ierr == PETSC_ERR_PYTHON: */ } /* "SLEPc/SLEPc.pyx":75 * if ierr == 0: * return 0 # no error * if ierr == PETSC_ERR_PYTHON: # <<<<<<<<<<<<<< * return -1 # Python error * SETERR(ierr) */ __pyx_t_1 = ((__pyx_v_ierr == (-1)) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":76 * return 0 # no error * if ierr == PETSC_ERR_PYTHON: * return -1 # Python error # <<<<<<<<<<<<<< * SETERR(ierr) * return -1 */ __pyx_r = -1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":75 * if ierr == 0: * return 0 # no error * if ierr == PETSC_ERR_PYTHON: # <<<<<<<<<<<<<< * return -1 # Python error * SETERR(ierr) */ } /* "SLEPc/SLEPc.pyx":77 * if ierr == PETSC_ERR_PYTHON: * return -1 # Python error * SETERR(ierr) # <<<<<<<<<<<<<< * return -1 * */ __pyx_f_8slepc4py_5SLEPc_SETERR(__pyx_v_ierr); /* "SLEPc/SLEPc.pyx":78 * return -1 # Python error * SETERR(ierr) * return -1 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = -1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":72 * return ierr * * cdef inline int CHKERR(int ierr) nogil except -1: # <<<<<<<<<<<<<< * if ierr == 0: * return 0 # no error */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "SLEPc/SLEPc.pyx":96 * PetscScalar PyPetscScalar_AsPetscScalar(object) except* * * cdef inline object toInt(PetscInt value): # <<<<<<<<<<<<<< * return value * cdef inline PetscInt asInt(object value) except? -1: */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toInt(PetscInt __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("toInt", 0); /* "SLEPc/SLEPc.pyx":97 * * cdef inline object toInt(PetscInt value): * return value # <<<<<<<<<<<<<< * cdef inline PetscInt asInt(object value) except? -1: * return value */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PetscInt(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":96 * PetscScalar PyPetscScalar_AsPetscScalar(object) except* * * cdef inline object toInt(PetscInt value): # <<<<<<<<<<<<<< * return value * cdef inline PetscInt asInt(object value) except? -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.toInt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":98 * cdef inline object toInt(PetscInt value): * return value * cdef inline PetscInt asInt(object value) except? -1: # <<<<<<<<<<<<<< * return value * */ static CYTHON_INLINE PetscInt __pyx_f_8slepc4py_5SLEPc_asInt(PyObject *__pyx_v_value) { PetscInt __pyx_r; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; __Pyx_RefNannySetupContext("asInt", 0); /* "SLEPc/SLEPc.pyx":99 * return value * cdef inline PetscInt asInt(object value) except? -1: * return value # <<<<<<<<<<<<<< * * cdef inline object toReal(PetscReal value): */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(4, 99, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":98 * cdef inline object toInt(PetscInt value): * return value * cdef inline PetscInt asInt(object value) except? -1: # <<<<<<<<<<<<<< * return value * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.asInt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1L; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":101 * return value * * cdef inline object toReal(PetscReal value): # <<<<<<<<<<<<<< * return value * cdef inline PetscReal asReal(object value) except? -1: */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toReal(PetscReal __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("toReal", 0); /* "SLEPc/SLEPc.pyx":102 * * cdef inline object toReal(PetscReal value): * return value # <<<<<<<<<<<<<< * cdef inline PetscReal asReal(object value) except? -1: * return value */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":101 * return value * * cdef inline object toReal(PetscReal value): # <<<<<<<<<<<<<< * return value * cdef inline PetscReal asReal(object value) except? -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.toReal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":103 * cdef inline object toReal(PetscReal value): * return value * cdef inline PetscReal asReal(object value) except? -1: # <<<<<<<<<<<<<< * return value * */ static CYTHON_INLINE PetscReal __pyx_f_8slepc4py_5SLEPc_asReal(PyObject *__pyx_v_value) { PetscReal __pyx_r; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; __Pyx_RefNannySetupContext("asReal", 0); /* "SLEPc/SLEPc.pyx":104 * return value * cdef inline PetscReal asReal(object value) except? -1: * return value # <<<<<<<<<<<<<< * * cdef inline object toScalar(PetscScalar value): */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(4, 104, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":103 * cdef inline object toReal(PetscReal value): * return value * cdef inline PetscReal asReal(object value) except? -1: # <<<<<<<<<<<<<< * return value * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.asReal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1.0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":106 * return value * * cdef inline object toScalar(PetscScalar value): # <<<<<<<<<<<<<< * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except*: */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toScalar(PetscScalar __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("toScalar", 0); /* "SLEPc/SLEPc.pyx":107 * * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) # <<<<<<<<<<<<<< * cdef inline PetscScalar asScalar(object value) except*: * return PyPetscScalar_AsPetscScalar(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyPetscScalar_FromPetscScalar(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":106 * return value * * cdef inline object toScalar(PetscScalar value): # <<<<<<<<<<<<<< * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except*: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.toScalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":108 * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except*: # <<<<<<<<<<<<<< * return PyPetscScalar_AsPetscScalar(value) * */ static CYTHON_INLINE PetscScalar __pyx_f_8slepc4py_5SLEPc_asScalar(PyObject *__pyx_v_value) { PetscScalar __pyx_r; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; __Pyx_RefNannySetupContext("asScalar", 0); /* "SLEPc/SLEPc.pyx":109 * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except*: * return PyPetscScalar_AsPetscScalar(value) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_1 = PyPetscScalar_AsPetscScalar(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 109, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":108 * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except*: # <<<<<<<<<<<<<< * return PyPetscScalar_AsPetscScalar(value) * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.asScalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcmpi.pxi":15 * * from petsc4py.PETSc cimport GetComm * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *: # <<<<<<<<<<<<<< * return GetComm(comm, defv) * */ static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_def_Comm(PyObject *__pyx_v_comm, MPI_Comm __pyx_v_defv) { MPI_Comm __pyx_r; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; __Pyx_RefNannySetupContext("def_Comm", 0); /* "SLEPc/slepcmpi.pxi":16 * from petsc4py.PETSc cimport GetComm * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *: * return GetComm(comm, defv) # <<<<<<<<<<<<<< * * from petsc4py.PETSc cimport GetCommDefault */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_GetComm(__pyx_v_comm, __pyx_v_defv); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 16, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/slepcmpi.pxi":15 * * from petsc4py.PETSc cimport GetComm * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *: # <<<<<<<<<<<<<< * return GetComm(comm, defv) * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.def_Comm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcmpi.pxi":19 * * from petsc4py.PETSc cimport GetCommDefault * cdef inline MPI_Comm SLEPC_COMM_DEFAULT(): # <<<<<<<<<<<<<< * return GetCommDefault() * */ static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT(void) { MPI_Comm __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SLEPC_COMM_DEFAULT", 0); /* "SLEPc/slepcmpi.pxi":20 * from petsc4py.PETSc cimport GetCommDefault * cdef inline MPI_Comm SLEPC_COMM_DEFAULT(): * return GetCommDefault() # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_f_8petsc4py_5PETSc_GetCommDefault(); goto __pyx_L0; /* "SLEPc/slepcmpi.pxi":19 * * from petsc4py.PETSc cimport GetCommDefault * cdef inline MPI_Comm SLEPC_COMM_DEFAULT(): # <<<<<<<<<<<<<< * return GetCommDefault() * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcsys.pxi":51 * int SlepcInitializeCalled * * cdef inline PetscMatStructure matstructure(object structure) \ # <<<<<<<<<<<<<< * except (-1): * if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN */ static CYTHON_INLINE MatStructure __pyx_f_8slepc4py_5SLEPc_matstructure(PyObject *__pyx_v_structure) { MatStructure __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MatStructure __pyx_t_3; __Pyx_RefNannySetupContext("matstructure", 0); /* "SLEPc/slepcsys.pxi":53 * cdef inline PetscMatStructure matstructure(object structure) \ * except (-1): * if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN # <<<<<<<<<<<<<< * elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN * elif structure is True: return MAT_SAME_NONZERO_PATTERN */ __pyx_t_1 = (__pyx_v_structure == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = DIFFERENT_NONZERO_PATTERN; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":54 * except (-1): * if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN * elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN # <<<<<<<<<<<<<< * elif structure is True: return MAT_SAME_NONZERO_PATTERN * else: return structure */ __pyx_t_2 = (__pyx_v_structure == Py_False); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_r = DIFFERENT_NONZERO_PATTERN; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":55 * if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN * elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN * elif structure is True: return MAT_SAME_NONZERO_PATTERN # <<<<<<<<<<<<<< * else: return structure * */ __pyx_t_1 = (__pyx_v_structure == Py_True); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = SAME_NONZERO_PATTERN; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":56 * elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN * elif structure is True: return MAT_SAME_NONZERO_PATTERN * else: return structure # <<<<<<<<<<<<<< * * cdef inline int PetscINCREF(PetscObject *obj): */ /*else*/ { __pyx_t_3 = ((MatStructure)__Pyx_PyInt_As_MatStructure(__pyx_v_structure)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 56, __pyx_L1_error) __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":51 * int SlepcInitializeCalled * * cdef inline PetscMatStructure matstructure(object structure) \ # <<<<<<<<<<<<<< * except (-1): * if structure is None: return MAT_DIFFERENT_NONZERO_PATTERN */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.matstructure", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = ((MatStructure)-1L); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcsys.pxi":58 * else: return structure * * cdef inline int PetscINCREF(PetscObject *obj): # <<<<<<<<<<<<<< * if obj == NULL: return 0 * if obj[0] == NULL: return 0 */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_PetscINCREF(PetscObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PetscINCREF", 0); /* "SLEPc/slepcsys.pxi":59 * * cdef inline int PetscINCREF(PetscObject *obj): * if obj == NULL: return 0 # <<<<<<<<<<<<<< * if obj[0] == NULL: return 0 * return PetscObjectReference(obj[0]) */ __pyx_t_1 = ((__pyx_v_obj == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":60 * cdef inline int PetscINCREF(PetscObject *obj): * if obj == NULL: return 0 * if obj[0] == NULL: return 0 # <<<<<<<<<<<<<< * return PetscObjectReference(obj[0]) * */ __pyx_t_1 = (((__pyx_v_obj[0]) == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":61 * if obj == NULL: return 0 * if obj[0] == NULL: return 0 * return PetscObjectReference(obj[0]) # <<<<<<<<<<<<<< * * cdef inline int SlepcCLEAR(PetscObject* obj): */ __pyx_r = PetscObjectReference((__pyx_v_obj[0])); goto __pyx_L0; /* "SLEPc/slepcsys.pxi":58 * else: return structure * * cdef inline int PetscINCREF(PetscObject *obj): # <<<<<<<<<<<<<< * if obj == NULL: return 0 * if obj[0] == NULL: return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcsys.pxi":63 * return PetscObjectReference(obj[0]) * * cdef inline int SlepcCLEAR(PetscObject* obj): # <<<<<<<<<<<<<< * if obj == NULL: return 0 * if obj[0] == NULL: return 0 */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(PetscObject *__pyx_v_obj) { PetscObject __pyx_v_tmp; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("SlepcCLEAR", 0); /* "SLEPc/slepcsys.pxi":64 * * cdef inline int SlepcCLEAR(PetscObject* obj): * if obj == NULL: return 0 # <<<<<<<<<<<<<< * if obj[0] == NULL: return 0 * cdef PetscObject tmp */ __pyx_t_1 = ((__pyx_v_obj == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":65 * cdef inline int SlepcCLEAR(PetscObject* obj): * if obj == NULL: return 0 * if obj[0] == NULL: return 0 # <<<<<<<<<<<<<< * cdef PetscObject tmp * tmp = obj[0]; obj[0] = NULL */ __pyx_t_1 = (((__pyx_v_obj[0]) == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":67 * if obj[0] == NULL: return 0 * cdef PetscObject tmp * tmp = obj[0]; obj[0] = NULL # <<<<<<<<<<<<<< * return PetscObjectDestroy(&tmp) * */ __pyx_v_tmp = (__pyx_v_obj[0]); (__pyx_v_obj[0]) = NULL; /* "SLEPc/slepcsys.pxi":68 * cdef PetscObject tmp * tmp = obj[0]; obj[0] = NULL * return PetscObjectDestroy(&tmp) # <<<<<<<<<<<<<< * * cdef extern from * nogil: */ __pyx_r = PetscObjectDestroy((&__pyx_v_tmp)); goto __pyx_L0; /* "SLEPc/slepcsys.pxi":63 * return PetscObjectReference(obj[0]) * * cdef inline int SlepcCLEAR(PetscObject* obj): # <<<<<<<<<<<<<< * if obj == NULL: return 0 * if obj[0] == NULL: return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcbv.pxi":73 * * * cdef inline int BV_Sizes( # <<<<<<<<<<<<<< * object size, * PetscInt *_n, */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_BV_Sizes(PyObject *__pyx_v_size, PetscInt *__pyx_v__n, PetscInt *__pyx_v__N) { PetscInt __pyx_v_n; PetscInt __pyx_v_N; PyObject *__pyx_v_on = 0; PyObject *__pyx_v_oN = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PetscInt __pyx_t_11; __Pyx_RefNannySetupContext("BV_Sizes", 0); /* "SLEPc/slepcbv.pxi":79 * ) except -1: * # unpack and get local and global sizes * cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE # <<<<<<<<<<<<<< * cdef object on, oN * try: */ __pyx_v_n = PETSC_DECIDE; __pyx_v_N = PETSC_DECIDE; /* "SLEPc/slepcbv.pxi":81 * cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE * cdef object on, oN * try: # <<<<<<<<<<<<<< * on, oN = size * except (TypeError, ValueError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "SLEPc/slepcbv.pxi":82 * cdef object on, oN * try: * on, oN = size # <<<<<<<<<<<<<< * except (TypeError, ValueError): * on = None; oN = size */ if ((likely(PyTuple_CheckExact(__pyx_v_size))) || (PyList_CheckExact(__pyx_v_size))) { PyObject* sequence = __pyx_v_size; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(2, 82, __pyx_L3_error) } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 82, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 82, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 82, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 82, __pyx_L3_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(2, 82, __pyx_L3_error) __pyx_L12_unpacking_done:; } __pyx_v_on = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_oN = __pyx_t_5; __pyx_t_5 = 0; /* "SLEPc/slepcbv.pxi":81 * cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE * cdef object on, oN * try: # <<<<<<<<<<<<<< * on, oN = size * except (TypeError, ValueError): */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/slepcbv.pxi":83 * try: * on, oN = size * except (TypeError, ValueError): # <<<<<<<<<<<<<< * on = None; oN = size * if on is not None: n = asInt(on) */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_8) { __Pyx_AddTraceback("slepc4py.SLEPc.BV_Sizes", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(2, 83, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); /* "SLEPc/slepcbv.pxi":84 * on, oN = size * except (TypeError, ValueError): * on = None; oN = size # <<<<<<<<<<<<<< * if on is not None: n = asInt(on) * if oN is not None: N = asInt(oN) */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_on, Py_None); __Pyx_INCREF(__pyx_v_size); __Pyx_XDECREF_SET(__pyx_v_oN, __pyx_v_size); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "SLEPc/slepcbv.pxi":81 * cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE * cdef object on, oN * try: # <<<<<<<<<<<<<< * on, oN = size * except (TypeError, ValueError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "SLEPc/slepcbv.pxi":85 * except (TypeError, ValueError): * on = None; oN = size * if on is not None: n = asInt(on) # <<<<<<<<<<<<<< * if oN is not None: N = asInt(oN) * if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError( */ __pyx_t_9 = (__pyx_v_on != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { __pyx_t_11 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_on); if (unlikely(__pyx_t_11 == -1L && PyErr_Occurred())) __PYX_ERR(2, 85, __pyx_L1_error) __pyx_v_n = __pyx_t_11; } /* "SLEPc/slepcbv.pxi":86 * on = None; oN = size * if on is not None: n = asInt(on) * if oN is not None: N = asInt(oN) # <<<<<<<<<<<<<< * if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError( * "local and global sizes cannot be both 'DECIDE'") */ __pyx_t_10 = (__pyx_v_oN != Py_None); __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { __pyx_t_11 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_oN); if (unlikely(__pyx_t_11 == -1L && PyErr_Occurred())) __PYX_ERR(2, 86, __pyx_L1_error) __pyx_v_N = __pyx_t_11; } /* "SLEPc/slepcbv.pxi":87 * if on is not None: n = asInt(on) * if oN is not None: N = asInt(oN) * if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError( # <<<<<<<<<<<<<< * "local and global sizes cannot be both 'DECIDE'") * # return result to the caller */ __pyx_t_10 = ((__pyx_v_n == PETSC_DECIDE) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L18_bool_binop_done; } __pyx_t_10 = ((__pyx_v_N == PETSC_DECIDE) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L18_bool_binop_done:; if (__pyx_t_9) { __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(2, 87, __pyx_L1_error) } /* "SLEPc/slepcbv.pxi":90 * "local and global sizes cannot be both 'DECIDE'") * # return result to the caller * if _n != NULL: _n[0] = n # <<<<<<<<<<<<<< * if _N != NULL: _N[0] = N * return 0 */ __pyx_t_9 = ((__pyx_v__n != NULL) != 0); if (__pyx_t_9) { (__pyx_v__n[0]) = __pyx_v_n; } /* "SLEPc/slepcbv.pxi":91 * # return result to the caller * if _n != NULL: _n[0] = n * if _N != NULL: _N[0] = N # <<<<<<<<<<<<<< * return 0 */ __pyx_t_9 = ((__pyx_v__N != NULL) != 0); if (__pyx_t_9) { (__pyx_v__N[0]) = __pyx_v_N; } /* "SLEPc/slepcbv.pxi":92 * if _n != NULL: _n[0] = n * if _N != NULL: _N[0] = N * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepcbv.pxi":73 * * * cdef inline int BV_Sizes( # <<<<<<<<<<<<<< * object size, * PetscInt *_n, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.BV_Sizes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_on); __Pyx_XDECREF(__pyx_v_oN); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcfn.pxi":47 * int FNPhiGetIndex(SlepcFN,PetscInt*) * * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data): # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, n = len(array) * cdef PetscScalar *a = NULL */ static PyObject *__pyx_f_8slepc4py_5SLEPc_iarray_s(PyObject *__pyx_v_array, PetscInt *__pyx_v_size, PetscScalar **__pyx_v_data) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PetscScalar *__pyx_v_a; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PetscScalar __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("iarray_s", 0); /* "SLEPc/slepcfn.pxi":48 * * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data): * cdef Py_ssize_t i = 0, n = len(array) # <<<<<<<<<<<<<< * cdef PetscScalar *a = NULL * cdef object mem = allocate(n*sizeof(PetscScalar),&a) */ __pyx_v_i = 0; __pyx_t_1 = PyObject_Length(__pyx_v_array); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(7, 48, __pyx_L1_error) __pyx_v_n = __pyx_t_1; /* "SLEPc/slepcfn.pxi":49 * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data): * cdef Py_ssize_t i = 0, n = len(array) * cdef PetscScalar *a = NULL # <<<<<<<<<<<<<< * cdef object mem = allocate(n*sizeof(PetscScalar),&a) * for i from 0 <= i < n: a[i] = asScalar(array[i]) */ __pyx_v_a = NULL; /* "SLEPc/slepcfn.pxi":50 * cdef Py_ssize_t i = 0, n = len(array) * cdef PetscScalar *a = NULL * cdef object mem = allocate(n*sizeof(PetscScalar),&a) # <<<<<<<<<<<<<< * for i from 0 <= i < n: a[i] = asScalar(array[i]) * if size != NULL: size[0] = n */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_n * (sizeof(PetscScalar))), ((void **)(&__pyx_v_a))); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_mem = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/slepcfn.pxi":51 * cdef PetscScalar *a = NULL * cdef object mem = allocate(n*sizeof(PetscScalar),&a) * for i from 0 <= i < n: a[i] = asScalar(array[i]) # <<<<<<<<<<<<<< * if size != NULL: size[0] = n * if data != NULL: data[0] = a */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_array, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_a[__pyx_v_i]) = __pyx_t_3; } /* "SLEPc/slepcfn.pxi":52 * cdef object mem = allocate(n*sizeof(PetscScalar),&a) * for i from 0 <= i < n: a[i] = asScalar(array[i]) * if size != NULL: size[0] = n # <<<<<<<<<<<<<< * if data != NULL: data[0] = a * return mem */ __pyx_t_4 = ((__pyx_v_size != NULL) != 0); if (__pyx_t_4) { (__pyx_v_size[0]) = ((PetscInt)__pyx_v_n); } /* "SLEPc/slepcfn.pxi":53 * for i from 0 <= i < n: a[i] = asScalar(array[i]) * if size != NULL: size[0] = n * if data != NULL: data[0] = a # <<<<<<<<<<<<<< * return mem */ __pyx_t_4 = ((__pyx_v_data != NULL) != 0); if (__pyx_t_4) { (__pyx_v_data[0]) = __pyx_v_a; } /* "SLEPc/slepcfn.pxi":54 * if size != NULL: size[0] = n * if data != NULL: data[0] = a * return mem # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "SLEPc/slepcfn.pxi":47 * int FNPhiGetIndex(SlepcFN,PetscInt*) * * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data): # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, n = len(array) * cdef PetscScalar *a = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.iarray_s", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcnep.pxi":116 * # ----------------------------------------------------------------------------- * * cdef inline Mat ref_Mat(PetscMat mat): # <<<<<<<<<<<<<< * cdef Mat ob = Mat() * ob.mat = mat */ static CYTHON_INLINE struct PyPetscMatObject *__pyx_f_8slepc4py_5SLEPc_ref_Mat(Mat __pyx_v_mat) { struct PyPetscMatObject *__pyx_v_ob = 0; struct PyPetscMatObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("ref_Mat", 0); /* "SLEPc/slepcnep.pxi":117 * * cdef inline Mat ref_Mat(PetscMat mat): * cdef Mat ob = Mat() # <<<<<<<<<<<<<< * ob.mat = mat * PetscINCREF(ob.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ob = ((struct PyPetscMatObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/slepcnep.pxi":118 * cdef inline Mat ref_Mat(PetscMat mat): * cdef Mat ob = Mat() * ob.mat = mat # <<<<<<<<<<<<<< * PetscINCREF(ob.obj) * return ob */ __pyx_v_ob->mat = __pyx_v_mat; /* "SLEPc/slepcnep.pxi":119 * cdef Mat ob = Mat() * ob.mat = mat * PetscINCREF(ob.obj) # <<<<<<<<<<<<<< * return ob * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj); /* "SLEPc/slepcnep.pxi":120 * ob.mat = mat * PetscINCREF(ob.obj) * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_ob)); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "SLEPc/slepcnep.pxi":116 * # ----------------------------------------------------------------------------- * * cdef inline Mat ref_Mat(PetscMat mat): # <<<<<<<<<<<<<< * cdef Mat ob = Mat() * ob.mat = mat */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ref_Mat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcnep.pxi":124 * # ----------------------------------------------------------------------------- * * cdef inline NEP ref_NEP(SlepcNEP nep): # <<<<<<<<<<<<<< * cdef NEP ob = NEP() * ob.nep = nep */ static CYTHON_INLINE struct PySlepcNEPObject *__pyx_f_8slepc4py_5SLEPc_ref_NEP(NEP __pyx_v_nep) { struct PySlepcNEPObject *__pyx_v_ob = 0; struct PySlepcNEPObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("ref_NEP", 0); /* "SLEPc/slepcnep.pxi":125 * * cdef inline NEP ref_NEP(SlepcNEP nep): * cdef NEP ob = NEP() # <<<<<<<<<<<<<< * ob.nep = nep * PetscINCREF(ob.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ob = ((struct PySlepcNEPObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/slepcnep.pxi":126 * cdef inline NEP ref_NEP(SlepcNEP nep): * cdef NEP ob = NEP() * ob.nep = nep # <<<<<<<<<<<<<< * PetscINCREF(ob.obj) * return ob */ __pyx_v_ob->nep = __pyx_v_nep; /* "SLEPc/slepcnep.pxi":127 * cdef NEP ob = NEP() * ob.nep = nep * PetscINCREF(ob.obj) # <<<<<<<<<<<<<< * return ob * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj); /* "SLEPc/slepcnep.pxi":128 * ob.nep = nep * PetscINCREF(ob.obj) * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_ob)); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "SLEPc/slepcnep.pxi":124 * # ----------------------------------------------------------------------------- * * cdef inline NEP ref_NEP(SlepcNEP nep): # <<<<<<<<<<<<<< * cdef NEP ob = NEP() * ob.nep = nep */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ref_NEP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcnep.pxi":132 * # ----------------------------------------------------------------------------- * * cdef int NEP_Function( # <<<<<<<<<<<<<< * SlepcNEP nep, * PetscScalar mu, */ static int __pyx_f_8slepc4py_5SLEPc_NEP_Function(NEP __pyx_v_nep, PetscScalar __pyx_v_mu, Mat __pyx_v_A, Mat __pyx_v_B, CYTHON_UNUSED void *__pyx_v_ctx) { struct PySlepcNEPObject *__pyx_v_Nep = 0; struct PyPetscMatObject *__pyx_v_Amat = 0; struct PyPetscMatObject *__pyx_v_Bmat = 0; PyObject *__pyx_v_function = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kargs = NULL; CYTHON_UNUSED PyObject *__pyx_v_retv = NULL; Mat __pyx_v_Atmp; Mat __pyx_v_Btmp; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Mat __pyx_t_7; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("NEP_Function", 0); /* "SLEPc/slepcnep.pxi":139 * void* ctx, * ) except PETSC_ERR_PYTHON with gil: * cdef NEP Nep = ref_NEP(nep) # <<<<<<<<<<<<<< * cdef Mat Amat = ref_Mat(A) * cdef Mat Bmat = ref_Mat(B) */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_NEP(__pyx_v_nep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":140 * ) except PETSC_ERR_PYTHON with gil: * cdef NEP Nep = ref_NEP(nep) * cdef Mat Amat = ref_Mat(A) # <<<<<<<<<<<<<< * cdef Mat Bmat = ref_Mat(B) * (function, args, kargs) = Nep.get_attr('__function__') */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Amat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":141 * cdef NEP Nep = ref_NEP(nep) * cdef Mat Amat = ref_Mat(A) * cdef Mat Bmat = ref_Mat(B) # <<<<<<<<<<<<<< * (function, args, kargs) = Nep.get_attr('__function__') * retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_B)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Bmat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":142 * cdef Mat Amat = ref_Mat(A) * cdef Mat Bmat = ref_Mat(B) * (function, args, kargs) = Nep.get_attr('__function__') # <<<<<<<<<<<<<< * retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) * cdef PetscMat Atmp = NULL, Btmp = NULL */ __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_Nep->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Nep), ((char *)"__function__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(8, 142, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(8, 142, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(8, 142, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_function = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_args = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_kargs = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/slepcnep.pxi":143 * cdef Mat Bmat = ref_Mat(B) * (function, args, kargs) = Nep.get_attr('__function__') * retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) # <<<<<<<<<<<<<< * cdef PetscMat Atmp = NULL, Btmp = NULL * Atmp = A; A = Amat.mat; Amat.mat = Atmp */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_mu); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_Nep)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Nep)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_Nep)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_Amat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Amat)); PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_Amat)); __Pyx_INCREF(((PyObject *)__pyx_v_Bmat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Bmat)); PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_Bmat)); __pyx_t_1 = 0; __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(8, 143, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kargs))) { __pyx_t_1 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_function, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_retv = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/slepcnep.pxi":144 * (function, args, kargs) = Nep.get_attr('__function__') * retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) * cdef PetscMat Atmp = NULL, Btmp = NULL # <<<<<<<<<<<<<< * Atmp = A; A = Amat.mat; Amat.mat = Atmp * Btmp = B; B = Bmat.mat; Bmat.mat = Btmp */ __pyx_v_Atmp = NULL; __pyx_v_Btmp = NULL; /* "SLEPc/slepcnep.pxi":145 * retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs) * cdef PetscMat Atmp = NULL, Btmp = NULL * Atmp = A; A = Amat.mat; Amat.mat = Atmp # <<<<<<<<<<<<<< * Btmp = B; B = Bmat.mat; Bmat.mat = Btmp * return 0 */ __pyx_v_Atmp = __pyx_v_A; __pyx_t_7 = __pyx_v_Amat->mat; __pyx_v_A = __pyx_t_7; __pyx_v_Amat->mat = __pyx_v_Atmp; /* "SLEPc/slepcnep.pxi":146 * cdef PetscMat Atmp = NULL, Btmp = NULL * Atmp = A; A = Amat.mat; Amat.mat = Atmp * Btmp = B; B = Bmat.mat; Bmat.mat = Btmp # <<<<<<<<<<<<<< * return 0 * */ __pyx_v_Btmp = __pyx_v_B; __pyx_t_7 = __pyx_v_Bmat->mat; __pyx_v_B = __pyx_t_7; __pyx_v_Bmat->mat = __pyx_v_Btmp; /* "SLEPc/slepcnep.pxi":147 * Atmp = A; A = Amat.mat; Amat.mat = Atmp * Btmp = B; B = Bmat.mat; Bmat.mat = Btmp * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepcnep.pxi":132 * # ----------------------------------------------------------------------------- * * cdef int NEP_Function( # <<<<<<<<<<<<<< * SlepcNEP nep, * PetscScalar mu, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.NEP_Function", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = (-1); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Nep); __Pyx_XDECREF((PyObject *)__pyx_v_Amat); __Pyx_XDECREF((PyObject *)__pyx_v_Bmat); __Pyx_XDECREF(__pyx_v_function); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XDECREF(__pyx_v_retv); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/slepcnep.pxi":151 * # ----------------------------------------------------------------------------- * * cdef int NEP_Jacobian( # <<<<<<<<<<<<<< * SlepcNEP nep, * PetscScalar mu, */ static int __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian(NEP __pyx_v_nep, PetscScalar __pyx_v_mu, Mat __pyx_v_J, CYTHON_UNUSED void *__pyx_v_ctx) { struct PySlepcNEPObject *__pyx_v_Nep = 0; struct PyPetscMatObject *__pyx_v_Jmat = 0; PyObject *__pyx_v_jacobian = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kargs = NULL; CYTHON_UNUSED PyObject *__pyx_v_retv = NULL; Mat __pyx_v_Jtmp; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Mat __pyx_t_7; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("NEP_Jacobian", 0); /* "SLEPc/slepcnep.pxi":157 * void* ctx, * ) except PETSC_ERR_PYTHON with gil: * cdef NEP Nep = ref_NEP(nep) # <<<<<<<<<<<<<< * cdef Mat Jmat = ref_Mat(J) * (jacobian, args, kargs) = Nep.get_attr('__jacobian__') */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_NEP(__pyx_v_nep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":158 * ) except PETSC_ERR_PYTHON with gil: * cdef NEP Nep = ref_NEP(nep) * cdef Mat Jmat = ref_Mat(J) # <<<<<<<<<<<<<< * (jacobian, args, kargs) = Nep.get_attr('__jacobian__') * retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_J)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Jmat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":159 * cdef NEP Nep = ref_NEP(nep) * cdef Mat Jmat = ref_Mat(J) * (jacobian, args, kargs) = Nep.get_attr('__jacobian__') # <<<<<<<<<<<<<< * retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) * cdef PetscMat Jtmp = NULL */ __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_Nep->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Nep), ((char *)"__jacobian__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(8, 159, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(8, 159, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(8, 159, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_jacobian = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_args = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_kargs = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/slepcnep.pxi":160 * cdef Mat Jmat = ref_Mat(J) * (jacobian, args, kargs) = Nep.get_attr('__jacobian__') * retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) # <<<<<<<<<<<<<< * cdef PetscMat Jtmp = NULL * Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_mu); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_Nep)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Nep)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_Nep)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_Jmat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Jmat)); PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_Jmat)); __pyx_t_1 = 0; __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(8, 160, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kargs))) { __pyx_t_1 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_jacobian, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_retv = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/slepcnep.pxi":161 * (jacobian, args, kargs) = Nep.get_attr('__jacobian__') * retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) * cdef PetscMat Jtmp = NULL # <<<<<<<<<<<<<< * Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp * return 0 */ __pyx_v_Jtmp = NULL; /* "SLEPc/slepcnep.pxi":162 * retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs) * cdef PetscMat Jtmp = NULL * Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp # <<<<<<<<<<<<<< * return 0 * */ __pyx_v_Jtmp = __pyx_v_J; __pyx_t_7 = __pyx_v_Jmat->mat; __pyx_v_J = __pyx_t_7; __pyx_v_Jmat->mat = __pyx_v_Jtmp; /* "SLEPc/slepcnep.pxi":163 * cdef PetscMat Jtmp = NULL * Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp * return 0 # <<<<<<<<<<<<<< * */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepcnep.pxi":151 * # ----------------------------------------------------------------------------- * * cdef int NEP_Jacobian( # <<<<<<<<<<<<<< * SlepcNEP nep, * PetscScalar mu, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.NEP_Jacobian", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = (-1); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Nep); __Pyx_XDECREF((PyObject *)__pyx_v_Jmat); __Pyx_XDECREF(__pyx_v_jacobian); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XDECREF(__pyx_v_retv); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, patch=False, devel=False, # <<<<<<<<<<<<<< * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3Sys_getVersion[] = "Sys.getVersion(type cls, patch=False, devel=False, date=False, author=False)"; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_patch = 0; PyObject *__pyx_v_devel = 0; PyObject *__pyx_v_date = 0; PyObject *__pyx_v_author = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVersion (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_patch,&__pyx_n_s_devel,&__pyx_n_s_date,&__pyx_n_s_author,0}; PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_False); values[1] = ((PyObject *)Py_False); /* "SLEPc/Sys.pyx":7 * @classmethod * def getVersion(cls, patch=False, devel=False, * date=False, author=False): # <<<<<<<<<<<<<< * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR */ values[2] = ((PyObject *)Py_False); values[3] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_patch); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_devel); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_author); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVersion") < 0)) __PYX_ERR(9, 6, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_patch = values[0]; __pyx_v_devel = values[1]; __pyx_v_date = values[2]; __pyx_v_author = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getVersion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 6, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(((PyTypeObject*)__pyx_v_cls), __pyx_v_patch, __pyx_v_devel, __pyx_v_date, __pyx_v_author); /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, patch=False, devel=False, # <<<<<<<<<<<<<< * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_patch, PyObject *__pyx_v_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author) { int __pyx_v_cmajor; int __pyx_v_cminor; int __pyx_v_cmicro; int __pyx_v_cpatch; int __pyx_v_cdevel; const char *__pyx_v_cdate; const char *__pyx_v_cauthorinfo; PyObject *__pyx_v_version = NULL; PyObject *__pyx_v_out = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("getVersion", 0); __Pyx_INCREF(__pyx_v_author); /* "SLEPc/Sys.pyx":8 * def getVersion(cls, patch=False, devel=False, * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR # <<<<<<<<<<<<<< * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR */ __pyx_v_cmajor = SLEPC_VERSION_MAJOR; /* "SLEPc/Sys.pyx":9 * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR # <<<<<<<<<<<<<< * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH */ __pyx_v_cminor = SLEPC_VERSION_MINOR; /* "SLEPc/Sys.pyx":10 * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR # <<<<<<<<<<<<<< * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int cdevel = not SLEPC_VERSION_RELEASE */ __pyx_v_cmicro = SLEPC_VERSION_SUBMINOR; /* "SLEPc/Sys.pyx":11 * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH # <<<<<<<<<<<<<< * cdef int cdevel = not SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE */ __pyx_v_cpatch = SLEPC_VERSION_PATCH; /* "SLEPc/Sys.pyx":12 * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int cdevel = not SLEPC_VERSION_RELEASE # <<<<<<<<<<<<<< * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO */ __pyx_v_cdevel = (!SLEPC_VERSION_RELEASE); /* "SLEPc/Sys.pyx":13 * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int cdevel = not SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE # <<<<<<<<<<<<<< * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * version = (cmajor, cminor, cmicro) */ __pyx_v_cdate = SLEPC_VERSION_DATE; /* "SLEPc/Sys.pyx":14 * cdef int cdevel = not SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO # <<<<<<<<<<<<<< * version = (cmajor, cminor, cmicro) * out = version */ __pyx_v_cauthorinfo = SLEPC_AUTHOR_INFO; /* "SLEPc/Sys.pyx":15 * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * version = (cmajor, cminor, cmicro) # <<<<<<<<<<<<<< * out = version * if patch or devel or date or author: */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_cmajor); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cminor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_cmicro); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_v_version = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":16 * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * version = (cmajor, cminor, cmicro) * out = version # <<<<<<<<<<<<<< * if patch or devel or date or author: * out = [version] */ __Pyx_INCREF(__pyx_v_version); __pyx_v_out = __pyx_v_version; /* "SLEPc/Sys.pyx":17 * version = (cmajor, cminor, cmicro) * out = version * if patch or devel or date or author: # <<<<<<<<<<<<<< * out = [version] * if patch: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_patch); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_5) { /* "SLEPc/Sys.pyx":18 * out = version * if patch or devel or date or author: * out = [version] # <<<<<<<<<<<<<< * if patch: * out.append(cpatch) */ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_version); __Pyx_GIVEREF(__pyx_v_version); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_version); __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":19 * if patch or devel or date or author: * out = [version] * if patch: # <<<<<<<<<<<<<< * out.append(cpatch) * if devel: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_patch); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 19, __pyx_L1_error) if (__pyx_t_5) { /* "SLEPc/Sys.pyx":20 * out = [version] * if patch: * out.append(cpatch) # <<<<<<<<<<<<<< * if devel: * out.append(cdevel) */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_cpatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":19 * if patch or devel or date or author: * out = [version] * if patch: # <<<<<<<<<<<<<< * out.append(cpatch) * if devel: */ } /* "SLEPc/Sys.pyx":21 * if patch: * out.append(cpatch) * if devel: # <<<<<<<<<<<<<< * out.append(cdevel) * if date: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 21, __pyx_L1_error) if (__pyx_t_5) { /* "SLEPc/Sys.pyx":22 * out.append(cpatch) * if devel: * out.append(cdevel) # <<<<<<<<<<<<<< * if date: * out.append(bytes2str(cdate)) */ __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_cdevel != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":21 * if patch: * out.append(cpatch) * if devel: # <<<<<<<<<<<<<< * out.append(cdevel) * if date: */ } /* "SLEPc/Sys.pyx":23 * if devel: * out.append(cdevel) * if date: # <<<<<<<<<<<<<< * out.append(bytes2str(cdate)) * if author: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 23, __pyx_L1_error) if (__pyx_t_5) { /* "SLEPc/Sys.pyx":24 * out.append(cdevel) * if date: * out.append(bytes2str(cdate)) # <<<<<<<<<<<<<< * if author: * author = bytes2str(cauthorinfo).split('\n') */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cdate); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":23 * if devel: * out.append(cdevel) * if date: # <<<<<<<<<<<<<< * out.append(bytes2str(cdate)) * if author: */ } /* "SLEPc/Sys.pyx":25 * if date: * out.append(bytes2str(cdate)) * if author: # <<<<<<<<<<<<<< * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 25, __pyx_L1_error) if (__pyx_t_5) { /* "SLEPc/Sys.pyx":26 * out.append(bytes2str(cdate)) * if author: * author = bytes2str(cauthorinfo).split('\n') # <<<<<<<<<<<<<< * author = [s.strip() for s in author if s] * out.append(author) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cauthorinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":27 * if author: * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] # <<<<<<<<<<<<<< * out.append(author) * return tuple(out) */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_v_author)) || PyTuple_CheckExact(__pyx_v_author)) { __pyx_t_3 = __pyx_v_author; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_author); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 27, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 27, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 27, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(9, 27, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_s); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 27, __pyx_L1_error) if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_10) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(9, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":28 * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] * out.append(author) # <<<<<<<<<<<<<< * return tuple(out) * */ __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_v_author); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 28, __pyx_L1_error) /* "SLEPc/Sys.pyx":25 * if date: * out.append(bytes2str(cdate)) * if author: # <<<<<<<<<<<<<< * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] */ } /* "SLEPc/Sys.pyx":17 * version = (cmajor, cminor, cmicro) * out = version * if patch or devel or date or author: # <<<<<<<<<<<<<< * out = [version] * if patch: */ } /* "SLEPc/Sys.pyx":29 * author = [s.strip() for s in author if s] * out.append(author) * return tuple(out) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PySequence_Tuple(__pyx_v_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, patch=False, devel=False, # <<<<<<<<<<<<<< * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_out); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_author); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/Sys.pyx":32 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3Sys_2getVersionInfo[] = "Sys.getVersionInfo(type cls)"; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVersionInfo (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getVersionInfo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getVersionInfo", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(((PyTypeObject*)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(CYTHON_UNUSED PyTypeObject *__pyx_v_cls) { int __pyx_v_cmajor; int __pyx_v_cminor; int __pyx_v_cmicro; int __pyx_v_cpatch; int __pyx_v_crelease; const char *__pyx_v_cdate; const char *__pyx_v_cauthorinfo; PyObject *__pyx_v_author = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("getVersionInfo", 0); /* "SLEPc/Sys.pyx":33 * @classmethod * def getVersionInfo(cls): * cdef int cmajor = SLEPC_VERSION_MAJOR # <<<<<<<<<<<<<< * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR */ __pyx_v_cmajor = SLEPC_VERSION_MAJOR; /* "SLEPc/Sys.pyx":34 * def getVersionInfo(cls): * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR # <<<<<<<<<<<<<< * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH */ __pyx_v_cminor = SLEPC_VERSION_MINOR; /* "SLEPc/Sys.pyx":35 * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR # <<<<<<<<<<<<<< * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int crelease = SLEPC_VERSION_RELEASE */ __pyx_v_cmicro = SLEPC_VERSION_SUBMINOR; /* "SLEPc/Sys.pyx":36 * cdef int cminor = SLEPC_VERSION_MINOR * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH # <<<<<<<<<<<<<< * cdef int crelease = SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE */ __pyx_v_cpatch = SLEPC_VERSION_PATCH; /* "SLEPc/Sys.pyx":37 * cdef int cmicro = SLEPC_VERSION_SUBMINOR * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int crelease = SLEPC_VERSION_RELEASE # <<<<<<<<<<<<<< * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO */ __pyx_v_crelease = SLEPC_VERSION_RELEASE; /* "SLEPc/Sys.pyx":38 * cdef int cpatch = SLEPC_VERSION_PATCH * cdef int crelease = SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE # <<<<<<<<<<<<<< * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * author = bytes2str(cauthorinfo).split('\n') */ __pyx_v_cdate = SLEPC_VERSION_DATE; /* "SLEPc/Sys.pyx":39 * cdef int crelease = SLEPC_VERSION_RELEASE * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO # <<<<<<<<<<<<<< * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] */ __pyx_v_cauthorinfo = SLEPC_AUTHOR_INFO; /* "SLEPc/Sys.pyx":40 * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * author = bytes2str(cauthorinfo).split('\n') # <<<<<<<<<<<<<< * author = [s.strip() for s in author if s] * return dict(major = cmajor, */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cauthorinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_author = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/Sys.pyx":41 * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] # <<<<<<<<<<<<<< * return dict(major = cmajor, * minor = cminor, */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_author)) || PyTuple_CheckExact(__pyx_v_author)) { __pyx_t_2 = __pyx_v_author; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_author); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 41, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 41, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 41, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(9, 41, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_s); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 41, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/Sys.pyx":42 * author = bytes2str(cauthorinfo).split('\n') * author = [s.strip() for s in author if s] * return dict(major = cmajor, # <<<<<<<<<<<<<< * minor = cminor, * subminor = cmicro, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cmajor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_major, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":43 * author = [s.strip() for s in author if s] * return dict(major = cmajor, * minor = cminor, # <<<<<<<<<<<<<< * subminor = cmicro, * patch = cpatch, */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cminor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minor, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":44 * return dict(major = cmajor, * minor = cminor, * subminor = cmicro, # <<<<<<<<<<<<<< * patch = cpatch, * release = crelease, */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cmicro); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_subminor, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":45 * minor = cminor, * subminor = cmicro, * patch = cpatch, # <<<<<<<<<<<<<< * release = crelease, * date = bytes2str(cdate), */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cpatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_patch, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":46 * subminor = cmicro, * patch = cpatch, * release = crelease, # <<<<<<<<<<<<<< * date = bytes2str(cdate), * authorinfo = author) */ __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_crelease != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_release, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":47 * patch = cpatch, * release = crelease, * date = bytes2str(cdate), # <<<<<<<<<<<<<< * authorinfo = author) * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cdate); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_date, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":48 * release = crelease, * date = bytes2str(cdate), * authorinfo = author) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_authorinfo, __pyx_v_author) < 0) __PYX_ERR(9, 42, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/Sys.pyx":32 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_author); __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":43 * MatMode = STMatMode * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.st * self.st = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(struct PySlepcSTObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/ST.pyx":44 * * def __cinit__(self): * self.obj = &self.st # <<<<<<<<<<<<<< * self.st = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->st)); /* "SLEPc/ST.pyx":45 * def __cinit__(self): * self.obj = &self.st * self.st = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->st = NULL; /* "SLEPc/ST.pyx":43 * MatMode = STMatMode * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.st * self.st = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":47 * self.st = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the ST data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_2view[] = "ST.view(self, Viewer viewer=None)\n\n Prints the ST data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(0, 47, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 47, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_2view(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_2view(struct PySlepcSTObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/ST.pyx":57 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( STView(self.st, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/ST.pyx":58 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( STView(self.st, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/ST.pyx":59 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( STView(self.st, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STView(__pyx_v_self->st, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 59, __pyx_L1_error) /* "SLEPc/ST.pyx":47 * self.st = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the ST data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":61 * CHKERR( STView(self.st, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the ST object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_4destroy[] = "ST.destroy(self)\n\n Destroys the ST object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/ST.pyx":65 * Destroys the ST object. * """ * CHKERR( STDestroy(&self.st) ) # <<<<<<<<<<<<<< * self.st = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STDestroy((&__pyx_v_self->st))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 65, __pyx_L1_error) /* "SLEPc/ST.pyx":66 * """ * CHKERR( STDestroy(&self.st) ) * self.st = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->st = NULL; /* "SLEPc/ST.pyx":67 * CHKERR( STDestroy(&self.st) ) * self.st = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/ST.pyx":61 * CHKERR( STView(self.st, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the ST object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":69 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the ST object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_6reset[] = "ST.reset(self)\n\n Resets the ST object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_6reset(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_6reset(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/ST.pyx":73 * Resets the ST object. * """ * CHKERR( STReset(self.st) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STReset(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 73, __pyx_L1_error) /* "SLEPc/ST.pyx":69 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the ST object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":75 * CHKERR( STReset(self.st) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the ST object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_8create[] = "ST.create(self, comm=None)\n\n Creates the ST object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 75, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8create(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8create(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; ST __pyx_v_newst; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/ST.pyx":85 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcST newst = NULL * CHKERR( STCreate(ccomm, &newst) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/ST.pyx":86 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcST newst = NULL # <<<<<<<<<<<<<< * CHKERR( STCreate(ccomm, &newst) ) * SlepcCLEAR(self.obj); self.st = newst */ __pyx_v_newst = NULL; /* "SLEPc/ST.pyx":87 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcST newst = NULL * CHKERR( STCreate(ccomm, &newst) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.st = newst * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STCreate(__pyx_v_ccomm, (&__pyx_v_newst))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 87, __pyx_L1_error) /* "SLEPc/ST.pyx":88 * cdef SlepcST newst = NULL * CHKERR( STCreate(ccomm, &newst) ) * SlepcCLEAR(self.obj); self.st = newst # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->st = __pyx_v_newst; /* "SLEPc/ST.pyx":89 * CHKERR( STCreate(ccomm, &newst) ) * SlepcCLEAR(self.obj); self.st = newst * return self # <<<<<<<<<<<<<< * * def setType(self, st_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/ST.pyx":75 * CHKERR( STReset(self.st) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the ST object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":91 * return self * * def setType(self, st_type): # <<<<<<<<<<<<<< * """ * Builds ST for a particular spectral transformation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_10setType[] = "ST.setType(self, st_type)\n\n Builds ST for a particular spectral transformation.\n\n Parameters\n ----------\n st_type: `ST.Type` enumerate\n The spectral transformation to be used.\n\n Notes\n -----\n See `ST.Type` for available methods. The default is\n `ST.Type.SHIFT` with a zero shift. Normally, it is best to\n use `setFromOptions()` and then set the ST type from the\n options database rather than by using this routine. Using the\n options database provides the user with maximum flexibility in\n evaluating the different available methods.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_st_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(0, 91, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_st_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 91, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_10setType(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_st_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_10setType(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_st_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_st_type); /* "SLEPc/ST.pyx":109 * evaluating the different available methods. * """ * cdef SlepcSTType cval = NULL # <<<<<<<<<<<<<< * st_type = str2bytes(st_type, &cval) * CHKERR( STSetType(self.st, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/ST.pyx":110 * """ * cdef SlepcSTType cval = NULL * st_type = str2bytes(st_type, &cval) # <<<<<<<<<<<<<< * CHKERR( STSetType(self.st, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_st_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_st_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":111 * cdef SlepcSTType cval = NULL * st_type = str2bytes(st_type, &cval) * CHKERR( STSetType(self.st, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetType(__pyx_v_self->st, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 111, __pyx_L1_error) /* "SLEPc/ST.pyx":91 * return self * * def setType(self, st_type): # <<<<<<<<<<<<<< * """ * Builds ST for a particular spectral transformation. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.ST.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_st_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":113 * CHKERR( STSetType(self.st, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the ST type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_12getType[] = "ST.getType(self)\n\n Gets the ST type of this object.\n\n Returns\n -------\n type: `ST.Type` enumerate\n The spectral transformation currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_12getType(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_12getType(struct PySlepcSTObject *__pyx_v_self) { const char* __pyx_v_st_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/ST.pyx":122 * The spectral transformation currently being used. * """ * cdef SlepcSTType st_type = NULL # <<<<<<<<<<<<<< * CHKERR( STGetType(self.st, &st_type) ) * return bytes2str(st_type) */ __pyx_v_st_type = NULL; /* "SLEPc/ST.pyx":123 * """ * cdef SlepcSTType st_type = NULL * CHKERR( STGetType(self.st, &st_type) ) # <<<<<<<<<<<<<< * return bytes2str(st_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetType(__pyx_v_self->st, (&__pyx_v_st_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 123, __pyx_L1_error) /* "SLEPc/ST.pyx":124 * cdef SlepcSTType st_type = NULL * CHKERR( STGetType(self.st, &st_type) ) * return bytes2str(st_type) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_st_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":113 * CHKERR( STSetType(self.st, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the ST type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":126 * return bytes2str(st_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all ST options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_14setOptionsPrefix[] = "ST.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all ST options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all ST option\n requests.\n\n Notes\n -----\n A hyphen (``-``) must NOT be given at the beginning of the\n prefix name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(0, 126, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/ST.pyx":143 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( STSetOptionsPrefix(self.st, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/ST.pyx":144 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( STSetOptionsPrefix(self.st, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":145 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( STSetOptionsPrefix(self.st, cval) ) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetOptionsPrefix(__pyx_v_self->st, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 145, __pyx_L1_error) /* "SLEPc/ST.pyx":126 * return bytes2str(st_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all ST options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":147 * CHKERR( STSetOptionsPrefix(self.st, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all ST options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_16getOptionsPrefix[] = "ST.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all ST options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this ST object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(struct PySlepcSTObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/ST.pyx":157 * The prefix string set for this ST object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( STGetOptionsPrefix(self.st, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/ST.pyx":158 * """ * cdef const_char *prefix = NULL * CHKERR( STGetOptionsPrefix(self.st, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetOptionsPrefix(__pyx_v_self->st, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 158, __pyx_L1_error) /* "SLEPc/ST.pyx":159 * cdef const_char *prefix = NULL * CHKERR( STGetOptionsPrefix(self.st, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":147 * CHKERR( STSetOptionsPrefix(self.st, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all ST options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":161 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets ST options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_18setFromOptions[] = "ST.setFromOptions(self)\n\n Sets ST options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n\n Notes\n -----\n To see all options, run your program with the -help option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/ST.pyx":171 * To see all options, run your program with the -help option. * """ * CHKERR( STSetFromOptions(self.st) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetFromOptions(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 171, __pyx_L1_error) /* "SLEPc/ST.pyx":161 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets ST options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":175 * # * * def setShift(self, shift): # <<<<<<<<<<<<<< * """ * Sets the shift associated with the spectral transformation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_20setShift[] = "ST.setShift(self, shift)\n\n Sets the shift associated with the spectral transformation.\n\n Parameters\n ----------\n shift: scalar (possibly complex)\n The value of the shift.\n\n Notes\n -----\n In some spectral transformations, changing the shift may have\n associated a lot of work, for example recomputing a\n factorization.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shift = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setShift (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shift,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shift)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setShift") < 0)) __PYX_ERR(0, 175, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_shift = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setShift", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setShift", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_shift); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_shift) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setShift", 0); /* "SLEPc/ST.pyx":190 * factorization. * """ * cdef PetscScalar sval = asScalar(shift) # <<<<<<<<<<<<<< * CHKERR( STSetShift(self.st, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_shift); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":191 * """ * cdef PetscScalar sval = asScalar(shift) * CHKERR( STSetShift(self.st, sval) ) # <<<<<<<<<<<<<< * * def getShift(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetShift(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 191, __pyx_L1_error) /* "SLEPc/ST.pyx":175 * # * * def setShift(self, shift): # <<<<<<<<<<<<<< * """ * Sets the shift associated with the spectral transformation. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setShift", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":193 * CHKERR( STSetShift(self.st, sval) ) * * def getShift(self): # <<<<<<<<<<<<<< * """ * Gets the shift associated with the spectral transformation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_22getShift[] = "ST.getShift(self)\n\n Gets the shift associated with the spectral transformation.\n\n Returns\n -------\n shift: scalar (possibly complex)\n The value of the shift.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getShift (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getShift", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getShift", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(struct PySlepcSTObject *__pyx_v_self) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getShift", 0); /* "SLEPc/ST.pyx":202 * The value of the shift. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * CHKERR( STGetShift(self.st, &sval) ) * return toScalar(sval) */ __pyx_v_sval = 0.0; /* "SLEPc/ST.pyx":203 * """ * cdef PetscScalar sval = 0 * CHKERR( STGetShift(self.st, &sval) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetShift(__pyx_v_self->st, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 203, __pyx_L1_error) /* "SLEPc/ST.pyx":204 * cdef PetscScalar sval = 0 * CHKERR( STGetShift(self.st, &sval) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def setTransform(self, flag): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":193 * CHKERR( STSetShift(self.st, sval) ) * * def getShift(self): # <<<<<<<<<<<<<< * """ * Gets the shift associated with the spectral transformation. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getShift", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":206 * return toScalar(sval) * * def setTransform(self, flag): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate whether the transformed matrices */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_24setTransform[] = "ST.setTransform(self, flag)\n\n Sets a flag to indicate whether the transformed matrices\n are computed or not.\n\n Parameters\n ----------\n flag: boolean\n This flag is intended for the case of polynomial\n eigenproblems solved via linearization.\n If this flag is False (default) the spectral transformation\n is applied to the linearization (handled by the eigensolver),\n otherwise it is applied to the original problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTransform (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTransform") < 0)) __PYX_ERR(0, 206, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_flag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTransform", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 206, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setTransform", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTransform", 0); /* "SLEPc/ST.pyx":220 * otherwise it is applied to the original problem. * """ * cdef PetscBool sval = flag # <<<<<<<<<<<<<< * CHKERR( STSetTransform(self.st, sval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":221 * """ * cdef PetscBool sval = flag * CHKERR( STSetTransform(self.st, sval) ) # <<<<<<<<<<<<<< * * def getTransform(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetTransform(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 221, __pyx_L1_error) /* "SLEPc/ST.pyx":206 * return toScalar(sval) * * def setTransform(self, flag): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate whether the transformed matrices */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setTransform", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":223 * CHKERR( STSetTransform(self.st, sval) ) * * def getTransform(self): # <<<<<<<<<<<<<< * """ * Gets the flag indicating whether the transformed matrices */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_26getTransform[] = "ST.getTransform(self)\n\n Gets the flag indicating whether the transformed matrices\n are computed or not.\n\n Returns\n -------\n flag: boolean\n This flag is intended for the case of polynomial\n eigenproblems solved via linearization.\n If this flag is False (default) the spectral transformation\n is applied to the linearization (handled by the eigensolver),\n otherwise it is applied to the original problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTransform (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTransform", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTransform", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(struct PySlepcSTObject *__pyx_v_self) { PetscBool __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTransform", 0); /* "SLEPc/ST.pyx":237 * otherwise it is applied to the original problem. * """ * cdef PetscBool sval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( STGetTransform(self.st, &sval) ) * return sval */ __pyx_v_sval = PETSC_FALSE; /* "SLEPc/ST.pyx":238 * """ * cdef PetscBool sval = PETSC_FALSE * CHKERR( STGetTransform(self.st, &sval) ) # <<<<<<<<<<<<<< * return sval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetTransform(__pyx_v_self->st, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 238, __pyx_L1_error) /* "SLEPc/ST.pyx":239 * cdef PetscBool sval = PETSC_FALSE * CHKERR( STGetTransform(self.st, &sval) ) * return sval # <<<<<<<<<<<<<< * * def setMatMode(self, mode): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":223 * CHKERR( STSetTransform(self.st, sval) ) * * def getTransform(self): # <<<<<<<<<<<<<< * """ * Gets the flag indicating whether the transformed matrices */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getTransform", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":241 * return sval * * def setMatMode(self, mode): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate how the matrix is being shifted in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_28setMatMode[] = "ST.setMatMode(self, mode)\n\n Sets a flag to indicate how the matrix is being shifted in the\n shift-and-invert and Cayley spectral transformations.\n\n Parameters\n ----------\n mode: `ST.MatMode` enumerate\n The mode flag.\n\n Notes\n -----\n By default (`ST.MatMode.COPY`), a copy of matrix ``A`` is made\n and then this copy is shifted explicitly, e.g. ``A <- (A - s\n B)``.\n\n With `ST.MatMode.INPLACE`, the original matrix ``A`` is\n shifted at `setUp()` and unshifted at the end of the\n computations. With respect to the previous one, this mode\n avoids a copy of matrix ``A``. However, a backdraw is that the\n recovered matrix might be slightly different from the original\n one (due to roundoff).\n\n With `ST.MatMode.SHELL`, the solver works with an implicit\n shell matrix that represents the shifted matrix. This mode is\n the most efficient in creating the shifted matrix but it\n places serious limitations to the linear solves performed in\n each iteration of the eigensolver (typically, only interative\n solvers with Jacobi preconditioning can be used).\n\n In the case of generalized problems, in the two first modes\n the matrix ``A - s B`` has to be computed explicitly. The\n efficiency of this computation can be controlled with\n `setMatStructure()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMatMode (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatMode") < 0)) __PYX_ERR(0, 241, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_mode = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMatMode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 241, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_mode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_mode) { STMatMode __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations STMatMode __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setMatMode", 0); /* "SLEPc/ST.pyx":276 * `setMatStructure()`. * """ * cdef SlepcSTMatMode val = mode # <<<<<<<<<<<<<< * CHKERR( STSetMatMode(self.st, val) ) * */ __pyx_t_1 = ((STMatMode)__Pyx_PyInt_As_STMatMode(__pyx_v_mode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/ST.pyx":277 * """ * cdef SlepcSTMatMode val = mode * CHKERR( STSetMatMode(self.st, val) ) # <<<<<<<<<<<<<< * * def getMatMode(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatMode(__pyx_v_self->st, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 277, __pyx_L1_error) /* "SLEPc/ST.pyx":241 * return sval * * def setMatMode(self, mode): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate how the matrix is being shifted in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":279 * CHKERR( STSetMatMode(self.st, val) ) * * def getMatMode(self): # <<<<<<<<<<<<<< * """ * Gets a flag that indicates how the matrix is being shifted in */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_30getMatMode[] = "ST.getMatMode(self)\n\n Gets a flag that indicates how the matrix is being shifted in\n the shift-and-invert and Cayley spectral transformations.\n\n Returns\n -------\n mode: `ST.MatMode` enumerate\n The mode flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMatMode (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getMatMode", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMatMode", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(struct PySlepcSTObject *__pyx_v_self) { STMatMode __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getMatMode", 0); /* "SLEPc/ST.pyx":289 * The mode flag. * """ * cdef SlepcSTMatMode val = ST_MATMODE_INPLACE # <<<<<<<<<<<<<< * CHKERR( STGetMatMode(self.st, &val) ) * return val */ __pyx_v_val = ST_MATMODE_INPLACE; /* "SLEPc/ST.pyx":290 * """ * cdef SlepcSTMatMode val = ST_MATMODE_INPLACE * CHKERR( STGetMatMode(self.st, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetMatMode(__pyx_v_self->st, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 290, __pyx_L1_error) /* "SLEPc/ST.pyx":291 * cdef SlepcSTMatMode val = ST_MATMODE_INPLACE * CHKERR( STGetMatMode(self.st, &val) ) * return val # <<<<<<<<<<<<<< * * def setOperators(self, operators): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_STMatMode(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":279 * CHKERR( STSetMatMode(self.st, val) ) * * def getMatMode(self): # <<<<<<<<<<<<<< * """ * Gets a flag that indicates how the matrix is being shifted in */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":293 * return val * * def setOperators(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_32setOperators[] = "ST.setOperators(self, operators)\n\n Sets the matrices associated with the eigenvalue problem.\n\n Parameters\n ----------\n operators: sequence of Mat\n The matrices associated with the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_operators = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOperators (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_operators,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operators)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(0, 293, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_operators = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOperators", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 293, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_operators); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_operators) { Mat *__pyx_v_mats; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Mat __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setOperators", 0); __Pyx_INCREF(__pyx_v_operators); /* "SLEPc/ST.pyx":302 * The matrices associated with the eigensystem. * """ * operators = tuple(operators) # <<<<<<<<<<<<<< * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) */ __pyx_t_1 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":303 * """ * operators = tuple(operators) * cdef PetscMat *mats = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) */ __pyx_v_mats = NULL; /* "SLEPc/ST.pyx":304 * operators = tuple(operators) * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) # <<<<<<<<<<<<<< * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat */ __pyx_v_k = 0; __pyx_t_2 = PyObject_Length(__pyx_v_operators); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_v_n = __pyx_t_2; /* "SLEPc/ST.pyx":305 * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) # <<<<<<<<<<<<<< * for k from 0 <= k < n: mats[k] = (operators[k]).mat * CHKERR( STSetOperators(self.st, n, mats) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(Mat))), ((void **)(&__pyx_v_mats))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/ST.pyx":306 * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat # <<<<<<<<<<<<<< * CHKERR( STSetOperators(self.st, n, mats) ) * */ __pyx_t_2 = __pyx_v_n; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_2; __pyx_v_k++) { __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_operators, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(0, 306, __pyx_L1_error) __pyx_t_3 = ((struct PyPetscMatObject *)__pyx_t_1)->mat; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_mats[__pyx_v_k]) = __pyx_t_3; } /* "SLEPc/ST.pyx":307 * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat * CHKERR( STSetOperators(self.st, n, mats) ) # <<<<<<<<<<<<<< * * def getOperators(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetOperators(__pyx_v_self->st, ((PetscInt)__pyx_v_n), __pyx_v_mats)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 307, __pyx_L1_error) /* "SLEPc/ST.pyx":293 * return val * * def setOperators(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_operators); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":309 * CHKERR( STSetOperators(self.st, n, mats) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_34getOperators[] = "ST.getOperators(self)\n\n Gets the matrices associated with the eigenvalue problem.\n\n Returns\n -------\n operators: tuple of Mat\n The matrices associated with the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOperators (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(struct PySlepcSTObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; Mat __pyx_v_mat; PetscInt __pyx_v_k; PetscInt __pyx_v_n; PyObject *__pyx_v_operators = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/ST.pyx":319 * """ * cdef Mat A * cdef PetscMat mat = NULL # <<<<<<<<<<<<<< * cdef PetscInt k=0, n=0 * CHKERR( STGetNumMatrices(self.st, &n) ) */ __pyx_v_mat = NULL; /* "SLEPc/ST.pyx":320 * cdef Mat A * cdef PetscMat mat = NULL * cdef PetscInt k=0, n=0 # <<<<<<<<<<<<<< * CHKERR( STGetNumMatrices(self.st, &n) ) * cdef object operators = [] */ __pyx_v_k = 0; __pyx_v_n = 0; /* "SLEPc/ST.pyx":321 * cdef PetscMat mat = NULL * cdef PetscInt k=0, n=0 * CHKERR( STGetNumMatrices(self.st, &n) ) # <<<<<<<<<<<<<< * cdef object operators = [] * for k from 0 <= k < n: */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetNumMatrices(__pyx_v_self->st, (&__pyx_v_n))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 321, __pyx_L1_error) /* "SLEPc/ST.pyx":322 * cdef PetscInt k=0, n=0 * CHKERR( STGetNumMatrices(self.st, &n) ) * cdef object operators = [] # <<<<<<<<<<<<<< * for k from 0 <= k < n: * CHKERR( STGetOperators(self.st, k, &mat) ) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_operators = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/ST.pyx":323 * CHKERR( STGetNumMatrices(self.st, &n) ) * cdef object operators = [] * for k from 0 <= k < n: # <<<<<<<<<<<<<< * CHKERR( STGetOperators(self.st, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "SLEPc/ST.pyx":324 * cdef object operators = [] * for k from 0 <= k < n: * CHKERR( STGetOperators(self.st, k, &mat) ) # <<<<<<<<<<<<<< * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetOperators(__pyx_v_self->st, __pyx_v_k, (&__pyx_v_mat))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 324, __pyx_L1_error) /* "SLEPc/ST.pyx":325 * for k from 0 <= k < n: * CHKERR( STGetOperators(self.st, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) # <<<<<<<<<<<<<< * operators.append(A) * return tuple(operators) */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_A, ((struct PyPetscMatObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_A->mat = __pyx_v_mat; __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/ST.pyx":326 * CHKERR( STGetOperators(self.st, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) # <<<<<<<<<<<<<< * return tuple(operators) * */ __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_operators, ((PyObject *)__pyx_v_A)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 326, __pyx_L1_error) } /* "SLEPc/ST.pyx":327 * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) * return tuple(operators) # <<<<<<<<<<<<<< * * def setMatStructure(self, structure): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":309 * CHKERR( STSetOperators(self.st, n, mats) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XDECREF(__pyx_v_operators); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":329 * return tuple(operators) * * def setMatStructure(self, structure): # <<<<<<<<<<<<<< * """ * Sets an internal Mat.Structure attribute to indicate which is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_36setMatStructure[] = "ST.setMatStructure(self, structure)\n\n Sets an internal Mat.Structure attribute to indicate which is\n the relation of the sparsity pattern of the two matrices ``A``\n and ``B`` constituting the generalized eigenvalue\n problem. This function has no effect in the case of standard\n eigenproblems.\n\n Parameters\n ----------\n structure: `PETSc.Mat.Structure` enumerate\n Either same, different, or a subset of the non-zero\n sparsity pattern.\n\n Notes\n -----\n By default, the sparsity patterns are assumed to be\n different. If the patterns are equal or a subset then it is\n recommended to set this attribute for efficiency reasons (in\n particular, for internal *AXPY()* matrix operations).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_structure = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMatStructure (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_structure,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatStructure") < 0)) __PYX_ERR(0, 329, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_structure = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMatStructure", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatStructure", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_structure); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_structure) { MatStructure __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MatStructure __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setMatStructure", 0); /* "SLEPc/ST.pyx":350 * particular, for internal *AXPY()* matrix operations). * """ * cdef PetscMatStructure val = matstructure(structure) # <<<<<<<<<<<<<< * CHKERR( STSetMatStructure(self.st, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_1 == ((MatStructure)-1L))) __PYX_ERR(0, 350, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/ST.pyx":351 * """ * cdef PetscMatStructure val = matstructure(structure) * CHKERR( STSetMatStructure(self.st, val) ) # <<<<<<<<<<<<<< * * def setKSP(self, KSP ksp not None): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatStructure(__pyx_v_self->st, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 351, __pyx_L1_error) /* "SLEPc/ST.pyx":329 * return tuple(operators) * * def setMatStructure(self, structure): # <<<<<<<<<<<<<< * """ * Sets an internal Mat.Structure attribute to indicate which is */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatStructure", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":353 * CHKERR( STSetMatStructure(self.st, val) ) * * def setKSP(self, KSP ksp not None): # <<<<<<<<<<<<<< * """ * Sets the KSP object associated with the spectral */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_38setKSP[] = "ST.setKSP(self, KSP ksp)\n\n Sets the KSP object associated with the spectral\n transformation.\n\n Parameters\n ----------\n ksp: KSP\n The linear solver object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscKSPObject *__pyx_v_ksp = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKSP (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ksp,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ksp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKSP") < 0)) __PYX_ERR(0, 353, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ksp = ((struct PyPetscKSPObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKSP", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 353, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setKSP", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ksp), __pyx_ptype_8petsc4py_5PETSc_KSP, 0, "ksp", 0))) __PYX_ERR(0, 353, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_ksp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(struct PySlepcSTObject *__pyx_v_self, struct PyPetscKSPObject *__pyx_v_ksp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setKSP", 0); /* "SLEPc/ST.pyx":363 * The linear solver object. * """ * CHKERR( STSetKSP(self.st, ksp.ksp) ) # <<<<<<<<<<<<<< * * def getKSP(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetKSP(__pyx_v_self->st, __pyx_v_ksp->ksp)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 363, __pyx_L1_error) /* "SLEPc/ST.pyx":353 * CHKERR( STSetMatStructure(self.st, val) ) * * def setKSP(self, KSP ksp not None): # <<<<<<<<<<<<<< * """ * Sets the KSP object associated with the spectral */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setKSP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":365 * CHKERR( STSetKSP(self.st, ksp.ksp) ) * * def getKSP(self): # <<<<<<<<<<<<<< * """ * Gets the KSP object associated with the spectral */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_40getKSP[] = "ST.getKSP(self)\n\n Gets the KSP object associated with the spectral\n transformation.\n\n Returns\n -------\n ksp: KSP\n The linear solver object.\n\n Notes\n -----\n On output, the internal value of KSP can be ``NULL`` if the\n combination of eigenproblem type and selected transformation\n does not require to solve a linear system of equations.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKSP (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKSP", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKSP", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(struct PySlepcSTObject *__pyx_v_self) { struct PyPetscKSPObject *__pyx_v_ksp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getKSP", 0); /* "SLEPc/ST.pyx":381 * does not require to solve a linear system of equations. * """ * cdef KSP ksp = KSP() # <<<<<<<<<<<<<< * CHKERR( STGetKSP(self.st, &ksp.ksp) ) * PetscINCREF(ksp.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_KSP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ksp = ((struct PyPetscKSPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":382 * """ * cdef KSP ksp = KSP() * CHKERR( STGetKSP(self.st, &ksp.ksp) ) # <<<<<<<<<<<<<< * PetscINCREF(ksp.obj) * return ksp */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetKSP(__pyx_v_self->st, (&__pyx_v_ksp->ksp))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 382, __pyx_L1_error) /* "SLEPc/ST.pyx":383 * cdef KSP ksp = KSP() * CHKERR( STGetKSP(self.st, &ksp.ksp) ) * PetscINCREF(ksp.obj) # <<<<<<<<<<<<<< * return ksp * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ksp->__pyx_base.obj); /* "SLEPc/ST.pyx":384 * CHKERR( STGetKSP(self.st, &ksp.ksp) ) * PetscINCREF(ksp.obj) * return ksp # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ksp)); __pyx_r = ((PyObject *)__pyx_v_ksp); goto __pyx_L0; /* "SLEPc/ST.pyx":365 * CHKERR( STSetKSP(self.st, ksp.ksp) ) * * def getKSP(self): # <<<<<<<<<<<<<< * """ * Gets the KSP object associated with the spectral */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getKSP", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ksp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":388 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Prepares for the use of a spectral transformation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_42setUp[] = "ST.setUp(self)\n\n Prepares for the use of a spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/ST.pyx":392 * Prepares for the use of a spectral transformation. * """ * CHKERR( STSetUp(self.st) ) # <<<<<<<<<<<<<< * * def apply(self, Vec x not None, Vec y not None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetUp(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 392, __pyx_L1_error) /* "SLEPc/ST.pyx":388 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Prepares for the use of a spectral transformation. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":394 * CHKERR( STSetUp(self.st) ) * * def apply(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Applies the spectral transformation operator to a vector, for */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_44apply[] = "ST.apply(self, Vec x, Vec y)\n\n Applies the spectral transformation operator to a vector, for\n instance ``(A - sB)^-1 B`` in the case of the shift-and-invert\n tranformation and generalized eigenproblem.\n\n Parameters\n ----------\n x: Vec\n The input vector.\n y: Vec\n The result vector.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply", 1, 2, 2, 1); __PYX_ERR(0, 394, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply") < 0)) __PYX_ERR(0, 394, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_x = ((struct PyPetscVecObject *)values[0]); __pyx_v_y = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("apply", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.apply", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(0, 394, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 394, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_44apply(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44apply(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("apply", 0); /* "SLEPc/ST.pyx":407 * The result vector. * """ * CHKERR( STApply(self.st, x.vec, y.vec) ) # <<<<<<<<<<<<<< * * def applyTranspose(self, Vec x not None, Vec y not None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STApply(__pyx_v_self->st, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 407, __pyx_L1_error) /* "SLEPc/ST.pyx":394 * CHKERR( STSetUp(self.st) ) * * def apply(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Applies the spectral transformation operator to a vector, for */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.apply", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":409 * CHKERR( STApply(self.st, x.vec, y.vec) ) * * def applyTranspose(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Applies the transpose of the operator to a vector, for */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_46applyTranspose[] = "ST.applyTranspose(self, Vec x, Vec y)\n\n Applies the transpose of the operator to a vector, for\n instance ``B^T(A - sB)^-T`` in the case of the\n shift-and-invert tranformation and generalized eigenproblem.\n\n Parameters\n ----------\n x: Vec\n The input vector.\n y: Vec\n The result vector.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("applyTranspose (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("applyTranspose", 1, 2, 2, 1); __PYX_ERR(0, 409, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyTranspose") < 0)) __PYX_ERR(0, 409, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_x = ((struct PyPetscVecObject *)values[0]); __pyx_v_y = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("applyTranspose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 409, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.applyTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(0, 409, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 409, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("applyTranspose", 0); /* "SLEPc/ST.pyx":422 * The result vector. * """ * CHKERR( STApplyTranspose(self.st, x.vec, y.vec) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STApplyTranspose(__pyx_v_self->st, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 422, __pyx_L1_error) /* "SLEPc/ST.pyx":409 * CHKERR( STApply(self.st, x.vec, y.vec) ) * * def applyTranspose(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Applies the transpose of the operator to a vector, for */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.applyTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":426 * # * * def setCayleyAntishift(self, tau): # <<<<<<<<<<<<<< * """ * Sets the value of the anti-shift for the Cayley spectral */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_48setCayleyAntishift[] = "ST.setCayleyAntishift(self, tau)\n\n Sets the value of the anti-shift for the Cayley spectral\n transformation.\n\n Parameters\n ----------\n tau: scalar (possibly complex)\n The anti-shift.\n\n Notes\n -----\n\n In the generalized Cayley transform, the operator can be\n expressed as ``OP = inv(A - sigma B)*(A + tau B)``. This\n function sets the value of `tau`. Use `setShift()` for\n setting ``sigma``.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tau = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCayleyAntishift (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCayleyAntishift") < 0)) __PYX_ERR(0, 426, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_tau = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCayleyAntishift", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 426, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setCayleyAntishift", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_tau); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_tau) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setCayleyAntishift", 0); /* "SLEPc/ST.pyx":444 * setting ``sigma``. * """ * cdef PetscScalar sval = asScalar(tau) # <<<<<<<<<<<<<< * CHKERR( STCayleySetAntishift(self.st, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_tau); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":445 * """ * cdef PetscScalar sval = asScalar(tau) * CHKERR( STCayleySetAntishift(self.st, sval) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STCayleySetAntishift(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 445, __pyx_L1_error) /* "SLEPc/ST.pyx":426 * # * * def setCayleyAntishift(self, tau): # <<<<<<<<<<<<<< * """ * Sets the value of the anti-shift for the Cayley spectral */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setCayleyAntishift", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":450 * * property shift: * def __get__(self): # <<<<<<<<<<<<<< * return self.getShift() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":451 * property shift: * def __get__(self): * return self.getShift() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setShift(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getShift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":450 * * property shift: * def __get__(self): # <<<<<<<<<<<<<< * return self.getShift() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.ST.shift.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":452 * def __get__(self): * return self.getShift() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setShift(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":453 * return self.getShift() * def __set__(self, value): * self.setShift(value) # <<<<<<<<<<<<<< * * property mat_mode: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setShift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":452 * def __get__(self): * return self.getShift() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setShift(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.ST.shift.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":456 * * property mat_mode: * def __get__(self): # <<<<<<<<<<<<<< * return self.getMatMode() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":457 * property mat_mode: * def __get__(self): * return self.getMatMode() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setMatMode(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":456 * * property mat_mode: * def __get__(self): # <<<<<<<<<<<<<< * return self.getMatMode() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.ST.mat_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":458 * def __get__(self): * return self.getMatMode() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setMatMode(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":459 * return self.getMatMode() * def __set__(self, value): * self.setMatMode(value) # <<<<<<<<<<<<<< * * property ksp: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":458 * def __get__(self): * return self.getMatMode() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setMatMode(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.ST.mat_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":462 * * property ksp: * def __get__(self): # <<<<<<<<<<<<<< * return self.getKSP() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":463 * property ksp: * def __get__(self): * return self.getKSP() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setKSP(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getKSP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":462 * * property ksp: * def __get__(self): # <<<<<<<<<<<<<< * return self.getKSP() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.ST.ksp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":464 * def __get__(self): * return self.getKSP() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setKSP(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":465 * return self.getKSP() * def __set__(self, value): * self.setKSP(value) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setKSP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":464 * def __get__(self): * return self.getKSP() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setKSP(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.ST.ksp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":59 * BlockType = BVOrthogBlockType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.bv * self.bv = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(struct PySlepcBVObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/BV.pyx":60 * * def __cinit__(self): * self.obj = &self.bv # <<<<<<<<<<<<<< * self.bv = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->bv)); /* "SLEPc/BV.pyx":61 * def __cinit__(self): * self.obj = &self.bv * self.bv = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->bv = NULL; /* "SLEPc/BV.pyx":59 * BlockType = BVOrthogBlockType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.bv * self.bv = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":63 * self.bv = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the BV data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_2view[] = "BV.view(self, Viewer viewer=None)\n\n Prints the BV data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(3, 63, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 63, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(3, 63, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_2view(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_2view(struct PySlepcBVObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/BV.pyx":73 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( BVView(self.bv, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/BV.pyx":74 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( BVView(self.bv, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/BV.pyx":75 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( BVView(self.bv, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVView(__pyx_v_self->bv, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 75, __pyx_L1_error) /* "SLEPc/BV.pyx":63 * self.bv = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the BV data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":77 * CHKERR( BVView(self.bv, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_4destroy[] = "BV.destroy(self)\n\n Destroys the BV object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/BV.pyx":81 * Destroys the BV object. * """ * CHKERR( BVDestroy(&self.bv) ) # <<<<<<<<<<<<<< * self.bv = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDestroy((&__pyx_v_self->bv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 81, __pyx_L1_error) /* "SLEPc/BV.pyx":82 * """ * CHKERR( BVDestroy(&self.bv) ) * self.bv = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->bv = NULL; /* "SLEPc/BV.pyx":83 * CHKERR( BVDestroy(&self.bv) ) * self.bv = NULL * return self # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/BV.pyx":77 * CHKERR( BVView(self.bv, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the BV object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":85 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_6create[] = "BV.create(self, comm=None)\n\n Creates the BV object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(3, 85, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 85, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_6create(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_6create(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; BV __pyx_v_newbv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/BV.pyx":95 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcBV newbv = NULL * CHKERR( BVCreate(ccomm, &newbv) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 95, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/BV.pyx":96 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcBV newbv = NULL # <<<<<<<<<<<<<< * CHKERR( BVCreate(ccomm, &newbv) ) * SlepcCLEAR(self.obj); self.bv = newbv */ __pyx_v_newbv = NULL; /* "SLEPc/BV.pyx":97 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcBV newbv = NULL * CHKERR( BVCreate(ccomm, &newbv) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.bv = newbv * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_ccomm, (&__pyx_v_newbv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 97, __pyx_L1_error) /* "SLEPc/BV.pyx":98 * cdef SlepcBV newbv = NULL * CHKERR( BVCreate(ccomm, &newbv) ) * SlepcCLEAR(self.obj); self.bv = newbv # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->bv = __pyx_v_newbv; /* "SLEPc/BV.pyx":99 * CHKERR( BVCreate(ccomm, &newbv) ) * SlepcCLEAR(self.obj); self.bv = newbv * return self # <<<<<<<<<<<<<< * * def duplicate(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/BV.pyx":85 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the BV object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":101 * return self * * def duplicate(self): # <<<<<<<<<<<<<< * """ * Duplicate the BV object with the same type and dimensions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_8duplicate[] = "BV.duplicate(self)\n\n Duplicate the BV object with the same type and dimensions.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("duplicate (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("duplicate", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "duplicate", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(struct PySlepcBVObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("duplicate", 0); /* "SLEPc/BV.pyx":105 * Duplicate the BV object with the same type and dimensions. * """ * cdef BV bv = type(self)() # <<<<<<<<<<<<<< * CHKERR( BVDuplicate(self.bv, &bv.bv) ) * return bv */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_t_2 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8slepc4py_5SLEPc_BV))))) __PYX_ERR(3, 105, __pyx_L1_error) __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":106 * """ * cdef BV bv = type(self)() * CHKERR( BVDuplicate(self.bv, &bv.bv) ) # <<<<<<<<<<<<<< * return bv * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDuplicate(__pyx_v_self->bv, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 106, __pyx_L1_error) /* "SLEPc/BV.pyx":107 * cdef BV bv = type(self)() * CHKERR( BVDuplicate(self.bv, &bv.bv) ) * return bv # <<<<<<<<<<<<<< * * def copy(self, BV result=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/BV.pyx":101 * return self * * def duplicate(self): # <<<<<<<<<<<<<< * """ * Duplicate the BV object with the same type and dimensions. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_bv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":109 * return bv * * def copy(self, BV result=None): # <<<<<<<<<<<<<< * if result is None: * result = type(self)() */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_10copy[] = "BV.copy(self, BV result=None)"; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_result = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_result,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PySlepcBVObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copy") < 0)) __PYX_ERR(3, 109, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_result = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("copy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 109, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "result", 0))) __PYX_ERR(3, 109, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_10copy(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_result); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10copy(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_result) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("copy", 0); __Pyx_INCREF((PyObject *)__pyx_v_result); /* "SLEPc/BV.pyx":110 * * def copy(self, BV result=None): * if result is None: # <<<<<<<<<<<<<< * result = type(self)() * if result.bv == NULL: */ __pyx_t_1 = (((PyObject *)__pyx_v_result) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":111 * def copy(self, BV result=None): * if result is None: * result = type(self)() # <<<<<<<<<<<<<< * if result.bv == NULL: * CHKERR( BVDuplicate(self.bv, &result.bv) ) */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_t_4 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 111, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8slepc4py_5SLEPc_BV))))) __PYX_ERR(3, 111, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_result, ((struct PySlepcBVObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":110 * * def copy(self, BV result=None): * if result is None: # <<<<<<<<<<<<<< * result = type(self)() * if result.bv == NULL: */ } /* "SLEPc/BV.pyx":112 * if result is None: * result = type(self)() * if result.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVDuplicate(self.bv, &result.bv) ) * CHKERR( BVCopy(self.bv, result.bv) ) */ __pyx_t_2 = ((__pyx_v_result->bv == NULL) != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":113 * result = type(self)() * if result.bv == NULL: * CHKERR( BVDuplicate(self.bv, &result.bv) ) # <<<<<<<<<<<<<< * CHKERR( BVCopy(self.bv, result.bv) ) * return result */ __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDuplicate(__pyx_v_self->bv, (&__pyx_v_result->bv))); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(3, 113, __pyx_L1_error) /* "SLEPc/BV.pyx":112 * if result is None: * result = type(self)() * if result.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVDuplicate(self.bv, &result.bv) ) * CHKERR( BVCopy(self.bv, result.bv) ) */ } /* "SLEPc/BV.pyx":114 * if result.bv == NULL: * CHKERR( BVDuplicate(self.bv, &result.bv) ) * CHKERR( BVCopy(self.bv, result.bv) ) # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCopy(__pyx_v_self->bv, __pyx_v_result->bv)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(3, 114, __pyx_L1_error) /* "SLEPc/BV.pyx":115 * CHKERR( BVDuplicate(self.bv, &result.bv) ) * CHKERR( BVCopy(self.bv, result.bv) ) * return result # <<<<<<<<<<<<<< * * def setType(self, bv_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "SLEPc/BV.pyx":109 * return bv * * def copy(self, BV result=None): # <<<<<<<<<<<<<< * if result is None: * result = type(self)() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.BV.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":117 * return result * * def setType(self, bv_type): # <<<<<<<<<<<<<< * """ * Selects the type for the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_12setType[] = "BV.setType(self, bv_type)\n\n Selects the type for the BV object.\n\n Parameters\n ----------\n bv_type: `BV.Type` enumerate\n The inner product type to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bv_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(3, 117, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_bv_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 117, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_12setType(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_bv_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_12setType(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_bv_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_bv_type); /* "SLEPc/BV.pyx":126 * The inner product type to be used. * """ * cdef SlepcBVType cval = NULL # <<<<<<<<<<<<<< * bv_type = str2bytes(bv_type, &cval) * CHKERR( BVSetType(self.bv, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/BV.pyx":127 * """ * cdef SlepcBVType cval = NULL * bv_type = str2bytes(bv_type, &cval) # <<<<<<<<<<<<<< * CHKERR( BVSetType(self.bv, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_bv_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_bv_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":128 * cdef SlepcBVType cval = NULL * bv_type = str2bytes(bv_type, &cval) * CHKERR( BVSetType(self.bv, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_self->bv, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 128, __pyx_L1_error) /* "SLEPc/BV.pyx":117 * return result * * def setType(self, bv_type): # <<<<<<<<<<<<<< * """ * Selects the type for the BV object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.BV.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bv_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":130 * CHKERR( BVSetType(self.bv, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the BV type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_15getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_14getType[] = "BV.getType(self)\n\n Gets the BV type of this object.\n\n Returns\n -------\n type: `BV.Type` enumerate\n The inner product type currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_15getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_14getType(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14getType(struct PySlepcBVObject *__pyx_v_self) { const char* __pyx_v_bv_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/BV.pyx":139 * The inner product type currently being used. * """ * cdef SlepcBVType bv_type = NULL # <<<<<<<<<<<<<< * CHKERR( BVGetType(self.bv, &bv_type) ) * return bytes2str(bv_type) */ __pyx_v_bv_type = NULL; /* "SLEPc/BV.pyx":140 * """ * cdef SlepcBVType bv_type = NULL * CHKERR( BVGetType(self.bv, &bv_type) ) # <<<<<<<<<<<<<< * return bytes2str(bv_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 140, __pyx_L1_error) /* "SLEPc/BV.pyx":141 * cdef SlepcBVType bv_type = NULL * CHKERR( BVGetType(self.bv, &bv_type) ) * return bytes2str(bv_type) # <<<<<<<<<<<<<< * * def setSizes(self, sizes, m): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_bv_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":130 * CHKERR( BVSetType(self.bv, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the BV type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":143 * return bytes2str(bv_type) * * def setSizes(self, sizes, m): # <<<<<<<<<<<<<< * """ * Sets the local and global sizes, and the number of columns. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_16setSizes[] = "BV.setSizes(self, sizes, m)\n\n Sets the local and global sizes, and the number of columns.\n\n Parameters\n ----------\n sizes: int or two-tuple of int\n The global size ``N`` or a two-tuple ``(n, N)``\n with the local and global sizes.\n m: int\n The number of columns.\n\n Notes\n -----\n Either ``n`` or ``N`` (but not both) can be ``PETSc.DECIDE``\n or ``None`` to have it automatically set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sizes = 0; PyObject *__pyx_v_m = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSizes (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sizes,&__pyx_n_s_m,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sizes)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSizes", 1, 2, 2, 1); __PYX_ERR(3, 143, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizes") < 0)) __PYX_ERR(3, 143, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sizes = values[0]; __pyx_v_m = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setSizes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 143, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_sizes, __pyx_v_m); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_m) { PetscInt __pyx_v_n; PetscInt __pyx_v_N; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setSizes", 0); /* "SLEPc/BV.pyx":160 * or ``None`` to have it automatically set. * """ * cdef PetscInt n=0, N=0 # <<<<<<<<<<<<<< * cdef PetscInt ival = asInt(m) * BV_Sizes(sizes, &n, &N) */ __pyx_v_n = 0; __pyx_v_N = 0; /* "SLEPc/BV.pyx":161 * """ * cdef PetscInt n=0, N=0 * cdef PetscInt ival = asInt(m) # <<<<<<<<<<<<<< * BV_Sizes(sizes, &n, &N) * CHKERR( BVSetSizes(self.bv, n, N, ival) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(3, 161, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/BV.pyx":162 * cdef PetscInt n=0, N=0 * cdef PetscInt ival = asInt(m) * BV_Sizes(sizes, &n, &N) # <<<<<<<<<<<<<< * CHKERR( BVSetSizes(self.bv, n, N, ival) ) * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_BV_Sizes(__pyx_v_sizes, (&__pyx_v_n), (&__pyx_v_N)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 162, __pyx_L1_error) /* "SLEPc/BV.pyx":163 * cdef PetscInt ival = asInt(m) * BV_Sizes(sizes, &n, &N) * CHKERR( BVSetSizes(self.bv, n, N, ival) ) # <<<<<<<<<<<<<< * * def setSizesFromVec(self, Vec w not None, m): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_self->bv, __pyx_v_n, __pyx_v_N, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 163, __pyx_L1_error) /* "SLEPc/BV.pyx":143 * return bytes2str(bv_type) * * def setSizes(self, sizes, m): # <<<<<<<<<<<<<< * """ * Sets the local and global sizes, and the number of columns. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":165 * CHKERR( BVSetSizes(self.bv, n, N, ival) ) * * def setSizesFromVec(self, Vec w not None, m): # <<<<<<<<<<<<<< * """ * Sets the local and global sizes, and the number of columns. Local and */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizesFromVec[] = "BV.setSizesFromVec(self, Vec w, m)\n\n Sets the local and global sizes, and the number of columns. Local and\n global sizes are specified indirectly by passing a template vector.\n\n Parameters\n ----------\n w: Vec\n The template vector.\n m: int\n The number of columns.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_w = 0; PyObject *__pyx_v_m = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSizesFromVec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_w,&__pyx_n_s_m,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSizesFromVec", 1, 2, 2, 1); __PYX_ERR(3, 165, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizesFromVec") < 0)) __PYX_ERR(3, 165, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_w = ((struct PyPetscVecObject *)values[0]); __pyx_v_m = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setSizesFromVec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 165, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizesFromVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "w", 0))) __PYX_ERR(3, 165, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_w, __pyx_v_m); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_w, PyObject *__pyx_v_m) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setSizesFromVec", 0); /* "SLEPc/BV.pyx":177 * The number of columns. * """ * cdef PetscInt ival = asInt(m) # <<<<<<<<<<<<<< * CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(3, 177, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/BV.pyx":178 * """ * cdef PetscInt ival = asInt(m) * CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) ) # <<<<<<<<<<<<<< * * def getSizes(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizesFromVec(__pyx_v_self->bv, __pyx_v_w->vec, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 178, __pyx_L1_error) /* "SLEPc/BV.pyx":165 * CHKERR( BVSetSizes(self.bv, n, N, ival) ) * * def setSizesFromVec(self, Vec w not None, m): # <<<<<<<<<<<<<< * """ * Sets the local and global sizes, and the number of columns. Local and */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizesFromVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":180 * CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) ) * * def getSizes(self): # <<<<<<<<<<<<<< * """ * Returns the local and global sizes, and the number of columns. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_20getSizes[] = "BV.getSizes(self)\n\n Returns the local and global sizes, and the number of columns.\n\n Returns\n -------\n sizes: two-tuple of int\n The local and global sizes ``(n, N)``.\n m: int\n The number of columns.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSizes (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getSizes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getSizes", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(struct PySlepcBVObject *__pyx_v_self) { PetscInt __pyx_v_n; PetscInt __pyx_v_N; PetscInt __pyx_v_m; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getSizes", 0); /* "SLEPc/BV.pyx":191 * The number of columns. * """ * cdef PetscInt n=0, N=0, m=0 # <<<<<<<<<<<<<< * CHKERR( BVGetSizes(self.bv, &n, &N, &m) ) * return ((toInt(n), toInt(N)), toInt(m)) */ __pyx_v_n = 0; __pyx_v_N = 0; __pyx_v_m = 0; /* "SLEPc/BV.pyx":192 * """ * cdef PetscInt n=0, N=0, m=0 * CHKERR( BVGetSizes(self.bv, &n, &N, &m) ) # <<<<<<<<<<<<<< * return ((toInt(n), toInt(N)), toInt(m)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, (&__pyx_v_n), (&__pyx_v_N), (&__pyx_v_m))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 192, __pyx_L1_error) /* "SLEPc/BV.pyx":193 * cdef PetscInt n=0, N=0, m=0 * CHKERR( BVGetSizes(self.bv, &n, &N, &m) ) * return ((toInt(n), toInt(N)), toInt(m)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":180 * CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) ) * * def getSizes(self): # <<<<<<<<<<<<<< * """ * Returns the local and global sizes, and the number of columns. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getSizes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":196 * * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all BV options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_22setOptionsPrefix[] = "BV.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all BV options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all BV option\n requests.\n\n Notes\n -----\n A hyphen (``-``) must NOT be given at the beginning of the\n prefix name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(3, 196, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 196, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/BV.pyx":213 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/BV.pyx":214 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":215 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOptionsPrefix(__pyx_v_self->bv, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 215, __pyx_L1_error) /* "SLEPc/BV.pyx":196 * * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all BV options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":217 * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all BV options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_24getOptionsPrefix[] = "BV.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all BV options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this BV object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(struct PySlepcBVObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/BV.pyx":227 * The prefix string set for this BV object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( BVGetOptionsPrefix(self.bv, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/BV.pyx":228 * """ * cdef const_char *prefix = NULL * CHKERR( BVGetOptionsPrefix(self.bv, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOptionsPrefix(__pyx_v_self->bv, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 228, __pyx_L1_error) /* "SLEPc/BV.pyx":229 * cdef const_char *prefix = NULL * CHKERR( BVGetOptionsPrefix(self.bv, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":217 * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all BV options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":231 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets BV options from the options database. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_26setFromOptions[] = "BV.setFromOptions(self)\n\n Sets BV options from the options database.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/BV.pyx":240 * option. * """ * CHKERR( BVSetFromOptions(self.bv) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetFromOptions(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 240, __pyx_L1_error) /* "SLEPc/BV.pyx":231 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets BV options from the options database. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":244 * # * * def getOrthogonalization(self): # <<<<<<<<<<<<<< * """ * Gets the orthogonalization settings from the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_28getOrthogonalization[] = "BV.getOrthogonalization(self)\n\n Gets the orthogonalization settings from the BV object.\n\n Returns\n -------\n type: `BV.OrthogType` enumerate\n The type of orthogonalization technique.\n refine: `BV.OrthogRefineType` enumerate\n The type of refinement.\n eta: float\n Parameter for selective refinement (used when the the\n refinement type `BV.OrthogRefineType.IFNEEDED`).\n block: `BV.OrthogBlockType` enumerate\n The type of block orthogonalization .\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOrthogonalization (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOrthogonalization", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOrthogonalization", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(struct PySlepcBVObject *__pyx_v_self) { BVOrthogType __pyx_v_val1; BVOrthogRefineType __pyx_v_val2; BVOrthogBlockType __pyx_v_val3; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("getOrthogonalization", 0); /* "SLEPc/BV.pyx":260 * The type of block orthogonalization . * """ * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS */ __pyx_v_val1 = BV_ORTHOG_CGS; /* "SLEPc/BV.pyx":261 * """ * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT */ __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED; /* "SLEPc/BV.pyx":262 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) */ __pyx_v_val3 = BV_ORTHOG_BLOCK_GS; /* "SLEPc/BV.pyx":263 * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * return (val1, val2, toReal(rval), val3) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/BV.pyx":264 * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) # <<<<<<<<<<<<<< * return (val1, val2, toReal(rval), val3) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 264, __pyx_L1_error) /* "SLEPc/BV.pyx":265 * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * return (val1, val2, toReal(rval), val3) # <<<<<<<<<<<<<< * * def setOrthogonalization(self, type=None, refine=None, eta=None, block=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_BVOrthogType(__pyx_v_val1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_BVOrthogRefineType(__pyx_v_val2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(__pyx_v_val3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":244 * # * * def getOrthogonalization(self): # <<<<<<<<<<<<<< * """ * Gets the orthogonalization settings from the BV object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":267 * return (val1, val2, toReal(rval), val3) * * def setOrthogonalization(self, type=None, refine=None, eta=None, block=None): # <<<<<<<<<<<<<< * """ * Specifies the method used for the orthogonalization of vectors */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_30setOrthogonalization[] = "BV.setOrthogonalization(self, type=None, refine=None, eta=None, block=None)\n\n Specifies the method used for the orthogonalization of vectors\n (classical or modified Gram-Schmidt with or without refinement),\n and for the block-orthogonalization (simultaneous orthogonalization\n of a set of vectors).\n\n Parameters\n ----------\n type: `BV.OrthogType` enumerate, optional\n The type of orthogonalization technique.\n refine: `BV.OrthogRefineType` enumerate, optional\n The type of refinement.\n eta: float, optional\n Parameter for selective refinement.\n block: `BV.OrthogBlockType` enumerate, optional\n The type of block orthogonalization.\n\n Notes\n -----\n The default settings work well for most problems.\n\n The parameter `eta` should be a real value between ``0`` and\n ``1`` (or `DEFAULT`). The value of `eta` is used only when\n the refinement type is `BV.OrthogRefineType.IFNEEDED`.\n\n When using several processors, `BV.OrthogType.MGS` is likely to\n result in bad scalability.\n\n If the method set for block orthogonalization is GS, then the\n computation is done column by column with the vector orthogonalization.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_type = 0; PyObject *__pyx_v_refine = 0; PyObject *__pyx_v_eta = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOrthogonalization (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_refine,&__pyx_n_s_eta,&__pyx_n_s_block,0}; PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refine); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eta); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOrthogonalization") < 0)) __PYX_ERR(3, 267, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_type = values[0]; __pyx_v_refine = values[1]; __pyx_v_eta = values[2]; __pyx_v_block = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOrthogonalization", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 267, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_type, __pyx_v_refine, __pyx_v_eta, __pyx_v_block); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_refine, PyObject *__pyx_v_eta, PyObject *__pyx_v_block) { BVOrthogType __pyx_v_val1; BVOrthogRefineType __pyx_v_val2; BVOrthogBlockType __pyx_v_val3; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; BVOrthogType __pyx_t_4; BVOrthogRefineType __pyx_t_5; BVOrthogBlockType __pyx_t_6; PetscReal __pyx_t_7; __Pyx_RefNannySetupContext("setOrthogonalization", 0); /* "SLEPc/BV.pyx":299 * computation is done column by column with the vector orthogonalization. * """ * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS */ __pyx_v_val1 = BV_ORTHOG_CGS; /* "SLEPc/BV.pyx":300 * """ * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT */ __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED; /* "SLEPc/BV.pyx":301 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) */ __pyx_v_val3 = BV_ORTHOG_BLOCK_GS; /* "SLEPc/BV.pyx":302 * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if type is not None: val1 = type */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/BV.pyx":303 * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) # <<<<<<<<<<<<<< * if type is not None: val1 = type * if refine is not None: val2 = refine */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 303, __pyx_L1_error) /* "SLEPc/BV.pyx":304 * cdef PetscReal rval = PETSC_DEFAULT * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if type is not None: val1 = type # <<<<<<<<<<<<<< * if refine is not None: val2 = refine * if block is not None: val3 = block */ __pyx_t_2 = (__pyx_v_type != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_4 = ((BVOrthogType)__Pyx_PyInt_As_BVOrthogType(__pyx_v_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 304, __pyx_L1_error) __pyx_v_val1 = __pyx_t_4; } /* "SLEPc/BV.pyx":305 * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if type is not None: val1 = type * if refine is not None: val2 = refine # <<<<<<<<<<<<<< * if block is not None: val3 = block * if eta is not None: rval = asReal(eta) */ __pyx_t_3 = (__pyx_v_refine != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_5 = ((BVOrthogRefineType)__Pyx_PyInt_As_BVOrthogRefineType(__pyx_v_refine)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 305, __pyx_L1_error) __pyx_v_val2 = __pyx_t_5; } /* "SLEPc/BV.pyx":306 * if type is not None: val1 = type * if refine is not None: val2 = refine * if block is not None: val3 = block # <<<<<<<<<<<<<< * if eta is not None: rval = asReal(eta) * CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) ) */ __pyx_t_2 = (__pyx_v_block != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_6 = ((BVOrthogBlockType)__Pyx_PyInt_As_BVOrthogBlockType(__pyx_v_block)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 306, __pyx_L1_error) __pyx_v_val3 = __pyx_t_6; } /* "SLEPc/BV.pyx":307 * if refine is not None: val2 = refine * if block is not None: val3 = block * if eta is not None: rval = asReal(eta) # <<<<<<<<<<<<<< * CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) ) * */ __pyx_t_3 = (__pyx_v_eta != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_eta); if (unlikely(__pyx_t_7 == -1.0 && PyErr_Occurred())) __PYX_ERR(3, 307, __pyx_L1_error) __pyx_v_rval = __pyx_t_7; } /* "SLEPc/BV.pyx":308 * if block is not None: val3 = block * if eta is not None: rval = asReal(eta) * CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_self->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 308, __pyx_L1_error) /* "SLEPc/BV.pyx":267 * return (val1, val2, toReal(rval), val3) * * def setOrthogonalization(self, type=None, refine=None, eta=None, block=None): # <<<<<<<<<<<<<< * """ * Specifies the method used for the orthogonalization of vectors */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":312 * # * * def getMatrix(self): # <<<<<<<<<<<<<< * """ * Retrieves the matrix representation of the inner product. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_32getMatrix[] = "BV.getMatrix(self)\n\n Retrieves the matrix representation of the inner product.\n\n Returns\n -------\n mat: the matrix of the inner product\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMatrix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMatrix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(struct PySlepcBVObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_mat = 0; PetscBool __pyx_v_indef; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("getMatrix", 0); /* "SLEPc/BV.pyx":320 * mat: the matrix of the inner product * """ * cdef Mat mat = Mat() # <<<<<<<<<<<<<< * cdef PetscBool indef = PETSC_FALSE * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":321 * """ * cdef Mat mat = Mat() * cdef PetscBool indef = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) * PetscINCREF(mat.obj) */ __pyx_v_indef = PETSC_FALSE; /* "SLEPc/BV.pyx":322 * cdef Mat mat = Mat() * cdef PetscBool indef = PETSC_FALSE * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) # <<<<<<<<<<<<<< * PetscINCREF(mat.obj) * return mat, indef */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetMatrix(__pyx_v_self->bv, (&__pyx_v_mat->mat), (&__pyx_v_indef))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 322, __pyx_L1_error) /* "SLEPc/BV.pyx":323 * cdef PetscBool indef = PETSC_FALSE * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) * PetscINCREF(mat.obj) # <<<<<<<<<<<<<< * return mat, indef * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_mat->__pyx_base.obj); /* "SLEPc/BV.pyx":324 * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) * PetscINCREF(mat.obj) * return mat, indef # <<<<<<<<<<<<<< * * def setMatrix(self, Mat mat, bint indef): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PetscBool(__pyx_v_indef); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_mat)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":312 * # * * def getMatrix(self): # <<<<<<<<<<<<<< * """ * Retrieves the matrix representation of the inner product. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_mat); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":326 * return mat, indef * * def setMatrix(self, Mat mat, bint indef): # <<<<<<<<<<<<<< * """ * Sets the bilinear form to be used for inner products. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_34setMatrix[] = "BV.setMatrix(self, Mat mat, bool indef)\n\n Sets the bilinear form to be used for inner products.\n\n Parameters\n ----------\n mat: Mat, optional\n The matrix of the inner product.\n indef: bool, optional\n Whether the matrix is indefinite\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_mat = 0; int __pyx_v_indef; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMatrix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mat,&__pyx_n_s_indef,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indef)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setMatrix", 1, 2, 2, 1); __PYX_ERR(3, 326, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatrix") < 0)) __PYX_ERR(3, 326, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_mat = ((struct PyPetscMatObject *)values[0]); __pyx_v_indef = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_indef == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 326, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMatrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 326, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "mat", 0))) __PYX_ERR(3, 326, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_mat, __pyx_v_indef); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_mat, int __pyx_v_indef) { Mat __pyx_v_m; PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations void *__pyx_t_1; int __pyx_t_2; PetscBool __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setMatrix", 0); /* "SLEPc/BV.pyx":337 * Whether the matrix is indefinite * """ * cdef PetscMat m = NULL if mat is None else mat.mat # <<<<<<<<<<<<<< * cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE * CHKERR( BVSetMatrix(self.bv, m, tval) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_mat) == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = NULL; } else { __pyx_t_1 = __pyx_v_mat->mat; } __pyx_v_m = __pyx_t_1; /* "SLEPc/BV.pyx":338 * """ * cdef PetscMat m = NULL if mat is None else mat.mat * cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVSetMatrix(self.bv, m, tval) ) * */ if ((__pyx_v_indef != 0)) { __pyx_t_3 = PETSC_TRUE; } else { __pyx_t_3 = PETSC_FALSE; } __pyx_v_tval = __pyx_t_3; /* "SLEPc/BV.pyx":339 * cdef PetscMat m = NULL if mat is None else mat.mat * cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE * CHKERR( BVSetMatrix(self.bv, m, tval) ) # <<<<<<<<<<<<<< * * def applyMatrix(self, Vec x not None, Vec y not None): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetMatrix(__pyx_v_self->bv, __pyx_v_m, __pyx_v_tval)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 339, __pyx_L1_error) /* "SLEPc/BV.pyx":326 * return mat, indef * * def setMatrix(self, Mat mat, bint indef): # <<<<<<<<<<<<<< * """ * Sets the bilinear form to be used for inner products. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":341 * CHKERR( BVSetMatrix(self.bv, m, tval) ) * * def applyMatrix(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Multiplies a vector with the matrix associated to the bilinear */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_36applyMatrix[] = "BV.applyMatrix(self, Vec x, Vec y)\n\n Multiplies a vector with the matrix associated to the bilinear\n form.\n\n Parameters\n ----------\n x: Vec\n The input vector.\n y: Vec\n The result vector.\n\n Notes\n -----\n If the bilinear form has no associated matrix this function\n copies the vector.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("applyMatrix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("applyMatrix", 1, 2, 2, 1); __PYX_ERR(3, 341, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyMatrix") < 0)) __PYX_ERR(3, 341, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_x = ((struct PyPetscVecObject *)values[0]); __pyx_v_y = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("applyMatrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 341, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.applyMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(3, 341, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(3, 341, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("applyMatrix", 0); /* "SLEPc/BV.pyx":358 * copies the vector. * """ * CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) ) # <<<<<<<<<<<<<< * * def setActiveColumns(self, int l, int k): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVApplyMatrix(__pyx_v_self->bv, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 358, __pyx_L1_error) /* "SLEPc/BV.pyx":341 * CHKERR( BVSetMatrix(self.bv, m, tval) ) * * def applyMatrix(self, Vec x not None, Vec y not None): # <<<<<<<<<<<<<< * """ * Multiplies a vector with the matrix associated to the bilinear */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.applyMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":360 * CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) ) * * def setActiveColumns(self, int l, int k): # <<<<<<<<<<<<<< * """ * Specify the columns that will be involved in operations. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_38setActiveColumns[] = "BV.setActiveColumns(self, int l, int k)\n\n Specify the columns that will be involved in operations.\n\n Parameters\n ----------\n l: int\n The leading number of columns.\n k: int\n The active number of columns.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_l; int __pyx_v_k; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setActiveColumns (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l,&__pyx_n_s_k,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setActiveColumns", 1, 2, 2, 1); __PYX_ERR(3, 360, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setActiveColumns") < 0)) __PYX_ERR(3, 360, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_l = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_l == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 360, __pyx_L3_error) __pyx_v_k = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 360, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setActiveColumns", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 360, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_l, __pyx_v_k); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setActiveColumns", 0); /* "SLEPc/BV.pyx":371 * The active number of columns. * """ * CHKERR( BVSetActiveColumns(self.bv, l, k) ) # <<<<<<<<<<<<<< * * def getActiveColumns(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetActiveColumns(__pyx_v_self->bv, __pyx_v_l, __pyx_v_k)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 371, __pyx_L1_error) /* "SLEPc/BV.pyx":360 * CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) ) * * def setActiveColumns(self, int l, int k): # <<<<<<<<<<<<<< * """ * Specify the columns that will be involved in operations. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":373 * CHKERR( BVSetActiveColumns(self.bv, l, k) ) * * def getActiveColumns(self): # <<<<<<<<<<<<<< * """ * Returns the current active dimensions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_40getActiveColumns[] = "BV.getActiveColumns(self)\n\n Returns the current active dimensions.\n\n Returns\n -------\n l: int\n The leading number of columns.\n k: int\n The active number of columns.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getActiveColumns (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getActiveColumns", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getActiveColumns", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(struct PySlepcBVObject *__pyx_v_self) { PetscInt __pyx_v_l; PetscInt __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getActiveColumns", 0); /* "SLEPc/BV.pyx":384 * The active number of columns. * """ * cdef PetscInt l=0, k=0 # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) * return (toInt(l), toInt(k)) */ __pyx_v_l = 0; __pyx_v_k = 0; /* "SLEPc/BV.pyx":385 * """ * cdef PetscInt l=0, k=0 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) # <<<<<<<<<<<<<< * return (toInt(l), toInt(k)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_self->bv, (&__pyx_v_l), (&__pyx_v_k))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 385, __pyx_L1_error) /* "SLEPc/BV.pyx":386 * cdef PetscInt l=0, k=0 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) * return (toInt(l), toInt(k)) # <<<<<<<<<<<<<< * * def scaleColumn(self, int j, alpha): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_l); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_k); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":373 * CHKERR( BVSetActiveColumns(self.bv, l, k) ) * * def getActiveColumns(self): # <<<<<<<<<<<<<< * """ * Returns the current active dimensions. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":388 * return (toInt(l), toInt(k)) * * def scaleColumn(self, int j, alpha): # <<<<<<<<<<<<<< * """ * Scale column j by alpha */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_42scaleColumn[] = "BV.scaleColumn(self, int j, alpha)\n\n Scale column j by alpha\n\n Parameters\n ----------\n j: int\n column number to be scaled.\n alpha: float\n scaling factor.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; PyObject *__pyx_v_alpha = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scaleColumn (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_alpha,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scaleColumn", 1, 2, 2, 1); __PYX_ERR(3, 388, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scaleColumn") < 0)) __PYX_ERR(3, 388, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 388, __pyx_L3_error) __pyx_v_alpha = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scaleColumn", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 388, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.scaleColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_alpha); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_alpha) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("scaleColumn", 0); /* "SLEPc/BV.pyx":399 * scaling factor. * """ * cdef PetscScalar sval = asScalar(alpha) # <<<<<<<<<<<<<< * CHKERR( BVScaleColumn(self.bv, j, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 399, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/BV.pyx":400 * """ * cdef PetscScalar sval = asScalar(alpha) * CHKERR( BVScaleColumn(self.bv, j, sval) ) # <<<<<<<<<<<<<< * * def scale(self, alpha): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVScaleColumn(__pyx_v_self->bv, __pyx_v_j, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 400, __pyx_L1_error) /* "SLEPc/BV.pyx":388 * return (toInt(l), toInt(k)) * * def scaleColumn(self, int j, alpha): # <<<<<<<<<<<<<< * """ * Scale column j by alpha */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.scaleColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":402 * CHKERR( BVScaleColumn(self.bv, j, sval) ) * * def scale(self, alpha): # <<<<<<<<<<<<<< * """ * Multiply the entries by a scalar value. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_45scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_44scale[] = "BV.scale(self, alpha)\n\n Multiply the entries by a scalar value.\n\n Parameters\n ----------\n alpha: float\n scaling factor.\n\n Notes\n -----\n All active columns (except the leading ones) are scaled.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_45scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scale (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scale") < 0)) __PYX_ERR(3, 402, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_alpha = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scale", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 402, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.scale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_44scale(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_44scale(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("scale", 0); /* "SLEPc/BV.pyx":415 * All active columns (except the leading ones) are scaled. * """ * cdef PetscScalar sval = asScalar(alpha) # <<<<<<<<<<<<<< * CHKERR( BVScale(self.bv, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 415, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/BV.pyx":416 * """ * cdef PetscScalar sval = asScalar(alpha) * CHKERR( BVScale(self.bv, sval) ) # <<<<<<<<<<<<<< * * def insertVec(self, int j, Vec w not None): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVScale(__pyx_v_self->bv, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 416, __pyx_L1_error) /* "SLEPc/BV.pyx":402 * CHKERR( BVScaleColumn(self.bv, j, sval) ) * * def scale(self, alpha): # <<<<<<<<<<<<<< * """ * Multiply the entries by a scalar value. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.scale", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":418 * CHKERR( BVScale(self.bv, sval) ) * * def insertVec(self, int j, Vec w not None): # <<<<<<<<<<<<<< * """ * Insert a vector into the specified column. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_46insertVec[] = "BV.insertVec(self, int j, Vec w)\n\n Insert a vector into the specified column.\n\n Parameters\n ----------\n j: int\n The column to be overwritten.\n w: Vec\n The vector to be copied.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; struct PyPetscVecObject *__pyx_v_w = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("insertVec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_w,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVec", 1, 2, 2, 1); __PYX_ERR(3, 418, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVec") < 0)) __PYX_ERR(3, 418, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 418, __pyx_L3_error) __pyx_v_w = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("insertVec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 418, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "w", 0))) __PYX_ERR(3, 418, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_w); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("insertVec", 0); /* "SLEPc/BV.pyx":429 * The vector to be copied. * """ * CHKERR( BVInsertVec(self.bv, j, w.vec) ) # <<<<<<<<<<<<<< * * def insertVecs(self, int s, W not None, bint orth): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVInsertVec(__pyx_v_self->bv, __pyx_v_j, __pyx_v_w->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 429, __pyx_L1_error) /* "SLEPc/BV.pyx":418 * CHKERR( BVScale(self.bv, sval) ) * * def insertVec(self, int j, Vec w not None): # <<<<<<<<<<<<<< * """ * Insert a vector into the specified column. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":431 * CHKERR( BVInsertVec(self.bv, j, w.vec) ) * * def insertVecs(self, int s, W not None, bint orth): # <<<<<<<<<<<<<< * """ * Insert a set of vectors into specified columns. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVecs[] = "BV.insertVecs(self, int s, W, bool orth)\n\n Insert a set of vectors into specified columns.\n\n Parameters\n ----------\n s: int\n The first column to be overwritten.\n W: Vec or sequence of Vec.\n Set of vectors to be copied.\n orth:\n Flag indicating if the vectors must be orthogonalized.\n\n Returns\n -------\n m: int\n Number of linearly independent vectors.\n\n Notes\n -----\n Copies the contents of vectors W into self(:,s:s+n), where n is the\n length of W. If orthogonalization flag is set then the vectors are\n copied one by one then orthogonalized against the previous one. If any\n are linearly dependent then it is discared and the value of m is\n decreased.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_s; PyObject *__pyx_v_W = 0; int __pyx_v_orth; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("insertVecs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_W,&__pyx_n_s_orth,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_W)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 1); __PYX_ERR(3, 431, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_orth)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 2); __PYX_ERR(3, 431, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVecs") < 0)) __PYX_ERR(3, 431, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_s = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_s == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 431, __pyx_L3_error) __pyx_v_W = values[1]; __pyx_v_orth = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_orth == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 431, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 431, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVecs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_W) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "W"); __PYX_ERR(3, 431, __pyx_L1_error) } __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_s, __pyx_v_W, __pyx_v_orth); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_s, PyObject *__pyx_v_W, int __pyx_v_orth) { Vec *__pyx_v_ws; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PetscInt __pyx_v_m; PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; PetscBool __pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("insertVecs", 0); __Pyx_INCREF(__pyx_v_W); /* "SLEPc/BV.pyx":457 * decreased. * """ * if isinstance(W, Vec): W = [W] # <<<<<<<<<<<<<< * cdef PetscVec *ws = NULL * cdef Py_ssize_t i = 0, ns = len(W) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_W, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_W); __Pyx_GIVEREF(__pyx_v_W); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_W); __Pyx_DECREF_SET(__pyx_v_W, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/BV.pyx":458 * """ * if isinstance(W, Vec): W = [W] * cdef PetscVec *ws = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(W) * cdef tmp = allocate(ns*sizeof(Vec),&ws) */ __pyx_v_ws = NULL; /* "SLEPc/BV.pyx":459 * if isinstance(W, Vec): W = [W] * cdef PetscVec *ws = NULL * cdef Py_ssize_t i = 0, ns = len(W) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&ws) * for i in range(ns): ws[i] = (W[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_W); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 459, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/BV.pyx":460 * cdef PetscVec *ws = NULL * cdef Py_ssize_t i = 0, ns = len(W) * cdef tmp = allocate(ns*sizeof(Vec),&ws) # <<<<<<<<<<<<<< * for i in range(ns): ws[i] = (W[i]).vec * cdef PetscInt m = ns */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_ws))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/BV.pyx":461 * cdef Py_ssize_t i = 0, ns = len(W) * cdef tmp = allocate(ns*sizeof(Vec),&ws) * for i in range(ns): ws[i] = (W[i]).vec # <<<<<<<<<<<<<< * cdef PetscInt m = ns * cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_W, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(3, 461, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_ws[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/BV.pyx":462 * cdef tmp = allocate(ns*sizeof(Vec),&ws) * for i in range(ns): ws[i] = (W[i]).vec * cdef PetscInt m = ns # <<<<<<<<<<<<<< * cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE * CHKERR( BVInsertVecs(self.bv, s, &m, ws, tval) ) */ __pyx_v_m = ((PetscInt)__pyx_v_ns); /* "SLEPc/BV.pyx":463 * for i in range(ns): ws[i] = (W[i]).vec * cdef PetscInt m = ns * cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVInsertVecs(self.bv, s, &m, ws, tval) ) * return toInt(m) */ if ((__pyx_v_orth != 0)) { __pyx_t_7 = PETSC_TRUE; } else { __pyx_t_7 = PETSC_FALSE; } __pyx_v_tval = __pyx_t_7; /* "SLEPc/BV.pyx":464 * cdef PetscInt m = ns * cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE * CHKERR( BVInsertVecs(self.bv, s, &m, ws, tval) ) # <<<<<<<<<<<<<< * return toInt(m) * */ __pyx_t_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVInsertVecs(__pyx_v_self->bv, ((PetscInt)__pyx_v_s), (&__pyx_v_m), __pyx_v_ws, __pyx_v_tval)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(3, 464, __pyx_L1_error) /* "SLEPc/BV.pyx":465 * cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE * CHKERR( BVInsertVecs(self.bv, s, &m, ws, tval) ) * return toInt(m) # <<<<<<<<<<<<<< * * def dotVec(self, Vec v not None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":431 * CHKERR( BVInsertVec(self.bv, j, w.vec) ) * * def insertVecs(self, int s, W not None, bint orth): # <<<<<<<<<<<<<< * """ * Insert a set of vectors into specified columns. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVecs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_W); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":467 * return toInt(m) * * def dotVec(self, Vec v not None): # <<<<<<<<<<<<<< * """ * Computes multiple dot products of a vector against all the column */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_50dotVec[] = "BV.dotVec(self, Vec v)\n\n Computes multiple dot products of a vector against all the column\n vectors of a BV.\n\n Parameters\n ----------\n v: Vec\n A vector.\n\n Returns\n -------\n m: Vec\n A vector with the results.\n\n This is analogue to VecMDot(), but using BV to represent a collection\n of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note\n that here X is transposed as opposed to BVDot().\n\n If a non-standard inner product has been specified with BVSetMatrix(),\n then the result is m = X^H*B*y.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_v = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dotVec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dotVec") < 0)) __PYX_ERR(3, 467, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_v = ((struct PyPetscVecObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dotVec", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 467, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.dotVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 467, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_v); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v) { PyObject *__pyx_v_l = NULL; PyObject *__pyx_v_k = NULL; PetscScalar *__pyx_v_mval; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); size_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; __Pyx_RefNannySetupContext("dotVec", 0); __Pyx_INCREF((PyObject *)__pyx_v_v); /* "SLEPc/BV.pyx":489 * then the result is m = X^H*B*y. * """ * l, k = self.getActiveColumns() # <<<<<<<<<<<<<< * cdef PetscScalar* mval = NULL * cdef tmp = allocate((k - l)*sizeof(PetscScalar),&mval) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getActiveColumns); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 489, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(3, 489, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(3, 489, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(3, 489, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_l = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_k = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/BV.pyx":490 * """ * l, k = self.getActiveColumns() * cdef PetscScalar* mval = NULL # <<<<<<<<<<<<<< * cdef tmp = allocate((k - l)*sizeof(PetscScalar),&mval) * */ __pyx_v_mval = NULL; /* "SLEPc/BV.pyx":491 * l, k = self.getActiveColumns() * cdef PetscScalar* mval = NULL * cdef tmp = allocate((k - l)*sizeof(PetscScalar),&mval) # <<<<<<<<<<<<<< * * CHKERR( BVDotVec(self.bv, v.vec, mval) ) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_t_6) * (sizeof(PetscScalar))), ((void **)(&__pyx_v_mval))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/BV.pyx":493 * cdef tmp = allocate((k - l)*sizeof(PetscScalar),&mval) * * CHKERR( BVDotVec(self.bv, v.vec, mval) ) # <<<<<<<<<<<<<< * * v = Vec().create(COMM_SELF) */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDotVec(__pyx_v_self->bv, __pyx_v_v->vec, __pyx_v_mval)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(3, 493, __pyx_L1_error) /* "SLEPc/BV.pyx":495 * CHKERR( BVDotVec(self.bv, v.vec, mval) ) * * v = Vec().create(COMM_SELF) # <<<<<<<<<<<<<< * v.setType('seq') * v.setSizes((DECIDE,k-l)) */ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Vec))))) __PYX_ERR(3, 495, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_v, ((struct PyPetscVecObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":496 * * v = Vec().create(COMM_SELF) * v.setType('seq') # <<<<<<<<<<<<<< * v.setSizes((DECIDE,k-l)) * v.setArray([mval[i] for i in range(0, k - l)]) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":497 * v = Vec().create(COMM_SELF) * v.setType('seq') * v.setSizes((DECIDE,k-l)) # <<<<<<<<<<<<<< * v.setArray([mval[i] for i in range(0, k - l)]) * v.ghostUpdate() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setSizes); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_DECIDE); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_8 = 0; __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":498 * v.setType('seq') * v.setSizes((DECIDE,k-l)) * v.setArray([mval[i] for i in range(0, k - l)]) # <<<<<<<<<<<<<< * v.ghostUpdate() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 498, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 498, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 498, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 498, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 498, __pyx_L1_error) __pyx_t_4 = PyFloat_FromDouble((__pyx_v_mval[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":499 * v.setSizes((DECIDE,k-l)) * v.setArray([mval[i] for i in range(0, k - l)]) * v.ghostUpdate() # <<<<<<<<<<<<<< * * return v */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_ghostUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 499, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":501 * v.ghostUpdate() * * return v # <<<<<<<<<<<<<< * * def getColumn(self, int j): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_v)); __pyx_r = ((PyObject *)__pyx_v_v); goto __pyx_L0; /* "SLEPc/BV.pyx":467 * return toInt(m) * * def dotVec(self, Vec v not None): # <<<<<<<<<<<<<< * """ * Computes multiple dot products of a vector against all the column */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("slepc4py.SLEPc.BV.dotVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_l); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":503 * return v * * def getColumn(self, int j): # <<<<<<<<<<<<<< * """ * Returns a Vec object that contains the entries of the requested column */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_52getColumn[] = "BV.getColumn(self, int j)\n\n Returns a Vec object that contains the entries of the requested column\n of the basis vectors object.\n\n Parameters\n ----------\n j: int\n The index of the requested column.\n\n Returns\n -------\n v: Vec\n The vector containing the jth column.\n\n Notes\n -----\n Modifying the returned Vec will change the BV entries as well.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getColumn (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getColumn") < 0)) __PYX_ERR(3, 503, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 503, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getColumn", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.getColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j) { struct PyPetscVecObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getColumn", 0); /* "SLEPc/BV.pyx":522 * Modifying the returned Vec will change the BV entries as well. * """ * cdef Vec v = Vec() # <<<<<<<<<<<<<< * CHKERR( BVGetColumn(self.bv, j, &v.vec) ) * return v */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_v = ((struct PyPetscVecObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":523 * """ * cdef Vec v = Vec() * CHKERR( BVGetColumn(self.bv, j, &v.vec) ) # <<<<<<<<<<<<<< * return v * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetColumn(__pyx_v_self->bv, __pyx_v_j, (&__pyx_v_v->vec))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 523, __pyx_L1_error) /* "SLEPc/BV.pyx":524 * cdef Vec v = Vec() * CHKERR( BVGetColumn(self.bv, j, &v.vec) ) * return v # <<<<<<<<<<<<<< * * def restoreColumn(self, int j, Vec v not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_v)); __pyx_r = ((PyObject *)__pyx_v_v); goto __pyx_L0; /* "SLEPc/BV.pyx":503 * return v * * def getColumn(self, int j): # <<<<<<<<<<<<<< * """ * Returns a Vec object that contains the entries of the requested column */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.BV.getColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":526 * return v * * def restoreColumn(self, int j, Vec v not None): # <<<<<<<<<<<<<< * """ * Restore a column obtained with BVGetColumn(). */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_54restoreColumn[] = "BV.restoreColumn(self, int j, Vec v)\n\n Restore a column obtained with BVGetColumn().\n\n Parameters\n ----------\n j: int\n The index of the requested column.\n\n v: Vec\n The vector obtained with BVGetColumn().\n\n Notes\n -----\n The arguments must match the corresponding call to BVGetColumn().\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; struct PyPetscVecObject *__pyx_v_v = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restoreColumn (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_v,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("restoreColumn", 1, 2, 2, 1); __PYX_ERR(3, 526, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "restoreColumn") < 0)) __PYX_ERR(3, 526, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 526, __pyx_L3_error) __pyx_v_v = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("restoreColumn", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 526, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.restoreColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 526, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_v); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("restoreColumn", 0); /* "SLEPc/BV.pyx":542 * The arguments must match the corresponding call to BVGetColumn(). * """ * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) # <<<<<<<<<<<<<< * * def dot(self, BV Y not None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVRestoreColumn(__pyx_v_self->bv, __pyx_v_j, (&__pyx_v_v->vec))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 542, __pyx_L1_error) /* "SLEPc/BV.pyx":526 * return v * * def restoreColumn(self, int j, Vec v not None): # <<<<<<<<<<<<<< * """ * Restore a column obtained with BVGetColumn(). */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.restoreColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":544 * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) * * def dot(self, BV Y not None): # <<<<<<<<<<<<<< * """ * Computes the 'block-dot' product of two basis vectors objects. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_57dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_56dot[] = "BV.dot(self, BV Y)\n\n Computes the 'block-dot' product of two basis vectors objects.\n M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X\n\n Parameters\n ----------\n Y: BV\n Left basis vectors, can be the same as self, giving M = X^H X.\n\n Returns\n -------\n M: Mat\n The resulting matrix.\n\n Notes\n -----\n This is the generalization of VecDot() for a collection of vectors, M =\n Y^H*X. The result is a matrix M whose entry m_ij is equal to y_i^H x_j\n (where y_i^H denotes the conjugate transpose of y_i).\n\n X and Y can be the same object.\n\n If a non-standard inner product has been specified with setMatrix(),\n then the result is M = Y^H*B*X. In this case, both X and Y must have\n the same associated matrix.\n\n Only rows (resp. columns) of M starting from ly (resp. lx) are\n computed, where ly (resp. lx) is the number of leading columns of Y\n (resp. X).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_57dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_Y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dot (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Y,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dot") < 0)) __PYX_ERR(3, 544, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_Y = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dot", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 544, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "Y", 0))) __PYX_ERR(3, 544, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_56dot(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_Y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_56dot(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_Y) { struct PySlepcBVObject *__pyx_v_X = 0; PetscInt __pyx_v_ky; PetscInt __pyx_v_kx; struct PyPetscMatObject *__pyx_v_M = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("dot", 0); /* "SLEPc/BV.pyx":575 * (resp. X). * """ * cdef BV X = self # <<<<<<<<<<<<<< * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_X = __pyx_v_self; /* "SLEPc/BV.pyx":576 * """ * cdef BV X = self * cdef PetscInt ky=0, kx=0 # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) */ __pyx_v_ky = 0; __pyx_v_kx = 0; /* "SLEPc/BV.pyx":577 * cdef BV X = self * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_Y->bv, NULL, (&__pyx_v_ky))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 577, __pyx_L1_error) /* "SLEPc/BV.pyx":578 * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) # <<<<<<<<<<<<<< * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * CHKERR( BVDot(X.bv, Y.bv, M.mat) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_X->bv, NULL, (&__pyx_v_kx))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 578, __pyx_L1_error) /* "SLEPc/BV.pyx":579 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() # <<<<<<<<<<<<<< * CHKERR( BVDot(X.bv, Y.bv, M.mat) ) * return M */ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_createDense); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_PetscInt(__pyx_v_ky); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_PetscInt(__pyx_v_kx); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_comm, __pyx_t_3) < 0) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setUp); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8petsc4py_5PETSc_Mat))))) __PYX_ERR(3, 579, __pyx_L1_error) __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":580 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * CHKERR( BVDot(X.bv, Y.bv, M.mat) ) # <<<<<<<<<<<<<< * return M * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDot(__pyx_v_X->bv, __pyx_v_Y->bv, __pyx_v_M->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 580, __pyx_L1_error) /* "SLEPc/BV.pyx":581 * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * CHKERR( BVDot(X.bv, Y.bv, M.mat) ) * return M # <<<<<<<<<<<<<< * * def matProject(self, Mat A, BV Y not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_M)); __pyx_r = ((PyObject *)__pyx_v_M); goto __pyx_L0; /* "SLEPc/BV.pyx":544 * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) * * def dot(self, BV Y not None): # <<<<<<<<<<<<<< * """ * Computes the 'block-dot' product of two basis vectors objects. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.BV.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_X); __Pyx_XDECREF((PyObject *)__pyx_v_M); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":583 * return M * * def matProject(self, Mat A, BV Y not None): # <<<<<<<<<<<<<< * """ * Computes the projection of a matrix onto a subspace. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_58matProject[] = "BV.matProject(self, Mat A, BV Y)\n\n Computes the projection of a matrix onto a subspace.\n\n M = Y^H A X\n\n Parameters\n ----------\n A: Mat or None\n Matrix to be projected.\n\n Y: BV\n Left basis vectors, can be the same as self, giving M = X^H A X.\n\n Returns\n -------\n M: Mat\n Projection of the matrix A onto the subspace.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("matProject (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_Y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("matProject", 1, 2, 2, 1); __PYX_ERR(3, 583, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matProject") < 0)) __PYX_ERR(3, 583, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); __pyx_v_Y = ((struct PySlepcBVObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("matProject", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 583, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.matProject", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "A", 0))) __PYX_ERR(3, 583, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "Y", 0))) __PYX_ERR(3, 583, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) { struct PySlepcBVObject *__pyx_v_X = 0; PetscInt __pyx_v_ky; PetscInt __pyx_v_kx; struct PyPetscMatObject *__pyx_v_M = 0; Mat __pyx_v_Amat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; void *__pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("matProject", 0); /* "SLEPc/BV.pyx":602 * Projection of the matrix A onto the subspace. * """ * cdef BV X = self # <<<<<<<<<<<<<< * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_X = __pyx_v_self; /* "SLEPc/BV.pyx":603 * """ * cdef BV X = self * cdef PetscInt ky=0, kx=0 # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) */ __pyx_v_ky = 0; __pyx_v_kx = 0; /* "SLEPc/BV.pyx":604 * cdef BV X = self * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_Y->bv, NULL, (&__pyx_v_ky))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 604, __pyx_L1_error) /* "SLEPc/BV.pyx":605 * cdef PetscInt ky=0, kx=0 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) # <<<<<<<<<<<<<< * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * cdef PetscMat Amat = NULL if A is None else A.mat */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_X->bv, NULL, (&__pyx_v_kx))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 605, __pyx_L1_error) /* "SLEPc/BV.pyx":606 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() # <<<<<<<<<<<<<< * cdef PetscMat Amat = NULL if A is None else A.mat * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) */ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_createDense); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_PetscInt(__pyx_v_ky); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_PetscInt(__pyx_v_kx); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_comm, __pyx_t_3) < 0) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setUp); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8petsc4py_5PETSc_Mat))))) __PYX_ERR(3, 606, __pyx_L1_error) __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":607 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * cdef PetscMat Amat = NULL if A is None else A.mat # <<<<<<<<<<<<<< * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) * return M */ __pyx_t_8 = (((PyObject *)__pyx_v_A) == Py_None); if ((__pyx_t_8 != 0)) { __pyx_t_7 = NULL; } else { __pyx_t_7 = __pyx_v_A->mat; } __pyx_v_Amat = __pyx_t_7; /* "SLEPc/BV.pyx":608 * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * cdef PetscMat Amat = NULL if A is None else A.mat * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) # <<<<<<<<<<<<<< * return M * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatProject(__pyx_v_X->bv, __pyx_v_Amat, __pyx_v_Y->bv, __pyx_v_M->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 608, __pyx_L1_error) /* "SLEPc/BV.pyx":609 * cdef PetscMat Amat = NULL if A is None else A.mat * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) * return M # <<<<<<<<<<<<<< * * def matMult(self, Mat A not None, BV Y=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_M)); __pyx_r = ((PyObject *)__pyx_v_M); goto __pyx_L0; /* "SLEPc/BV.pyx":583 * return M * * def matProject(self, Mat A, BV Y not None): # <<<<<<<<<<<<<< * """ * Computes the projection of a matrix onto a subspace. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.BV.matProject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_X); __Pyx_XDECREF((PyObject *)__pyx_v_M); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":611 * return M * * def matMult(self, Mat A not None, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product for each column, Y = A*V. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_60matMult[] = "BV.matMult(self, Mat A, BV Y=None)\n\n Computes the matrix-vector product for each column, Y = A*V.\n\n Parameters\n ----------\n A: Mat\n The matrix.\n\n Returns\n -------\n Y: BV\n The result.\n\n Notes\n -----\n Only active columns (excluding the leading ones) are processed.\n\n It is possible to choose whether the computation is done column by column\n or using dense matrices using the options database keys:\n\n -bv_matmult_vecs\n -bv_matmult_mat\n\n The default is bv_matmult_mat.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("matMult (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_Y,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PySlepcBVObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matMult") < 0)) __PYX_ERR(3, 611, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); __pyx_v_Y = ((struct PySlepcBVObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("matMult", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 611, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMult", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(3, 611, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(3, 611, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) { MPI_Comm __pyx_v_comm; const char* __pyx_v_bv_type; PetscInt __pyx_v_n; PetscInt __pyx_v_N; PetscInt __pyx_v_m; BVOrthogType __pyx_v_val1; BVOrthogRefineType __pyx_v_val2; BVOrthogBlockType __pyx_v_val3; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("matMult", 0); __Pyx_INCREF((PyObject *)__pyx_v_Y); /* "SLEPc/BV.pyx":637 * The default is bv_matmult_mat. * """ * cdef MPI_Comm comm = PetscObjectComm(self.bv) # <<<<<<<<<<<<<< * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 */ __pyx_v_comm = PetscObjectComm(((PetscObject)__pyx_v_self->bv)); /* "SLEPc/BV.pyx":638 * """ * cdef MPI_Comm comm = PetscObjectComm(self.bv) * cdef SlepcBVType bv_type = NULL # <<<<<<<<<<<<<< * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS */ __pyx_v_bv_type = NULL; /* "SLEPc/BV.pyx":639 * cdef MPI_Comm comm = PetscObjectComm(self.bv) * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 # <<<<<<<<<<<<<< * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED */ __pyx_v_n = 0; __pyx_v_N = 0; __pyx_v_m = 0; /* "SLEPc/BV.pyx":640 * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS */ __pyx_v_val1 = BV_ORTHOG_CGS; /* "SLEPc/BV.pyx":641 * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT */ __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED; /* "SLEPc/BV.pyx":642 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() */ __pyx_v_val3 = BV_ORTHOG_BLOCK_GS; /* "SLEPc/BV.pyx":643 * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * if Y is None: Y = BV() * if Y.bv == NULL: */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/BV.pyx":644 * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() # <<<<<<<<<<<<<< * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Y) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_Y, ((struct PySlepcBVObject *)__pyx_t_3)); __pyx_t_3 = 0; } /* "SLEPc/BV.pyx":645 * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) */ __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":646 * if Y is None: Y = BV() * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) # <<<<<<<<<<<<<< * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 646, __pyx_L1_error) /* "SLEPc/BV.pyx":647 * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) # <<<<<<<<<<<<<< * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetLocalSize(__pyx_v_A->mat, (&__pyx_v_n), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 647, __pyx_L1_error) /* "SLEPc/BV.pyx":648 * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) # <<<<<<<<<<<<<< * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetSize(__pyx_v_A->mat, (&__pyx_v_N), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 648, __pyx_L1_error) /* "SLEPc/BV.pyx":649 * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) # <<<<<<<<<<<<<< * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, NULL, NULL, (&__pyx_v_m))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 649, __pyx_L1_error) /* "SLEPc/BV.pyx":650 * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) # <<<<<<<<<<<<<< * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 650, __pyx_L1_error) /* "SLEPc/BV.pyx":645 * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) */ } /* "SLEPc/BV.pyx":651 * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) */ __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":652 * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) # <<<<<<<<<<<<<< * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_comm, (&__pyx_v_Y->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 652, __pyx_L1_error) /* "SLEPc/BV.pyx":653 * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) # <<<<<<<<<<<<<< * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_Y->bv, __pyx_v_bv_type)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 653, __pyx_L1_error) /* "SLEPc/BV.pyx":654 * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) # <<<<<<<<<<<<<< * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_Y->bv, __pyx_v_n, __pyx_v_N, __pyx_v_m)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 654, __pyx_L1_error) /* "SLEPc/BV.pyx":655 * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) # <<<<<<<<<<<<<< * CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) * return Y */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_Y->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 655, __pyx_L1_error) /* "SLEPc/BV.pyx":651 * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) */ } /* "SLEPc/BV.pyx":656 * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) # <<<<<<<<<<<<<< * return Y * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatMult(__pyx_v_self->bv, __pyx_v_A->mat, __pyx_v_Y->bv)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 656, __pyx_L1_error) /* "SLEPc/BV.pyx":657 * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) * return Y # <<<<<<<<<<<<<< * * def matMultHermitianTranspose(self, Mat A not None, BV Y=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_Y)); __pyx_r = ((PyObject *)__pyx_v_Y); goto __pyx_L0; /* "SLEPc/BV.pyx":611 * return M * * def matMult(self, Mat A not None, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product for each column, Y = A*V. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMult", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":659 * return Y * * def matMultHermitianTranspose(self, Mat A not None, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product with the conjugate transpose of a */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose[] = "BV.matMultHermitianTranspose(self, Mat A, BV Y=None)\n\n Computes the matrix-vector product with the conjugate transpose of a\n matrix for each column, Y=A^H*V.\n\n Parameters\n ----------\n A: Mat\n The matrix.\n\n Returns\n -------\n Y: BV\n The result.\n\n Notes\n -----\n Only active columns (excluding the leading ones) are processed.\n\n As opoosed to matMult(), this operation is always done by column by\n column, with a sequence of calls to MatMultHermitianTranspose().\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("matMultHermitianTranspose (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_Y,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PySlepcBVObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matMultHermitianTranspose") < 0)) __PYX_ERR(3, 659, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); __pyx_v_Y = ((struct PySlepcBVObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("matMultHermitianTranspose", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 659, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMultHermitianTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(3, 659, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(3, 659, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) { MPI_Comm __pyx_v_comm; const char* __pyx_v_bv_type; PetscInt __pyx_v_n; PetscInt __pyx_v_N; PetscInt __pyx_v_m; BVOrthogType __pyx_v_val1; BVOrthogRefineType __pyx_v_val2; BVOrthogBlockType __pyx_v_val3; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("matMultHermitianTranspose", 0); __Pyx_INCREF((PyObject *)__pyx_v_Y); /* "SLEPc/BV.pyx":681 * column, with a sequence of calls to MatMultHermitianTranspose(). * """ * cdef MPI_Comm comm = PetscObjectComm(self.bv) # <<<<<<<<<<<<<< * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 */ __pyx_v_comm = PetscObjectComm(((PetscObject)__pyx_v_self->bv)); /* "SLEPc/BV.pyx":682 * """ * cdef MPI_Comm comm = PetscObjectComm(self.bv) * cdef SlepcBVType bv_type = NULL # <<<<<<<<<<<<<< * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS */ __pyx_v_bv_type = NULL; /* "SLEPc/BV.pyx":683 * cdef MPI_Comm comm = PetscObjectComm(self.bv) * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 # <<<<<<<<<<<<<< * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED */ __pyx_v_n = 0; __pyx_v_N = 0; __pyx_v_m = 0; /* "SLEPc/BV.pyx":684 * cdef SlepcBVType bv_type = NULL * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS */ __pyx_v_val1 = BV_ORTHOG_CGS; /* "SLEPc/BV.pyx":685 * cdef PetscInt n=0, N=0, m=0 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT */ __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED; /* "SLEPc/BV.pyx":686 * cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() */ __pyx_v_val3 = BV_ORTHOG_BLOCK_GS; /* "SLEPc/BV.pyx":687 * cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * if Y is None: Y = BV() * if Y.bv == NULL: */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/BV.pyx":688 * cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() # <<<<<<<<<<<<<< * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Y) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_Y, ((struct PySlepcBVObject *)__pyx_t_3)); __pyx_t_3 = 0; } /* "SLEPc/BV.pyx":689 * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) */ __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":690 * if Y is None: Y = BV() * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) # <<<<<<<<<<<<<< * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 690, __pyx_L1_error) /* "SLEPc/BV.pyx":691 * if Y.bv == NULL: * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) # <<<<<<<<<<<<<< * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetLocalSize(__pyx_v_A->mat, (&__pyx_v_n), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 691, __pyx_L1_error) /* "SLEPc/BV.pyx":692 * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) # <<<<<<<<<<<<<< * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetSize(__pyx_v_A->mat, (&__pyx_v_N), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 692, __pyx_L1_error) /* "SLEPc/BV.pyx":693 * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) # <<<<<<<<<<<<<< * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, NULL, NULL, (&__pyx_v_m))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 693, __pyx_L1_error) /* "SLEPc/BV.pyx":694 * CHKERR( MatGetSize(A.mat, &N, NULL) ) * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) # <<<<<<<<<<<<<< * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 694, __pyx_L1_error) /* "SLEPc/BV.pyx":689 * cdef PetscReal rval = PETSC_DEFAULT * if Y is None: Y = BV() * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVGetType(self.bv, &bv_type) ) * CHKERR( MatGetLocalSize(A.mat, &n, NULL) ) */ } /* "SLEPc/BV.pyx":695 * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) */ __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0); if (__pyx_t_2) { /* "SLEPc/BV.pyx":696 * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) # <<<<<<<<<<<<<< * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_comm, (&__pyx_v_Y->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 696, __pyx_L1_error) /* "SLEPc/BV.pyx":697 * if Y.bv == NULL: * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) # <<<<<<<<<<<<<< * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_Y->bv, __pyx_v_bv_type)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 697, __pyx_L1_error) /* "SLEPc/BV.pyx":698 * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) # <<<<<<<<<<<<<< * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_Y->bv, __pyx_v_n, __pyx_v_N, __pyx_v_m)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 698, __pyx_L1_error) /* "SLEPc/BV.pyx":699 * CHKERR( BVSetType(Y.bv, bv_type) ) * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) # <<<<<<<<<<<<<< * CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) ) * return Y */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_Y->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 699, __pyx_L1_error) /* "SLEPc/BV.pyx":695 * CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) ) * CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) ) * if Y.bv == NULL: # <<<<<<<<<<<<<< * CHKERR( BVCreate(comm, &Y.bv) ) * CHKERR( BVSetType(Y.bv, bv_type) ) */ } /* "SLEPc/BV.pyx":700 * CHKERR( BVSetSizes(Y.bv, n, N, m) ) * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) ) # <<<<<<<<<<<<<< * return Y * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatMultHermitianTranspose(__pyx_v_self->bv, __pyx_v_A->mat, __pyx_v_Y->bv)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 700, __pyx_L1_error) /* "SLEPc/BV.pyx":701 * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) ) * return Y # <<<<<<<<<<<<<< * * def multVec(self, alpha, beta, Vec y not None, q): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_Y)); __pyx_r = ((PyObject *)__pyx_v_Y); goto __pyx_L0; /* "SLEPc/BV.pyx":659 * return Y * * def matMultHermitianTranspose(self, Mat A not None, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product with the conjugate transpose of a */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMultHermitianTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":703 * return Y * * def multVec(self, alpha, beta, Vec y not None, q): # <<<<<<<<<<<<<< * """ * Computes y = beta*y + alpha*X*q. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_64multVec[] = "BV.multVec(self, alpha, beta, Vec y, q)\n\n Computes y = beta*y + alpha*X*q.\n\n Parameter\n ---------\n alpha: scalar\n beta: scalar\n q: scalar or sequence of scalars\n\n Return\n ------\n y: Vec\n The result.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_v_beta = 0; struct PyPetscVecObject *__pyx_v_y = 0; PyObject *__pyx_v_q = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("multVec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,&__pyx_n_s_beta,&__pyx_n_s_y,&__pyx_n_s_q,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beta)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 1); __PYX_ERR(3, 703, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 2); __PYX_ERR(3, 703, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 3); __PYX_ERR(3, 703, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multVec") < 0)) __PYX_ERR(3, 703, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_alpha = values[0]; __pyx_v_beta = values[1]; __pyx_v_y = ((struct PyPetscVecObject *)values[2]); __pyx_v_q = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 703, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.multVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(3, 703, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_alpha, __pyx_v_beta, __pyx_v_y, __pyx_v_q); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta, struct PyPetscVecObject *__pyx_v_y, PyObject *__pyx_v_q) { PetscScalar __pyx_v_sval1; PetscScalar __pyx_v_sval2; PetscInt __pyx_v_nq; PetscScalar *__pyx_v_qval; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PetscInt __pyx_v_l; PetscInt __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("multVec", 0); /* "SLEPc/BV.pyx":718 * The result. * """ * cdef PetscScalar sval1 = asScalar(alpha) # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = asScalar(beta) * cdef PetscInt nq = 0 */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 718, __pyx_L1_error) __pyx_v_sval1 = __pyx_t_1; /* "SLEPc/BV.pyx":719 * """ * cdef PetscScalar sval1 = asScalar(alpha) * cdef PetscScalar sval2 = asScalar(beta) # <<<<<<<<<<<<<< * cdef PetscInt nq = 0 * cdef PetscScalar* qval = NULL */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_beta); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 719, __pyx_L1_error) __pyx_v_sval2 = __pyx_t_1; /* "SLEPc/BV.pyx":720 * cdef PetscScalar sval1 = asScalar(alpha) * cdef PetscScalar sval2 = asScalar(beta) * cdef PetscInt nq = 0 # <<<<<<<<<<<<<< * cdef PetscScalar* qval = NULL * cdef tmp = iarray_s(q, &nq, &qval) */ __pyx_v_nq = 0; /* "SLEPc/BV.pyx":721 * cdef PetscScalar sval2 = asScalar(beta) * cdef PetscInt nq = 0 * cdef PetscScalar* qval = NULL # <<<<<<<<<<<<<< * cdef tmp = iarray_s(q, &nq, &qval) * cdef PetscInt l=0, k=0 */ __pyx_v_qval = NULL; /* "SLEPc/BV.pyx":722 * cdef PetscInt nq = 0 * cdef PetscScalar* qval = NULL * cdef tmp = iarray_s(q, &nq, &qval) # <<<<<<<<<<<<<< * cdef PetscInt l=0, k=0 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_q, (&__pyx_v_nq), (&__pyx_v_qval)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/BV.pyx":723 * cdef PetscScalar* qval = NULL * cdef tmp = iarray_s(q, &nq, &qval) * cdef PetscInt l=0, k=0 # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) * assert nq == k-l */ __pyx_v_l = 0; __pyx_v_k = 0; /* "SLEPc/BV.pyx":724 * cdef tmp = iarray_s(q, &nq, &qval) * cdef PetscInt l=0, k=0 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) # <<<<<<<<<<<<<< * assert nq == k-l * CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_self->bv, (&__pyx_v_l), (&__pyx_v_k))); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(3, 724, __pyx_L1_error) /* "SLEPc/BV.pyx":725 * cdef PetscInt l=0, k=0 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) * assert nq == k-l # <<<<<<<<<<<<<< * CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_nq == (__pyx_v_k - __pyx_v_l)) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(3, 725, __pyx_L1_error) } } #endif /* "SLEPc/BV.pyx":726 * CHKERR( BVGetActiveColumns(self.bv, &l, &k) ) * assert nq == k-l * CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) # <<<<<<<<<<<<<< * * def normColumn(self, int j, norm_type=None): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMultVec(__pyx_v_self->bv, __pyx_v_sval1, __pyx_v_sval2, __pyx_v_y->vec, __pyx_v_qval)); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(3, 726, __pyx_L1_error) /* "SLEPc/BV.pyx":703 * return Y * * def multVec(self, alpha, beta, Vec y not None, q): # <<<<<<<<<<<<<< * """ * Computes y = beta*y + alpha*X*q. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.BV.multVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":728 * CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) * * def normColumn(self, int j, norm_type=None): # <<<<<<<<<<<<<< * """ * Computes the matrix norm of the BV. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_66normColumn[] = "BV.normColumn(self, int j, norm_type=None)\n\n Computes the matrix norm of the BV.\n\n Parameters\n ----------\n j: int\n Index of column.\n norm_type: PETSc.NormType (int)\n The norm type.\n\n Returns\n -------\n norm: float\n\n Notes\n -----\n The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).\n\n If a non-standard inner product has been specified with BVSetMatrix(),\n then the returned value is ``sqrt(V[j]'* B*V[j])``, where B is the inner\n product matrix (argument 'type' is ignored).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; PyObject *__pyx_v_norm_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("normColumn (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_norm_type,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_norm_type); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "normColumn") < 0)) __PYX_ERR(3, 728, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 728, __pyx_L3_error) __pyx_v_norm_type = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("normColumn", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 728, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.normColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_norm_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_norm_type) { NormType __pyx_v_ntype; PetscReal __pyx_v_norm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; NormType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("normColumn", 0); /* "SLEPc/BV.pyx":751 * product matrix (argument 'type' is ignored). * """ * cdef PetscNormType ntype = PETSC_NORM_2 # <<<<<<<<<<<<<< * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 */ __pyx_v_ntype = NORM_2; /* "SLEPc/BV.pyx":752 * """ * cdef PetscNormType ntype = PETSC_NORM_2 * if norm_type is not None: ntype = norm_type # <<<<<<<<<<<<<< * cdef PetscReal norm = 0 * CHKERR( BVNormColumn(self.bv, j, ntype, &norm) ) */ __pyx_t_1 = (__pyx_v_norm_type != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((NormType)__Pyx_PyInt_As_NormType(__pyx_v_norm_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 752, __pyx_L1_error) __pyx_v_ntype = __pyx_t_3; } /* "SLEPc/BV.pyx":753 * cdef PetscNormType ntype = PETSC_NORM_2 * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 # <<<<<<<<<<<<<< * CHKERR( BVNormColumn(self.bv, j, ntype, &norm) ) * return toReal(norm) */ __pyx_v_norm = 0.0; /* "SLEPc/BV.pyx":754 * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 * CHKERR( BVNormColumn(self.bv, j, ntype, &norm) ) # <<<<<<<<<<<<<< * return toReal(norm) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVNormColumn(__pyx_v_self->bv, __pyx_v_j, __pyx_v_ntype, (&__pyx_v_norm))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 754, __pyx_L1_error) /* "SLEPc/BV.pyx":755 * cdef PetscReal norm = 0 * CHKERR( BVNormColumn(self.bv, j, ntype, &norm) ) * return toReal(norm) # <<<<<<<<<<<<<< * * def norm(self, norm_type=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":728 * CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) ) * * def normColumn(self, int j, norm_type=None): # <<<<<<<<<<<<<< * """ * Computes the matrix norm of the BV. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.BV.normColumn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":757 * return toReal(norm) * * def norm(self, norm_type=None): # <<<<<<<<<<<<<< * """ * Computes the matrix norm of the BV. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_69norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_68norm[] = "BV.norm(self, norm_type=None)\n\n Computes the matrix norm of the BV.\n\n Parameters\n ----------\n norm_type: PETSC.NormType enumerate\n The norm type.\n\n Returns\n -------\n norm: float\n\n Notes\n -----\n All active columns (except the leading ones) are considered as a\n matrix. The allowed norms are NORM_1, NORM_FROBENIUS, and\n NORM_INFINITY.\n\n This operation fails if a non-standard inner product has been specified\n with BVSetMatrix().\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_69norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_norm_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("norm (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_norm_type,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_norm_type); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "norm") < 0)) __PYX_ERR(3, 757, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_norm_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("norm", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 757, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.norm", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_68norm(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_norm_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_68norm(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_norm_type) { NormType __pyx_v_ntype; PetscReal __pyx_v_norm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; NormType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("norm", 0); /* "SLEPc/BV.pyx":779 * with BVSetMatrix(). * """ * cdef PetscNormType ntype = PETSC_NORM_FROBENIUS # <<<<<<<<<<<<<< * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 */ __pyx_v_ntype = NORM_FROBENIUS; /* "SLEPc/BV.pyx":780 * """ * cdef PetscNormType ntype = PETSC_NORM_FROBENIUS * if norm_type is not None: ntype = norm_type # <<<<<<<<<<<<<< * cdef PetscReal norm = 0 * CHKERR( BVNorm(self.bv, ntype, &norm) ) */ __pyx_t_1 = (__pyx_v_norm_type != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((NormType)__Pyx_PyInt_As_NormType(__pyx_v_norm_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 780, __pyx_L1_error) __pyx_v_ntype = __pyx_t_3; } /* "SLEPc/BV.pyx":781 * cdef PetscNormType ntype = PETSC_NORM_FROBENIUS * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 # <<<<<<<<<<<<<< * CHKERR( BVNorm(self.bv, ntype, &norm) ) * return toReal(norm) */ __pyx_v_norm = 0.0; /* "SLEPc/BV.pyx":782 * if norm_type is not None: ntype = norm_type * cdef PetscReal norm = 0 * CHKERR( BVNorm(self.bv, ntype, &norm) ) # <<<<<<<<<<<<<< * return toReal(norm) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVNorm(__pyx_v_self->bv, __pyx_v_ntype, (&__pyx_v_norm))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 782, __pyx_L1_error) /* "SLEPc/BV.pyx":783 * cdef PetscReal norm = 0 * CHKERR( BVNorm(self.bv, ntype, &norm) ) * return toReal(norm) # <<<<<<<<<<<<<< * * def setRandom(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":757 * return toReal(norm) * * def norm(self, norm_type=None): # <<<<<<<<<<<<<< * """ * Computes the matrix norm of the BV. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.BV.norm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":785 * return toReal(norm) * * def setRandom(self): # <<<<<<<<<<<<<< * """ * Set the active columns of BV to random numbers. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_70setRandom[] = "BV.setRandom(self)\n\n Set the active columns of BV to random numbers.\n\n Notes\n -----\n All active columns (except the leading ones) are modified.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRandom (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setRandom", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setRandom", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setRandom", 0); /* "SLEPc/BV.pyx":793 * All active columns (except the leading ones) are modified. * """ * CHKERR( BVSetRandom(self.bv) ) # <<<<<<<<<<<<<< * * def orthogonalizeVec(self, Vec v not None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetRandom(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 793, __pyx_L1_error) /* "SLEPc/BV.pyx":785 * return toReal(norm) * * def setRandom(self): # <<<<<<<<<<<<<< * """ * Set the active columns of BV to random numbers. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setRandom", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":795 * CHKERR( BVSetRandom(self.bv) ) * * def orthogonalizeVec(self, Vec v not None): # <<<<<<<<<<<<<< * """ * Orthogonalize a vector with respect to a set of vectors. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_72orthogonalizeVec[] = "BV.orthogonalizeVec(self, Vec v)\n\n Orthogonalize a vector with respect to a set of vectors.\n\n Parameters\n ----------\n v: Vec\n Vector to be orthogonalized, modified on return.\n\n Returns\n -------\n norm: float\n The norm of the resulting vector.\n lindep: boolean\n Flag indicating that refinement did not improve the\n quality of orthogonalization.\n\n Notes\n -----\n This function applies an orthogonal projector to project\n vector ``v`` onto the orthogonal complement of the span of the\n columns of the BV.\n\n This routine does not normalize the resulting vector.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_v = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("orthogonalizeVec (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "orthogonalizeVec") < 0)) __PYX_ERR(3, 795, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_v = ((struct PyPetscVecObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("orthogonalizeVec", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 795, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalizeVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 795, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_v); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v) { PetscReal __pyx_v_norm; PetscBool __pyx_v_ldep; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("orthogonalizeVec", 0); /* "SLEPc/BV.pyx":820 * This routine does not normalize the resulting vector. * """ * cdef PetscReal norm = 0 # <<<<<<<<<<<<<< * cdef PetscBool ldep = PETSC_FALSE * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) */ __pyx_v_norm = 0.0; /* "SLEPc/BV.pyx":821 * """ * cdef PetscReal norm = 0 * cdef PetscBool ldep = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) * return (toReal(norm), ldep) */ __pyx_v_ldep = PETSC_FALSE; /* "SLEPc/BV.pyx":822 * cdef PetscReal norm = 0 * cdef PetscBool ldep = PETSC_FALSE * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) # <<<<<<<<<<<<<< * return (toReal(norm), ldep) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVOrthogonalizeVec(__pyx_v_self->bv, __pyx_v_v->vec, NULL, (&__pyx_v_norm), (&__pyx_v_ldep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 822, __pyx_L1_error) /* "SLEPc/BV.pyx":823 * cdef PetscBool ldep = PETSC_FALSE * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) * return (toReal(norm), ldep) # <<<<<<<<<<<<<< * * def orthogonalize(self, Mat R=None, **kargs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_PetscBool(__pyx_v_ldep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":795 * CHKERR( BVSetRandom(self.bv) ) * * def orthogonalizeVec(self, Vec v not None): # <<<<<<<<<<<<<< * """ * Orthogonalize a vector with respect to a set of vectors. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalizeVec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":825 * return (toReal(norm), ldep) * * def orthogonalize(self, Mat R=None, **kargs): # <<<<<<<<<<<<<< * """ * Orthogonalize all columns (except leading ones), */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_74orthogonalize[] = "BV.orthogonalize(self, Mat R=None, **kargs)\n\n Orthogonalize all columns (except leading ones),\n that is, compute the QR decomposition.\n\n Parameters\n ----------\n R: Mat or None\n A sequential dense matrix.\n\n Notes\n -----\n The output satisfies ``V0 = V*R`` (where V0 represent the input V) and ``V'*V = I``.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_R = 0; PyObject *__pyx_v_kargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("orthogonalize (wrapper)", 0); __pyx_v_kargs = PyDict_New(); if (unlikely(!__pyx_v_kargs)) return NULL; __Pyx_GOTREF(__pyx_v_kargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_R,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscMatObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_R); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kargs, values, pos_args, "orthogonalize") < 0)) __PYX_ERR(3, 825, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_R = ((struct PyPetscMatObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("orthogonalize", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 825, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kargs); __pyx_v_kargs = 0; __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_R), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "R", 0))) __PYX_ERR(3, 825, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_R, __pyx_v_kargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_R, PyObject *__pyx_v_kargs) { Mat __pyx_v_Rmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; void *__pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("orthogonalize", 0); /* "SLEPc/BV.pyx":839 * The output satisfies ``V0 = V*R`` (where V0 represent the input V) and ``V'*V = I``. * """ * if kargs: self.setOrthogonalization(**kargs) # <<<<<<<<<<<<<< * cdef PetscMat Rmat = NULL if R is None else R.mat * CHKERR( BVOrthogonalize(self.bv, Rmat) ) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 839, __pyx_L1_error) if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setOrthogonalization); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/BV.pyx":840 * """ * if kargs: self.setOrthogonalization(**kargs) * cdef PetscMat Rmat = NULL if R is None else R.mat # <<<<<<<<<<<<<< * CHKERR( BVOrthogonalize(self.bv, Rmat) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_R) == Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_4 = NULL; } else { __pyx_t_4 = __pyx_v_R->mat; } __pyx_v_Rmat = __pyx_t_4; /* "SLEPc/BV.pyx":841 * if kargs: self.setOrthogonalization(**kargs) * cdef PetscMat Rmat = NULL if R is None else R.mat * CHKERR( BVOrthogonalize(self.bv, Rmat) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVOrthogonalize(__pyx_v_self->bv, __pyx_v_Rmat)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(3, 841, __pyx_L1_error) /* "SLEPc/BV.pyx":825 * return (toReal(norm), ldep) * * def orthogonalize(self, Mat R=None, **kargs): # <<<<<<<<<<<<<< * """ * Orthogonalize all columns (except leading ones), */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":72 * MatType = DSMatType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.ds * self.ds = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(struct PySlepcDSObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/DS.pyx":73 * * def __cinit__(self): * self.obj = &self.ds # <<<<<<<<<<<<<< * self.ds = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->ds)); /* "SLEPc/DS.pyx":74 * def __cinit__(self): * self.obj = &self.ds * self.ds = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->ds = NULL; /* "SLEPc/DS.pyx":72 * MatType = DSMatType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.ds * self.ds = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":76 * self.ds = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the DS data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_2view[] = "DS.view(self, Viewer viewer=None)\n\n Prints the DS data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(10, 76, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 76, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(10, 76, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_2view(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_2view(struct PySlepcDSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/DS.pyx":86 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( DSView(self.ds, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/DS.pyx":87 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( DSView(self.ds, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/DS.pyx":88 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( DSView(self.ds, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSView(__pyx_v_self->ds, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(10, 88, __pyx_L1_error) /* "SLEPc/DS.pyx":76 * self.ds = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the DS data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":90 * CHKERR( DSView(self.ds, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_4destroy[] = "DS.destroy(self)\n\n Destroys the DS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(struct PySlepcDSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/DS.pyx":94 * Destroys the DS object. * """ * CHKERR( DSDestroy(&self.ds) ) # <<<<<<<<<<<<<< * self.ds = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSDestroy((&__pyx_v_self->ds))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 94, __pyx_L1_error) /* "SLEPc/DS.pyx":95 * """ * CHKERR( DSDestroy(&self.ds) ) * self.ds = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->ds = NULL; /* "SLEPc/DS.pyx":96 * CHKERR( DSDestroy(&self.ds) ) * self.ds = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/DS.pyx":90 * CHKERR( DSView(self.ds, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the DS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":98 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_6reset[] = "DS.reset(self)\n\n Resets the DS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_6reset(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_6reset(struct PySlepcDSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/DS.pyx":102 * Resets the DS object. * """ * CHKERR( DSReset(self.ds) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSReset(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 102, __pyx_L1_error) /* "SLEPc/DS.pyx":98 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the DS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":104 * CHKERR( DSReset(self.ds) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_8create[] = "DS.create(self, comm=None)\n\n Creates the DS object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(10, 104, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 104, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_8create(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_8create(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; DS __pyx_v_newds; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/DS.pyx":114 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcDS newds = NULL * CHKERR( DSCreate(ccomm, &newds) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 114, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/DS.pyx":115 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcDS newds = NULL # <<<<<<<<<<<<<< * CHKERR( DSCreate(ccomm, &newds) ) * SlepcCLEAR(self.obj); self.ds = newds */ __pyx_v_newds = NULL; /* "SLEPc/DS.pyx":116 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcDS newds = NULL * CHKERR( DSCreate(ccomm, &newds) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.ds = newds * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSCreate(__pyx_v_ccomm, (&__pyx_v_newds))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 116, __pyx_L1_error) /* "SLEPc/DS.pyx":117 * cdef SlepcDS newds = NULL * CHKERR( DSCreate(ccomm, &newds) ) * SlepcCLEAR(self.obj); self.ds = newds # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->ds = __pyx_v_newds; /* "SLEPc/DS.pyx":118 * CHKERR( DSCreate(ccomm, &newds) ) * SlepcCLEAR(self.obj); self.ds = newds * return self # <<<<<<<<<<<<<< * * def setType(self, ds_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/DS.pyx":104 * CHKERR( DSReset(self.ds) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the DS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":120 * return self * * def setType(self, ds_type): # <<<<<<<<<<<<<< * """ * Selects the type for the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_10setType[] = "DS.setType(self, ds_type)\n\n Selects the type for the DS object.\n\n Parameters\n ----------\n ds_type: `DS.Type` enumerate\n The direct solver type to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ds_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ds_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ds_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(10, 120, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ds_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 120, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_10setType(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ds_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_10setType(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ds_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_ds_type); /* "SLEPc/DS.pyx":129 * The direct solver type to be used. * """ * cdef SlepcDSType cval = NULL # <<<<<<<<<<<<<< * ds_type = str2bytes(ds_type, &cval) * CHKERR( DSSetType(self.ds, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/DS.pyx":130 * """ * cdef SlepcDSType cval = NULL * ds_type = str2bytes(ds_type, &cval) # <<<<<<<<<<<<<< * CHKERR( DSSetType(self.ds, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_ds_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ds_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/DS.pyx":131 * cdef SlepcDSType cval = NULL * ds_type = str2bytes(ds_type, &cval) * CHKERR( DSSetType(self.ds, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetType(__pyx_v_self->ds, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 131, __pyx_L1_error) /* "SLEPc/DS.pyx":120 * return self * * def setType(self, ds_type): # <<<<<<<<<<<<<< * """ * Selects the type for the DS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.DS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ds_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":133 * CHKERR( DSSetType(self.ds, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the DS type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_12getType[] = "DS.getType(self)\n\n Gets the DS type of this object.\n\n Returns\n -------\n type: `DS.Type` enumerate\n The direct solver type currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_12getType(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_12getType(struct PySlepcDSObject *__pyx_v_self) { const char* __pyx_v_ds_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/DS.pyx":142 * The direct solver type currently being used. * """ * cdef SlepcDSType ds_type = NULL # <<<<<<<<<<<<<< * CHKERR( DSGetType(self.ds, &ds_type) ) * return bytes2str(ds_type) */ __pyx_v_ds_type = NULL; /* "SLEPc/DS.pyx":143 * """ * cdef SlepcDSType ds_type = NULL * CHKERR( DSGetType(self.ds, &ds_type) ) # <<<<<<<<<<<<<< * return bytes2str(ds_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetType(__pyx_v_self->ds, (&__pyx_v_ds_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 143, __pyx_L1_error) /* "SLEPc/DS.pyx":144 * cdef SlepcDSType ds_type = NULL * CHKERR( DSGetType(self.ds, &ds_type) ) * return bytes2str(ds_type) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_ds_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":133 * CHKERR( DSSetType(self.ds, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the DS type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":146 * return bytes2str(ds_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all DS options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_14setOptionsPrefix[] = "DS.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all DS options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all DS option\n requests.\n\n Notes\n -----\n A hyphen (``-``) must NOT be given at the beginning of the\n prefix name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(10, 146, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 146, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/DS.pyx":163 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( DSSetOptionsPrefix(self.ds, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/DS.pyx":164 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( DSSetOptionsPrefix(self.ds, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/DS.pyx":165 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( DSSetOptionsPrefix(self.ds, cval) ) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetOptionsPrefix(__pyx_v_self->ds, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 165, __pyx_L1_error) /* "SLEPc/DS.pyx":146 * return bytes2str(ds_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all DS options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.DS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":167 * CHKERR( DSSetOptionsPrefix(self.ds, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all DS options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_16getOptionsPrefix[] = "DS.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all DS options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this DS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(struct PySlepcDSObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/DS.pyx":177 * The prefix string set for this DS object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( DSGetOptionsPrefix(self.ds, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/DS.pyx":178 * """ * cdef const_char *prefix = NULL * CHKERR( DSGetOptionsPrefix(self.ds, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetOptionsPrefix(__pyx_v_self->ds, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 178, __pyx_L1_error) /* "SLEPc/DS.pyx":179 * cdef const_char *prefix = NULL * CHKERR( DSGetOptionsPrefix(self.ds, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":167 * CHKERR( DSSetOptionsPrefix(self.ds, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all DS options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":181 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets DS options from the options database. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_18setFromOptions[] = "DS.setFromOptions(self)\n\n Sets DS options from the options database.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(struct PySlepcDSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/DS.pyx":190 * option. * """ * CHKERR( DSSetFromOptions(self.ds) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetFromOptions(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 190, __pyx_L1_error) /* "SLEPc/DS.pyx":181 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets DS options from the options database. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":194 * # * * def allocate(self, ld): # <<<<<<<<<<<<<< * """ * Allocates memory for internal storage or matrices in DS. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_20allocate[] = "DS.allocate(self, ld)\n\n Allocates memory for internal storage or matrices in DS.\n\n Parameters\n ----------\n ld: integer\n Leading dimension (maximum allowed dimension for the\n matrices, including the extra row if present).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ld = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("allocate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ld,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ld)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allocate") < 0)) __PYX_ERR(10, 194, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ld = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("allocate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 194, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ld); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ld) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("allocate", 0); /* "SLEPc/DS.pyx":204 * matrices, including the extra row if present). * """ * cdef PetscInt val = ld # <<<<<<<<<<<<<< * CHKERR( DSAllocate(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_ld); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 204, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":205 * """ * cdef PetscInt val = ld * CHKERR( DSAllocate(self.ds, val) ) # <<<<<<<<<<<<<< * * def getLeadingDimension(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSAllocate(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 205, __pyx_L1_error) /* "SLEPc/DS.pyx":194 * # * * def allocate(self, ld): # <<<<<<<<<<<<<< * """ * Allocates memory for internal storage or matrices in DS. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":207 * CHKERR( DSAllocate(self.ds, val) ) * * def getLeadingDimension(self): # <<<<<<<<<<<<<< * """ * Returns the leading dimension of the allocated matrices. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_22getLeadingDimension[] = "DS.getLeadingDimension(self)\n\n Returns the leading dimension of the allocated matrices.\n\n Returns\n -------\n ld: integer\n Leading dimension (maximum allowed dimension for the matrices).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLeadingDimension (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLeadingDimension", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLeadingDimension", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(struct PySlepcDSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getLeadingDimension", 0); /* "SLEPc/DS.pyx":216 * Leading dimension (maximum allowed dimension for the matrices). * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( DSGetLeadingDimension(self.ds, &val) ) * return val */ __pyx_v_val = 0; /* "SLEPc/DS.pyx":217 * """ * cdef PetscInt val = 0 * CHKERR( DSGetLeadingDimension(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetLeadingDimension(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 217, __pyx_L1_error) /* "SLEPc/DS.pyx":218 * cdef PetscInt val = 0 * CHKERR( DSGetLeadingDimension(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def setState(self, state): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":207 * CHKERR( DSAllocate(self.ds, val) ) * * def getLeadingDimension(self): # <<<<<<<<<<<<<< * """ * Returns the leading dimension of the allocated matrices. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getLeadingDimension", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":220 * return val * * def setState(self, state): # <<<<<<<<<<<<<< * """ * Change the state of the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_25setState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_24setState[] = "DS.setState(self, state)\n\n Change the state of the DS object.\n\n Parameters\n ----------\n state: `DS.StateType` enumerate\n The new state.\n\n Notes\n -----\n The state indicates that the dense system is in an initial\n state (raw), in an intermediate state (such as tridiagonal,\n Hessenberg or Hessenberg-triangular), in a condensed state\n (such as diagonal, Schur or generalized Schur), or in a\n truncated state.\n\n This function is normally used to return to the raw state when\n the condensed structure is destroyed.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_25setState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setState (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_state,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setState") < 0)) __PYX_ERR(10, 220, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_state = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setState", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 220, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setState", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_24setState(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_24setState(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_state) { DSStateType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations DSStateType __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setState", 0); /* "SLEPc/DS.pyx":240 * the condensed structure is destroyed. * """ * cdef SlepcDSStateType val = state # <<<<<<<<<<<<<< * CHKERR( DSSetState(self.ds, val) ) * */ __pyx_t_1 = ((DSStateType)__Pyx_PyInt_As_DSStateType(__pyx_v_state)); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 240, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":241 * """ * cdef SlepcDSStateType val = state * CHKERR( DSSetState(self.ds, val) ) # <<<<<<<<<<<<<< * * def getState(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetState(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 241, __pyx_L1_error) /* "SLEPc/DS.pyx":220 * return val * * def setState(self, state): # <<<<<<<<<<<<<< * """ * Change the state of the DS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setState", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":243 * CHKERR( DSSetState(self.ds, val) ) * * def getState(self): # <<<<<<<<<<<<<< * """ * Returns the current state. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_27getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_26getState[] = "DS.getState(self)\n\n Returns the current state.\n\n Returns\n -------\n state: `DS.StateType` enumerate\n The current state.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_27getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getState (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getState", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getState", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_26getState(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_26getState(struct PySlepcDSObject *__pyx_v_self) { DSStateType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getState", 0); /* "SLEPc/DS.pyx":252 * The current state. * """ * cdef SlepcDSStateType val = DS_STATE_RAW # <<<<<<<<<<<<<< * CHKERR( DSGetState(self.ds, &val) ) * return val */ __pyx_v_val = DS_STATE_RAW; /* "SLEPc/DS.pyx":253 * """ * cdef SlepcDSStateType val = DS_STATE_RAW * CHKERR( DSGetState(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetState(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 253, __pyx_L1_error) /* "SLEPc/DS.pyx":254 * cdef SlepcDSStateType val = DS_STATE_RAW * CHKERR( DSGetState(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def setDimensions(self, n=None, m=None, l=None, k=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_DSStateType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":243 * CHKERR( DSSetState(self.ds, val) ) * * def getState(self): # <<<<<<<<<<<<<< * """ * Returns the current state. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getState", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":256 * return val * * def setDimensions(self, n=None, m=None, l=None, k=None): # <<<<<<<<<<<<<< * """ * Resize the matrices in the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_28setDimensions[] = "DS.setDimensions(self, n=None, m=None, l=None, k=None)\n\n Resize the matrices in the DS object.\n\n Parameters\n ----------\n n: int, optional\n The new size.\n m: int, optional\n The new column size (only for SVD).\n l: int, optional\n Number of locked (inactive) leading columns.\n k: int, optional\n Intermediate dimension (e.g., position of arrow).\n\n Notes\n -----\n The internal arrays are not reallocated.\n\n The value `m` is not used except in the case of DS.SVD.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_n = 0; PyObject *__pyx_v_m = 0; PyObject *__pyx_v_l = 0; PyObject *__pyx_v_k = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_m,&__pyx_n_s_l,&__pyx_n_s_k,0}; PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(10, 256, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_n = values[0]; __pyx_v_m = values[1]; __pyx_v_l = values[2]; __pyx_v_k = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 256, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_n, __pyx_v_m, __pyx_v_l, __pyx_v_k); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_m, PyObject *__pyx_v_l, PyObject *__pyx_v_k) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PetscInt __pyx_v_ival4; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/DS.pyx":277 * The value `m` is not used except in the case of DS.SVD. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/DS.pyx":278 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/DS.pyx":279 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival4 = 0 * if n is not None: ival1 = asInt(n) */ __pyx_v_ival3 = 0; /* "SLEPc/DS.pyx":280 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 # <<<<<<<<<<<<<< * if n is not None: ival1 = asInt(n) * if m is not None: ival2 = asInt(m) */ __pyx_v_ival4 = 0; /* "SLEPc/DS.pyx":281 * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 * if n is not None: ival1 = asInt(n) # <<<<<<<<<<<<<< * if m is not None: ival2 = asInt(m) * if l is not None: ival3 = asInt(l) */ __pyx_t_1 = (__pyx_v_n != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_n); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 281, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/DS.pyx":282 * cdef PetscInt ival4 = 0 * if n is not None: ival1 = asInt(n) * if m is not None: ival2 = asInt(m) # <<<<<<<<<<<<<< * if l is not None: ival3 = asInt(l) * if k is not None: ival4 = asInt(k) */ __pyx_t_2 = (__pyx_v_m != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 282, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/DS.pyx":283 * if n is not None: ival1 = asInt(n) * if m is not None: ival2 = asInt(m) * if l is not None: ival3 = asInt(l) # <<<<<<<<<<<<<< * if k is not None: ival4 = asInt(k) * CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) */ __pyx_t_1 = (__pyx_v_l != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_l); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 283, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/DS.pyx":284 * if m is not None: ival2 = asInt(m) * if l is not None: ival3 = asInt(l) * if k is not None: ival4 = asInt(k) # <<<<<<<<<<<<<< * CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) * */ __pyx_t_2 = (__pyx_v_k != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_k); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 284, __pyx_L1_error) __pyx_v_ival4 = __pyx_t_3; } /* "SLEPc/DS.pyx":285 * if l is not None: ival3 = asInt(l) * if k is not None: ival4 = asInt(k) * CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetDimensions(__pyx_v_self->ds, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3, __pyx_v_ival4)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(10, 285, __pyx_L1_error) /* "SLEPc/DS.pyx":256 * return val * * def setDimensions(self, n=None, m=None, l=None, k=None): # <<<<<<<<<<<<<< * """ * Resize the matrices in the DS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":287 * CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Returns the current dimensions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_30getDimensions[] = "DS.getDimensions(self)\n\n Returns the current dimensions.\n\n Returns\n -------\n n: int\n The new size.\n m: int\n The new column size (only for SVD).\n l: int\n Number of locked (inactive) leading columns.\n k: int\n Intermediate dimension (e.g., position of arrow).\n t: int\n Truncated length.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(struct PySlepcDSObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PetscInt __pyx_v_ival4; PetscInt __pyx_v_ival5; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/DS.pyx":304 * Truncated length. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/DS.pyx":305 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 */ __pyx_v_ival2 = 0; /* "SLEPc/DS.pyx":306 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival4 = 0 * cdef PetscInt ival5 = 0 */ __pyx_v_ival3 = 0; /* "SLEPc/DS.pyx":307 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival5 = 0 * CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) ) */ __pyx_v_ival4 = 0; /* "SLEPc/DS.pyx":308 * cdef PetscInt ival3 = 0 * cdef PetscInt ival4 = 0 * cdef PetscInt ival5 = 0 # <<<<<<<<<<<<<< * CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) ) * return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) */ __pyx_v_ival5 = 0; /* "SLEPc/DS.pyx":309 * cdef PetscInt ival4 = 0 * cdef PetscInt ival5 = 0 * CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetDimensions(__pyx_v_self->ds, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3), (&__pyx_v_ival4), (&__pyx_v_ival5))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 309, __pyx_L1_error) /* "SLEPc/DS.pyx":310 * cdef PetscInt ival5 = 0 * CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) ) * return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) # <<<<<<<<<<<<<< * * def setMethod(self, meth): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival4); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival5); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_6); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":287 * CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Returns the current dimensions. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":312 * return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) * * def setMethod(self, meth): # <<<<<<<<<<<<<< * """ * Selects the method to be used to solve the problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_32setMethod[] = "DS.setMethod(self, meth)\n\n Selects the method to be used to solve the problem.\n\n Parameters\n ----------\n meth: int\n An index indentifying the method.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_meth = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMethod (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_meth,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_meth)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMethod") < 0)) __PYX_ERR(10, 312, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_meth = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMethod", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 312, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setMethod", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_meth); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_meth) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setMethod", 0); /* "SLEPc/DS.pyx":321 * An index indentifying the method. * """ * cdef PetscInt val = meth # <<<<<<<<<<<<<< * CHKERR( DSSetMethod(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_meth); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 321, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":322 * """ * cdef PetscInt val = meth * CHKERR( DSSetMethod(self.ds, val) ) # <<<<<<<<<<<<<< * * def getMethod(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetMethod(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 322, __pyx_L1_error) /* "SLEPc/DS.pyx":312 * return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5)) * * def setMethod(self, meth): # <<<<<<<<<<<<<< * """ * Selects the method to be used to solve the problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setMethod", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":324 * CHKERR( DSSetMethod(self.ds, val) ) * * def getMethod(self): # <<<<<<<<<<<<<< * """ * Gets the method currently used in the DS. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_34getMethod[] = "DS.getMethod(self)\n\n Gets the method currently used in the DS.\n\n Returns\n -------\n meth: int\n Identifier of the method.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMethod (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getMethod", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMethod", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(struct PySlepcDSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getMethod", 0); /* "SLEPc/DS.pyx":333 * Identifier of the method. * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( DSGetMethod(self.ds, &val) ) * return val */ __pyx_v_val = 0; /* "SLEPc/DS.pyx":334 * """ * cdef PetscInt val = 0 * CHKERR( DSGetMethod(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetMethod(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 334, __pyx_L1_error) /* "SLEPc/DS.pyx":335 * cdef PetscInt val = 0 * CHKERR( DSGetMethod(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def setCompact(self, comp): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":324 * CHKERR( DSSetMethod(self.ds, val) ) * * def getMethod(self): # <<<<<<<<<<<<<< * """ * Gets the method currently used in the DS. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getMethod", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":337 * return val * * def setCompact(self, comp): # <<<<<<<<<<<<<< * """ * Switch to compact storage of matrices. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_36setCompact[] = "DS.setCompact(self, comp)\n\n Switch to compact storage of matrices.\n\n Parameters\n ----------\n comp: boolean\n A boolean flag.\n\n Notes\n -----\n Compact storage is used in some `DS` types such as\n `DS.Type.HEP` when the matrix is tridiagonal. This flag\n can be used to indicate whether the user provides the\n matrix entries via the compact form (the tridiagonal\n `DS.MatType.T`) or the non-compact one (`DS.MatType.A`).\n\n The default is ``False``.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comp = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCompact (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comp,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompact") < 0)) __PYX_ERR(10, 337, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_comp = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCompact", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 337, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setCompact", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_comp); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comp) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setCompact", 0); /* "SLEPc/DS.pyx":356 * The default is ``False``. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * if comp: val = PETSC_TRUE * CHKERR( DSSetCompact(self.ds, val) ) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":357 * """ * cdef PetscBool val = PETSC_FALSE * if comp: val = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( DSSetCompact(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_comp); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 357, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_val = PETSC_TRUE; } /* "SLEPc/DS.pyx":358 * cdef PetscBool val = PETSC_FALSE * if comp: val = PETSC_TRUE * CHKERR( DSSetCompact(self.ds, val) ) # <<<<<<<<<<<<<< * * def getCompact(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetCompact(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 358, __pyx_L1_error) /* "SLEPc/DS.pyx":337 * return val * * def setCompact(self, comp): # <<<<<<<<<<<<<< * """ * Switch to compact storage of matrices. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setCompact", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":360 * CHKERR( DSSetCompact(self.ds, val) ) * * def getCompact(self): # <<<<<<<<<<<<<< * """ * Gets the compact storage flag. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_38getCompact[] = "DS.getCompact(self)\n\n Gets the compact storage flag.\n\n Returns\n -------\n comp: boolean\n The flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCompact (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getCompact", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCompact", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(struct PySlepcDSObject *__pyx_v_self) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getCompact", 0); /* "SLEPc/DS.pyx":369 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetCompact(self.ds, &val) ) * return val */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":370 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetCompact(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetCompact(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 370, __pyx_L1_error) /* "SLEPc/DS.pyx":371 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetCompact(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def setExtraRow(self, ext): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":360 * CHKERR( DSSetCompact(self.ds, val) ) * * def getCompact(self): # <<<<<<<<<<<<<< * """ * Gets the compact storage flag. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getCompact", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":373 * return val * * def setExtraRow(self, ext): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that the matrix has one extra row. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_40setExtraRow[] = "DS.setExtraRow(self, ext)\n\n Sets a flag to indicate that the matrix has one extra row.\n\n Parameters\n ----------\n ext: boolean\n A boolean flag.\n\n Notes\n -----\n In Krylov methods it is useful that the matrix representing\n the direct solver has one extra row, i.e., has dimension (n+1)\n x n. If this flag is activated, all transformations applied to\n the right of the matrix also affect this additional row. In\n that case, (n+1) must be less or equal than the leading\n dimension.\n\n The default is ``False``.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ext = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setExtraRow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ext,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ext)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExtraRow") < 0)) __PYX_ERR(10, 373, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ext = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setExtraRow", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 373, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ext); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ext) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setExtraRow", 0); /* "SLEPc/DS.pyx":393 * The default is ``False``. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * if ext: val = PETSC_TRUE * CHKERR( DSSetExtraRow(self.ds, val) ) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":394 * """ * cdef PetscBool val = PETSC_FALSE * if ext: val = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( DSSetExtraRow(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ext); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 394, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_val = PETSC_TRUE; } /* "SLEPc/DS.pyx":395 * cdef PetscBool val = PETSC_FALSE * if ext: val = PETSC_TRUE * CHKERR( DSSetExtraRow(self.ds, val) ) # <<<<<<<<<<<<<< * * def getExtraRow(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetExtraRow(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 395, __pyx_L1_error) /* "SLEPc/DS.pyx":373 * return val * * def setExtraRow(self, ext): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that the matrix has one extra row. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":397 * CHKERR( DSSetExtraRow(self.ds, val) ) * * def getExtraRow(self): # <<<<<<<<<<<<<< * """ * Gets the extra row flag. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_42getExtraRow[] = "DS.getExtraRow(self)\n\n Gets the extra row flag.\n\n Returns\n -------\n comp: boolean\n The flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getExtraRow (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getExtraRow", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getExtraRow", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(struct PySlepcDSObject *__pyx_v_self) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getExtraRow", 0); /* "SLEPc/DS.pyx":406 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetExtraRow(self.ds, &val) ) * return val */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":407 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetExtraRow(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetExtraRow(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 407, __pyx_L1_error) /* "SLEPc/DS.pyx":408 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetExtraRow(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def setRefined(self, ref): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":397 * CHKERR( DSSetExtraRow(self.ds, val) ) * * def getExtraRow(self): # <<<<<<<<<<<<<< * """ * Gets the extra row flag. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":410 * return val * * def setRefined(self, ref): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that refined vectors must be computed. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_44setRefined[] = "DS.setRefined(self, ref)\n\n Sets a flag to indicate that refined vectors must be computed.\n\n Parameters\n ----------\n ref: boolean\n A boolean flag.\n\n Notes\n -----\n Normally the vectors returned in `DS.MatType.X` are eigenvectors\n of the projected matrix. With this flag activated, `vectors()`\n will return the right singular vector of the smallest singular\n value of matrix At-theta*I, where At is the extended (n+1)xn\n matrix and theta is the Ritz value. This is used in the\n refined Ritz approximation.\n\n The default is ``False``.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ref = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRefined (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRefined") < 0)) __PYX_ERR(10, 410, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ref = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRefined", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 410, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setRefined", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ref); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ref) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setRefined", 0); /* "SLEPc/DS.pyx":430 * The default is ``False``. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * if ref: val = PETSC_TRUE * CHKERR( DSSetRefined(self.ds, val) ) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":431 * """ * cdef PetscBool val = PETSC_FALSE * if ref: val = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( DSSetRefined(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 431, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_val = PETSC_TRUE; } /* "SLEPc/DS.pyx":432 * cdef PetscBool val = PETSC_FALSE * if ref: val = PETSC_TRUE * CHKERR( DSSetRefined(self.ds, val) ) # <<<<<<<<<<<<<< * * def getRefined(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetRefined(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 432, __pyx_L1_error) /* "SLEPc/DS.pyx":410 * return val * * def setRefined(self, ref): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that refined vectors must be computed. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.setRefined", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":434 * CHKERR( DSSetRefined(self.ds, val) ) * * def getRefined(self): # <<<<<<<<<<<<<< * """ * Gets the refined vectors flag. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_46getRefined[] = "DS.getRefined(self)\n\n Gets the refined vectors flag.\n\n Returns\n -------\n comp: boolean\n The flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRefined (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRefined", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRefined", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(struct PySlepcDSObject *__pyx_v_self) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getRefined", 0); /* "SLEPc/DS.pyx":443 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetRefined(self.ds, &val) ) * return val */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":444 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetRefined(self.ds, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetRefined(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 444, __pyx_L1_error) /* "SLEPc/DS.pyx":445 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetRefined(self.ds, &val) ) * return val # <<<<<<<<<<<<<< * * def truncate(self, n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":434 * CHKERR( DSSetRefined(self.ds, val) ) * * def getRefined(self): # <<<<<<<<<<<<<< * """ * Gets the refined vectors flag. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getRefined", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":447 * return val * * def truncate(self, n): # <<<<<<<<<<<<<< * """ * Truncates the system represented in the DS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_48truncate[] = "DS.truncate(self, n)\n\n Truncates the system represented in the DS object.\n\n Parameters\n ----------\n n: integer\n The new size.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_n = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("truncate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "truncate") < 0)) __PYX_ERR(10, 447, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_n = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("truncate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 447, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("truncate", 0); /* "SLEPc/DS.pyx":456 * The new size. * """ * cdef PetscInt val = n # <<<<<<<<<<<<<< * CHKERR( DSTruncate(self.ds, val) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_n); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 456, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":457 * """ * cdef PetscInt val = n * CHKERR( DSTruncate(self.ds, val) ) # <<<<<<<<<<<<<< * * def updateExtraRow(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSTruncate(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 457, __pyx_L1_error) /* "SLEPc/DS.pyx":447 * return val * * def truncate(self, n): # <<<<<<<<<<<<<< * """ * Truncates the system represented in the DS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/DS.pyx":459 * CHKERR( DSTruncate(self.ds, val) ) * * def updateExtraRow(self): # <<<<<<<<<<<<<< * """ * Performs all necessary operations so that the extra */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_50updateExtraRow[] = "DS.updateExtraRow(self)\n\n Performs all necessary operations so that the extra\n row gets up-to-date after a call to `solve()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("updateExtraRow (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("updateExtraRow", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "updateExtraRow", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(((struct PySlepcDSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(struct PySlepcDSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("updateExtraRow", 0); /* "SLEPc/DS.pyx":464 * row gets up-to-date after a call to `solve()`. * """ * CHKERR( DSUpdateExtraRow(self.ds) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSUpdateExtraRow(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 464, __pyx_L1_error) /* "SLEPc/DS.pyx":459 * CHKERR( DSTruncate(self.ds, val) ) * * def updateExtraRow(self): # <<<<<<<<<<<<<< * """ * Performs all necessary operations so that the extra */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.updateExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":40 * CombineType = FNCombineType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.fn * self.fn = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(struct PySlepcFNObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/FN.pyx":41 * * def __cinit__(self): * self.obj = &self.fn # <<<<<<<<<<<<<< * self.fn = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->fn)); /* "SLEPc/FN.pyx":42 * def __cinit__(self): * self.obj = &self.fn * self.fn = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->fn = NULL; /* "SLEPc/FN.pyx":40 * CombineType = FNCombineType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.fn * self.fn = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":44 * self.fn = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the FN data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_2view[] = "FN.view(self, Viewer viewer=None)\n\n Prints the FN data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(11, 44, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 44, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(11, 44, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_2view(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_2view(struct PySlepcFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/FN.pyx":54 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( FNView(self.fn, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/FN.pyx":55 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( FNView(self.fn, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/FN.pyx":56 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( FNView(self.fn, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNView(__pyx_v_self->fn, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(11, 56, __pyx_L1_error) /* "SLEPc/FN.pyx":44 * self.fn = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the FN data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":58 * CHKERR( FNView(self.fn, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the FN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_4destroy[] = "FN.destroy(self)\n\n Destroys the FN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(struct PySlepcFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/FN.pyx":62 * Destroys the FN object. * """ * CHKERR( FNDestroy(&self.fn) ) # <<<<<<<<<<<<<< * self.fn = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNDestroy((&__pyx_v_self->fn))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 62, __pyx_L1_error) /* "SLEPc/FN.pyx":63 * """ * CHKERR( FNDestroy(&self.fn) ) * self.fn = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->fn = NULL; /* "SLEPc/FN.pyx":64 * CHKERR( FNDestroy(&self.fn) ) * self.fn = NULL * return self # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/FN.pyx":58 * CHKERR( FNView(self.fn, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the FN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":66 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the FN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_6create[] = "FN.create(self, comm=None)\n\n Creates the FN object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(11, 66, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 66, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_6create(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_6create(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; FN __pyx_v_newfn; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/FN.pyx":76 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcFN newfn = NULL * CHKERR( FNCreate(ccomm, &newfn) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 76, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/FN.pyx":77 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcFN newfn = NULL # <<<<<<<<<<<<<< * CHKERR( FNCreate(ccomm, &newfn) ) * SlepcCLEAR(self.obj); self.fn = newfn */ __pyx_v_newfn = NULL; /* "SLEPc/FN.pyx":78 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcFN newfn = NULL * CHKERR( FNCreate(ccomm, &newfn) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.fn = newfn * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNCreate(__pyx_v_ccomm, (&__pyx_v_newfn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 78, __pyx_L1_error) /* "SLEPc/FN.pyx":79 * cdef SlepcFN newfn = NULL * CHKERR( FNCreate(ccomm, &newfn) ) * SlepcCLEAR(self.obj); self.fn = newfn # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->fn = __pyx_v_newfn; /* "SLEPc/FN.pyx":80 * CHKERR( FNCreate(ccomm, &newfn) ) * SlepcCLEAR(self.obj); self.fn = newfn * return self # <<<<<<<<<<<<<< * * def setType(self, fn_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/FN.pyx":66 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the FN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":82 * return self * * def setType(self, fn_type): # <<<<<<<<<<<<<< * """ * Selects the type for the FN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_8setType[] = "FN.setType(self, fn_type)\n\n Selects the type for the FN object.\n\n Parameters\n ----------\n fn_type: `FN.Type` enumerate\n The inner product type to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fn_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fn_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(11, 82, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_fn_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 82, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_8setType(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_fn_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_8setType(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_fn_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_fn_type); /* "SLEPc/FN.pyx":91 * The inner product type to be used. * """ * cdef SlepcFNType cval = NULL # <<<<<<<<<<<<<< * fn_type = str2bytes(fn_type, &cval) * CHKERR( FNSetType(self.fn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/FN.pyx":92 * """ * cdef SlepcFNType cval = NULL * fn_type = str2bytes(fn_type, &cval) # <<<<<<<<<<<<<< * CHKERR( FNSetType(self.fn, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_fn_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_fn_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/FN.pyx":93 * cdef SlepcFNType cval = NULL * fn_type = str2bytes(fn_type, &cval) * CHKERR( FNSetType(self.fn, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetType(__pyx_v_self->fn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 93, __pyx_L1_error) /* "SLEPc/FN.pyx":82 * return self * * def setType(self, fn_type): # <<<<<<<<<<<<<< * """ * Selects the type for the FN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.FN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fn_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":95 * CHKERR( FNSetType(self.fn, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the FN type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_10getType[] = "FN.getType(self)\n\n Gets the FN type of this object.\n\n Returns\n -------\n type: `FN.Type` enumerate\n The inner product type currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_10getType(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_10getType(struct PySlepcFNObject *__pyx_v_self) { const char* __pyx_v_fn_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/FN.pyx":104 * The inner product type currently being used. * """ * cdef SlepcFNType fn_type = NULL # <<<<<<<<<<<<<< * CHKERR( FNGetType(self.fn, &fn_type) ) * return bytes2str(fn_type) */ __pyx_v_fn_type = NULL; /* "SLEPc/FN.pyx":105 * """ * cdef SlepcFNType fn_type = NULL * CHKERR( FNGetType(self.fn, &fn_type) ) # <<<<<<<<<<<<<< * return bytes2str(fn_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetType(__pyx_v_self->fn, (&__pyx_v_fn_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 105, __pyx_L1_error) /* "SLEPc/FN.pyx":106 * cdef SlepcFNType fn_type = NULL * CHKERR( FNGetType(self.fn, &fn_type) ) * return bytes2str(fn_type) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_fn_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":95 * CHKERR( FNSetType(self.fn, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the FN type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.FN.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":108 * return bytes2str(fn_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all FN options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_12setOptionsPrefix[] = "FN.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all FN options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all FN option\n requests.\n\n Notes\n -----\n A hyphen (``-``) must NOT be given at the beginning of the\n prefix name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(11, 108, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 108, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/FN.pyx":125 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/FN.pyx":126 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/FN.pyx":127 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetOptionsPrefix(__pyx_v_self->fn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 127, __pyx_L1_error) /* "SLEPc/FN.pyx":108 * return bytes2str(fn_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all FN options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.FN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":129 * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all FN options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_14getOptionsPrefix[] = "FN.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all FN options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this FN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(struct PySlepcFNObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/FN.pyx":139 * The prefix string set for this FN object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( FNGetOptionsPrefix(self.fn, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/FN.pyx":140 * """ * cdef const_char *prefix = NULL * CHKERR( FNGetOptionsPrefix(self.fn, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetOptionsPrefix(__pyx_v_self->fn, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 140, __pyx_L1_error) /* "SLEPc/FN.pyx":141 * cdef const_char *prefix = NULL * CHKERR( FNGetOptionsPrefix(self.fn, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":129 * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all FN options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.FN.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":143 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets FN options from the options database. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_16setFromOptions[] = "FN.setFromOptions(self)\n\n Sets FN options from the options database.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(struct PySlepcFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/FN.pyx":152 * option. * """ * CHKERR( FNSetFromOptions(self.fn) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetFromOptions(__pyx_v_self->fn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 152, __pyx_L1_error) /* "SLEPc/FN.pyx":143 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets FN options from the options database. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":156 * # * * def evaluateFunction(self, x): # <<<<<<<<<<<<<< * """ * Computes the value of the function f(x) for a given x. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_18evaluateFunction[] = "FN.evaluateFunction(self, x)\n\n Computes the value of the function f(x) for a given x.\n\n Parameters\n ----------\n x: scalar\n Value where the function must be evaluated.\n\n Returns\n -------\n y: scalar\n The result of f(x).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_x = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluateFunction (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluateFunction") < 0)) __PYX_ERR(11, 156, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_x = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("evaluateFunction", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 156, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_x); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("evaluateFunction", 0); /* "SLEPc/FN.pyx":170 * The result of f(x). * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * CHKERR( FNEvaluateFunction(self.fn, x, &sval) ) * return toScalar(sval) */ __pyx_v_sval = 0.0; /* "SLEPc/FN.pyx":171 * """ * cdef PetscScalar sval = 0 * CHKERR( FNEvaluateFunction(self.fn, x, &sval) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_1 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(11, 171, __pyx_L1_error) __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNEvaluateFunction(__pyx_v_self->fn, __pyx_t_1, (&__pyx_v_sval))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 171, __pyx_L1_error) /* "SLEPc/FN.pyx":172 * cdef PetscScalar sval = 0 * CHKERR( FNEvaluateFunction(self.fn, x, &sval) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def evaluateDerivative(self, x): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":156 * # * * def evaluateFunction(self, x): # <<<<<<<<<<<<<< * """ * Computes the value of the function f(x) for a given x. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":174 * return toScalar(sval) * * def evaluateDerivative(self, x): # <<<<<<<<<<<<<< * """ * Computes the value of the derivative f'(x) for a given x. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_20evaluateDerivative[] = "FN.evaluateDerivative(self, x)\n\n Computes the value of the derivative f'(x) for a given x.\n\n Parameters\n ----------\n x: scalar\n Value where the derivative must be evaluated.\n\n Returns\n -------\n y: scalar\n The result of f'(x).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_x = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluateDerivative (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluateDerivative") < 0)) __PYX_ERR(11, 174, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_x = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("evaluateDerivative", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 174, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateDerivative", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_x); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("evaluateDerivative", 0); /* "SLEPc/FN.pyx":188 * The result of f'(x). * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * CHKERR( FNEvaluateDerivative(self.fn, x, &sval) ) * return toScalar(sval) */ __pyx_v_sval = 0.0; /* "SLEPc/FN.pyx":189 * """ * cdef PetscScalar sval = 0 * CHKERR( FNEvaluateDerivative(self.fn, x, &sval) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_1 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(11, 189, __pyx_L1_error) __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNEvaluateDerivative(__pyx_v_self->fn, __pyx_t_1, (&__pyx_v_sval))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 189, __pyx_L1_error) /* "SLEPc/FN.pyx":190 * cdef PetscScalar sval = 0 * CHKERR( FNEvaluateDerivative(self.fn, x, &sval) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def setScale(self, alpha=None, beta=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":174 * return toScalar(sval) * * def evaluateDerivative(self, x): # <<<<<<<<<<<<<< * """ * Computes the value of the derivative f'(x) for a given x. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateDerivative", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":192 * return toScalar(sval) * * def setScale(self, alpha=None, beta=None): # <<<<<<<<<<<<<< * """ * Sets the scaling parameters that define the matematical function. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_22setScale[] = "FN.setScale(self, alpha=None, beta=None)\n\n Sets the scaling parameters that define the matematical function.\n\n Parameters\n ----------\n alpha: scalar (possibly complex)\n inner scaling (argument).\n beta: scalar (possibly complex)\n outer scaling (result).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_v_beta = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setScale (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,&__pyx_n_s_beta,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beta); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScale") < 0)) __PYX_ERR(11, 192, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_alpha = values[0]; __pyx_v_beta = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setScale", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 192, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha, __pyx_v_beta); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta) { PetscScalar __pyx_v_aval; PetscScalar __pyx_v_bval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscScalar __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setScale", 0); /* "SLEPc/FN.pyx":203 * outer scaling (result). * """ * cdef PetscScalar aval = 1.0 # <<<<<<<<<<<<<< * cdef PetscScalar bval = 1.0 * if alpha is not None: aval = asScalar(alpha) */ __pyx_v_aval = 1.0; /* "SLEPc/FN.pyx":204 * """ * cdef PetscScalar aval = 1.0 * cdef PetscScalar bval = 1.0 # <<<<<<<<<<<<<< * if alpha is not None: aval = asScalar(alpha) * if beta is not None: bval = asScalar(beta) */ __pyx_v_bval = 1.0; /* "SLEPc/FN.pyx":205 * cdef PetscScalar aval = 1.0 * cdef PetscScalar bval = 1.0 * if alpha is not None: aval = asScalar(alpha) # <<<<<<<<<<<<<< * if beta is not None: bval = asScalar(beta) * CHKERR( FNSetScale(self.fn, aval, bval) ) */ __pyx_t_1 = (__pyx_v_alpha != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 205, __pyx_L1_error) __pyx_v_aval = __pyx_t_3; } /* "SLEPc/FN.pyx":206 * cdef PetscScalar bval = 1.0 * if alpha is not None: aval = asScalar(alpha) * if beta is not None: bval = asScalar(beta) # <<<<<<<<<<<<<< * CHKERR( FNSetScale(self.fn, aval, bval) ) * */ __pyx_t_2 = (__pyx_v_beta != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_beta); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 206, __pyx_L1_error) __pyx_v_bval = __pyx_t_3; } /* "SLEPc/FN.pyx":207 * if alpha is not None: aval = asScalar(alpha) * if beta is not None: bval = asScalar(beta) * CHKERR( FNSetScale(self.fn, aval, bval) ) # <<<<<<<<<<<<<< * * def getScale(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetScale(__pyx_v_self->fn, __pyx_v_aval, __pyx_v_bval)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(11, 207, __pyx_L1_error) /* "SLEPc/FN.pyx":192 * return toScalar(sval) * * def setScale(self, alpha=None, beta=None): # <<<<<<<<<<<<<< * """ * Sets the scaling parameters that define the matematical function. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":209 * CHKERR( FNSetScale(self.fn, aval, bval) ) * * def getScale(self): # <<<<<<<<<<<<<< * """ * Gets the scaling parameters that define the matematical function. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_24getScale[] = "FN.getScale(self)\n\n Gets the scaling parameters that define the matematical function.\n\n Returns\n -------\n alpha: scalar (possibly complex)\n inner scaling (argument).\n beta: scalar (possibly complex)\n outer scaling (result).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getScale (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getScale", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getScale", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(((struct PySlepcFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(struct PySlepcFNObject *__pyx_v_self) { PetscScalar __pyx_v_aval; PetscScalar __pyx_v_bval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getScale", 0); /* "SLEPc/FN.pyx":220 * outer scaling (result). * """ * cdef PetscScalar aval = 0, bval = 0 # <<<<<<<<<<<<<< * CHKERR( FNGetScale(self.fn, &aval, &bval) ) * return (toScalar(aval), toScalar(bval)) */ __pyx_v_aval = 0.0; __pyx_v_bval = 0.0; /* "SLEPc/FN.pyx":221 * """ * cdef PetscScalar aval = 0, bval = 0 * CHKERR( FNGetScale(self.fn, &aval, &bval) ) # <<<<<<<<<<<<<< * return (toScalar(aval), toScalar(bval)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetScale(__pyx_v_self->fn, (&__pyx_v_aval), (&__pyx_v_bval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 221, __pyx_L1_error) /* "SLEPc/FN.pyx":222 * cdef PetscScalar aval = 0, bval = 0 * CHKERR( FNGetScale(self.fn, &aval, &bval) ) * return (toScalar(aval), toScalar(bval)) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_aval); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_bval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":209 * CHKERR( FNSetScale(self.fn, aval, bval) ) * * def getScale(self): # <<<<<<<<<<<<<< * """ * Gets the scaling parameters that define the matematical function. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.FN.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":226 * # * * def setRationalNumerator(self, alpha not None): # <<<<<<<<<<<<<< * """ * Sets the coefficients of the numerator of the rational function. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_26setRationalNumerator[] = "FN.setRationalNumerator(self, alpha)\n\n Sets the coefficients of the numerator of the rational function.\n\n Parameters\n ----------\n alpha: array of scalars\n Coefficients.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRationalNumerator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRationalNumerator") < 0)) __PYX_ERR(11, 226, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_alpha = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRationalNumerator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 226, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalNumerator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_alpha) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "alpha"); __PYX_ERR(11, 226, __pyx_L1_error) } __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha) { PetscInt __pyx_v_na; PetscScalar *__pyx_v_a; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setRationalNumerator", 0); /* "SLEPc/FN.pyx":235 * Coefficients. * """ * cdef PetscInt na = 0 # <<<<<<<<<<<<<< * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) */ __pyx_v_na = 0; /* "SLEPc/FN.pyx":236 * """ * cdef PetscInt na = 0 * cdef PetscScalar *a = NULL # <<<<<<<<<<<<<< * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) */ __pyx_v_a = NULL; /* "SLEPc/FN.pyx":237 * cdef PetscInt na = 0 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) # <<<<<<<<<<<<<< * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_alpha, (&__pyx_v_na), (&__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/FN.pyx":238 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) # <<<<<<<<<<<<<< * * def setRationalDenominator(self, alpha not None): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetNumerator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 238, __pyx_L1_error) /* "SLEPc/FN.pyx":226 * # * * def setRationalNumerator(self, alpha not None): # <<<<<<<<<<<<<< * """ * Sets the coefficients of the numerator of the rational function. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalNumerator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/FN.pyx":240 * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) * * def setRationalDenominator(self, alpha not None): # <<<<<<<<<<<<<< * """ * Sets the coefficients of the denominator of the rational function. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_28setRationalDenominator[] = "FN.setRationalDenominator(self, alpha)\n\n Sets the coefficients of the denominator of the rational function.\n\n Parameters\n ----------\n alpha: array of scalars\n Coefficients.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRationalDenominator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRationalDenominator") < 0)) __PYX_ERR(11, 240, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_alpha = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRationalDenominator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalDenominator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_alpha) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "alpha"); __PYX_ERR(11, 240, __pyx_L1_error) } __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha) { PetscInt __pyx_v_na; PetscScalar *__pyx_v_a; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setRationalDenominator", 0); /* "SLEPc/FN.pyx":249 * Coefficients. * """ * cdef PetscInt na = 0 # <<<<<<<<<<<<<< * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) */ __pyx_v_na = 0; /* "SLEPc/FN.pyx":250 * """ * cdef PetscInt na = 0 * cdef PetscScalar *a = NULL # <<<<<<<<<<<<<< * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) */ __pyx_v_a = NULL; /* "SLEPc/FN.pyx":251 * cdef PetscInt na = 0 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) # <<<<<<<<<<<<<< * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_alpha, (&__pyx_v_na), (&__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/FN.pyx":252 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetDenominator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 252, __pyx_L1_error) /* "SLEPc/FN.pyx":240 * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) * * def setRationalDenominator(self, alpha not None): # <<<<<<<<<<<<<< * """ * Sets the coefficients of the denominator of the rational function. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalDenominator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":22 * Type = RGType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.rg * self.rg = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(struct PySlepcRGObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/RG.pyx":23 * * def __cinit__(self): * self.obj = &self.rg # <<<<<<<<<<<<<< * self.rg = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->rg)); /* "SLEPc/RG.pyx":24 * def __cinit__(self): * self.obj = &self.rg * self.rg = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->rg = NULL; /* "SLEPc/RG.pyx":22 * Type = RGType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.rg * self.rg = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":26 * self.rg = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the RG data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_2view[] = "RG.view(self, Viewer viewer=None)\n\n Prints the RG data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(12, 26, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 26, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(12, 26, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_2view(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_2view(struct PySlepcRGObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/RG.pyx":36 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( RGView(self.rg, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/RG.pyx":37 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( RGView(self.rg, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/RG.pyx":38 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( RGView(self.rg, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGView(__pyx_v_self->rg, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(12, 38, __pyx_L1_error) /* "SLEPc/RG.pyx":26 * self.rg = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the RG data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":40 * CHKERR( RGView(self.rg, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the RG object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_4destroy[] = "RG.destroy(self)\n\n Destroys the RG object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(struct PySlepcRGObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/RG.pyx":44 * Destroys the RG object. * """ * CHKERR( RGDestroy(&self.rg) ) # <<<<<<<<<<<<<< * self.rg = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGDestroy((&__pyx_v_self->rg))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 44, __pyx_L1_error) /* "SLEPc/RG.pyx":45 * """ * CHKERR( RGDestroy(&self.rg) ) * self.rg = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->rg = NULL; /* "SLEPc/RG.pyx":46 * CHKERR( RGDestroy(&self.rg) ) * self.rg = NULL * return self # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/RG.pyx":40 * CHKERR( RGView(self.rg, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the RG object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":48 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the RG object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_6create[] = "RG.create(self, comm=None)\n\n Creates the RG object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(12, 48, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_6create(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_6create(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; RG __pyx_v_newrg; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/RG.pyx":58 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcRG newrg = NULL * CHKERR( RGCreate(ccomm, &newrg) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 58, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/RG.pyx":59 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcRG newrg = NULL # <<<<<<<<<<<<<< * CHKERR( RGCreate(ccomm, &newrg) ) * SlepcCLEAR(self.obj); self.rg = newrg */ __pyx_v_newrg = NULL; /* "SLEPc/RG.pyx":60 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcRG newrg = NULL * CHKERR( RGCreate(ccomm, &newrg) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.rg = newrg * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGCreate(__pyx_v_ccomm, (&__pyx_v_newrg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 60, __pyx_L1_error) /* "SLEPc/RG.pyx":61 * cdef SlepcRG newrg = NULL * CHKERR( RGCreate(ccomm, &newrg) ) * SlepcCLEAR(self.obj); self.rg = newrg # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->rg = __pyx_v_newrg; /* "SLEPc/RG.pyx":62 * CHKERR( RGCreate(ccomm, &newrg) ) * SlepcCLEAR(self.obj); self.rg = newrg * return self # <<<<<<<<<<<<<< * * def setType(self, rg_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/RG.pyx":48 * return self * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the RG object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":64 * return self * * def setType(self, rg_type): # <<<<<<<<<<<<<< * """ * Selects the type for the RG object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_8setType[] = "RG.setType(self, rg_type)\n\n Selects the type for the RG object.\n\n Parameters\n ----------\n rg_type: `RG.Type` enumerate\n The inner product type to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rg_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(12, 64, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rg_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 64, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_8setType(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_rg_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_8setType(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_rg_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_rg_type); /* "SLEPc/RG.pyx":73 * The inner product type to be used. * """ * cdef SlepcRGType cval = NULL # <<<<<<<<<<<<<< * rg_type = str2bytes(rg_type, &cval) * CHKERR( RGSetType(self.rg, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/RG.pyx":74 * """ * cdef SlepcRGType cval = NULL * rg_type = str2bytes(rg_type, &cval) # <<<<<<<<<<<<<< * CHKERR( RGSetType(self.rg, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_rg_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_rg_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/RG.pyx":75 * cdef SlepcRGType cval = NULL * rg_type = str2bytes(rg_type, &cval) * CHKERR( RGSetType(self.rg, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetType(__pyx_v_self->rg, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 75, __pyx_L1_error) /* "SLEPc/RG.pyx":64 * return self * * def setType(self, rg_type): # <<<<<<<<<<<<<< * """ * Selects the type for the RG object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.RG.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rg_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":77 * CHKERR( RGSetType(self.rg, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the RG type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_10getType[] = "RG.getType(self)\n\n Gets the RG type of this object.\n\n Returns\n -------\n type: `RG.Type` enumerate\n The inner product type currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_10getType(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_10getType(struct PySlepcRGObject *__pyx_v_self) { const char* __pyx_v_rg_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/RG.pyx":86 * The inner product type currently being used. * """ * cdef SlepcRGType rg_type = NULL # <<<<<<<<<<<<<< * CHKERR( RGGetType(self.rg, &rg_type) ) * return bytes2str(rg_type) */ __pyx_v_rg_type = NULL; /* "SLEPc/RG.pyx":87 * """ * cdef SlepcRGType rg_type = NULL * CHKERR( RGGetType(self.rg, &rg_type) ) # <<<<<<<<<<<<<< * return bytes2str(rg_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetType(__pyx_v_self->rg, (&__pyx_v_rg_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 87, __pyx_L1_error) /* "SLEPc/RG.pyx":88 * cdef SlepcRGType rg_type = NULL * CHKERR( RGGetType(self.rg, &rg_type) ) * return bytes2str(rg_type) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_rg_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":77 * CHKERR( RGSetType(self.rg, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the RG type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.RG.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":90 * return bytes2str(rg_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all RG options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_12setOptionsPrefix[] = "RG.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all RG options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all RG option\n requests.\n\n Notes\n -----\n A hyphen (``-``) must NOT be given at the beginning of the\n prefix name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(12, 90, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 90, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/RG.pyx":107 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/RG.pyx":108 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/RG.pyx":109 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetOptionsPrefix(__pyx_v_self->rg, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 109, __pyx_L1_error) /* "SLEPc/RG.pyx":90 * return bytes2str(rg_type) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all RG options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.RG.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":111 * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all RG options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_14getOptionsPrefix[] = "RG.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all RG options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this RG object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(struct PySlepcRGObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/RG.pyx":121 * The prefix string set for this RG object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( RGGetOptionsPrefix(self.rg, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/RG.pyx":122 * """ * cdef const_char *prefix = NULL * CHKERR( RGGetOptionsPrefix(self.rg, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetOptionsPrefix(__pyx_v_self->rg, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 122, __pyx_L1_error) /* "SLEPc/RG.pyx":123 * cdef const_char *prefix = NULL * CHKERR( RGGetOptionsPrefix(self.rg, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":111 * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all RG options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.RG.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":125 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets RG options from the options database. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_16setFromOptions[] = "RG.setFromOptions(self)\n\n Sets RG options from the options database.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(struct PySlepcRGObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/RG.pyx":134 * option. * """ * CHKERR( RGSetFromOptions(self.rg) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetFromOptions(__pyx_v_self->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 134, __pyx_L1_error) /* "SLEPc/RG.pyx":125 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets RG options from the options database. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":138 * # * * def isTrivial(self): # <<<<<<<<<<<<<< * """ * Tells whether it is the trivial region (whole complex plane). */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_18isTrivial[] = "RG.isTrivial(self)\n\n Tells whether it is the trivial region (whole complex plane).\n\n Returns\n -------\n flag: boolean\n True if the region is equal to the whole complex plane, e.g.,\n an interval region with all four endpoints unbounded or an\n ellipse with infinite radius.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isTrivial (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("isTrivial", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isTrivial", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(struct PySlepcRGObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("isTrivial", 0); /* "SLEPc/RG.pyx":149 * ellipse with infinite radius. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( RGIsTrivial(self.rg, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/RG.pyx":150 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGIsTrivial(self.rg, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIsTrivial(__pyx_v_self->rg, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 150, __pyx_L1_error) /* "SLEPc/RG.pyx":151 * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGIsTrivial(self.rg, &tval) ) * return tval # <<<<<<<<<<<<<< * * def getComplement(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":138 * # * * def isTrivial(self): # <<<<<<<<<<<<<< * """ * Tells whether it is the trivial region (whole complex plane). */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.RG.isTrivial", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":153 * return tval * * def getComplement(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether the region is complemented or not. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_20getComplement[] = "RG.getComplement(self)\n\n Returns the flag indicating whether the region is complemented or not.\n\n Returns\n -------\n flg: bool\n Whether the region is complemented or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getComplement (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getComplement", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getComplement", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(struct PySlepcRGObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getComplement", 0); /* "SLEPc/RG.pyx":162 * Whether the region is complemented or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( RGGetComplement(self.rg, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/RG.pyx":163 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGGetComplement(self.rg, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetComplement(__pyx_v_self->rg, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 163, __pyx_L1_error) /* "SLEPc/RG.pyx":164 * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGGetComplement(self.rg, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setComplement(self, comp): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":153 * return tval * * def getComplement(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether the region is complemented or not. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.RG.getComplement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":166 * return tval * * def setComplement(self, comp): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that the region is the complement */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_22setComplement[] = "RG.setComplement(self, comp)\n\n Sets a flag to indicate that the region is the complement\n of the specified one.\n\n Parameters\n ----------\n comp: bool\n Activate/deactivate the complementation of the region.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comp = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setComplement (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comp,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setComplement") < 0)) __PYX_ERR(12, 166, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_comp = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setComplement", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 166, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setComplement", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_comp); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comp) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setComplement", 0); /* "SLEPc/RG.pyx":176 * Activate/deactivate the complementation of the region. * """ * cdef PetscBool tval = comp # <<<<<<<<<<<<<< * CHKERR( RGSetComplement(self.rg, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_comp)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 176, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/RG.pyx":177 * """ * cdef PetscBool tval = comp * CHKERR( RGSetComplement(self.rg, tval) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetComplement(__pyx_v_self->rg, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 177, __pyx_L1_error) /* "SLEPc/RG.pyx":166 * return tval * * def setComplement(self, comp): # <<<<<<<<<<<<<< * """ * Sets a flag to indicate that the region is the complement */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setComplement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":181 * # * * def setEllipseParameters(self, center, radius, vscale): # <<<<<<<<<<<<<< * """ * Sets the parameters defining the ellipse region. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_24setEllipseParameters[] = "RG.setEllipseParameters(self, center, radius, vscale)\n\n Sets the parameters defining the ellipse region.\n\n Parameters\n ----------\n center: float (real or complex)\n The center.\n radius: float\n The radius.\n vscale: float\n The vertical scale.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_center = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_vscale = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setEllipseParameters (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_center,&__pyx_n_s_radius,&__pyx_n_s_vscale,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_center)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 1); __PYX_ERR(12, 181, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vscale)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 2); __PYX_ERR(12, 181, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEllipseParameters") < 0)) __PYX_ERR(12, 181, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_center = values[0]; __pyx_v_radius = values[1]; __pyx_v_vscale = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 181, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_center, __pyx_v_radius, __pyx_v_vscale); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_radius, PyObject *__pyx_v_vscale) { PetscScalar __pyx_v_sval; PetscReal __pyx_v_val1; PetscReal __pyx_v_val2; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; PetscReal __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("setEllipseParameters", 0); /* "SLEPc/RG.pyx":194 * The vertical scale. * """ * cdef PetscScalar sval = asScalar(center) # <<<<<<<<<<<<<< * cdef PetscReal val1 = radius * cdef PetscReal val2 = vscale */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_center); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 194, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/RG.pyx":195 * """ * cdef PetscScalar sval = asScalar(center) * cdef PetscReal val1 = radius # <<<<<<<<<<<<<< * cdef PetscReal val2 = vscale * CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_radius); if (unlikely((__pyx_t_2 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 195, __pyx_L1_error) __pyx_v_val1 = __pyx_t_2; /* "SLEPc/RG.pyx":196 * cdef PetscScalar sval = asScalar(center) * cdef PetscReal val1 = radius * cdef PetscReal val2 = vscale # <<<<<<<<<<<<<< * CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) * */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_vscale); if (unlikely((__pyx_t_2 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 196, __pyx_L1_error) __pyx_v_val2 = __pyx_t_2; /* "SLEPc/RG.pyx":197 * cdef PetscReal val1 = radius * cdef PetscReal val2 = vscale * CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) # <<<<<<<<<<<<<< * * def getEllipseParameters(self): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGEllipseSetParameters(__pyx_v_self->rg, __pyx_v_sval, __pyx_v_val1, __pyx_v_val2)); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(12, 197, __pyx_L1_error) /* "SLEPc/RG.pyx":181 * # * * def setEllipseParameters(self, center, radius, vscale): # <<<<<<<<<<<<<< * """ * Sets the parameters defining the ellipse region. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":199 * CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) * * def getEllipseParameters(self): # <<<<<<<<<<<<<< * """ * Gets the parameters that define the ellipse region. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_26getEllipseParameters[] = "RG.getEllipseParameters(self)\n\n Gets the parameters that define the ellipse region.\n\n Returns\n -------\n center: float (real or complex)\n The center.\n radius: float\n The radius.\n vscale: float\n The vertical scale.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEllipseParameters (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getEllipseParameters", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getEllipseParameters", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(struct PySlepcRGObject *__pyx_v_self) { PetscScalar __pyx_v_sval; PetscReal __pyx_v_val1; PetscReal __pyx_v_val2; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getEllipseParameters", 0); /* "SLEPc/RG.pyx":212 * The vertical scale. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * cdef PetscReal val1 = 0 * cdef PetscReal val2 = 0 */ __pyx_v_sval = 0.0; /* "SLEPc/RG.pyx":213 * """ * cdef PetscScalar sval = 0 * cdef PetscReal val1 = 0 # <<<<<<<<<<<<<< * cdef PetscReal val2 = 0 * CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) ) */ __pyx_v_val1 = 0.0; /* "SLEPc/RG.pyx":214 * cdef PetscScalar sval = 0 * cdef PetscReal val1 = 0 * cdef PetscReal val2 = 0 # <<<<<<<<<<<<<< * CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) ) * return (toScalar(sval), toReal(val1), toReal(val2)) */ __pyx_v_val2 = 0.0; /* "SLEPc/RG.pyx":215 * cdef PetscReal val1 = 0 * cdef PetscReal val2 = 0 * CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) ) # <<<<<<<<<<<<<< * return (toScalar(sval), toReal(val1), toReal(val2)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGEllipseGetParameters(__pyx_v_self->rg, (&__pyx_v_sval), (&__pyx_v_val1), (&__pyx_v_val2))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 215, __pyx_L1_error) /* "SLEPc/RG.pyx":216 * cdef PetscReal val2 = 0 * CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) ) * return (toScalar(sval), toReal(val1), toReal(val2)) # <<<<<<<<<<<<<< * * def setIntervalEndpoints(self, a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_val1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_val2); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":199 * CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) ) * * def getEllipseParameters(self): # <<<<<<<<<<<<<< * """ * Gets the parameters that define the ellipse region. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.RG.getEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":218 * return (toScalar(sval), toReal(val1), toReal(val2)) * * def setIntervalEndpoints(self, a, b, c, d): # <<<<<<<<<<<<<< * """ * Sets the parameters defining the interval region. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints[] = "RG.setIntervalEndpoints(self, a, b, c, d)\n\n Sets the parameters defining the interval region.\n\n Parameters\n ----------\n a: float\n The left endpoint in the real axis.\n b: float\n The right endpoint in the real axis.\n c: float\n The upper endpoint in the imaginary axis.\n d: float\n The lower endpoint in the imaginary axis.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_b = 0; PyObject *__pyx_v_c = 0; PyObject *__pyx_v_d = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setIntervalEndpoints (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 1); __PYX_ERR(12, 218, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 2); __PYX_ERR(12, 218, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 3); __PYX_ERR(12, 218, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIntervalEndpoints") < 0)) __PYX_ERR(12, 218, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_a = values[0]; __pyx_v_b = values[1]; __pyx_v_c = values[2]; __pyx_v_d = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 218, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PetscReal __pyx_v_va; PetscReal __pyx_v_vb; PetscReal __pyx_v_vc; PetscReal __pyx_v_vd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setIntervalEndpoints", 0); /* "SLEPc/RG.pyx":233 * The lower endpoint in the imaginary axis. * """ * cdef PetscReal va = a # <<<<<<<<<<<<<< * cdef PetscReal vb = b * cdef PetscReal vc = c */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 233, __pyx_L1_error) __pyx_v_va = __pyx_t_1; /* "SLEPc/RG.pyx":234 * """ * cdef PetscReal va = a * cdef PetscReal vb = b # <<<<<<<<<<<<<< * cdef PetscReal vc = c * cdef PetscReal vd = d */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 234, __pyx_L1_error) __pyx_v_vb = __pyx_t_1; /* "SLEPc/RG.pyx":235 * cdef PetscReal va = a * cdef PetscReal vb = b * cdef PetscReal vc = c # <<<<<<<<<<<<<< * cdef PetscReal vd = d * CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_c); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 235, __pyx_L1_error) __pyx_v_vc = __pyx_t_1; /* "SLEPc/RG.pyx":236 * cdef PetscReal vb = b * cdef PetscReal vc = c * cdef PetscReal vd = d # <<<<<<<<<<<<<< * CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_d); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 236, __pyx_L1_error) __pyx_v_vd = __pyx_t_1; /* "SLEPc/RG.pyx":237 * cdef PetscReal vc = c * cdef PetscReal vd = d * CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) # <<<<<<<<<<<<<< * * def getIntervalEndpoints(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIntervalSetEndpoints(__pyx_v_self->rg, __pyx_v_va, __pyx_v_vb, __pyx_v_vc, __pyx_v_vd)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 237, __pyx_L1_error) /* "SLEPc/RG.pyx":218 * return (toScalar(sval), toReal(val1), toReal(val2)) * * def setIntervalEndpoints(self, a, b, c, d): # <<<<<<<<<<<<<< * """ * Sets the parameters defining the interval region. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.RG.setIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/RG.pyx":239 * CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) * * def getIntervalEndpoints(self): # <<<<<<<<<<<<<< * """ * Gets the parameters that define the interval region. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints[] = "RG.getIntervalEndpoints(self)\n\n Gets the parameters that define the interval region.\n\n Returns\n -------\n a: float\n The left endpoint in the real axis.\n b: float\n The right endpoint in the real axis.\n c: float\n The upper endpoint in the imaginary axis.\n d: float\n The lower endpoint in the imaginary axis.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIntervalEndpoints (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIntervalEndpoints", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIntervalEndpoints", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(((struct PySlepcRGObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self) { PetscReal __pyx_v_va; PetscReal __pyx_v_vb; PetscReal __pyx_v_vc; PetscReal __pyx_v_vd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("getIntervalEndpoints", 0); /* "SLEPc/RG.pyx":254 * The lower endpoint in the imaginary axis. * """ * cdef PetscReal va = 0 # <<<<<<<<<<<<<< * cdef PetscReal vb = 0 * cdef PetscReal vc = 0 */ __pyx_v_va = 0.0; /* "SLEPc/RG.pyx":255 * """ * cdef PetscReal va = 0 * cdef PetscReal vb = 0 # <<<<<<<<<<<<<< * cdef PetscReal vc = 0 * cdef PetscReal vd = 0 */ __pyx_v_vb = 0.0; /* "SLEPc/RG.pyx":256 * cdef PetscReal va = 0 * cdef PetscReal vb = 0 * cdef PetscReal vc = 0 # <<<<<<<<<<<<<< * cdef PetscReal vd = 0 * CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) ) */ __pyx_v_vc = 0.0; /* "SLEPc/RG.pyx":257 * cdef PetscReal vb = 0 * cdef PetscReal vc = 0 * cdef PetscReal vd = 0 # <<<<<<<<<<<<<< * CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) ) * return (toReal(va), toReal(vb), toReal(vc), toReal(vd)) */ __pyx_v_vd = 0.0; /* "SLEPc/RG.pyx":258 * cdef PetscReal vc = 0 * cdef PetscReal vd = 0 * CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) ) # <<<<<<<<<<<<<< * return (toReal(va), toReal(vb), toReal(vc), toReal(vd)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIntervalGetEndpoints(__pyx_v_self->rg, (&__pyx_v_va), (&__pyx_v_vb), (&__pyx_v_vc), (&__pyx_v_vd))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 258, __pyx_L1_error) /* "SLEPc/RG.pyx":259 * cdef PetscReal vd = 0 * CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) ) * return (toReal(va), toReal(vb), toReal(vc), toReal(vd)) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_va); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vb); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vc); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vd); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":239 * CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) ) * * def getIntervalEndpoints(self): # <<<<<<<<<<<<<< * """ * Gets the parameters that define the interval region. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.RG.getIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":227 * LanczosReorthogType = EPSLanczosReorthogType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.eps * self.eps = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(struct PySlepcEPSObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/EPS.pyx":228 * * def __cinit__(self): * self.obj = &self.eps # <<<<<<<<<<<<<< * self.eps = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->eps)); /* "SLEPc/EPS.pyx":229 * def __cinit__(self): * self.obj = &self.eps * self.eps = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->eps = NULL; /* "SLEPc/EPS.pyx":227 * LanczosReorthogType = EPSLanczosReorthogType * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.eps * self.eps = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":231 * self.eps = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the EPS data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_2view[] = "EPS.view(self, Viewer viewer=None)\n\n Prints the EPS data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(13, 231, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 231, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(13, 231, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2view(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2view(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/EPS.pyx":241 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( EPSView(self.eps, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/EPS.pyx":242 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( EPSView(self.eps, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/EPS.pyx":243 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( EPSView(self.eps, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSView(__pyx_v_self->eps, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 243, __pyx_L1_error) /* "SLEPc/EPS.pyx":231 * self.eps = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the EPS data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":245 * CHKERR( EPSView(self.eps, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_4destroy[] = "EPS.destroy(self)\n\n Destroys the EPS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/EPS.pyx":249 * Destroys the EPS object. * """ * CHKERR( EPSDestroy(&self.eps) ) # <<<<<<<<<<<<<< * self.eps = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSDestroy((&__pyx_v_self->eps))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 249, __pyx_L1_error) /* "SLEPc/EPS.pyx":250 * """ * CHKERR( EPSDestroy(&self.eps) ) * self.eps = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->eps = NULL; /* "SLEPc/EPS.pyx":251 * CHKERR( EPSDestroy(&self.eps) ) * self.eps = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/EPS.pyx":245 * CHKERR( EPSView(self.eps, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the EPS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":253 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_6reset[] = "EPS.reset(self)\n\n Resets the EPS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/EPS.pyx":257 * Resets the EPS object. * """ * CHKERR( EPSReset(self.eps) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSReset(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 257, __pyx_L1_error) /* "SLEPc/EPS.pyx":253 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the EPS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":259 * CHKERR( EPSReset(self.eps) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_8create[] = "EPS.create(self, comm=None)\n\n Creates the EPS object.\n\n Parameters\n ----------\n comm: MPI_Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(13, 259, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 259, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_8create(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_8create(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; EPS __pyx_v_neweps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/EPS.pyx":269 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcEPS neweps = NULL * CHKERR( EPSCreate(ccomm, &neweps) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 269, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/EPS.pyx":270 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcEPS neweps = NULL # <<<<<<<<<<<<<< * CHKERR( EPSCreate(ccomm, &neweps) ) * SlepcCLEAR(self.obj); self.eps = neweps */ __pyx_v_neweps = NULL; /* "SLEPc/EPS.pyx":271 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcEPS neweps = NULL * CHKERR( EPSCreate(ccomm, &neweps) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.eps = neweps * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSCreate(__pyx_v_ccomm, (&__pyx_v_neweps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 271, __pyx_L1_error) /* "SLEPc/EPS.pyx":272 * cdef SlepcEPS neweps = NULL * CHKERR( EPSCreate(ccomm, &neweps) ) * SlepcCLEAR(self.obj); self.eps = neweps # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->eps = __pyx_v_neweps; /* "SLEPc/EPS.pyx":273 * CHKERR( EPSCreate(ccomm, &neweps) ) * SlepcCLEAR(self.obj); self.eps = neweps * return self # <<<<<<<<<<<<<< * * def setType(self, eps_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/EPS.pyx":259 * CHKERR( EPSReset(self.eps) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the EPS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":275 * return self * * def setType(self, eps_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_10setType[] = "EPS.setType(self, eps_type)\n\n Selects the particular solver to be used in the EPS object.\n\n Parameters\n ----------\n eps_type: `EPS.Type` enumerate\n The solver to be used.\n\n Notes\n -----\n See `EPS.Type` for available methods. The default is\n `EPS.Type.KRYLOVSCHUR`. Normally, it is best to use\n `setFromOptions()` and then set the EPS type from the options\n database rather than by using this routine. Using the options\n database provides the user with maximum flexibility in\n evaluating the different available methods.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_eps_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(13, 275, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_eps_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 275, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_eps_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_eps_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_eps_type); /* "SLEPc/EPS.pyx":293 * evaluating the different available methods. * """ * cdef SlepcEPSType cval = NULL # <<<<<<<<<<<<<< * eps_type = str2bytes(eps_type, &cval) * CHKERR( EPSSetType(self.eps, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/EPS.pyx":294 * """ * cdef SlepcEPSType cval = NULL * eps_type = str2bytes(eps_type, &cval) # <<<<<<<<<<<<<< * CHKERR( EPSSetType(self.eps, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_eps_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_eps_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":295 * cdef SlepcEPSType cval = NULL * eps_type = str2bytes(eps_type, &cval) * CHKERR( EPSSetType(self.eps, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetType(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 295, __pyx_L1_error) /* "SLEPc/EPS.pyx":275 * return self * * def setType(self, eps_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the EPS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_eps_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":297 * CHKERR( EPSSetType(self.eps, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the EPS type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_12getType[] = "EPS.getType(self)\n\n Gets the EPS type of this object.\n\n Returns\n -------\n type: `EPS.Type` enumerate\n The solver currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(struct PySlepcEPSObject *__pyx_v_self) { const char* __pyx_v_eps_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/EPS.pyx":306 * The solver currently being used. * """ * cdef SlepcEPSType eps_type = NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetType(self.eps, &eps_type) ) * return bytes2str(eps_type) */ __pyx_v_eps_type = NULL; /* "SLEPc/EPS.pyx":307 * """ * cdef SlepcEPSType eps_type = NULL * CHKERR( EPSGetType(self.eps, &eps_type) ) # <<<<<<<<<<<<<< * return bytes2str(eps_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetType(__pyx_v_self->eps, (&__pyx_v_eps_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 307, __pyx_L1_error) /* "SLEPc/EPS.pyx":308 * cdef SlepcEPSType eps_type = NULL * CHKERR( EPSGetType(self.eps, &eps_type) ) * return bytes2str(eps_type) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_eps_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":297 * CHKERR( EPSSetType(self.eps, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the EPS type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":310 * return bytes2str(eps_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all EPS options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix[] = "EPS.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all EPS options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this EPS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/EPS.pyx":320 * The prefix string set for this EPS object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/EPS.pyx":321 * """ * cdef const_char *prefix = NULL * CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOptionsPrefix(__pyx_v_self->eps, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 321, __pyx_L1_error) /* "SLEPc/EPS.pyx":322 * cdef const_char *prefix = NULL * CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":310 * return bytes2str(eps_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all EPS options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":324 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all EPS options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix[] = "EPS.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all EPS options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all EPS option\n requests.\n\n Notes\n -----\n A hyphen (-) must NOT be given at the beginning of the prefix\n name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n\n For example, to distinguish between the runtime options for\n two different EPS contexts, one could call::\n\n E1.setOptionsPrefix(\"eig1_\")\n E2.setOptionsPrefix(\"eig2_\")\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(13, 324, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 324, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/EPS.pyx":347 * E2.setOptionsPrefix("eig2_") * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/EPS.pyx":348 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":349 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) # <<<<<<<<<<<<<< * * def appendOptionsPrefix(self, prefix): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetOptionsPrefix(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 349, __pyx_L1_error) /* "SLEPc/EPS.pyx":324 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all EPS options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":351 * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all EPS options */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix[] = "EPS.appendOptionsPrefix(self, prefix)\n\n Appends to the prefix used for searching for all EPS options\n in the database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all EPS option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(13, 351, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 351, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/EPS.pyx":361 * The prefix string to prepend to all EPS option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/EPS.pyx":362 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":363 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSAppendOptionsPrefix(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 363, __pyx_L1_error) /* "SLEPc/EPS.pyx":351 * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all EPS options */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":365 * CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets EPS options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_20setFromOptions[] = "EPS.setFromOptions(self)\n\n Sets EPS options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/EPS.pyx":376 * option. * """ * CHKERR( EPSSetFromOptions(self.eps) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetFromOptions(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 376, __pyx_L1_error) /* "SLEPc/EPS.pyx":365 * CHKERR( EPSAppendOptionsPrefix(self.eps, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets EPS options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":380 * # * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_22getProblemType[] = "EPS.getProblemType(self)\n\n Gets the problem type from the EPS object.\n\n Returns\n -------\n problem_type: `EPS.ProblemType` enumerate\n The problem type that was previously set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getProblemType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getProblemType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getProblemType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(struct PySlepcEPSObject *__pyx_v_self) { EPSProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getProblemType", 0); /* "SLEPc/EPS.pyx":389 * The problem type that was previously set. * """ * cdef SlepcEPSProblemType val = EPS_NHEP # <<<<<<<<<<<<<< * CHKERR( EPSGetProblemType(self.eps, &val) ) * return val */ __pyx_v_val = EPS_NHEP; /* "SLEPc/EPS.pyx":390 * """ * cdef SlepcEPSProblemType val = EPS_NHEP * CHKERR( EPSGetProblemType(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetProblemType(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 390, __pyx_L1_error) /* "SLEPc/EPS.pyx":391 * cdef SlepcEPSProblemType val = EPS_NHEP * CHKERR( EPSGetProblemType(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setProblemType(self, problem_type): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSProblemType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":380 * # * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the EPS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":393 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_24setProblemType[] = "EPS.setProblemType(self, problem_type)\n\n Specifies the type of the eigenvalue problem.\n\n Parameters\n ----------\n problem_type: `EPS.ProblemType` enumerate\n The problem type to be set.\n\n Notes\n -----\n Allowed values are: Hermitian (HEP), non-Hermitian (NHEP),\n generalized Hermitian (GHEP), generalized non-Hermitian\n (GNHEP), and generalized non-Hermitian with positive\n semi-definite B (PGNHEP).\n\n This function must be used to instruct SLEPc to exploit\n symmetry. If no problem type is specified, by default a\n non-Hermitian problem is assumed (either standard or\n generalized). If the user knows that the problem is Hermitian\n (i.e. ``A=A^H``) or generalized Hermitian (i.e. ``A=A^H``,\n ``B=B^H``, and ``B`` positive definite) then it is recommended\n to set the problem type so that eigensolver can exploit these\n properties.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_problem_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setProblemType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problem_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_problem_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setProblemType") < 0)) __PYX_ERR(13, 393, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_problem_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setProblemType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 393, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_problem_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_problem_type) { EPSProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSProblemType __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setProblemType", 0); /* "SLEPc/EPS.pyx":418 * properties. * """ * cdef SlepcEPSProblemType val = problem_type # <<<<<<<<<<<<<< * CHKERR( EPSSetProblemType(self.eps, val) ) * */ __pyx_t_1 = ((EPSProblemType)__Pyx_PyInt_As_EPSProblemType(__pyx_v_problem_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 418, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":419 * """ * cdef SlepcEPSProblemType val = problem_type * CHKERR( EPSSetProblemType(self.eps, val) ) # <<<<<<<<<<<<<< * * def isGeneralized(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetProblemType(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 419, __pyx_L1_error) /* "SLEPc/EPS.pyx":393 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of the eigenvalue problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":421 * CHKERR( EPSSetProblemType(self.eps, val) ) * * def isGeneralized(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to a generalized */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_26isGeneralized[] = "EPS.isGeneralized(self)\n\n Tells whether the EPS object corresponds to a generalized\n eigenvalue problem.\n\n Returns\n -------\n flag: boolean\n True if two matrices were set with `setOperators()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isGeneralized (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("isGeneralized", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isGeneralized", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("isGeneralized", 0); /* "SLEPc/EPS.pyx":431 * True if two matrices were set with `setOperators()`. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsGeneralized(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":432 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsGeneralized(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsGeneralized(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 432, __pyx_L1_error) /* "SLEPc/EPS.pyx":433 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsGeneralized(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def isHermitian(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":421 * CHKERR( EPSSetProblemType(self.eps, val) ) * * def isGeneralized(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to a generalized */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isGeneralized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":435 * return tval * * def isHermitian(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to a Hermitian */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_28isHermitian[] = "EPS.isHermitian(self)\n\n Tells whether the EPS object corresponds to a Hermitian\n eigenvalue problem.\n\n Returns\n -------\n flag: boolean\n True if the problem type set with `setProblemType()` was\n Hermitian.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isHermitian (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("isHermitian", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isHermitian", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("isHermitian", 0); /* "SLEPc/EPS.pyx":446 * Hermitian. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsHermitian(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":447 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsHermitian(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsHermitian(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 447, __pyx_L1_error) /* "SLEPc/EPS.pyx":448 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsHermitian(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def isPositive(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":435 * return tval * * def isHermitian(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to a Hermitian */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isHermitian", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":450 * return tval * * def isPositive(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to an eigenvalue problem */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_30isPositive[] = "EPS.isPositive(self)\n\n Tells whether the EPS object corresponds to an eigenvalue problem\n type that requires a positive (semi-) definite matrix B.\n\n Returns\n -------\n flag: boolean\n True if the problem type set with `setProblemType()` was\n positive.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isPositive (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("isPositive", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isPositive", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("isPositive", 0); /* "SLEPc/EPS.pyx":461 * positive. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsPositive(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":462 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsPositive(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsPositive(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 462, __pyx_L1_error) /* "SLEPc/EPS.pyx":463 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsPositive(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def getBalance(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":450 * return tval * * def isPositive(self): # <<<<<<<<<<<<<< * """ * Tells whether the EPS object corresponds to an eigenvalue problem */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isPositive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":465 * return tval * * def getBalance(self): # <<<<<<<<<<<<<< * """ * Gets the balancing type used by the EPS object, */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_32getBalance[] = "EPS.getBalance(self)\n\n Gets the balancing type used by the EPS object,\n and the associated parameters.\n\n Returns\n -------\n balance: `EPS.Balance` enumerate\n The balancing method\n iterations: integer\n Number of iterations of the balancing algorithm\n cutoff: real\n Cutoff value\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBalance (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBalance", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBalance", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(struct PySlepcEPSObject *__pyx_v_self) { EPSBalance __pyx_v_val; PetscInt __pyx_v_ival; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getBalance", 0); /* "SLEPc/EPS.pyx":479 * Cutoff value * """ * cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * cdef PetscReal rval = 0 */ __pyx_v_val = EPS_BALANCE_ONESIDE; /* "SLEPc/EPS.pyx":480 * """ * cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * cdef PetscReal rval = 0 * CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) ) */ __pyx_v_ival = 0; /* "SLEPc/EPS.pyx":481 * cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE * cdef PetscInt ival = 0 * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) ) * return (val, toInt(ival), toReal(rval)) */ __pyx_v_rval = 0.0; /* "SLEPc/EPS.pyx":482 * cdef PetscInt ival = 0 * cdef PetscReal rval = 0 * CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) ) # <<<<<<<<<<<<<< * return (val, toInt(ival), toReal(rval)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetBalance(__pyx_v_self->eps, (&__pyx_v_val), (&__pyx_v_ival), (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 482, __pyx_L1_error) /* "SLEPc/EPS.pyx":483 * cdef PetscReal rval = 0 * CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) ) * return (val, toInt(ival), toReal(rval)) # <<<<<<<<<<<<<< * * def setBalance(self, balance=None, iterations=None, cutoff=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSBalance(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":465 * return tval * * def getBalance(self): # <<<<<<<<<<<<<< * """ * Gets the balancing type used by the EPS object, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getBalance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":485 * return (val, toInt(ival), toReal(rval)) * * def setBalance(self, balance=None, iterations=None, cutoff=None): # <<<<<<<<<<<<<< * """ * Specifies the balancing technique to be employed by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_34setBalance[] = "EPS.setBalance(self, balance=None, iterations=None, cutoff=None)\n\n Specifies the balancing technique to be employed by the\n eigensolver, and some parameters associated to it.\n\n Parameters\n ----------\n balance: `EPS.Balance` enumerate\n The balancing method\n iterations: integer\n Number of iterations of the balancing algorithm\n cutoff: real\n Cutoff value\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_balance = 0; PyObject *__pyx_v_iterations = 0; PyObject *__pyx_v_cutoff = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBalance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_balance,&__pyx_n_s_iterations,&__pyx_n_s_cutoff,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_balance); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cutoff); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBalance") < 0)) __PYX_ERR(13, 485, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_balance = values[0]; __pyx_v_iterations = values[1]; __pyx_v_cutoff = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBalance", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 485, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBalance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_balance, __pyx_v_iterations, __pyx_v_cutoff); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_balance, PyObject *__pyx_v_iterations, PyObject *__pyx_v_cutoff) { EPSBalance __pyx_v_val; PetscInt __pyx_v_ival; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; EPSBalance __pyx_t_3; PetscInt __pyx_t_4; PetscReal __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("setBalance", 0); /* "SLEPc/EPS.pyx":499 * Cutoff value * """ * cdef SlepcEPSBalance val = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval = PETSC_DEFAULT */ __pyx_v_val = ((EPSBalance)PETSC_DEFAULT); /* "SLEPc/EPS.pyx":500 * """ * cdef SlepcEPSBalance val = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscReal rval = PETSC_DEFAULT * if balance is not None: val = balance */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":501 * cdef SlepcEPSBalance val = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * if balance is not None: val = balance * if iterations is not None: ival = asInt(iterations) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":502 * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval = PETSC_DEFAULT * if balance is not None: val = balance # <<<<<<<<<<<<<< * if iterations is not None: ival = asInt(iterations) * if cutoff is not None: rval = asReal(cutoff) */ __pyx_t_1 = (__pyx_v_balance != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((EPSBalance)__Pyx_PyInt_As_EPSBalance(__pyx_v_balance)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 502, __pyx_L1_error) __pyx_v_val = __pyx_t_3; } /* "SLEPc/EPS.pyx":503 * cdef PetscReal rval = PETSC_DEFAULT * if balance is not None: val = balance * if iterations is not None: ival = asInt(iterations) # <<<<<<<<<<<<<< * if cutoff is not None: rval = asReal(cutoff) * CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) */ __pyx_t_2 = (__pyx_v_iterations != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_iterations); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(13, 503, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/EPS.pyx":504 * if balance is not None: val = balance * if iterations is not None: ival = asInt(iterations) * if cutoff is not None: rval = asReal(cutoff) # <<<<<<<<<<<<<< * CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) * */ __pyx_t_1 = (__pyx_v_cutoff != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_cutoff); if (unlikely(__pyx_t_5 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 504, __pyx_L1_error) __pyx_v_rval = __pyx_t_5; } /* "SLEPc/EPS.pyx":505 * if iterations is not None: ival = asInt(iterations) * if cutoff is not None: rval = asReal(cutoff) * CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) # <<<<<<<<<<<<<< * * def getExtraction(self): */ __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetBalance(__pyx_v_self->eps, __pyx_v_val, __pyx_v_ival, __pyx_v_rval)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(13, 505, __pyx_L1_error) /* "SLEPc/EPS.pyx":485 * return (val, toInt(ival), toReal(rval)) * * def setBalance(self, balance=None, iterations=None, cutoff=None): # <<<<<<<<<<<<<< * """ * Specifies the balancing technique to be employed by the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBalance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":507 * CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) * * def getExtraction(self): # <<<<<<<<<<<<<< * """ * Gets the extraction type used by the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_36getExtraction[] = "EPS.getExtraction(self)\n\n Gets the extraction type used by the EPS object.\n\n Returns\n -------\n extraction: `EPS.Extraction` enumerate\n The method of extraction.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getExtraction (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getExtraction", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getExtraction", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(struct PySlepcEPSObject *__pyx_v_self) { EPSExtraction __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getExtraction", 0); /* "SLEPc/EPS.pyx":516 * The method of extraction. * """ * cdef SlepcEPSExtraction val = EPS_RITZ # <<<<<<<<<<<<<< * CHKERR( EPSGetExtraction(self.eps, &val) ) * return val */ __pyx_v_val = EPS_RITZ; /* "SLEPc/EPS.pyx":517 * """ * cdef SlepcEPSExtraction val = EPS_RITZ * CHKERR( EPSGetExtraction(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetExtraction(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 517, __pyx_L1_error) /* "SLEPc/EPS.pyx":518 * cdef SlepcEPSExtraction val = EPS_RITZ * CHKERR( EPSGetExtraction(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setExtraction(self, extraction): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSExtraction(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":507 * CHKERR( EPSSetBalance(self.eps, val, ival, rval) ) * * def getExtraction(self): # <<<<<<<<<<<<<< * """ * Gets the extraction type used by the EPS object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":520 * return val * * def setExtraction(self, extraction): # <<<<<<<<<<<<<< * """ * Sets the extraction type used by the EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_38setExtraction[] = "EPS.setExtraction(self, extraction)\n\n Sets the extraction type used by the EPS object.\n\n Parameters\n ----------\n extraction: `EPS.Extraction` enumerate\n The extraction method to be used by the solver.\n\n Notes\n -----\n Not all eigensolvers support all types of extraction. See the\n SLEPc documentation for details.\n\n By default, a standard Rayleigh-Ritz extraction is used. Other\n extractions may be useful when computing interior eigenvalues.\n\n Harmonic-type extractions are used in combination with a\n *target*. See `setTarget()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_extraction = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setExtraction (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extraction,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_extraction)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExtraction") < 0)) __PYX_ERR(13, 520, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_extraction = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setExtraction", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 520, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_extraction); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_extraction) { EPSExtraction __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSExtraction __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setExtraction", 0); /* "SLEPc/EPS.pyx":540 * *target*. See `setTarget()`. * """ * cdef SlepcEPSExtraction val = extraction # <<<<<<<<<<<<<< * CHKERR( EPSSetExtraction(self.eps, val) ) * */ __pyx_t_1 = ((EPSExtraction)__Pyx_PyInt_As_EPSExtraction(__pyx_v_extraction)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 540, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":541 * """ * cdef SlepcEPSExtraction val = extraction * CHKERR( EPSSetExtraction(self.eps, val) ) # <<<<<<<<<<<<<< * * def getWhichEigenpairs(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetExtraction(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 541, __pyx_L1_error) /* "SLEPc/EPS.pyx":520 * return val * * def setExtraction(self, extraction): # <<<<<<<<<<<<<< * """ * Sets the extraction type used by the EPS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":543 * CHKERR( EPSSetExtraction(self.eps, val) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs[] = "EPS.getWhichEigenpairs(self)\n\n Returns which portion of the spectrum is to be sought.\n\n Returns\n -------\n which: `EPS.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self) { EPSWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/EPS.pyx":552 * The portion of the spectrum to be sought by the solver. * """ * cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * CHKERR( EPSGetWhichEigenpairs(self.eps, &val) ) * return val */ __pyx_v_val = EPS_LARGEST_MAGNITUDE; /* "SLEPc/EPS.pyx":553 * """ * cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE * CHKERR( EPSGetWhichEigenpairs(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetWhichEigenpairs(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 553, __pyx_L1_error) /* "SLEPc/EPS.pyx":554 * cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE * CHKERR( EPSGetWhichEigenpairs(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setWhichEigenpairs(self, which): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":543 * CHKERR( EPSSetExtraction(self.eps, val) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":556 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs[] = "EPS.setWhichEigenpairs(self, which)\n\n Specifies which portion of the spectrum is to be sought.\n\n Parameters\n ----------\n which: `EPS.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n\n Notes\n -----\n Not all eigensolvers implemented in EPS account for all the\n possible values. Also, some values make sense only for certain\n types of problems. If SLEPc is compiled for real numbers\n `EPS.Which.LARGEST_IMAGINARY` and\n `EPS.Which.SMALLEST_IMAGINARY` use the absolute value of the\n imaginary part for eigenvalue selection.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_which = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(13, 556, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_which = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 556, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_which); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_which) { EPSWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSWhich __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/EPS.pyx":574 * imaginary part for eigenvalue selection. * """ * cdef SlepcEPSWhich val = which # <<<<<<<<<<<<<< * CHKERR( EPSSetWhichEigenpairs(self.eps, val) ) * */ __pyx_t_1 = ((EPSWhich)__Pyx_PyInt_As_EPSWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 574, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":575 * """ * cdef SlepcEPSWhich val = which * CHKERR( EPSSetWhichEigenpairs(self.eps, val) ) # <<<<<<<<<<<<<< * * def getTarget(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetWhichEigenpairs(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 575, __pyx_L1_error) /* "SLEPc/EPS.pyx":556 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":577 * CHKERR( EPSSetWhichEigenpairs(self.eps, val) ) * * def getTarget(self): # <<<<<<<<<<<<<< * """ * Gets the value of the target. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_44getTarget[] = "EPS.getTarget(self)\n\n Gets the value of the target.\n\n Returns\n -------\n target: float (real or complex)\n The value of the target.\n\n Notes\n -----\n If the target was not set by the user, then zero is returned.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTarget (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTarget", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTarget", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(struct PySlepcEPSObject *__pyx_v_self) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTarget", 0); /* "SLEPc/EPS.pyx":590 * If the target was not set by the user, then zero is returned. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetTarget(self.eps, &sval) ) * return toScalar(sval) */ __pyx_v_sval = 0.0; /* "SLEPc/EPS.pyx":591 * """ * cdef PetscScalar sval = 0 * CHKERR( EPSGetTarget(self.eps, &sval) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTarget(__pyx_v_self->eps, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 591, __pyx_L1_error) /* "SLEPc/EPS.pyx":592 * cdef PetscScalar sval = 0 * CHKERR( EPSGetTarget(self.eps, &sval) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def setTarget(self, target): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":577 * CHKERR( EPSSetWhichEigenpairs(self.eps, val) ) * * def getTarget(self): # <<<<<<<<<<<<<< * """ * Gets the value of the target. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":594 * return toScalar(sval) * * def setTarget(self, target): # <<<<<<<<<<<<<< * """ * Sets the value of the target. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_46setTarget[] = "EPS.setTarget(self, target)\n\n Sets the value of the target.\n\n Parameters\n ----------\n target: float (real or complex)\n The value of the target.\n\n Notes\n -----\n The target is a scalar value used to determine the portion of\n the spectrum of interest. It is used in combination with\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_target = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTarget (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTarget") < 0)) __PYX_ERR(13, 594, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_target = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTarget", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 594, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_target) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscScalar __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTarget", 0); /* "SLEPc/EPS.pyx":609 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval = asScalar(target) # <<<<<<<<<<<<<< * CHKERR( EPSSetTarget(self.eps, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_target); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 609, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/EPS.pyx":610 * """ * cdef PetscScalar sval = asScalar(target) * CHKERR( EPSSetTarget(self.eps, sval) ) # <<<<<<<<<<<<<< * * def getInterval(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTarget(__pyx_v_self->eps, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 610, __pyx_L1_error) /* "SLEPc/EPS.pyx":594 * return toScalar(sval) * * def setTarget(self, target): # <<<<<<<<<<<<<< * """ * Sets the value of the target. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":612 * CHKERR( EPSSetTarget(self.eps, sval) ) * * def getInterval(self): # <<<<<<<<<<<<<< * """ * Gets the computational interval for spectrum slicing. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_48getInterval[] = "EPS.getInterval(self)\n\n Gets the computational interval for spectrum slicing.\n\n Returns\n -------\n inta: float\n The left end of the interval.\n intb: float\n The right end of the interval.\n\n Notes\n -----\n If the interval was not set by the user, then zeros are returned.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getInterval (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getInterval", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getInterval", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(struct PySlepcEPSObject *__pyx_v_self) { PetscReal __pyx_v_inta; PetscReal __pyx_v_intb; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getInterval", 0); /* "SLEPc/EPS.pyx":627 * If the interval was not set by the user, then zeros are returned. * """ * cdef PetscReal inta = 0 # <<<<<<<<<<<<<< * cdef PetscReal intb = 0 * CHKERR( EPSGetInterval(self.eps, &inta, &intb) ) */ __pyx_v_inta = 0.0; /* "SLEPc/EPS.pyx":628 * """ * cdef PetscReal inta = 0 * cdef PetscReal intb = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetInterval(self.eps, &inta, &intb) ) * return (toReal(inta), toReal(intb)) */ __pyx_v_intb = 0.0; /* "SLEPc/EPS.pyx":629 * cdef PetscReal inta = 0 * cdef PetscReal intb = 0 * CHKERR( EPSGetInterval(self.eps, &inta, &intb) ) # <<<<<<<<<<<<<< * return (toReal(inta), toReal(intb)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetInterval(__pyx_v_self->eps, (&__pyx_v_inta), (&__pyx_v_intb))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 629, __pyx_L1_error) /* "SLEPc/EPS.pyx":630 * cdef PetscReal intb = 0 * CHKERR( EPSGetInterval(self.eps, &inta, &intb) ) * return (toReal(inta), toReal(intb)) # <<<<<<<<<<<<<< * * def setInterval(self, inta, intb): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_inta); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_intb); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":612 * CHKERR( EPSSetTarget(self.eps, sval) ) * * def getInterval(self): # <<<<<<<<<<<<<< * """ * Gets the computational interval for spectrum slicing. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":632 * return (toReal(inta), toReal(intb)) * * def setInterval(self, inta, intb): # <<<<<<<<<<<<<< * """ * Defines the computational interval for spectrum slicing. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_50setInterval[] = "EPS.setInterval(self, inta, intb)\n\n Defines the computational interval for spectrum slicing.\n\n Parameters\n ----------\n inta: float\n The left end of the interval.\n intb: float\n The right end of the interval.\n\n Notes\n -----\n Spectrum slicing is a technique employed for computing all\n eigenvalues of symmetric eigenproblems in a given interval.\n This function provides the interval to be considered. It must\n be used in combination with `EPS.Which.ALL`, see\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inta = 0; PyObject *__pyx_v_intb = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInterval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inta,&__pyx_n_s_intb,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_inta)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_intb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, 1); __PYX_ERR(13, 632, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInterval") < 0)) __PYX_ERR(13, 632, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_inta = values[0]; __pyx_v_intb = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 632, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_inta, __pyx_v_intb); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_inta, PyObject *__pyx_v_intb) { PetscReal __pyx_v_rval1; PetscReal __pyx_v_rval2; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setInterval", 0); /* "SLEPc/EPS.pyx":651 * `setWhichEigenpairs()`. * """ * cdef PetscReal rval1 = asReal(inta) # <<<<<<<<<<<<<< * cdef PetscReal rval2 = asReal(intb) * CHKERR( EPSSetInterval(self.eps, rval1, rval2) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_inta); if (unlikely(__pyx_t_1 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 651, __pyx_L1_error) __pyx_v_rval1 = __pyx_t_1; /* "SLEPc/EPS.pyx":652 * """ * cdef PetscReal rval1 = asReal(inta) * cdef PetscReal rval2 = asReal(intb) # <<<<<<<<<<<<<< * CHKERR( EPSSetInterval(self.eps, rval1, rval2) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_intb); if (unlikely(__pyx_t_1 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 652, __pyx_L1_error) __pyx_v_rval2 = __pyx_t_1; /* "SLEPc/EPS.pyx":653 * cdef PetscReal rval1 = asReal(inta) * cdef PetscReal rval2 = asReal(intb) * CHKERR( EPSSetInterval(self.eps, rval1, rval2) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetInterval(__pyx_v_self->eps, __pyx_v_rval1, __pyx_v_rval2)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 653, __pyx_L1_error) /* "SLEPc/EPS.pyx":632 * return (toReal(inta), toReal(intb)) * * def setInterval(self, inta, intb): # <<<<<<<<<<<<<< * """ * Defines the computational interval for spectrum slicing. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":657 * # * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_52getTolerances[] = "EPS.getTolerances(self)\n\n Gets the tolerance and maximum iteration count used by the\n default EPS convergence tests.\n\n Returns\n -------\n tol: float\n The convergence tolerance.\n max_it: int\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(struct PySlepcEPSObject *__pyx_v_self) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/EPS.pyx":669 * The maximum number of iterations * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * CHKERR( EPSGetTolerances(self.eps, &rval, &ival) ) */ __pyx_v_rval = 0.0; /* "SLEPc/EPS.pyx":670 * """ * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetTolerances(self.eps, &rval, &ival) ) * return (toReal(rval), toInt(ival)) */ __pyx_v_ival = 0; /* "SLEPc/EPS.pyx":671 * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 * CHKERR( EPSGetTolerances(self.eps, &rval, &ival) ) # <<<<<<<<<<<<<< * return (toReal(rval), toInt(ival)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTolerances(__pyx_v_self->eps, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 671, __pyx_L1_error) /* "SLEPc/EPS.pyx":672 * cdef PetscInt ival = 0 * CHKERR( EPSGetTolerances(self.eps, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, max_it=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":657 * # * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":674 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_54setTolerances[] = "EPS.setTolerances(self, tol=None, max_it=None)\n\n Sets the tolerance and maximum iteration count used by the\n default EPS convergence tests.\n\n Parameters\n ----------\n tol: float, optional\n The convergence tolerance.\n max_it: int, optional\n The maximum number of iterations\n\n Notes\n -----\n Use `DECIDE` for maxits to assign a reasonably good value,\n which is dependent on the solution method.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(13, 674, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_tol = values[0]; __pyx_v_max_it = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 674, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscReal __pyx_t_3; PetscInt __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/EPS.pyx":691 * which is dependent on the solution method. * """ * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":692 * """ * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":693 * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) # <<<<<<<<<<<<<< * if max_it is not None: ival = asInt(max_it) * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) */ __pyx_t_1 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 693, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/EPS.pyx":694 * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) # <<<<<<<<<<<<<< * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) * */ __pyx_t_2 = (__pyx_v_max_it != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(13, 694, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/EPS.pyx":695 * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) # <<<<<<<<<<<<<< * * def getConvergenceTest(self): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTolerances(__pyx_v_self->eps, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(13, 695, __pyx_L1_error) /* "SLEPc/EPS.pyx":674 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":697 * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) * * def getConvergenceTest(self): # <<<<<<<<<<<<<< * """ * Return the method used to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_56getConvergenceTest[] = "EPS.getConvergenceTest(self)\n\n Return the method used to compute the error estimate \n used in the convergence test. \n\n Returns\n -------\n conv: EPS.Conv\n The method used to compute the error estimate \n used in the convergence test. \n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergenceTest (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergenceTest", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergenceTest", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self) { EPSConv __pyx_v_conv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergenceTest", 0); /* "SLEPc/EPS.pyx":708 * used in the convergence test. * """ * cdef SlepcEPSConv conv = EPS_CONV_REL # <<<<<<<<<<<<<< * CHKERR( EPSGetConvergenceTest(self.eps, &conv) ) * return conv */ __pyx_v_conv = EPS_CONV_REL; /* "SLEPc/EPS.pyx":709 * """ * cdef SlepcEPSConv conv = EPS_CONV_REL * CHKERR( EPSGetConvergenceTest(self.eps, &conv) ) # <<<<<<<<<<<<<< * return conv * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConvergenceTest(__pyx_v_self->eps, (&__pyx_v_conv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 709, __pyx_L1_error) /* "SLEPc/EPS.pyx":710 * cdef SlepcEPSConv conv = EPS_CONV_REL * CHKERR( EPSGetConvergenceTest(self.eps, &conv) ) * return conv # <<<<<<<<<<<<<< * * def setConvergenceTest(self, conv): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSConv(__pyx_v_conv); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":697 * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) * * def getConvergenceTest(self): # <<<<<<<<<<<<<< * """ * Return the method used to compute the error estimate */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":712 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_58setConvergenceTest[] = "EPS.setConvergenceTest(self, conv)\n\n Specifies how to compute the error estimate \n used in the convergence test. \n\n Parameters\n ----------\n conv: EPS.Conv\n The method used to compute the error estimate \n used in the convergence test.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_conv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setConvergenceTest (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConvergenceTest") < 0)) __PYX_ERR(13, 712, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_conv = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setConvergenceTest", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 712, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_conv); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_conv) { EPSConv __pyx_v_tconv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSConv __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setConvergenceTest", 0); /* "SLEPc/EPS.pyx":723 * used in the convergence test. * """ * cdef SlepcEPSConv tconv = conv # <<<<<<<<<<<<<< * CHKERR( EPSSetConvergenceTest(self.eps, tconv) ) * */ __pyx_t_1 = ((EPSConv)__Pyx_PyInt_As_EPSConv(__pyx_v_conv)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 723, __pyx_L1_error) __pyx_v_tconv = __pyx_t_1; /* "SLEPc/EPS.pyx":724 * """ * cdef SlepcEPSConv tconv = conv * CHKERR( EPSSetConvergenceTest(self.eps, tconv) ) # <<<<<<<<<<<<<< * * def getTrueResidual(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetConvergenceTest(__pyx_v_self->eps, __pyx_v_tconv)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 724, __pyx_L1_error) /* "SLEPc/EPS.pyx":712 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":726 * CHKERR( EPSSetConvergenceTest(self.eps, tconv) ) * * def getTrueResidual(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether true residual must be */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_60getTrueResidual[] = "EPS.getTrueResidual(self)\n\n Returns the flag indicating whether true residual must be\n computed explicitly or not.\n\n Returns\n -------\n trueres: bool\n Whether the solver compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTrueResidual (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTrueResidual", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrueResidual", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTrueResidual", 0); /* "SLEPc/EPS.pyx":736 * Whether the solver compute all residuals or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSGetTrueResidual(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":737 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTrueResidual(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTrueResidual(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 737, __pyx_L1_error) /* "SLEPc/EPS.pyx":738 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTrueResidual(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTrueResidual(self, trueres): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":726 * CHKERR( EPSSetConvergenceTest(self.eps, tconv) ) * * def getTrueResidual(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether true residual must be */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":740 * return tval * * def setTrueResidual(self, trueres): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the true residual */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_62setTrueResidual[] = "EPS.setTrueResidual(self, trueres)\n\n Specifies if the solver must compute the true residual \n explicitly or not.\n\n Parameters\n ----------\n trueres: bool\n Whether compute the true residual or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trueres = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTrueResidual (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trueres,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trueres)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrueResidual") < 0)) __PYX_ERR(13, 740, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_trueres = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTrueResidual", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 740, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trueres); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trueres) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTrueResidual", 0); /* "SLEPc/EPS.pyx":750 * Whether compute the true residual or not. * """ * cdef PetscBool tval = trueres # <<<<<<<<<<<<<< * CHKERR( EPSSetTrueResidual(self.eps, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trueres)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 750, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/EPS.pyx":751 * """ * cdef PetscBool tval = trueres * CHKERR( EPSSetTrueResidual(self.eps, tval) ) # <<<<<<<<<<<<<< * * def getTrackAll(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTrueResidual(__pyx_v_self->eps, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 751, __pyx_L1_error) /* "SLEPc/EPS.pyx":740 * return tval * * def setTrueResidual(self, trueres): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the true residual */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":753 * CHKERR( EPSSetTrueResidual(self.eps, tval) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrackAll[] = "EPS.getTrackAll(self)\n\n Returns the flag indicating whether all residual norms must be\n computed or not.\n\n Returns\n -------\n trackall: bool\n Whether the solver compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/EPS.pyx":763 * Whether the solver compute all residuals or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSGetTrackAll(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":764 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTrackAll(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTrackAll(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 764, __pyx_L1_error) /* "SLEPc/EPS.pyx":765 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTrackAll(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTrackAll(self, trackall): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":753 * CHKERR( EPSSetTrueResidual(self.eps, tval) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":767 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrackAll[] = "EPS.setTrackAll(self, trackall)\n\n Specifies if the solver must compute the residual of all\n approximate eigenpairs or not.\n\n Parameters\n ----------\n trackall: bool\n Whether compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trackall = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(13, 767, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_trackall = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 767, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trackall); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trackall) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/EPS.pyx":777 * Whether compute all residuals or not. * """ * cdef PetscBool tval = trackall # <<<<<<<<<<<<<< * CHKERR( EPSSetTrackAll(self.eps, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 777, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/EPS.pyx":778 * """ * cdef PetscBool tval = trackall * CHKERR( EPSSetTrackAll(self.eps, tval) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTrackAll(__pyx_v_self->eps, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 778, __pyx_L1_error) /* "SLEPc/EPS.pyx":767 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":780 * CHKERR( EPSSetTrackAll(self.eps, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_68getDimensions[] = "EPS.getDimensions(self)\n\n Gets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Returns\n -------\n nev: int\n Number of eigenvalues to compute.\n ncv: int\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/EPS.pyx":795 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/EPS.pyx":796 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/EPS.pyx":797 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/EPS.pyx":798 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetDimensions(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 798, __pyx_L1_error) /* "SLEPc/EPS.pyx":799 * cdef PetscInt ival3 = 0 * CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * def setDimensions(self, nev=None, ncv=None, mpd=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":780 * CHKERR( EPSSetTrackAll(self.eps, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":801 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_70setDimensions[] = "EPS.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n Sets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Parameters\n ----------\n nev: int, optional\n Number of eigenvalues to compute.\n ncv: int, optional\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int, optional\n Maximum dimension allowed for the projected problem.\n\n Notes\n -----\n Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good\n value, which is dependent on the solution method.\n\n The parameters `ncv` and `mpd` are intimately related, so that\n the user is advised to set one of them at most. Normal usage\n is the following:\n\n + In cases where `nev` is small, the user sets `ncv`\n (a reasonable default is 2 * `nev`).\n\n + In cases where `nev` is large, the user sets `mpd`.\n\n The value of `ncv` should always be between `nev` and (`nev` +\n `mpd`), typically `ncv` = `nev` + `mpd`. If `nev` is not too\n large, `mpd` = `nev` is a reasonable choice, otherwise a\n smaller value should be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nev = 0; PyObject *__pyx_v_ncv = 0; PyObject *__pyx_v_mpd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(13, 801, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_nev = values[0]; __pyx_v_ncv = values[1]; __pyx_v_mpd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/EPS.pyx":835 * smaller value should be used. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":836 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":837 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT # <<<<<<<<<<<<<< * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) */ __pyx_v_ival3 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":838 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) # <<<<<<<<<<<<<< * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) */ __pyx_t_1 = (__pyx_v_nev != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 838, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/EPS.pyx":839 * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) # <<<<<<<<<<<<<< * if mpd is not None: ival3 = asInt(mpd) * CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) */ __pyx_t_2 = (__pyx_v_ncv != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 839, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/EPS.pyx":840 * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) # <<<<<<<<<<<<<< * CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) * */ __pyx_t_1 = (__pyx_v_mpd != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 840, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/EPS.pyx":841 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getST(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDimensions(__pyx_v_self->eps, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 841, __pyx_L1_error) /* "SLEPc/EPS.pyx":801 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":843 * CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) * * def getST(self): # <<<<<<<<<<<<<< * """ * Obtain the spectral transformation (`ST`) object associated to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_72getST[] = "EPS.getST(self)\n\n Obtain the spectral transformation (`ST`) object associated to\n the eigensolver object.\n\n Returns\n -------\n st: ST\n The spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getST (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getST", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getST", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(struct PySlepcEPSObject *__pyx_v_self) { struct PySlepcSTObject *__pyx_v_st = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getST", 0); /* "SLEPc/EPS.pyx":853 * The spectral transformation. * """ * cdef ST st = ST() # <<<<<<<<<<<<<< * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":854 * """ * cdef ST st = ST() * CHKERR( EPSGetST(self.eps, &st.st) ) # <<<<<<<<<<<<<< * PetscINCREF(st.obj) * return st */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetST(__pyx_v_self->eps, (&__pyx_v_st->st))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 854, __pyx_L1_error) /* "SLEPc/EPS.pyx":855 * cdef ST st = ST() * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) # <<<<<<<<<<<<<< * return st * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj); /* "SLEPc/EPS.pyx":856 * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) * return st # <<<<<<<<<<<<<< * * def setST(self, ST st not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_st)); __pyx_r = ((PyObject *)__pyx_v_st); goto __pyx_L0; /* "SLEPc/EPS.pyx":843 * CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) ) * * def getST(self): # <<<<<<<<<<<<<< * """ * Obtain the spectral transformation (`ST`) object associated to */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getST", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_st); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":858 * return st * * def setST(self, ST st not None): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_74setST[] = "EPS.setST(self, ST st)\n\n Associates a spectral transformation object to the\n eigensolver.\n\n Parameters\n ----------\n st: ST\n The spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcSTObject *__pyx_v_st = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setST (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setST") < 0)) __PYX_ERR(13, 858, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_st = ((struct PySlepcSTObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setST", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 858, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setST", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), __pyx_ptype_8slepc4py_5SLEPc_ST, 0, "st", 0))) __PYX_ERR(13, 858, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_st); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setST", 0); /* "SLEPc/EPS.pyx":868 * The spectral transformation. * """ * CHKERR( EPSSetST(self.eps, st.st) ) # <<<<<<<<<<<<<< * * def getBV(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetST(__pyx_v_self->eps, __pyx_v_st->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 868, __pyx_L1_error) /* "SLEPc/EPS.pyx":858 * return st * * def setST(self, ST st not None): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setST", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":870 * CHKERR( EPSSetST(self.eps, st.st) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vector objects associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_76getBV[] = "EPS.getBV(self)\n\n Obtain the basis vector objects associated to the eigensolver.\n\n Returns\n -------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBV (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(struct PySlepcEPSObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/EPS.pyx":879 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":880 * """ * cdef BV bv = BV() * CHKERR( EPSGetBV(self.eps, &bv.bv) ) # <<<<<<<<<<<<<< * PetscINCREF(bv.obj) * return bv */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetBV(__pyx_v_self->eps, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 880, __pyx_L1_error) /* "SLEPc/EPS.pyx":881 * cdef BV bv = BV() * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj); /* "SLEPc/EPS.pyx":882 * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/EPS.pyx":870 * CHKERR( EPSSetST(self.eps, st.st) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vector objects associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_bv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":884 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_78setBV[] = "EPS.setBV(self, BV bv)\n\n Associates a basis vectors object to the eigensolver.\n\n Parameters\n ----------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBV (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(13, 884, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_bv = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 884, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(13, 884, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_bv); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/EPS.pyx":893 * The basis vectors context. * """ * CHKERR( EPSSetBV(self.eps, bv.bv) ) # <<<<<<<<<<<<<< * * def getDS(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetBV(__pyx_v_self->eps, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 893, __pyx_L1_error) /* "SLEPc/EPS.pyx":884 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":895 * CHKERR( EPSSetBV(self.eps, bv.bv) ) * * def getDS(self): # <<<<<<<<<<<<<< * """ * Obtain the direct solver associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_80getDS[] = "EPS.getDS(self)\n\n Obtain the direct solver associated to the eigensolver.\n\n Returns\n -------\n ds: DS\n The direct solver context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDS (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDS", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(struct PySlepcEPSObject *__pyx_v_self) { struct PySlepcDSObject *__pyx_v_ds = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getDS", 0); /* "SLEPc/EPS.pyx":904 * The direct solver context. * """ * cdef DS ds = DS() # <<<<<<<<<<<<<< * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ds = ((struct PySlepcDSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":905 * """ * cdef DS ds = DS() * CHKERR( EPSGetDS(self.eps, &ds.ds) ) # <<<<<<<<<<<<<< * PetscINCREF(ds.obj) * return ds */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetDS(__pyx_v_self->eps, (&__pyx_v_ds->ds))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 905, __pyx_L1_error) /* "SLEPc/EPS.pyx":906 * cdef DS ds = DS() * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) # <<<<<<<<<<<<<< * return ds * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ds->__pyx_base.obj); /* "SLEPc/EPS.pyx":907 * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) * return ds # <<<<<<<<<<<<<< * * def setDS(self, DS ds not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ds)); __pyx_r = ((PyObject *)__pyx_v_ds); goto __pyx_L0; /* "SLEPc/EPS.pyx":895 * CHKERR( EPSSetBV(self.eps, bv.bv) ) * * def getDS(self): # <<<<<<<<<<<<<< * """ * Obtain the direct solver associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getDS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ds); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":909 * return ds * * def setDS(self, DS ds not None): # <<<<<<<<<<<<<< * """ * Associates a direct solver object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_82setDS[] = "EPS.setDS(self, DS ds)\n\n Associates a direct solver object to the eigensolver.\n\n Parameters\n ----------\n ds: DS\n The direct solver context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcDSObject *__pyx_v_ds = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ds,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ds)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDS") < 0)) __PYX_ERR(13, 909, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ds = ((struct PySlepcDSObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 909, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ds), __pyx_ptype_8slepc4py_5SLEPc_DS, 0, "ds", 0))) __PYX_ERR(13, 909, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_ds); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setDS", 0); /* "SLEPc/EPS.pyx":918 * The direct solver context. * """ * CHKERR( EPSSetDS(self.eps, ds.ds) ) # <<<<<<<<<<<<<< * * def getRG(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDS(__pyx_v_self->eps, __pyx_v_ds->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 918, __pyx_L1_error) /* "SLEPc/EPS.pyx":909 * return ds * * def setDS(self, DS ds not None): # <<<<<<<<<<<<<< * """ * Associates a direct solver object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":920 * CHKERR( EPSSetDS(self.eps, ds.ds) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_84getRG[] = "EPS.getRG(self)\n\n Obtain the region object associated to the eigensolver.\n\n Returns\n -------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRG (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(struct PySlepcEPSObject *__pyx_v_self) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/EPS.pyx":929 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":930 * """ * cdef RG rg = RG() * CHKERR( EPSGetRG(self.eps, &rg.rg) ) # <<<<<<<<<<<<<< * PetscINCREF(rg.obj) * return rg */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetRG(__pyx_v_self->eps, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 930, __pyx_L1_error) /* "SLEPc/EPS.pyx":931 * cdef RG rg = RG() * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj); /* "SLEPc/EPS.pyx":932 * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/EPS.pyx":920 * CHKERR( EPSSetDS(self.eps, ds.ds) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":934 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_86setRG[] = "EPS.setRG(self, RG rg)\n\n Associates a region object to the eigensolver.\n\n Parameters\n ----------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRG (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(13, 934, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rg = ((struct PySlepcRGObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 934, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(13, 934, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_rg); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/EPS.pyx":943 * The region context. * """ * CHKERR( EPSSetRG(self.eps, rg.rg) ) # <<<<<<<<<<<<<< * * def getOperators(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetRG(__pyx_v_self->eps, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 943, __pyx_L1_error) /* "SLEPc/EPS.pyx":934 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":945 * CHKERR( EPSSetRG(self.eps, rg.rg) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_88getOperators[] = "EPS.getOperators(self)\n\n Gets the matrices associated with the eigenvalue problem.\n\n Returns\n -------\n A: Mat\n The matrix associated with the eigensystem.\n B: Mat\n The second matrix in the case of generalized eigenproblems.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOperators (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(struct PySlepcEPSObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; struct PyPetscMatObject *__pyx_v_B = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/EPS.pyx":956 * The second matrix in the case of generalized eigenproblems. * """ * cdef Mat A = Mat() # <<<<<<<<<<<<<< * cdef Mat B = Mat() * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":957 * """ * cdef Mat A = Mat() * cdef Mat B = Mat() # <<<<<<<<<<<<<< * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":958 * cdef Mat A = Mat() * cdef Mat B = Mat() * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(A.obj) * PetscINCREF(B.obj) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOperators(__pyx_v_self->eps, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 958, __pyx_L1_error) /* "SLEPc/EPS.pyx":959 * cdef Mat B = Mat() * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * PetscINCREF(B.obj) * return (A, B) */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/EPS.pyx":960 * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) * PetscINCREF(B.obj) # <<<<<<<<<<<<<< * return (A, B) * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj); /* "SLEPc/EPS.pyx":961 * PetscINCREF(A.obj) * PetscINCREF(B.obj) * return (A, B) # <<<<<<<<<<<<<< * * def setOperators(self, Mat A not None, Mat B=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_A)); __Pyx_GIVEREF(((PyObject *)__pyx_v_A)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_A)); __Pyx_INCREF(((PyObject *)__pyx_v_B)); __Pyx_GIVEREF(((PyObject *)__pyx_v_B)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_B)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":945 * CHKERR( EPSSetRG(self.eps, rg.rg) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XDECREF((PyObject *)__pyx_v_B); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":963 * return (A, B) * * def setOperators(self, Mat A not None, Mat B=None): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_90setOperators[] = "EPS.setOperators(self, Mat A, Mat B=None)\n\n Sets the matrices associated with the eigenvalue problem.\n\n Parameters\n ----------\n A: Mat\n The matrix associated with the eigensystem.\n B: Mat, optional\n The second matrix in the case of generalized eigenproblems;\n if not provided, a standard eigenproblem is assumed.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PyPetscMatObject *__pyx_v_B = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOperators (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_B,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyPetscMatObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_B); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(13, 963, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); __pyx_v_B = ((struct PyPetscMatObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOperators", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 963, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(13, 963, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "B", 0))) __PYX_ERR(13, 963, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_A, __pyx_v_B); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B) { Mat __pyx_v_Bmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Mat __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setOperators", 0); /* "SLEPc/EPS.pyx":975 * if not provided, a standard eigenproblem is assumed. * """ * cdef PetscMat Bmat = NULL # <<<<<<<<<<<<<< * if B is not None: Bmat = B.mat * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) */ __pyx_v_Bmat = NULL; /* "SLEPc/EPS.pyx":976 * """ * cdef PetscMat Bmat = NULL * if B is not None: Bmat = B.mat # <<<<<<<<<<<<<< * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_B) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_B->mat; __pyx_v_Bmat = __pyx_t_3; } /* "SLEPc/EPS.pyx":977 * cdef PetscMat Bmat = NULL * if B is not None: Bmat = B.mat * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) # <<<<<<<<<<<<<< * * def setDeflationSpace(self, space): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetOperators(__pyx_v_self->eps, __pyx_v_A->mat, __pyx_v_Bmat)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 977, __pyx_L1_error) /* "SLEPc/EPS.pyx":963 * return (A, B) * * def setOperators(self, Mat A not None, Mat B=None): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":979 * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) * * def setDeflationSpace(self, space): # <<<<<<<<<<<<<< * """ * Add vectors to the basis of the deflation space. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_92setDeflationSpace[] = "EPS.setDeflationSpace(self, space)\n\n Add vectors to the basis of the deflation space.\n\n Parameters\n ----------\n space: a Vec or an array of Vec\n Set of basis vectors to be added to the deflation\n space.\n\n Notes\n -----\n When a deflation space is given, the eigensolver seeks the\n eigensolution in the restriction of the problem to the\n orthogonal complement of this space. This can be used for\n instance in the case that an invariant subspace is known\n beforehand (such as the nullspace of the matrix).\n\n The vectors do not need to be mutually orthonormal, since they\n are explicitly orthonormalized internally.\n\n These vectors do not persist from one `solve()` call to the other,\n so the deflation space should be set every time.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDeflationSpace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDeflationSpace") < 0)) __PYX_ERR(13, 979, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_space = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDeflationSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 979, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDeflationSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space) { Vec *__pyx_v_vs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setDeflationSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/EPS.pyx":1003 * so the deflation space should be set every time. * """ * if isinstance(space, Vec): space = [space] # <<<<<<<<<<<<<< * cdef PetscVec* vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_space); __Pyx_GIVEREF(__pyx_v_space); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space); __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/EPS.pyx":1004 * """ * if isinstance(space, Vec): space = [space] * cdef PetscVec* vs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) */ __pyx_v_vs = NULL; /* "SLEPc/EPS.pyx":1005 * if isinstance(space, Vec): space = [space] * cdef PetscVec* vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1005, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/EPS.pyx":1006 * cdef PetscVec* vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) # <<<<<<<<<<<<<< * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( EPSSetDeflationSpace(self.eps, ns, vs) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1007 * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec # <<<<<<<<<<<<<< * CHKERR( EPSSetDeflationSpace(self.eps, ns, vs) ) * */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(13, 1007, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/EPS.pyx":1008 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( EPSSetDeflationSpace(self.eps, ns, vs) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDeflationSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(13, 1008, __pyx_L1_error) /* "SLEPc/EPS.pyx":979 * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) * * def setDeflationSpace(self, space): # <<<<<<<<<<<<<< * """ * Add vectors to the basis of the deflation space. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDeflationSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_space); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1012 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_94setInitialSpace[] = "EPS.setInitialSpace(self, space)\n\n Sets the initial space from which the eigensolver starts to\n iterate.\n\n Parameters\n ----------\n space: Vec or sequence of Vec\n The initial space\n\n Notes\n -----\n Some solvers start to iterate on a single vector (initial vector).\n In that case, the other vectors are ignored.\n\n In contrast to `setDeflationSpace()`, these vectors do not persist\n from one `solve()` call to the other, so the initial space should be\n set every time.\n\n The vectors do not need to be mutually orthonormal, since they are\n explicitly orthonormalized internally.\n\n Common usage of this function is when the user can provide a rough\n approximation of the wanted eigenspace. Then, convergence may be faster.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(13, 1012, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_space = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1012, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space) { Vec *__pyx_v_vs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/EPS.pyx":1037 * approximation of the wanted eigenspace. Then, convergence may be faster. * """ * if isinstance(space, Vec): space = [space] # <<<<<<<<<<<<<< * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_space); __Pyx_GIVEREF(__pyx_v_space); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space); __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/EPS.pyx":1038 * """ * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) */ __pyx_v_vs = NULL; /* "SLEPc/EPS.pyx":1039 * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1039, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/EPS.pyx":1040 * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) # <<<<<<<<<<<<<< * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( EPSSetInitialSpace(self.eps, ns, vs) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1041 * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec # <<<<<<<<<<<<<< * CHKERR( EPSSetInitialSpace(self.eps, ns, vs) ) * */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(13, 1041, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/EPS.pyx":1042 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( EPSSetInitialSpace(self.eps, ns, vs) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetInitialSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(13, 1042, __pyx_L1_error) /* "SLEPc/EPS.pyx":1012 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_space); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1046 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_96cancelMonitor[] = "EPS.cancelMonitor(self)\n\n Clears all monitors for an EPS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/EPS.pyx":1050 * Clears all monitors for an EPS object. * """ * CHKERR( EPSMonitorCancel(self.eps) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSMonitorCancel(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1050, __pyx_L1_error) /* "SLEPc/EPS.pyx":1046 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an EPS object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1054 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_98setUp[] = "EPS.setUp(self)\n\n Sets up all the internal data structures necessary for the\n execution of the eigensolver.\n\n Notes\n -----\n This function need not be called explicitly in most cases,\n since `solve()` calls it. It can be useful when one wants to\n measure the set-up time separately from the solve time.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/EPS.pyx":1065 * measure the set-up time separately from the solve time. * """ * CHKERR( EPSSetUp(self.eps) ) # <<<<<<<<<<<<<< * * def solve(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetUp(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1065, __pyx_L1_error) /* "SLEPc/EPS.pyx":1054 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1067 * CHKERR( EPSSetUp(self.eps) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_100solve[] = "EPS.solve(self)\n\n Solves the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/EPS.pyx":1071 * Solves the eigensystem. * """ * CHKERR( EPSSolve(self.eps) ) # <<<<<<<<<<<<<< * * def getIterationNumber(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSolve(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1071, __pyx_L1_error) /* "SLEPc/EPS.pyx":1067 * CHKERR( EPSSetUp(self.eps) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1073 * CHKERR( EPSSolve(self.eps) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_102getIterationNumber[] = "EPS.getIterationNumber(self)\n\n Gets the current iteration number. If the call to `solve()` is\n complete, then it returns the number of iterations carried out\n by the solution method.\n\n Returns\n -------\n its: int\n Iteration number.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/EPS.pyx":1084 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetIterationNumber(self.eps, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/EPS.pyx":1085 * """ * cdef PetscInt ival = 0 * CHKERR( EPSGetIterationNumber(self.eps, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetIterationNumber(__pyx_v_self->eps, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1085, __pyx_L1_error) /* "SLEPc/EPS.pyx":1086 * cdef PetscInt ival = 0 * CHKERR( EPSGetIterationNumber(self.eps, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getConvergedReason(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1073 * CHKERR( EPSSolve(self.eps) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1088 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_104getConvergedReason[] = "EPS.getConvergedReason(self)\n\n Gets the reason why the `solve()` iteration was stopped.\n\n Returns\n -------\n reason: `EPS.ConvergedReason` enumerate\n Negative value indicates diverged, positive value\n converged.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(struct PySlepcEPSObject *__pyx_v_self) { EPSConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/EPS.pyx":1098 * converged. * """ * cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( EPSGetConvergedReason(self.eps, &val) ) * return val */ __pyx_v_val = EPS_CONVERGED_ITERATING; /* "SLEPc/EPS.pyx":1099 * """ * cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING * CHKERR( EPSGetConvergedReason(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConvergedReason(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1099, __pyx_L1_error) /* "SLEPc/EPS.pyx":1100 * cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING * CHKERR( EPSGetConvergedReason(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def getConverged(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1088 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1102 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_106getConverged[] = "EPS.getConverged(self)\n\n Gets the number of converged eigenpairs.\n\n Returns\n -------\n nconv: int\n Number of converged eigenpairs.\n\n Notes\n -----\n This function should be called after `solve()` has finished.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConverged (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/EPS.pyx":1115 * This function should be called after `solve()` has finished. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetConverged(self.eps, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/EPS.pyx":1116 * """ * cdef PetscInt ival = 0 * CHKERR( EPSGetConverged(self.eps, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConverged(__pyx_v_self->eps, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1116, __pyx_L1_error) /* "SLEPc/EPS.pyx":1117 * cdef PetscInt ival = 0 * CHKERR( EPSGetConverged(self.eps, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getEigenvalue(self, int i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1102 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1119 * return toInt(ival) * * def getEigenvalue(self, int i): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenvalue as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_108getEigenvalue[] = "EPS.getEigenvalue(self, int i)\n\n Gets the i-th eigenvalue as computed by `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n\n Returns\n -------\n e: scalar (possibly complex)\n The computed eigenvalue.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n according to the ordering criterion established with\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEigenvalue (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenvalue") < 0)) __PYX_ERR(13, 1119, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1119, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getEigenvalue", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1119, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvalue", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i) { PetscScalar __pyx_v_sval1; PetscScalar __pyx_v_sval2; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getEigenvalue", 0); /* "SLEPc/EPS.pyx":1140 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) */ __pyx_v_sval1 = 0.0; /* "SLEPc/EPS.pyx":1141 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) * return complex(toScalar(sval1), toScalar(sval2)) */ __pyx_v_sval2 = 0.0; /* "SLEPc/EPS.pyx":1142 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) # <<<<<<<<<<<<<< * return complex(toScalar(sval1), toScalar(sval2)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenvalue(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1142, __pyx_L1_error) /* "SLEPc/EPS.pyx":1143 * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) * return complex(toScalar(sval1), toScalar(sval2)) # <<<<<<<<<<<<<< * * def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1119 * return toInt(ival) * * def getEigenvalue(self, int i): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenvalue as computed by `solve()`. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvalue", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1145 * return complex(toScalar(sval1), toScalar(sval2)) * * def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenvector as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_110getEigenvector[] = "EPS.getEigenvector(self, int i, Vec Vr, Vec Vi=None)\n\n Gets the i-th eigenvector as computed by `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Vr: Vec\n Placeholder for the returned eigenvector (real part).\n Vi: Vec, optional\n Placeholder for the returned eigenvector (imaginary part).\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n according to the ordering criterion established with\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Vr = 0; struct PyPetscVecObject *__pyx_v_Vi = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEigenvector (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getEigenvector", 0, 2, 3, 1); __PYX_ERR(13, 1145, __pyx_L3_error) } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenvector") < 0)) __PYX_ERR(13, 1145, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1145, __pyx_L3_error) __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getEigenvector", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1145, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "Vr", 0))) __PYX_ERR(13, 1145, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(13, 1145, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) { Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("getEigenvector", 0); /* "SLEPc/EPS.pyx":1165 * `setWhichEigenpairs()`. * """ * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec */ __pyx_v_vecr = NULL; /* "SLEPc/EPS.pyx":1166 * """ * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL # <<<<<<<<<<<<<< * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec */ __pyx_v_veci = NULL; /* "SLEPc/EPS.pyx":1167 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec # <<<<<<<<<<<<<< * if Vi is not None: veci = Vi.vec * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_Vr->vec; __pyx_v_vecr = __pyx_t_3; } /* "SLEPc/EPS.pyx":1168 * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_Vi->vec; __pyx_v_veci = __pyx_t_3; } /* "SLEPc/EPS.pyx":1169 * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) # <<<<<<<<<<<<<< * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenvector(__pyx_v_self->eps, __pyx_v_i, __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1169, __pyx_L1_error) /* "SLEPc/EPS.pyx":1145 * return complex(toScalar(sval1), toScalar(sval2)) * * def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenvector as computed by `solve()`. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1171 * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_112getEigenpair[] = "EPS.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n Gets the i-th solution of the eigenproblem as computed by\n `solve()`. The solution consists of both the eigenvalue and\n the eigenvector.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Vr: Vec\n Placeholder for the returned eigenvector (real part).\n Vi: Vec\n Placeholder for the returned eigenvector (imaginary part).\n\n Returns\n -------\n e: scalar (possibly complex)\n The computed eigenvalue.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n according to the ordering criterion established with\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Vr = 0; struct PyPetscVecObject *__pyx_v_Vi = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(13, 1171, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1171, __pyx_L3_error) __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1171, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(13, 1171, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(13, 1171, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) { PetscScalar __pyx_v_sval1; PetscScalar __pyx_v_sval2; Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/EPS.pyx":1198 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/EPS.pyx":1199 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/EPS.pyx":1200 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec */ __pyx_v_vecr = NULL; /* "SLEPc/EPS.pyx":1201 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL # <<<<<<<<<<<<<< * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec */ __pyx_v_veci = NULL; /* "SLEPc/EPS.pyx":1202 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec # <<<<<<<<<<<<<< * if Vi is not None: veci = Vi.vec * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_Vr->vec; __pyx_v_vecr = __pyx_t_3; } /* "SLEPc/EPS.pyx":1203 * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_Vi->vec; __pyx_v_veci = __pyx_t_3; } /* "SLEPc/EPS.pyx":1204 * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return complex(toScalar(sval1), toScalar(sval2)) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenpair(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1204, __pyx_L1_error) /* "SLEPc/EPS.pyx":1205 * if Vi is not None: veci = Vi.vec * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) # <<<<<<<<<<<<<< * * def getInvariantSubspace(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1171 * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1207 * return complex(toScalar(sval1), toScalar(sval2)) * * def getInvariantSubspace(self): # <<<<<<<<<<<<<< * """ * Gets an orthonormal basis of the computed invariant subspace. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace[] = "EPS.getInvariantSubspace(self)\n\n Gets an orthonormal basis of the computed invariant subspace.\n\n Returns\n -------\n subspace: list of Vec\n Basis of the invariant subspace.\n\n Notes\n -----\n This function should be called after `solve()` has finished.\n\n The returned vectors span an invariant subspace associated\n with the computed eigenvalues. An invariant subspace ``X`` of\n ``A` satisfies ``A x`` in ``X`` for all ``x`` in ``X`` (a\n similar definition applies for generalized eigenproblems).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getInvariantSubspace (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getInvariantSubspace", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getInvariantSubspace", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_i; PetscInt __pyx_v_ncv; Vec __pyx_v_v; Vec *__pyx_v_isp; PyObject *__pyx_v_subspace = 0; Mat __pyx_v_A; struct PyPetscVecObject *__pyx_v_V = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PetscInt __pyx_t_4; PetscInt __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("getInvariantSubspace", 0); /* "SLEPc/EPS.pyx":1225 * similar definition applies for generalized eigenproblems). * """ * cdef PetscInt i = 0, ncv = 0 # <<<<<<<<<<<<<< * cdef PetscVec v = NULL, *isp = NULL * cdef list subspace = [] */ __pyx_v_i = 0; __pyx_v_ncv = 0; /* "SLEPc/EPS.pyx":1226 * """ * cdef PetscInt i = 0, ncv = 0 * cdef PetscVec v = NULL, *isp = NULL # <<<<<<<<<<<<<< * cdef list subspace = [] * CHKERR( EPSGetConverged(self.eps, &ncv) ) */ __pyx_v_v = NULL; __pyx_v_isp = NULL; /* "SLEPc/EPS.pyx":1227 * cdef PetscInt i = 0, ncv = 0 * cdef PetscVec v = NULL, *isp = NULL * cdef list subspace = [] # <<<<<<<<<<<<<< * CHKERR( EPSGetConverged(self.eps, &ncv) ) * if ncv == 0: return subspace */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_subspace = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1228 * cdef PetscVec v = NULL, *isp = NULL * cdef list subspace = [] * CHKERR( EPSGetConverged(self.eps, &ncv) ) # <<<<<<<<<<<<<< * if ncv == 0: return subspace * cdef PetscMat A = NULL */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConverged(__pyx_v_self->eps, (&__pyx_v_ncv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1228, __pyx_L1_error) /* "SLEPc/EPS.pyx":1229 * cdef list subspace = [] * CHKERR( EPSGetConverged(self.eps, &ncv) ) * if ncv == 0: return subspace # <<<<<<<<<<<<<< * cdef PetscMat A = NULL * CHKERR( EPSGetOperators(self.eps, &A, NULL) ) */ __pyx_t_3 = ((__pyx_v_ncv == 0) != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_subspace); __pyx_r = __pyx_v_subspace; goto __pyx_L0; } /* "SLEPc/EPS.pyx":1230 * CHKERR( EPSGetConverged(self.eps, &ncv) ) * if ncv == 0: return subspace * cdef PetscMat A = NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetOperators(self.eps, &A, NULL) ) * CHKERR( MatCreateVecs(A, &v, NULL) ) */ __pyx_v_A = NULL; /* "SLEPc/EPS.pyx":1231 * if ncv == 0: return subspace * cdef PetscMat A = NULL * CHKERR( EPSGetOperators(self.eps, &A, NULL) ) # <<<<<<<<<<<<<< * CHKERR( MatCreateVecs(A, &v, NULL) ) * cdef Vec V = None */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOperators(__pyx_v_self->eps, (&__pyx_v_A), NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1231, __pyx_L1_error) /* "SLEPc/EPS.pyx":1232 * cdef PetscMat A = NULL * CHKERR( EPSGetOperators(self.eps, &A, NULL) ) * CHKERR( MatCreateVecs(A, &v, NULL) ) # <<<<<<<<<<<<<< * cdef Vec V = None * cdef object tmp = allocate(ncv*sizeof(Vec),&isp) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatCreateVecs(__pyx_v_A, (&__pyx_v_v), NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1232, __pyx_L1_error) /* "SLEPc/EPS.pyx":1233 * CHKERR( EPSGetOperators(self.eps, &A, NULL) ) * CHKERR( MatCreateVecs(A, &v, NULL) ) * cdef Vec V = None # <<<<<<<<<<<<<< * cdef object tmp = allocate(ncv*sizeof(Vec),&isp) * for i in range(ncv): */ __Pyx_INCREF(Py_None); __pyx_v_V = ((struct PyPetscVecObject *)Py_None); /* "SLEPc/EPS.pyx":1234 * CHKERR( MatCreateVecs(A, &v, NULL) ) * cdef Vec V = None * cdef object tmp = allocate(ncv*sizeof(Vec),&isp) # <<<<<<<<<<<<<< * for i in range(ncv): * if i == 0: isp[0] = v */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_ncv * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_isp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1235 * cdef Vec V = None * cdef object tmp = allocate(ncv*sizeof(Vec),&isp) * for i in range(ncv): # <<<<<<<<<<<<<< * if i == 0: isp[0] = v * if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) */ __pyx_t_4 = __pyx_v_ncv; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "SLEPc/EPS.pyx":1236 * cdef object tmp = allocate(ncv*sizeof(Vec),&isp) * for i in range(ncv): * if i == 0: isp[0] = v # <<<<<<<<<<<<<< * if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) * V = Vec(); V.vec = isp[i]; subspace.append(V) */ __pyx_t_3 = ((__pyx_v_i == 0) != 0); if (__pyx_t_3) { (__pyx_v_isp[0]) = __pyx_v_v; } /* "SLEPc/EPS.pyx":1237 * for i in range(ncv): * if i == 0: isp[0] = v * if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) # <<<<<<<<<<<<<< * V = Vec(); V.vec = isp[i]; subspace.append(V) * CHKERR( EPSGetInvariantSubspace(self.eps, isp) ) */ __pyx_t_3 = ((__pyx_v_i >= 1) != 0); if (__pyx_t_3) { __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDuplicate(__pyx_v_v, (&(__pyx_v_isp[__pyx_v_i])))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1237, __pyx_L1_error) } /* "SLEPc/EPS.pyx":1238 * if i == 0: isp[0] = v * if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) * V = Vec(); V.vec = isp[i]; subspace.append(V) # <<<<<<<<<<<<<< * CHKERR( EPSGetInvariantSubspace(self.eps, isp) ) * return subspace */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_V, ((struct PyPetscVecObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_V->vec = (__pyx_v_isp[__pyx_v_i]); __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_subspace, ((PyObject *)__pyx_v_V)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(13, 1238, __pyx_L1_error) } /* "SLEPc/EPS.pyx":1239 * if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) ) * V = Vec(); V.vec = isp[i]; subspace.append(V) * CHKERR( EPSGetInvariantSubspace(self.eps, isp) ) # <<<<<<<<<<<<<< * return subspace * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetInvariantSubspace(__pyx_v_self->eps, __pyx_v_isp)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1239, __pyx_L1_error) /* "SLEPc/EPS.pyx":1240 * V = Vec(); V.vec = isp[i]; subspace.append(V) * CHKERR( EPSGetInvariantSubspace(self.eps, isp) ) * return subspace # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_subspace); __pyx_r = __pyx_v_subspace; goto __pyx_L0; /* "SLEPc/EPS.pyx":1207 * return complex(toScalar(sval1), toScalar(sval2)) * * def getInvariantSubspace(self): # <<<<<<<<<<<<<< * """ * Gets an orthonormal basis of the computed invariant subspace. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getInvariantSubspace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_subspace); __Pyx_XDECREF((PyObject *)__pyx_v_V); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1244 * # * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_116getErrorEstimate[] = "EPS.getErrorEstimate(self, int i)\n\n Returns the error estimate associated to the i-th computed\n eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n\n Returns\n -------\n e: real\n Error estimate.\n\n Notes\n -----\n This is the error estimate used internally by the\n eigensolver. The actual error bound can be computed with\n `computeError()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(13, 1244, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1244, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1244, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i) { PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/EPS.pyx":1265 * `computeError()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/EPS.pyx":1266 * """ * cdef PetscReal rval = 0 * CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetErrorEstimate(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1266, __pyx_L1_error) /* "SLEPc/EPS.pyx":1267 * cdef PetscReal rval = 0 * CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def computeError(self, int i, etype=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1244 * # * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1269 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_118computeError[] = "EPS.computeError(self, int i, etype=None)\n\n Computes the error (based on the residual norm) associated with the i-th\n computed eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n etype: `EPS.ErrorType` enumerate\n The error type to compute.\n\n Returns\n -------\n e: real\n The error bound, computed in various ways from the residual norm\n ``||Ax-kBx||_2`` where ``k`` is the eigenvalue and\n ``x`` is the eigenvector.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("computeError (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(13, 1269, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1269, __pyx_L3_error) __pyx_v_etype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1269, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) { EPSErrorType __pyx_v_et; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; EPSErrorType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/EPS.pyx":1293 * ``nconv-1`` (see `getConverged()`). * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE # <<<<<<<<<<<<<< * cdef PetscReal rval = 0 * if etype is not None: et = etype */ __pyx_v_et = EPS_ERROR_RELATIVE; /* "SLEPc/EPS.pyx":1294 * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * if etype is not None: et = etype * CHKERR( EPSComputeError(self.eps, i, et, &rval) ) */ __pyx_v_rval = 0.0; /* "SLEPc/EPS.pyx":1295 * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * cdef PetscReal rval = 0 * if etype is not None: et = etype # <<<<<<<<<<<<<< * CHKERR( EPSComputeError(self.eps, i, et, &rval) ) * return toReal(rval) */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((EPSErrorType)__Pyx_PyInt_As_EPSErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1295, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/EPS.pyx":1296 * cdef PetscReal rval = 0 * if etype is not None: et = etype * CHKERR( EPSComputeError(self.eps, i, et, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSComputeError(__pyx_v_self->eps, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1296, __pyx_L1_error) /* "SLEPc/EPS.pyx":1297 * if etype is not None: et = etype * CHKERR( EPSComputeError(self.eps, i, et, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def errorView(self, etype=None, Viewer viewer=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1269 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1299 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_120errorView[] = "EPS.errorView(self, etype=None, Viewer viewer=None)\n\n Displays the errors associated with the computed solution\n (as well as the eigenvalues).\n\n Parameters\n ----------\n etype: `EPS.ErrorType` enumerate, optional\n The error type to compute.\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n\n Notes\n -----\n By default, this function checks the error of all eigenpairs and prints\n the eigenvalues if all of them are below the requested tolerance.\n If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n eigenvalues and corresponding errors is printed.\n\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("errorView (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(13, 1299, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_etype = values[0]; __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1299, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(13, 1299, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) { EPSErrorType __pyx_v_et; PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; EPSErrorType __pyx_t_3; PetscViewer __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/EPS.pyx":1320 * * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = NULL */ __pyx_v_et = EPS_ERROR_RELATIVE; /* "SLEPc/EPS.pyx":1321 * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((EPSErrorType)__Pyx_PyInt_As_EPSErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1321, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/EPS.pyx":1322 * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( EPSErrorView(self.eps, et, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/EPS.pyx":1323 * if etype is not None: et = etype * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( EPSErrorView(self.eps, et, vwr) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_4; } /* "SLEPc/EPS.pyx":1324 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( EPSErrorView(self.eps, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSErrorView(__pyx_v_self->eps, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(13, 1324, __pyx_L1_error) /* "SLEPc/EPS.pyx":1299 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1328 * # * * def setPowerShiftType(self, shift): # <<<<<<<<<<<<<< * """ * Sets the type of shifts used during the power iteration. This */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_122setPowerShiftType[] = "EPS.setPowerShiftType(self, shift)\n\n Sets the type of shifts used during the power iteration. This\n can be used to emulate the Rayleigh Quotient Iteration (RQI)\n method.\n\n Parameters\n ----------\n shift: `EPS.PowerShiftType` enumerate\n The type of shift.\n\n Notes\n -----\n This call is only relevant if the type was set to\n `EPS.Type.POWER` with `setType()`.\n\n By default, shifts are constant\n (`EPS.PowerShiftType.CONSTANT`) and the iteration is the\n simple power method (or inverse iteration if a\n shift-and-invert transformation is being used).\n\n A variable shift can be specified\n (`EPS.PowerShiftType.RAYLEIGH` or\n `EPS.PowerShiftType.WILKINSON`). In this case, the iteration\n behaves rather like a cubic converging method as RQI.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shift = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setPowerShiftType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shift,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shift)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPowerShiftType") < 0)) __PYX_ERR(13, 1328, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_shift = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setPowerShiftType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1328, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_shift); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_shift) { EPSPowerShiftType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSPowerShiftType __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setPowerShiftType", 0); /* "SLEPc/EPS.pyx":1354 * behaves rather like a cubic converging method as RQI. * """ * cdef SlepcEPSPowerShiftType val = shift # <<<<<<<<<<<<<< * CHKERR( EPSPowerSetShiftType(self.eps, val) ) * */ __pyx_t_1 = ((EPSPowerShiftType)__Pyx_PyInt_As_EPSPowerShiftType(__pyx_v_shift)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1354, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1355 * """ * cdef SlepcEPSPowerShiftType val = shift * CHKERR( EPSPowerSetShiftType(self.eps, val) ) # <<<<<<<<<<<<<< * * def getPowerShiftType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSPowerSetShiftType(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1355, __pyx_L1_error) /* "SLEPc/EPS.pyx":1328 * # * * def setPowerShiftType(self, shift): # <<<<<<<<<<<<<< * """ * Sets the type of shifts used during the power iteration. This */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1357 * CHKERR( EPSPowerSetShiftType(self.eps, val) ) * * def getPowerShiftType(self): # <<<<<<<<<<<<<< * """ * Gets the type of shifts used during the power iteration. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_124getPowerShiftType[] = "EPS.getPowerShiftType(self)\n\n Gets the type of shifts used during the power iteration.\n\n Returns\n -------\n shift: `EPS.PowerShiftType` enumerate\n The type of shift.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPowerShiftType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getPowerShiftType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getPowerShiftType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self) { EPSPowerShiftType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getPowerShiftType", 0); /* "SLEPc/EPS.pyx":1366 * The type of shift. * """ * cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT # <<<<<<<<<<<<<< * CHKERR( EPSPowerGetShiftType(self.eps, &val) ) * return val */ __pyx_v_val = EPS_POWER_SHIFT_CONSTANT; /* "SLEPc/EPS.pyx":1367 * """ * cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT * CHKERR( EPSPowerGetShiftType(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSPowerGetShiftType(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1367, __pyx_L1_error) /* "SLEPc/EPS.pyx":1368 * cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT * CHKERR( EPSPowerGetShiftType(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setArnoldiDelayed(self, delayed): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSPowerShiftType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1357 * CHKERR( EPSPowerSetShiftType(self.eps, val) ) * * def getPowerShiftType(self): # <<<<<<<<<<<<<< * """ * Gets the type of shifts used during the power iteration. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1370 * return val * * def setArnoldiDelayed(self, delayed): # <<<<<<<<<<<<<< * """ * Activates or deactivates delayed reorthogonalization in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed[] = "EPS.setArnoldiDelayed(self, delayed)\n\n Activates or deactivates delayed reorthogonalization in the\n Arnoldi iteration.\n\n Parameters\n ----------\n delayed: boolean\n True if delayed reorthogonalization is to be used.\n\n Notes\n -----\n This call is only relevant if the type was set to\n `EPS.Type.ARNOLDI` with `setType()`.\n\n Delayed reorthogonalization is an aggressive optimization for\n the Arnoldi eigensolver than may provide better scalability,\n but sometimes makes the solver converge less than the default\n algorithm.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_delayed = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setArnoldiDelayed (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delayed,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delayed)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setArnoldiDelayed") < 0)) __PYX_ERR(13, 1370, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_delayed = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setArnoldiDelayed", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1370, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_delayed); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setArnoldiDelayed", 0); /* "SLEPc/EPS.pyx":1390 * algorithm. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * if delayed: val = PETSC_TRUE * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/EPS.pyx":1391 * """ * cdef PetscBool val = PETSC_FALSE * if delayed: val = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_delayed); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(13, 1391, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_val = PETSC_TRUE; } /* "SLEPc/EPS.pyx":1392 * cdef PetscBool val = PETSC_FALSE * if delayed: val = PETSC_TRUE * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) # <<<<<<<<<<<<<< * * def getArnoldiDelayed(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSArnoldiSetDelayed(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1392, __pyx_L1_error) /* "SLEPc/EPS.pyx":1370 * return val * * def setArnoldiDelayed(self, delayed): # <<<<<<<<<<<<<< * """ * Activates or deactivates delayed reorthogonalization in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1394 * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) * * def getArnoldiDelayed(self): # <<<<<<<<<<<<<< * """ * Gets the type of reorthogonalization used during the Arnoldi */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed[] = "EPS.getArnoldiDelayed(self)\n\n Gets the type of reorthogonalization used during the Arnoldi\n iteration.\n\n Returns\n -------\n delayed: boolean\n True if delayed reorthogonalization is to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getArnoldiDelayed (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getArnoldiDelayed", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getArnoldiDelayed", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getArnoldiDelayed", 0); /* "SLEPc/EPS.pyx":1404 * True if delayed reorthogonalization is to be used. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1405 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSArnoldiGetDelayed(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1405, __pyx_L1_error) /* "SLEPc/EPS.pyx":1406 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setLanczosReorthogType(self, reorthog): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1394 * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) * * def getArnoldiDelayed(self): # <<<<<<<<<<<<<< * """ * Gets the type of reorthogonalization used during the Arnoldi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1408 * return tval * * def setLanczosReorthogType(self, reorthog): # <<<<<<<<<<<<<< * """ * Sets the type of reorthogonalization used during the Lanczos */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType[] = "EPS.setLanczosReorthogType(self, reorthog)\n\n Sets the type of reorthogonalization used during the Lanczos\n iteration.\n\n Parameters\n ----------\n reorthog: `EPS.LanczosReorthogType` enumerate\n The type of reorthogonalization.\n\n Notes\n -----\n This call is only relevant if the type was set to\n `EPS.Type.LANCZOS` with `setType()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reorthog = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLanczosReorthogType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reorthog,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reorthog)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLanczosReorthogType") < 0)) __PYX_ERR(13, 1408, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_reorthog = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLanczosReorthogType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1408, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_reorthog); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_reorthog) { EPSLanczosReorthogType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations EPSLanczosReorthogType __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setLanczosReorthogType", 0); /* "SLEPc/EPS.pyx":1423 * `EPS.Type.LANCZOS` with `setType()`. * """ * cdef SlepcEPSLanczosReorthogType val = reorthog # <<<<<<<<<<<<<< * CHKERR( EPSLanczosSetReorthog(self.eps, val) ) * */ __pyx_t_1 = ((EPSLanczosReorthogType)__Pyx_PyInt_As_EPSLanczosReorthogType(__pyx_v_reorthog)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1423, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1424 * """ * cdef SlepcEPSLanczosReorthogType val = reorthog * CHKERR( EPSLanczosSetReorthog(self.eps, val) ) # <<<<<<<<<<<<<< * * def getLanczosReorthogType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSLanczosSetReorthog(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1424, __pyx_L1_error) /* "SLEPc/EPS.pyx":1408 * return tval * * def setLanczosReorthogType(self, reorthog): # <<<<<<<<<<<<<< * """ * Sets the type of reorthogonalization used during the Lanczos */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1426 * CHKERR( EPSLanczosSetReorthog(self.eps, val) ) * * def getLanczosReorthogType(self): # <<<<<<<<<<<<<< * """ * Gets the type of reorthogonalization used during the Lanczos */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType[] = "EPS.getLanczosReorthogType(self)\n\n Gets the type of reorthogonalization used during the Lanczos\n iteration.\n\n Returns\n -------\n reorthog: `EPS.LanczosReorthogType` enumerate\n The type of reorthogonalization.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLanczosReorthogType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLanczosReorthogType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLanczosReorthogType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self) { EPSLanczosReorthogType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getLanczosReorthogType", 0); /* "SLEPc/EPS.pyx":1437 * """ * cdef SlepcEPSLanczosReorthogType val = \ * EPS_LANCZOS_REORTHOG_LOCAL # <<<<<<<<<<<<<< * CHKERR( EPSLanczosGetReorthog(self.eps, &val) ) * return val */ __pyx_v_val = EPS_LANCZOS_REORTHOG_LOCAL; /* "SLEPc/EPS.pyx":1438 * cdef SlepcEPSLanczosReorthogType val = \ * EPS_LANCZOS_REORTHOG_LOCAL * CHKERR( EPSLanczosGetReorthog(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSLanczosGetReorthog(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1438, __pyx_L1_error) /* "SLEPc/EPS.pyx":1439 * EPS_LANCZOS_REORTHOG_LOCAL * CHKERR( EPSLanczosGetReorthog(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_EPSLanczosReorthogType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1426 * CHKERR( EPSLanczosSetReorthog(self.eps, val) ) * * def getLanczosReorthogType(self): # <<<<<<<<<<<<<< * """ * Gets the type of reorthogonalization used during the Lanczos */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1443 * # * * def setKrylovSchurRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the Krylov-Schur method, in */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart[] = "EPS.setKrylovSchurRestart(self, keep)\n\n Sets the restart parameter for the Krylov-Schur method, in\n particular the proportion of basis vectors that must be kept\n after restart.\n\n Parameters\n ----------\n keep: float\n The number of vectors to be kept at restart.\n\n Notes\n -----\n Allowed values are in the range [0.1,0.9]. The default is 0.5.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_keep = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurRestart (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keep,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keep)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurRestart") < 0)) __PYX_ERR(13, 1443, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keep = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurRestart", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1443, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_keep); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_keep) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setKrylovSchurRestart", 0); /* "SLEPc/EPS.pyx":1458 * Allowed values are in the range [0.1,0.9]. The default is 0.5. * """ * cdef PetscReal val = keep # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurSetRestart(self.eps, val) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_keep); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(13, 1458, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1459 * """ * cdef PetscReal val = keep * CHKERR( EPSKrylovSchurSetRestart(self.eps, val) ) # <<<<<<<<<<<<<< * * def getKrylovSchurRestart(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetRestart(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1459, __pyx_L1_error) /* "SLEPc/EPS.pyx":1443 * # * * def setKrylovSchurRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the Krylov-Schur method, in */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1461 * CHKERR( EPSKrylovSchurSetRestart(self.eps, val) ) * * def getKrylovSchurRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the Krylov-Schur method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart[] = "EPS.getKrylovSchurRestart(self)\n\n Gets the restart parameter used in the Krylov-Schur method.\n\n Returns\n -------\n keep: float\n The number of vectors to be kept at restart.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurRestart (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurRestart", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurRestart", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurRestart", 0); /* "SLEPc/EPS.pyx":1470 * The number of vectors to be kept at restart. * """ * cdef PetscReal val = 0 # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) ) * return val */ __pyx_v_val = 0.0; /* "SLEPc/EPS.pyx":1471 * """ * cdef PetscReal val = 0 * CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetRestart(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1471, __pyx_L1_error) /* "SLEPc/EPS.pyx":1472 * cdef PetscReal val = 0 * CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setKrylovSchurLocking(self, lock): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1461 * CHKERR( EPSKrylovSchurSetRestart(self.eps, val) ) * * def getKrylovSchurRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the Krylov-Schur method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1474 * return val * * def setKrylovSchurLocking(self, lock): # <<<<<<<<<<<<<< * """ * Choose between locking and non-locking variants of the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking[] = "EPS.setKrylovSchurLocking(self, lock)\n\n Choose between locking and non-locking variants of the\n Krylov-Schur method.\n\n Parameters\n ----------\n lock: bool\n True if the locking variant must be selected.\n\n Notes\n -----\n The default is to lock converged eigenpairs when the method restarts.\n This behaviour can be changed so that all directions are kept in the\n working subspace even if already converged to working accuracy (the\n non-locking variant).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lock = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurLocking (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lock,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurLocking") < 0)) __PYX_ERR(13, 1474, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_lock = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurLocking", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1474, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_lock); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_lock) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setKrylovSchurLocking", 0); /* "SLEPc/EPS.pyx":1491 * non-locking variant). * """ * cdef PetscBool val = lock # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurSetLocking(self.eps, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_lock)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1491, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1492 * """ * cdef PetscBool val = lock * CHKERR( EPSKrylovSchurSetLocking(self.eps, val) ) # <<<<<<<<<<<<<< * * def getKrylovSchurLocking(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetLocking(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1492, __pyx_L1_error) /* "SLEPc/EPS.pyx":1474 * return val * * def setKrylovSchurLocking(self, lock): # <<<<<<<<<<<<<< * """ * Choose between locking and non-locking variants of the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1494 * CHKERR( EPSKrylovSchurSetLocking(self.eps, val) ) * * def getKrylovSchurLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the Krylov-Schur method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking[] = "EPS.getKrylovSchurLocking(self)\n\n Gets the locking flag used in the Krylov-Schur method.\n\n Returns\n -------\n lock: bool\n The locking flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurLocking (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurLocking", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurLocking", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurLocking", 0); /* "SLEPc/EPS.pyx":1503 * The locking flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1504 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetLocking(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1504, __pyx_L1_error) /* "SLEPc/EPS.pyx":1505 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setKrylovSchurPartitions(self, npart): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1494 * CHKERR( EPSKrylovSchurSetLocking(self.eps, val) ) * * def getKrylovSchurLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the Krylov-Schur method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1507 * return tval * * def setKrylovSchurPartitions(self, npart): # <<<<<<<<<<<<<< * """ * Sets the number of partitions for the case of doing spectrum */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions[] = "EPS.setKrylovSchurPartitions(self, npart)\n\n Sets the number of partitions for the case of doing spectrum\n slicing for a computational interval with the communicator split\n in several sub-communicators.\n\n Parameters\n ----------\n npart: int\n The number of partitions.\n\n Notes\n -----\n By default, npart=1 so all processes in the communicator participate in\n the processing of the whole interval. If npart>1 then the interval is\n divided into npart subintervals, each of them being processed by a\n subset of processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_npart = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurPartitions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_npart,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_npart)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurPartitions") < 0)) __PYX_ERR(13, 1507, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_npart = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurPartitions", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1507, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_npart); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_npart) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setKrylovSchurPartitions", 0); /* "SLEPc/EPS.pyx":1525 * subset of processes. * """ * cdef PetscInt val = npart # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_npart); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(13, 1525, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1526 * """ * cdef PetscInt val = npart * CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) ) # <<<<<<<<<<<<<< * * def getKrylovSchurPartitions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetPartitions(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1526, __pyx_L1_error) /* "SLEPc/EPS.pyx":1507 * return tval * * def setKrylovSchurPartitions(self, npart): # <<<<<<<<<<<<<< * """ * Sets the number of partitions for the case of doing spectrum */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1528 * CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) ) * * def getKrylovSchurPartitions(self): # <<<<<<<<<<<<<< * """ * Gets the number of partitions of the communicator in case of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions[] = "EPS.getKrylovSchurPartitions(self)\n\n Gets the number of partitions of the communicator in case of\n spectrum slicing.\n\n Returns\n -------\n npart: int\n The number of partitions.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurPartitions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurPartitions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurPartitions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurPartitions", 0); /* "SLEPc/EPS.pyx":1538 * The number of partitions. * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) ) * return val */ __pyx_v_val = 0; /* "SLEPc/EPS.pyx":1539 * """ * cdef PetscInt val = 0 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetPartitions(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1539, __pyx_L1_error) /* "SLEPc/EPS.pyx":1540 * cdef PetscInt val = 0 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * def setKrylovSchurDetectZeros(self, detect): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1528 * CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) ) * * def getKrylovSchurPartitions(self): # <<<<<<<<<<<<<< * """ * Gets the number of partitions of the communicator in case of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1542 * return val * * def setKrylovSchurDetectZeros(self, detect): # <<<<<<<<<<<<<< * """ * Sets a flag to enforce detection of zeros during the factorizations */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros[] = "EPS.setKrylovSchurDetectZeros(self, detect)\n\n Sets a flag to enforce detection of zeros during the factorizations\n throughout the spectrum slicing computation.\n\n Parameters\n ----------\n detect: bool\n True if zeros must checked for.\n\n Notes\n -----\n A zero in the factorization indicates that a shift coincides with\n an eigenvalue.\n\n This flag is turned off by default, and may be necessary in some cases,\n especially when several partitions are being used. This feature currently\n requires an external package for factorizations with support for zero\n detection, e.g. MUMPS.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_detect = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurDetectZeros (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_detect,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_detect)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurDetectZeros") < 0)) __PYX_ERR(13, 1542, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_detect = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurDetectZeros", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1542, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_detect); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_detect) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setKrylovSchurDetectZeros", 0); /* "SLEPc/EPS.pyx":1562 * detection, e.g. MUMPS. * """ * cdef PetscBool val = detect # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_detect)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1562, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1563 * """ * cdef PetscBool val = detect * CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) ) # <<<<<<<<<<<<<< * * def getKrylovSchurDetectZeros(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetDetectZeros(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1563, __pyx_L1_error) /* "SLEPc/EPS.pyx":1542 * return val * * def setKrylovSchurDetectZeros(self, detect): # <<<<<<<<<<<<<< * """ * Sets a flag to enforce detection of zeros during the factorizations */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1565 * CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) ) * * def getKrylovSchurDetectZeros(self): # <<<<<<<<<<<<<< * """ * Gets the flag that enforces zero detection in spectrum slicing. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros[] = "EPS.getKrylovSchurDetectZeros(self)\n\n Gets the flag that enforces zero detection in spectrum slicing.\n\n Returns\n -------\n detect: bool\n The zero detection flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurDetectZeros (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurDetectZeros", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurDetectZeros", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurDetectZeros", 0); /* "SLEPc/EPS.pyx":1574 * The zero detection flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1575 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetDetectZeros(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1575, __pyx_L1_error) /* "SLEPc/EPS.pyx":1576 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1565 * CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) ) * * def getKrylovSchurDetectZeros(self): # <<<<<<<<<<<<<< * """ * Gets the flag that enforces zero detection in spectrum slicing. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1578 * return tval * * def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the dimensions used for each subsolve step in case of doing */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions[] = "EPS.setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None)\n\n Sets the dimensions used for each subsolve step in case of doing\n spectrum slicing for a computational interval. The meaning of the\n parameters is the same as in `setDimensions()`.\n\n Parameters\n ----------\n nev: int, optional\n Number of eigenvalues to compute.\n ncv: int, optional\n Maximum dimension of the subspace to be used by the solver.\n mpd: int, optional\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nev = 0; PyObject *__pyx_v_ncv = 0; PyObject *__pyx_v_mpd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurDimensions") < 0)) __PYX_ERR(13, 1578, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_nev = values[0]; __pyx_v_ncv = values[1]; __pyx_v_mpd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1578, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setKrylovSchurDimensions", 0); /* "SLEPc/EPS.pyx":1593 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":1594 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":1595 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT # <<<<<<<<<<<<<< * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) */ __pyx_v_ival3 = PETSC_DEFAULT; /* "SLEPc/EPS.pyx":1596 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) # <<<<<<<<<<<<<< * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) */ __pyx_t_1 = (__pyx_v_nev != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1596, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1597 * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) # <<<<<<<<<<<<<< * if mpd is not None: ival3 = asInt(mpd) * CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) */ __pyx_t_2 = (__pyx_v_ncv != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1597, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1598 * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) * */ __pyx_t_1 = (__pyx_v_mpd != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1598, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1599 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getKrylovSchurDimensions(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetDimensions(__pyx_v_self->eps, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1599, __pyx_L1_error) /* "SLEPc/EPS.pyx":1578 * return tval * * def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the dimensions used for each subsolve step in case of doing */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1601 * CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) * * def getKrylovSchurDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the dimensions used for each subsolve step in case of doing */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions[] = "EPS.getKrylovSchurDimensions(self)\n\n Gets the dimensions used for each subsolve step in case of doing\n spectrum slicing for a computational interval.\n\n Returns\n -------\n nev: int\n Number of eigenvalues to compute.\n ncv: int\n Maximum dimension of the subspace to be used by the solver.\n mpd: int\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurDimensions", 0); /* "SLEPc/EPS.pyx":1615 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/EPS.pyx":1616 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/EPS.pyx":1617 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/EPS.pyx":1618 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetDimensions(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1618, __pyx_L1_error) /* "SLEPc/EPS.pyx":1619 * cdef PetscInt ival3 = 0 * CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * def getKrylovSchurSubcommInfo(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1601 * CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) ) * * def getKrylovSchurDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the dimensions used for each subsolve step in case of doing */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1621 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def getKrylovSchurSubcommInfo(self): # <<<<<<<<<<<<<< * """ * Gets information related to the case of doing spectrum slicing */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo[] = "EPS.getKrylovSchurSubcommInfo(self)\n\n Gets information related to the case of doing spectrum slicing\n for a computational interval with multiple communicators.\n\n Returns\n -------\n k: int\n Number of the subinterval for the calling process.\n n: int\n Number of eigenvalues found in the k-th subinterval.\n v: Vec\n A vector owned by processes in the subcommunicator with dimensions\n compatible for locally computed eigenvectors.\n\n Notes\n -----\n This function is only available for spectrum slicing runs.\n\n The returned Vec should be destroyed by the user.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurSubcommInfo (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommInfo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurSubcommInfo", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; struct PyPetscVecObject *__pyx_v_vec = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurSubcommInfo", 0); /* "SLEPc/EPS.pyx":1642 * The returned Vec should be destroyed by the user. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef Vec vec */ __pyx_v_ival1 = 0; /* "SLEPc/EPS.pyx":1643 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef Vec vec * vec = Vec() */ __pyx_v_ival2 = 0; /* "SLEPc/EPS.pyx":1645 * cdef PetscInt ival2 = 0 * cdef Vec vec * vec = Vec() # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) ) * return (toInt(ival1), toInt(ival2), vec) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_vec = ((struct PyPetscVecObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1646 * cdef Vec vec * vec = Vec() * CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), vec) * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommInfo(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_vec->vec))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1646, __pyx_L1_error) /* "SLEPc/EPS.pyx":1647 * vec = Vec() * CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) ) * return (toInt(ival1), toInt(ival2), vec) # <<<<<<<<<<<<<< * * def getKrylovSchurSubcommPairs(self, int i, Vec V): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_vec)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vec)); PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_vec)); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1621 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def getKrylovSchurSubcommInfo(self): # <<<<<<<<<<<<<< * """ * Gets information related to the case of doing spectrum slicing */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_vec); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1649 * return (toInt(ival1), toInt(ival2), vec) * * def getKrylovSchurSubcommPairs(self, int i, Vec V): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenpair stored internally in the multi-communicator */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs[] = "EPS.getKrylovSchurSubcommPairs(self, int i, Vec V)\n\n Gets the i-th eigenpair stored internally in the multi-communicator\n to which the calling process belongs.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n V: Vec\n Placeholder for the returned eigenvector.\n\n Returns\n -------\n e: scalar\n The computed eigenvalue.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and ``n-1``,\n where ``n`` is the number of vectors in the local subinterval,\n see `getKrylovSchurSubcommInfo()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_V = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurSubcommPairs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_V,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommPairs", 1, 2, 2, 1); __PYX_ERR(13, 1649, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getKrylovSchurSubcommPairs") < 0)) __PYX_ERR(13, 1649, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1649, __pyx_L3_error) __pyx_v_V = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommPairs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1649, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommPairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "V", 0))) __PYX_ERR(13, 1649, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_V); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_V) { PetscScalar __pyx_v_sval; Vec __pyx_v_vec; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getKrylovSchurSubcommPairs", 0); /* "SLEPc/EPS.pyx":1672 * see `getKrylovSchurSubcommInfo()`. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * cdef PetscVec vec = NULL * if V is not None: vec = V.vec */ __pyx_v_sval = 0.0; /* "SLEPc/EPS.pyx":1673 * """ * cdef PetscScalar sval = 0 * cdef PetscVec vec = NULL # <<<<<<<<<<<<<< * if V is not None: vec = V.vec * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) */ __pyx_v_vec = NULL; /* "SLEPc/EPS.pyx":1674 * cdef PetscScalar sval = 0 * cdef PetscVec vec = NULL * if V is not None: vec = V.vec # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) * return toScalar(sval) */ __pyx_t_1 = (((PyObject *)__pyx_v_V) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_V->vec; __pyx_v_vec = __pyx_t_3; } /* "SLEPc/EPS.pyx":1675 * cdef PetscVec vec = NULL * if V is not None: vec = V.vec * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommPairs(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval), __pyx_v_vec)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1675, __pyx_L1_error) /* "SLEPc/EPS.pyx":1676 * if V is not None: vec = V.vec * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def getKrylovSchurSubcommMats(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1649 * return (toInt(ival1), toInt(ival2), vec) * * def getKrylovSchurSubcommPairs(self, int i, Vec V): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenpair stored internally in the multi-communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommPairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1678 * return toScalar(sval) * * def getKrylovSchurSubcommMats(self): # <<<<<<<<<<<<<< * """ * Gets the eigenproblem matrices stored internally in the subcommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats[] = "EPS.getKrylovSchurSubcommMats(self)\n\n Gets the eigenproblem matrices stored internally in the subcommunicator\n to which the calling process belongs.\n\n Returns\n -------\n A: Mat\n The matrix associated with the eigensystem.\n B: Mat\n The second matrix in the case of generalized eigenproblems.\n\n Notes\n -----\n This is the analog of `getOperators()`, but returns the matrices distributed\n differently (in the subcommunicator rather than in the parent communicator).\n\n These matrices should not be modified by the user.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getKrylovSchurSubcommMats (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommMats", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurSubcommMats", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; struct PyPetscMatObject *__pyx_v_B = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getKrylovSchurSubcommMats", 0); /* "SLEPc/EPS.pyx":1697 * These matrices should not be modified by the user. * """ * cdef Mat A = Mat() # <<<<<<<<<<<<<< * cdef Mat B = Mat() * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1698 * """ * cdef Mat A = Mat() * cdef Mat B = Mat() # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1699 * cdef Mat A = Mat() * cdef Mat B = Mat() * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(A.obj) * PetscINCREF(B.obj) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommMats(__pyx_v_self->eps, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1699, __pyx_L1_error) /* "SLEPc/EPS.pyx":1700 * cdef Mat B = Mat() * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * PetscINCREF(B.obj) * return (A, B) */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/EPS.pyx":1701 * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) * PetscINCREF(B.obj) # <<<<<<<<<<<<<< * return (A, B) * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj); /* "SLEPc/EPS.pyx":1702 * PetscINCREF(A.obj) * PetscINCREF(B.obj) * return (A, B) # <<<<<<<<<<<<<< * * def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_A)); __Pyx_GIVEREF(((PyObject *)__pyx_v_A)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_A)); __Pyx_INCREF(((PyObject *)__pyx_v_B)); __Pyx_GIVEREF(((PyObject *)__pyx_v_B)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_B)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1678 * return toScalar(sval) * * def getKrylovSchurSubcommMats(self): # <<<<<<<<<<<<<< * """ * Gets the eigenproblem matrices stored internally in the subcommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XDECREF((PyObject *)__pyx_v_B); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1704 * return (A, B) * * def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False): # <<<<<<<<<<<<<< * """ * Update the eigenproblem matrices stored internally in the subcommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats[] = "EPS.updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False)\n\n Update the eigenproblem matrices stored internally in the subcommunicator\n to which the calling process belongs.\n\n Parameters\n ----------\n s: float (real or complex)\n Scalar that multiplies the existing A matrix.\n a: float (real or complex)\n Scalar used in the axpy operation on A.\n Au: Mat, optional\n The matrix used in the axpy operation on A.\n t: float (real or complex)\n Scalar that multiplies the existing B matrix.\n b: float (real or complex)\n Scalar used in the axpy operation on B.\n Bu: Mat, optional\n The matrix used in the axpy operation on B.\n structure: `PETSc.Mat.Structure` enumerate\n Either same, different, or a subset of the non-zero sparsity pattern.\n globalup: bool\n Whether global matrices must be updated or not.\n\n Notes\n -----\n This function modifies the eigenproblem matrices at subcommunicator level,\n and optionally updates the global matrices in the parent communicator.\n The updates are expressed as ``A <-- s*A + a*Au``, ``B <-- t*B + b*Bu``.\n\n It is possible to update one of the matrices, or both.\n\n The matrices `Au` and `Bu` must be equal in all subcommunicators.\n\n The `str` flag is passed to the `Mat.axpy()` operations to perform the updates.\n\n If `globalup` is True, communication is carried out to reconstruct the updated\n matrices in the parent communicator.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_v_a = 0; struct PyPetscMatObject *__pyx_v_Au = 0; PyObject *__pyx_v_t = 0; PyObject *__pyx_v_b = 0; struct PyPetscMatObject *__pyx_v_Bu = 0; PyObject *__pyx_v_structure = 0; PyObject *__pyx_v_globalup = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("updateKrylovSchurSubcommMats (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_a,&__pyx_n_s_Au,&__pyx_n_s_t,&__pyx_n_s_b,&__pyx_n_s_Bu,&__pyx_n_s_structure,&__pyx_n_s_globalup,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; values[0] = ((PyObject *)__pyx_float_1_0); values[1] = ((PyObject *)__pyx_float_1_0); values[2] = (PyObject *)((struct PyPetscMatObject *)Py_None); values[3] = ((PyObject *)__pyx_float_1_0); values[4] = ((PyObject *)__pyx_float_1_0); values[5] = (PyObject *)((struct PyPetscMatObject *)Py_None); values[6] = ((PyObject *)Py_None); values[7] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Au); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Bu); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalup); if (value) { values[7] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateKrylovSchurSubcommMats") < 0)) __PYX_ERR(13, 1704, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_s = values[0]; __pyx_v_a = values[1]; __pyx_v_Au = ((struct PyPetscMatObject *)values[2]); __pyx_v_t = values[3]; __pyx_v_b = values[4]; __pyx_v_Bu = ((struct PyPetscMatObject *)values[5]); __pyx_v_structure = values[6]; __pyx_v_globalup = values[7]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("updateKrylovSchurSubcommMats", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1704, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.updateKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Au), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "Au", 0))) __PYX_ERR(13, 1704, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Bu), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "Bu", 0))) __PYX_ERR(13, 1704, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_s, __pyx_v_a, __pyx_v_Au, __pyx_v_t, __pyx_v_b, __pyx_v_Bu, __pyx_v_structure, __pyx_v_globalup); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_a, struct PyPetscMatObject *__pyx_v_Au, PyObject *__pyx_v_t, PyObject *__pyx_v_b, struct PyPetscMatObject *__pyx_v_Bu, PyObject *__pyx_v_structure, PyObject *__pyx_v_globalup) { Mat __pyx_v_Amat; Mat __pyx_v_Bmat; MatStructure __pyx_v_vstr; PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Mat __pyx_t_3; MatStructure __pyx_t_4; PetscBool __pyx_t_5; PetscScalar __pyx_t_6; PetscScalar __pyx_t_7; PetscScalar __pyx_t_8; PetscScalar __pyx_t_9; int __pyx_t_10; __Pyx_RefNannySetupContext("updateKrylovSchurSubcommMats", 0); /* "SLEPc/EPS.pyx":1743 * matrices in the parent communicator. * """ * cdef PetscMat Amat = NULL # <<<<<<<<<<<<<< * if Au is not None: Amat = Au.mat * cdef PetscMat Bmat = NULL */ __pyx_v_Amat = NULL; /* "SLEPc/EPS.pyx":1744 * """ * cdef PetscMat Amat = NULL * if Au is not None: Amat = Au.mat # <<<<<<<<<<<<<< * cdef PetscMat Bmat = NULL * if Bu is not None: Bmat = Bu.mat */ __pyx_t_1 = (((PyObject *)__pyx_v_Au) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_Au->mat; __pyx_v_Amat = __pyx_t_3; } /* "SLEPc/EPS.pyx":1745 * cdef PetscMat Amat = NULL * if Au is not None: Amat = Au.mat * cdef PetscMat Bmat = NULL # <<<<<<<<<<<<<< * if Bu is not None: Bmat = Bu.mat * cdef PetscMatStructure vstr = matstructure(structure) */ __pyx_v_Bmat = NULL; /* "SLEPc/EPS.pyx":1746 * if Au is not None: Amat = Au.mat * cdef PetscMat Bmat = NULL * if Bu is not None: Bmat = Bu.mat # <<<<<<<<<<<<<< * cdef PetscMatStructure vstr = matstructure(structure) * cdef PetscBool tval = globalup */ __pyx_t_2 = (((PyObject *)__pyx_v_Bu) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_Bu->mat; __pyx_v_Bmat = __pyx_t_3; } /* "SLEPc/EPS.pyx":1747 * cdef PetscMat Bmat = NULL * if Bu is not None: Bmat = Bu.mat * cdef PetscMatStructure vstr = matstructure(structure) # <<<<<<<<<<<<<< * cdef PetscBool tval = globalup * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_4 == ((MatStructure)-1L))) __PYX_ERR(13, 1747, __pyx_L1_error) __pyx_v_vstr = __pyx_t_4; /* "SLEPc/EPS.pyx":1748 * if Bu is not None: Bmat = Bu.mat * cdef PetscMatStructure vstr = matstructure(structure) * cdef PetscBool tval = globalup # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) * */ __pyx_t_5 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_globalup)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1748, __pyx_L1_error) __pyx_v_tval = __pyx_t_5; /* "SLEPc/EPS.pyx":1749 * cdef PetscMatStructure vstr = matstructure(structure) * cdef PetscBool tval = globalup * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) # <<<<<<<<<<<<<< * * def setKrylovSchurSubintervals(self, subint): */ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_6 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error) __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_7 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_8 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error) __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_9 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error) __pyx_t_10 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurUpdateSubcommMats(__pyx_v_self->eps, __pyx_t_6, __pyx_t_7, __pyx_v_Amat, __pyx_t_8, __pyx_t_9, __pyx_v_Bmat, __pyx_v_vstr, __pyx_v_tval)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(13, 1749, __pyx_L1_error) /* "SLEPc/EPS.pyx":1704 * return (A, B) * * def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False): # <<<<<<<<<<<<<< * """ * Update the eigenproblem matrices stored internally in the subcommunicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.updateKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1751 * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) * * def setKrylovSchurSubintervals(self, subint): # <<<<<<<<<<<<<< * """ * Sets the subinterval boundaries for spectrum slicing with a computational interval. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals[] = "EPS.setKrylovSchurSubintervals(self, subint)\n\n Sets the subinterval boundaries for spectrum slicing with a computational interval.\n \n Parameters\n ----------\n subint: list of real values specifying subintervals\n\n Notes\n -----\n Logically Collective on EPS\n This function must be called after setKrylovSchurPartitions(). \n For npart partitions, the argument subint must contain npart+1 \n real values sorted in ascending order: \n subint_0, subint_1, ..., subint_npart, \n where the first and last values must coincide with the interval \n endpoints set with EPSSetInterval().\n The subintervals are then defined by two consecutive points: \n [subint_0,subint_1], [subint_1,subint_2], and so on.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_subint = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setKrylovSchurSubintervals (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_subint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_subint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurSubintervals") < 0)) __PYX_ERR(13, 1751, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_subint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setKrylovSchurSubintervals", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1751, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurSubintervals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_subint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_subint) { PetscBool __pyx_v_match; PetscReal *__pyx_v_subintarray; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PetscInt __pyx_v_nparts; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PetscReal __pyx_t_6; __Pyx_RefNannySetupContext("setKrylovSchurSubintervals", 0); /* "SLEPc/EPS.pyx":1771 * [subint_0,subint_1], [subint_1,subint_2], and so on. * """ * cdef PetscBool match = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PetscObjectTypeCompare(self.eps, EPSKRYLOVSCHUR, &match) ) * if match == PETSC_FALSE: return */ __pyx_v_match = PETSC_FALSE; /* "SLEPc/EPS.pyx":1772 * """ * cdef PetscBool match = PETSC_FALSE * CHKERR( PetscObjectTypeCompare(self.eps, EPSKRYLOVSCHUR, &match) ) # <<<<<<<<<<<<<< * if match == PETSC_FALSE: return * cdef PetscReal *subintarray = NULL */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PetscObjectTypeCompare(((PetscObject)__pyx_v_self->eps), EPSKRYLOVSCHUR, (&__pyx_v_match))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1772, __pyx_L1_error) /* "SLEPc/EPS.pyx":1773 * cdef PetscBool match = PETSC_FALSE * CHKERR( PetscObjectTypeCompare(self.eps, EPSKRYLOVSCHUR, &match) ) * if match == PETSC_FALSE: return # <<<<<<<<<<<<<< * cdef PetscReal *subintarray = NULL * cdef Py_ssize_t i = 0, n = len(subint) */ __pyx_t_2 = ((__pyx_v_match == PETSC_FALSE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "SLEPc/EPS.pyx":1774 * CHKERR( PetscObjectTypeCompare(self.eps, EPSKRYLOVSCHUR, &match) ) * if match == PETSC_FALSE: return * cdef PetscReal *subintarray = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, n = len(subint) * cdef PetscInt nparts = 0 */ __pyx_v_subintarray = NULL; /* "SLEPc/EPS.pyx":1775 * if match == PETSC_FALSE: return * cdef PetscReal *subintarray = NULL * cdef Py_ssize_t i = 0, n = len(subint) # <<<<<<<<<<<<<< * cdef PetscInt nparts = 0 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) */ __pyx_v_i = 0; __pyx_t_3 = PyObject_Length(__pyx_v_subint); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(13, 1775, __pyx_L1_error) __pyx_v_n = __pyx_t_3; /* "SLEPc/EPS.pyx":1776 * cdef PetscReal *subintarray = NULL * cdef Py_ssize_t i = 0, n = len(subint) * cdef PetscInt nparts = 0 # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) * assert n >= nparts */ __pyx_v_nparts = 0; /* "SLEPc/EPS.pyx":1777 * cdef Py_ssize_t i = 0, n = len(subint) * cdef PetscInt nparts = 0 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) # <<<<<<<<<<<<<< * assert n >= nparts * cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetPartitions(__pyx_v_self->eps, (&__pyx_v_nparts))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1777, __pyx_L1_error) /* "SLEPc/EPS.pyx":1778 * cdef PetscInt nparts = 0 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) * assert n >= nparts # <<<<<<<<<<<<<< * cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) * for i in range(n): subintarray[i] = asReal(subint[i]) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_n >= __pyx_v_nparts) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(13, 1778, __pyx_L1_error) } } #endif /* "SLEPc/EPS.pyx":1779 * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) ) * assert n >= nparts * cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) # <<<<<<<<<<<<<< * for i in range(n): subintarray[i] = asReal(subint[i]) * CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_n * (sizeof(PetscReal))), ((void **)(&__pyx_v_subintarray))); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_tmp = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/EPS.pyx":1780 * assert n >= nparts * cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) * for i in range(n): subintarray[i] = asReal(subint[i]) # <<<<<<<<<<<<<< * CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) * */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_subint, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_t_4); if (unlikely(__pyx_t_6 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 1780, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_subintarray[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/EPS.pyx":1781 * cdef tmp = allocate(n*sizeof(PetscReal),&subintarray) * for i in range(n): subintarray[i] = asReal(subint[i]) * CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) # <<<<<<<<<<<<<< * * def setRQCGReset(self, nrest): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetSubintervals(__pyx_v_self->eps, __pyx_v_subintarray)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1781, __pyx_L1_error) /* "SLEPc/EPS.pyx":1751 * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) * * def setKrylovSchurSubintervals(self, subint): # <<<<<<<<<<<<<< * """ * Sets the subinterval boundaries for spectrum slicing with a computational interval. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurSubintervals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1783 * CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) * * def setRQCGReset(self, nrest): # <<<<<<<<<<<<<< * """ * Sets the reset parameter of the RQCG iteration. Every nrest iterations, */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_164setRQCGReset[] = "EPS.setRQCGReset(self, nrest)\n\n Sets the reset parameter of the RQCG iteration. Every nrest iterations,\n the solver performs a Rayleigh-Ritz projection step.\n\n Parameters\n ----------\n nrest: integer\n The number of iterations between resets.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nrest = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRQCGReset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nrest,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nrest)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRQCGReset") < 0)) __PYX_ERR(13, 1783, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_nrest = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRQCGReset", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1783, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nrest); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nrest) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setRQCGReset", 0); /* "SLEPc/EPS.pyx":1793 * The number of iterations between resets. * """ * cdef PetscInt val = nrest # <<<<<<<<<<<<<< * CHKERR( EPSRQCGSetReset(self.eps, val) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_nrest); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(13, 1793, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1794 * """ * cdef PetscInt val = nrest * CHKERR( EPSRQCGSetReset(self.eps, val) ) # <<<<<<<<<<<<<< * * def getRQCGReset(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSRQCGSetReset(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1794, __pyx_L1_error) /* "SLEPc/EPS.pyx":1783 * CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray)) * * def setRQCGReset(self, nrest): # <<<<<<<<<<<<<< * """ * Sets the reset parameter of the RQCG iteration. Every nrest iterations, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1796 * CHKERR( EPSRQCGSetReset(self.eps, val) ) * * def getRQCGReset(self): # <<<<<<<<<<<<<< * """ * Gets the reset parameter used in the RQCG method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_166getRQCGReset[] = "EPS.getRQCGReset(self)\n\n Gets the reset parameter used in the RQCG method.\n\n Returns\n -------\n nrest: integer\n The number of iterations between resets.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRQCGReset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRQCGReset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRQCGReset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getRQCGReset", 0); /* "SLEPc/EPS.pyx":1805 * The number of iterations between resets. * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( EPSRQCGGetReset(self.eps, &val) ) * return val */ __pyx_v_val = 0; /* "SLEPc/EPS.pyx":1806 * """ * cdef PetscInt val = 0 * CHKERR( EPSRQCGGetReset(self.eps, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSRQCGGetReset(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1806, __pyx_L1_error) /* "SLEPc/EPS.pyx":1807 * cdef PetscInt val = 0 * CHKERR( EPSRQCGGetReset(self.eps, &val) ) * return val # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1796 * CHKERR( EPSRQCGSetReset(self.eps, val) ) * * def getRQCGReset(self): # <<<<<<<<<<<<<< * """ * Gets the reset parameter used in the RQCG method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1811 * # * property problem_type: * def __get__(self): # <<<<<<<<<<<<<< * return self.getProblemType() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1812 * property problem_type: * def __get__(self): * return self.getProblemType() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setProblemType(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1812, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1812, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1811 * # * property problem_type: * def __get__(self): # <<<<<<<<<<<<<< * return self.getProblemType() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.problem_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1813 * def __get__(self): * return self.getProblemType() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setProblemType(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1814 * return self.getProblemType() * def __set__(self, value): * self.setProblemType(value) # <<<<<<<<<<<<<< * * property extraction: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1813 * def __get__(self): * return self.getProblemType() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setProblemType(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.problem_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1817 * * property extraction: * def __get__(self): # <<<<<<<<<<<<<< * return self.getExtraction() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1818 * property extraction: * def __get__(self): * return self.getExtraction() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setExtraction(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1818, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1817 * * property extraction: * def __get__(self): # <<<<<<<<<<<<<< * return self.getExtraction() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.extraction.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1819 * def __get__(self): * return self.getExtraction() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setExtraction(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1820 * return self.getExtraction() * def __set__(self, value): * self.setExtraction(value) # <<<<<<<<<<<<<< * * property which: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1819 * def __get__(self): * return self.getExtraction() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setExtraction(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.extraction.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1823 * * property which: * def __get__(self): # <<<<<<<<<<<<<< * return self.getWhichEigenpairs() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1824 * property which: * def __get__(self): * return self.getWhichEigenpairs() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setWhichEigenpairs(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWhichEigenpairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1824, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1823 * * property which: * def __get__(self): # <<<<<<<<<<<<<< * return self.getWhichEigenpairs() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1825 * def __get__(self): * return self.getWhichEigenpairs() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setWhichEigenpairs(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1826 * return self.getWhichEigenpairs() * def __set__(self, value): * self.setWhichEigenpairs(value) # <<<<<<<<<<<<<< * * property target: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setWhichEigenpairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1825 * def __get__(self): * return self.getWhichEigenpairs() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setWhichEigenpairs(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.which.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1829 * * property target: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTarget() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1830 * property target: * def __get__(self): * return self.getTarget() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTarget(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTarget); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1830, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1829 * * property target: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTarget() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.target.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1831 * def __get__(self): * return self.getTarget() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTarget(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1832 * return self.getTarget() * def __set__(self, value): * self.setTarget(value) # <<<<<<<<<<<<<< * * property tol: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTarget); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1831 * def __get__(self): * return self.getTarget() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTarget(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.target.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1835 * * property tol: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[0] * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1836 * property tol: * def __get__(self): * return self.getTolerances()[0] # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTolerances(tol=value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1836, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1835 * * property tol: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[0] * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.tol.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1837 * def __get__(self): * return self.getTolerances()[0] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(tol=value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1838 * return self.getTolerances()[0] * def __set__(self, value): * self.setTolerances(tol=value) # <<<<<<<<<<<<<< * * property max_it: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tol, __pyx_v_value) < 0) __PYX_ERR(13, 1838, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1837 * def __get__(self): * return self.getTolerances()[0] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(tol=value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.tol.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1841 * * property max_it: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[1] * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1842 * property max_it: * def __get__(self): * return self.getTolerances()[1] # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTolerances(max_it=value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1842, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1841 * * property max_it: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[1] * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.max_it.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1843 * def __get__(self): * return self.getTolerances()[1] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(max_it=value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1844 * return self.getTolerances()[1] * def __set__(self, value): * self.setTolerances(max_it=value) # <<<<<<<<<<<<<< * * property st: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_it, __pyx_v_value) < 0) __PYX_ERR(13, 1844, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1843 * def __get__(self): * return self.getTolerances()[1] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(max_it=value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.max_it.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1847 * * property st: * def __get__(self): # <<<<<<<<<<<<<< * return self.getST() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1848 * property st: * def __get__(self): * return self.getST() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setST(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getST); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1848, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1847 * * property st: * def __get__(self): # <<<<<<<<<<<<<< * return self.getST() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.st.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1849 * def __get__(self): * return self.getST() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setST(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1850 * return self.getST() * def __set__(self, value): * self.setST(value) # <<<<<<<<<<<<<< * * property bv: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setST); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1849 * def __get__(self): * return self.getST() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setST(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.st.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1853 * * property bv: * def __get__(self): # <<<<<<<<<<<<<< * return self.getBV() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1854 * property bv: * def __get__(self): * return self.getBV() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setBV(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1854, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1853 * * property bv: * def __get__(self): # <<<<<<<<<<<<<< * return self.getBV() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.bv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1855 * def __get__(self): * return self.getBV() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setBV(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1856 * return self.getBV() * def __set__(self, value): * self.setBV(value) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1855 * def __get__(self): * return self.getBV() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setBV(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.bv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":69 * ConvergedReason = SVDConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.svd * self.svd = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(struct PySlepcSVDObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/SVD.pyx":70 * * def __cinit__(self): * self.obj = &self.svd # <<<<<<<<<<<<<< * self.svd = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->svd)); /* "SLEPc/SVD.pyx":71 * def __cinit__(self): * self.obj = &self.svd * self.svd = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->svd = NULL; /* "SLEPc/SVD.pyx":69 * ConvergedReason = SVDConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.svd * self.svd = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":73 * self.svd = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the SVD data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_2view[] = "SVD.view(self, Viewer viewer=None)\n\n Prints the SVD data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(14, 73, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 73, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(14, 73, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2view(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2view(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/SVD.pyx":83 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( SVDView(self.svd, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/SVD.pyx":84 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( SVDView(self.svd, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/SVD.pyx":85 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( SVDView(self.svd, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDView(__pyx_v_self->svd, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 85, __pyx_L1_error) /* "SLEPc/SVD.pyx":73 * self.svd = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the SVD data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":87 * CHKERR( SVDView(self.svd, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_4destroy[] = "SVD.destroy(self)\n\n Destroys the SVD object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/SVD.pyx":91 * Destroys the SVD object. * """ * CHKERR( SVDDestroy(&self.svd) ) # <<<<<<<<<<<<<< * self.svd = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDDestroy((&__pyx_v_self->svd))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 91, __pyx_L1_error) /* "SLEPc/SVD.pyx":92 * """ * CHKERR( SVDDestroy(&self.svd) ) * self.svd = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->svd = NULL; /* "SLEPc/SVD.pyx":93 * CHKERR( SVDDestroy(&self.svd) ) * self.svd = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/SVD.pyx":87 * CHKERR( SVDView(self.svd, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the SVD object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":95 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_6reset[] = "SVD.reset(self)\n\n Resets the SVD object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/SVD.pyx":99 * Resets the SVD object. * """ * CHKERR( SVDReset(self.svd) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDReset(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 99, __pyx_L1_error) /* "SLEPc/SVD.pyx":95 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the SVD object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":101 * CHKERR( SVDReset(self.svd) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_8create[] = "SVD.create(self, comm=None)\n\n Creates the SVD object.\n\n Parameters\n ----------\n comm: Comm, optional\n MPI communicator; if not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(14, 101, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 101, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_8create(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_8create(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; SVD __pyx_v_newsvd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/SVD.pyx":111 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcSVD newsvd = NULL * CHKERR( SVDCreate(ccomm, &newsvd) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 111, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/SVD.pyx":112 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcSVD newsvd = NULL # <<<<<<<<<<<<<< * CHKERR( SVDCreate(ccomm, &newsvd) ) * SlepcCLEAR(self.obj); self.svd = newsvd */ __pyx_v_newsvd = NULL; /* "SLEPc/SVD.pyx":113 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcSVD newsvd = NULL * CHKERR( SVDCreate(ccomm, &newsvd) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.svd = newsvd * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCreate(__pyx_v_ccomm, (&__pyx_v_newsvd))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 113, __pyx_L1_error) /* "SLEPc/SVD.pyx":114 * cdef SlepcSVD newsvd = NULL * CHKERR( SVDCreate(ccomm, &newsvd) ) * SlepcCLEAR(self.obj); self.svd = newsvd # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->svd = __pyx_v_newsvd; /* "SLEPc/SVD.pyx":115 * CHKERR( SVDCreate(ccomm, &newsvd) ) * SlepcCLEAR(self.obj); self.svd = newsvd * return self # <<<<<<<<<<<<<< * * def setType(self, svd_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/SVD.pyx":101 * CHKERR( SVDReset(self.svd) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the SVD object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":117 * return self * * def setType(self, svd_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_10setType[] = "SVD.setType(self, svd_type)\n\n Selects the particular solver to be used in the SVD object.\n\n Parameters\n ----------\n svd_type: `SVD.Type` enumerate\n The solver to be used.\n\n Notes\n -----\n See `SVD.Type` for available methods. The default is CROSS.\n Normally, it is best to use `setFromOptions()` and then set\n the SVD type from the options database rather than by using\n this routine. Using the options database provides the user\n with maximum flexibility in evaluating the different available\n methods.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_svd_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_svd_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_svd_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(14, 117, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_svd_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 117, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_svd_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_svd_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_svd_type); /* "SLEPc/SVD.pyx":135 * methods. * """ * cdef SlepcSVDType cval = NULL # <<<<<<<<<<<<<< * svd_type = str2bytes(svd_type, &cval) * CHKERR( SVDSetType(self.svd, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/SVD.pyx":136 * """ * cdef SlepcSVDType cval = NULL * svd_type = str2bytes(svd_type, &cval) # <<<<<<<<<<<<<< * CHKERR( SVDSetType(self.svd, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_svd_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_svd_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":137 * cdef SlepcSVDType cval = NULL * svd_type = str2bytes(svd_type, &cval) * CHKERR( SVDSetType(self.svd, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetType(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 137, __pyx_L1_error) /* "SLEPc/SVD.pyx":117 * return self * * def setType(self, svd_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the SVD object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_svd_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":139 * CHKERR( SVDSetType(self.svd, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the SVD type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_12getType[] = "SVD.getType(self)\n\n Gets the SVD type of this object.\n\n Returns\n -------\n type: `SVD.Type` enumerate\n The solver currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(struct PySlepcSVDObject *__pyx_v_self) { const char* __pyx_v_svd_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/SVD.pyx":148 * The solver currently being used. * """ * cdef SlepcSVDType svd_type = NULL # <<<<<<<<<<<<<< * CHKERR( SVDGetType(self.svd, &svd_type) ) * return bytes2str(svd_type) */ __pyx_v_svd_type = NULL; /* "SLEPc/SVD.pyx":149 * """ * cdef SlepcSVDType svd_type = NULL * CHKERR( SVDGetType(self.svd, &svd_type) ) # <<<<<<<<<<<<<< * return bytes2str(svd_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetType(__pyx_v_self->svd, (&__pyx_v_svd_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 149, __pyx_L1_error) /* "SLEPc/SVD.pyx":150 * cdef SlepcSVDType svd_type = NULL * CHKERR( SVDGetType(self.svd, &svd_type) ) * return bytes2str(svd_type) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_svd_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":139 * CHKERR( SVDSetType(self.svd, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the SVD type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":152 * return bytes2str(svd_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all SVD options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix[] = "SVD.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all SVD options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this SVD object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/SVD.pyx":162 * The prefix string set for this SVD object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/SVD.pyx":163 * """ * cdef const_char *prefix = NULL * CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetOptionsPrefix(__pyx_v_self->svd, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 163, __pyx_L1_error) /* "SLEPc/SVD.pyx":164 * cdef const_char *prefix = NULL * CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":152 * return bytes2str(svd_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all SVD options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":166 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all SVD options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix[] = "SVD.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all SVD options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all SVD option\n requests.\n\n Notes\n -----\n A hyphen (-) must NOT be given at the beginning of the prefix\n name. The first character of all runtime options is\n AUTOMATICALLY the hyphen.\n\n For example, to distinguish between the runtime options for\n two different SVD contexts, one could call::\n\n S1.setOptionsPrefix(\"svd1_\")\n S2.setOptionsPrefix(\"svd2_\")\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(14, 166, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 166, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/SVD.pyx":189 * S2.setOptionsPrefix("svd2_") * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/SVD.pyx":190 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":191 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) # <<<<<<<<<<<<<< * * def appendOptionsPrefix(self, prefix): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetOptionsPrefix(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 191, __pyx_L1_error) /* "SLEPc/SVD.pyx":166 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all SVD options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":193 * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all SVD options */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix[] = "SVD.appendOptionsPrefix(self, prefix)\n\n Appends to the prefix used for searching for all SVD options\n in the database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all SVD option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(14, 193, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 193, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/SVD.pyx":203 * The prefix string to prepend to all SVD option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/SVD.pyx":204 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":205 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDAppendOptionsPrefix(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 205, __pyx_L1_error) /* "SLEPc/SVD.pyx":193 * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all SVD options */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":207 * CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets SVD options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_20setFromOptions[] = "SVD.setFromOptions(self)\n\n Sets SVD options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n\n Notes\n -----\n To see all options, run your program with the ``-help``\n option.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/SVD.pyx":218 * option. * """ * CHKERR( SVDSetFromOptions(self.svd) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetFromOptions(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 218, __pyx_L1_error) /* "SLEPc/SVD.pyx":207 * CHKERR( SVDAppendOptionsPrefix(self.svd, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets SVD options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":222 * # * * def getImplicitTranspose(self): # <<<<<<<<<<<<<< * """ * Gets the mode used to handle the transpose of the matrix */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose[] = "SVD.getImplicitTranspose(self)\n\n Gets the mode used to handle the transpose of the matrix\n associated with the singular value problem.\n\n Returns\n -------\n impl: boolean\n How to handle the transpose (implicitly or not).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getImplicitTranspose (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getImplicitTranspose", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getImplicitTranspose", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getImplicitTranspose", 0); /* "SLEPc/SVD.pyx":232 * How to handle the transpose (implicitly or not). * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) * return val */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/SVD.pyx":233 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetImplicitTranspose(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 233, __pyx_L1_error) /* "SLEPc/SVD.pyx":234 * cdef PetscBool val = PETSC_FALSE * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) * return val # <<<<<<<<<<<<<< * * def setImplicitTranspose(self, mode): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":222 * # * * def getImplicitTranspose(self): # <<<<<<<<<<<<<< * """ * Gets the mode used to handle the transpose of the matrix */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":236 * return val * * def setImplicitTranspose(self, mode): # <<<<<<<<<<<<<< * """ * Indicates how to handle the transpose of the matrix */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose[] = "SVD.setImplicitTranspose(self, mode)\n\n Indicates how to handle the transpose of the matrix\n associated with the singular value problem.\n\n Parameters\n ----------\n impl: boolean\n How to handle the transpose (implicitly or not).\n\n Notes\n -----\n By default, the transpose of the matrix is explicitly built\n (if the matrix has defined the MatTranspose operation).\n\n If this flag is set to true, the solver does not build the\n transpose, but handles it implicitly via MatMultTranspose().\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setImplicitTranspose (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setImplicitTranspose") < 0)) __PYX_ERR(14, 236, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_mode = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setImplicitTranspose", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 236, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_mode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_mode) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setImplicitTranspose", 0); /* "SLEPc/SVD.pyx":254 * transpose, but handles it implicitly via MatMultTranspose(). * """ * cdef PetscBool val = mode # <<<<<<<<<<<<<< * CHKERR( SVDSetImplicitTranspose(self.svd, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_mode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 254, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/SVD.pyx":255 * """ * cdef PetscBool val = mode * CHKERR( SVDSetImplicitTranspose(self.svd, val) ) # <<<<<<<<<<<<<< * * def getWhichSingularTriplets(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetImplicitTranspose(__pyx_v_self->svd, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 255, __pyx_L1_error) /* "SLEPc/SVD.pyx":236 * return val * * def setImplicitTranspose(self, mode): # <<<<<<<<<<<<<< * """ * Indicates how to handle the transpose of the matrix */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":257 * CHKERR( SVDSetImplicitTranspose(self.svd, val) ) * * def getWhichSingularTriplets(self): # <<<<<<<<<<<<<< * """ * Returns which singular triplets are to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets[] = "SVD.getWhichSingularTriplets(self)\n\n Returns which singular triplets are to be sought.\n\n Returns\n -------\n which: `SVD.Which` enumerate\n The singular values to be sought (either largest or\n smallest).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getWhichSingularTriplets (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getWhichSingularTriplets", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichSingularTriplets", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self) { SVDWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getWhichSingularTriplets", 0); /* "SLEPc/SVD.pyx":267 * smallest). * """ * cdef SlepcSVDWhich val = SVD_LARGEST # <<<<<<<<<<<<<< * CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) ) * return val */ __pyx_v_val = SVD_LARGEST; /* "SLEPc/SVD.pyx":268 * """ * cdef SlepcSVDWhich val = SVD_LARGEST * CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetWhichSingularTriplets(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 268, __pyx_L1_error) /* "SLEPc/SVD.pyx":269 * cdef SlepcSVDWhich val = SVD_LARGEST * CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) ) * return val # <<<<<<<<<<<<<< * * def setWhichSingularTriplets(self, which): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SVDWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":257 * CHKERR( SVDSetImplicitTranspose(self.svd, val) ) * * def getWhichSingularTriplets(self): # <<<<<<<<<<<<<< * """ * Returns which singular triplets are to be sought. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":271 * return val * * def setWhichSingularTriplets(self, which): # <<<<<<<<<<<<<< * """ * Specifies which singular triplets are to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets[] = "SVD.setWhichSingularTriplets(self, which)\n\n Specifies which singular triplets are to be sought.\n\n Parameters\n ----------\n which: `SVD.Which` enumerate\n The singular values to be sought (either largest or\n smallest).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_which = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setWhichSingularTriplets (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichSingularTriplets") < 0)) __PYX_ERR(14, 271, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_which = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setWhichSingularTriplets", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 271, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_which); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_which) { SVDWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SVDWhich __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setWhichSingularTriplets", 0); /* "SLEPc/SVD.pyx":281 * smallest). * """ * cdef SlepcSVDWhich val = which # <<<<<<<<<<<<<< * CHKERR( SVDSetWhichSingularTriplets(self.svd, val) ) * # */ __pyx_t_1 = ((SVDWhich)__Pyx_PyInt_As_SVDWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 281, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/SVD.pyx":282 * """ * cdef SlepcSVDWhich val = which * CHKERR( SVDSetWhichSingularTriplets(self.svd, val) ) # <<<<<<<<<<<<<< * # * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetWhichSingularTriplets(__pyx_v_self->svd, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 282, __pyx_L1_error) /* "SLEPc/SVD.pyx":271 * return val * * def setWhichSingularTriplets(self, which): # <<<<<<<<<<<<<< * """ * Specifies which singular triplets are to be sought. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":285 * # * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_30getTolerances[] = "SVD.getTolerances(self)\n\n Gets the tolerance and maximum iteration count used by the\n default SVD convergence tests.\n\n Returns\n -------\n tol: float\n The convergence tolerance.\n max_it: int\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(struct PySlepcSVDObject *__pyx_v_self) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/SVD.pyx":297 * The maximum number of iterations * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * CHKERR( SVDGetTolerances(self.svd, &rval, &ival) ) */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":298 * """ * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetTolerances(self.svd, &rval, &ival) ) * return (toReal(rval), toInt(ival)) */ __pyx_v_ival = 0; /* "SLEPc/SVD.pyx":299 * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 * CHKERR( SVDGetTolerances(self.svd, &rval, &ival) ) # <<<<<<<<<<<<<< * return (toReal(rval), toInt(ival)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetTolerances(__pyx_v_self->svd, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 299, __pyx_L1_error) /* "SLEPc/SVD.pyx":300 * cdef PetscInt ival = 0 * CHKERR( SVDGetTolerances(self.svd, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, max_it=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":285 * # * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":302 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_32setTolerances[] = "SVD.setTolerances(self, tol=None, max_it=None)\n\n Sets the tolerance and maximum iteration count used by the\n default SVD convergence tests.\n\n Parameters\n ----------\n tol: float, optional\n The convergence tolerance.\n max_it: int, optional\n The maximum number of iterations\n\n Notes\n -----\n Use `DECIDE` for `max_it` to assign a reasonably good value,\n which is dependent on the solution method.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(14, 302, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_tol = values[0]; __pyx_v_max_it = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 302, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscReal __pyx_t_3; PetscInt __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/SVD.pyx":319 * which is dependent on the solution method. * """ * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/SVD.pyx":320 * """ * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/SVD.pyx":321 * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) # <<<<<<<<<<<<<< * if max_it is not None: ival = asInt(max_it) * CHKERR( SVDSetTolerances(self.svd, rval, ival) ) */ __pyx_t_1 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(14, 321, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/SVD.pyx":322 * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) # <<<<<<<<<<<<<< * CHKERR( SVDSetTolerances(self.svd, rval, ival) ) * */ __pyx_t_2 = (__pyx_v_max_it != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(14, 322, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/SVD.pyx":323 * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) * CHKERR( SVDSetTolerances(self.svd, rval, ival) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetTolerances(__pyx_v_self->svd, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(14, 323, __pyx_L1_error) /* "SLEPc/SVD.pyx":302 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":325 * CHKERR( SVDSetTolerances(self.svd, rval, ival) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of singular values to compute and the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_34getDimensions[] = "SVD.getDimensions(self)\n\n Gets the number of singular values to compute and the\n dimension of the subspace.\n\n Returns\n -------\n nsv: int\n Number of singular values to compute.\n ncv: int\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(struct PySlepcSVDObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/SVD.pyx":340 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/SVD.pyx":341 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/SVD.pyx":342 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/SVD.pyx":343 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetDimensions(__pyx_v_self->svd, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 343, __pyx_L1_error) /* "SLEPc/SVD.pyx":344 * cdef PetscInt ival3 = 0 * CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * def setDimensions(self, nsv=None, ncv=None, mpd=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":325 * CHKERR( SVDSetTolerances(self.svd, rval, ival) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of singular values to compute and the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":346 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nsv=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of singular values to compute and the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_36setDimensions[] = "SVD.setDimensions(self, nsv=None, ncv=None, mpd=None)\n\n Sets the number of singular values to compute and the\n dimension of the subspace.\n\n Parameters\n ----------\n nsv: int, optional\n Number of singular values to compute.\n ncv: int, optional\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int, optional\n Maximum dimension allowed for the projected problem.\n\n Notes\n -----\n Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good\n value, which is dependent on the solution method.\n\n The parameters `ncv` and `mpd` are intimately related, so that\n the user is advised to set one of them at most. Normal usage\n is the following:\n\n - In cases where `nsv` is small, the user sets `ncv`\n (a reasonable default is 2 * `nsv`).\n - In cases where `nsv` is large, the user sets `mpd`.\n\n The value of `ncv` should always be between `nsv` and (`nsv` +\n `mpd`), typically `ncv` = `nsv` + `mpd`. If `nsv` is not too\n large, `mpd` = `nsv` is a reasonable choice, otherwise a\n smaller value should be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nsv = 0; PyObject *__pyx_v_ncv = 0; PyObject *__pyx_v_mpd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nsv,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nsv); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(14, 346, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_nsv = values[0]; __pyx_v_ncv = values[1]; __pyx_v_mpd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 346, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_nsv, __pyx_v_ncv, __pyx_v_mpd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_nsv, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/SVD.pyx":379 * smaller value should be used. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/SVD.pyx":380 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = PETSC_DEFAULT * if nsv is not None: ival1 = asInt(nsv) */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/SVD.pyx":381 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT # <<<<<<<<<<<<<< * if nsv is not None: ival1 = asInt(nsv) * if ncv is not None: ival2 = asInt(ncv) */ __pyx_v_ival3 = PETSC_DEFAULT; /* "SLEPc/SVD.pyx":382 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT * if nsv is not None: ival1 = asInt(nsv) # <<<<<<<<<<<<<< * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) */ __pyx_t_1 = (__pyx_v_nsv != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nsv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 382, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/SVD.pyx":383 * cdef PetscInt ival3 = PETSC_DEFAULT * if nsv is not None: ival1 = asInt(nsv) * if ncv is not None: ival2 = asInt(ncv) # <<<<<<<<<<<<<< * if mpd is not None: ival3 = asInt(mpd) * CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) */ __pyx_t_2 = (__pyx_v_ncv != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 383, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/SVD.pyx":384 * if nsv is not None: ival1 = asInt(nsv) * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) # <<<<<<<<<<<<<< * CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) * */ __pyx_t_1 = (__pyx_v_mpd != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 384, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/SVD.pyx":385 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getBV(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetDimensions(__pyx_v_self->svd, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 385, __pyx_L1_error) /* "SLEPc/SVD.pyx":346 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nsv=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of singular values to compute and the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":387 * CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors objects associated to the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_38getBV[] = "SVD.getBV(self)\n\n Obtain the basis vectors objects associated to the SVD object.\n\n Returns\n -------\n V: BV\n The basis vectors context for right singular vectors.\n U: BV\n The basis vectors context for left singular vectors.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBV (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(struct PySlepcSVDObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_V = 0; struct PySlepcBVObject *__pyx_v_U = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/SVD.pyx":398 * The basis vectors context for left singular vectors. * """ * cdef BV V = BV() # <<<<<<<<<<<<<< * cdef BV U = BV() * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_V = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":399 * """ * cdef BV V = BV() * cdef BV U = BV() # <<<<<<<<<<<<<< * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_U = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":400 * cdef BV V = BV() * cdef BV U = BV() * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) # <<<<<<<<<<<<<< * PetscINCREF(V.obj) * PetscINCREF(U.obj) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetBV(__pyx_v_self->svd, (&__pyx_v_V->bv), (&__pyx_v_U->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 400, __pyx_L1_error) /* "SLEPc/SVD.pyx":401 * cdef BV U = BV() * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) # <<<<<<<<<<<<<< * PetscINCREF(U.obj) * return (V,U) */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_V->__pyx_base.obj); /* "SLEPc/SVD.pyx":402 * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) * PetscINCREF(U.obj) # <<<<<<<<<<<<<< * return (V,U) * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_U->__pyx_base.obj); /* "SLEPc/SVD.pyx":403 * PetscINCREF(V.obj) * PetscINCREF(U.obj) * return (V,U) # <<<<<<<<<<<<<< * * def setBV(self, BV V not None,BV U=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_V)); __Pyx_GIVEREF(((PyObject *)__pyx_v_V)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_V)); __Pyx_INCREF(((PyObject *)__pyx_v_U)); __Pyx_GIVEREF(((PyObject *)__pyx_v_U)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_U)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":387 * CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors objects associated to the SVD object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_V); __Pyx_XDECREF((PyObject *)__pyx_v_U); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":405 * return (V,U) * * def setBV(self, BV V not None,BV U=None): # <<<<<<<<<<<<<< * """ * Associates basis vectors objects to the SVD solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_40setBV[] = "SVD.setBV(self, BV V, BV U=None)\n\n Associates basis vectors objects to the SVD solver.\n\n Parameters\n ----------\n V: BV\n The basis vectors context for right singular vectors.\n U: BV\n The basis vectors context for left singular vectors.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_V = 0; struct PySlepcBVObject *__pyx_v_U = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBV (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_V,&__pyx_n_s_U,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PySlepcBVObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(14, 405, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_V = ((struct PySlepcBVObject *)values[0]); __pyx_v_U = ((struct PySlepcBVObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBV", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 405, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "V", 0))) __PYX_ERR(14, 405, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "U", 0))) __PYX_ERR(14, 405, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_V, __pyx_v_U); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_V, struct PySlepcBVObject *__pyx_v_U) { BV __pyx_v_VBV; BV __pyx_v_UBV; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations BV __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/SVD.pyx":416 * The basis vectors context for left singular vectors. * """ * cdef SlepcBV VBV = V.bv # <<<<<<<<<<<<<< * cdef SlepcBV UBV = NULL * if U is not None: UBV = U.bv */ __pyx_t_1 = __pyx_v_V->bv; __pyx_v_VBV = __pyx_t_1; /* "SLEPc/SVD.pyx":417 * """ * cdef SlepcBV VBV = V.bv * cdef SlepcBV UBV = NULL # <<<<<<<<<<<<<< * if U is not None: UBV = U.bv * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) */ __pyx_v_UBV = NULL; /* "SLEPc/SVD.pyx":418 * cdef SlepcBV VBV = V.bv * cdef SlepcBV UBV = NULL * if U is not None: UBV = U.bv # <<<<<<<<<<<<<< * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_U) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_1 = __pyx_v_U->bv; __pyx_v_UBV = __pyx_t_1; } /* "SLEPc/SVD.pyx":419 * cdef SlepcBV UBV = NULL * if U is not None: UBV = U.bv * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) # <<<<<<<<<<<<<< * * def getOperator(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetBV(__pyx_v_self->svd, __pyx_v_VBV, __pyx_v_UBV)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 419, __pyx_L1_error) /* "SLEPc/SVD.pyx":405 * return (V,U) * * def setBV(self, BV V not None,BV U=None): # <<<<<<<<<<<<<< * """ * Associates basis vectors objects to the SVD solver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":421 * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * * def getOperator(self): # <<<<<<<<<<<<<< * """ * Gets the matrix associated with the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_42getOperator[] = "SVD.getOperator(self)\n\n Gets the matrix associated with the singular value problem.\n\n Returns\n -------\n A: Mat\n The matrix associated with the singular value problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOperator (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOperator", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperator", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(struct PySlepcSVDObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getOperator", 0); /* "SLEPc/SVD.pyx":430 * The matrix associated with the singular value problem. * """ * cdef Mat A = Mat() # <<<<<<<<<<<<<< * CHKERR( SVDGetOperator(self.svd, &A.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":431 * """ * cdef Mat A = Mat() * CHKERR( SVDGetOperator(self.svd, &A.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(A.obj) * return A */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetOperator(__pyx_v_self->svd, (&__pyx_v_A->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 431, __pyx_L1_error) /* "SLEPc/SVD.pyx":432 * cdef Mat A = Mat() * CHKERR( SVDGetOperator(self.svd, &A.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * return A * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/SVD.pyx":433 * CHKERR( SVDGetOperator(self.svd, &A.mat) ) * PetscINCREF(A.obj) * return A # <<<<<<<<<<<<<< * * def setOperator(self, Mat A not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_A)); __pyx_r = ((PyObject *)__pyx_v_A); goto __pyx_L0; /* "SLEPc/SVD.pyx":421 * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * * def getOperator(self): # <<<<<<<<<<<<<< * """ * Gets the matrix associated with the singular value problem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":435 * return A * * def setOperator(self, Mat A not None): # <<<<<<<<<<<<<< * """ * Sets the matrix associated with the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_44setOperator[] = "SVD.setOperator(self, Mat A)\n\n Sets the matrix associated with the singular value problem.\n\n Parameters\n ----------\n A: Mat\n The matrix associated with the singular value problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOperator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperator") < 0)) __PYX_ERR(14, 435, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOperator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 435, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(14, 435, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_A); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setOperator", 0); /* "SLEPc/SVD.pyx":444 * The matrix associated with the singular value problem. * """ * CHKERR( SVDSetOperator(self.svd, A.mat) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetOperator(__pyx_v_self->svd, __pyx_v_A->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 444, __pyx_L1_error) /* "SLEPc/SVD.pyx":435 * return A * * def setOperator(self, Mat A not None): # <<<<<<<<<<<<<< * """ * Sets the matrix associated with the singular value problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":448 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the SVD solver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_46setInitialSpace[] = "SVD.setInitialSpace(self, space)\n\n Sets the initial space from which the SVD solver starts to\n iterate.\n\n Parameters\n ----------\n space: an sequence of Vec\n The initial space.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(14, 448, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_space = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 448, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_space) { Vec *__pyx_v_vs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/SVD.pyx":458 * The initial space. * """ * if isinstance(space, Vec): space = [space] # <<<<<<<<<<<<<< * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_space); __Pyx_GIVEREF(__pyx_v_space); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space); __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/SVD.pyx":459 * """ * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) */ __pyx_v_vs = NULL; /* "SLEPc/SVD.pyx":460 * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 460, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/SVD.pyx":461 * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) # <<<<<<<<<<<<<< * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( SVDSetInitialSpace(self.svd, ns, vs) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":462 * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec # <<<<<<<<<<<<<< * CHKERR( SVDSetInitialSpace(self.svd, ns, vs) ) * */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(14, 462, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/SVD.pyx":463 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( SVDSetInitialSpace(self.svd, ns, vs) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetInitialSpace(__pyx_v_self->svd, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(14, 463, __pyx_L1_error) /* "SLEPc/SVD.pyx":448 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the SVD solver starts to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_space); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":467 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_48cancelMonitor[] = "SVD.cancelMonitor(self)\n\n Clears all monitors for an SVD object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/SVD.pyx":471 * Clears all monitors for an SVD object. * """ * CHKERR( SVDMonitorCancel(self.svd) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDMonitorCancel(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 471, __pyx_L1_error) /* "SLEPc/SVD.pyx":467 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an SVD object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":475 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_50setUp[] = "SVD.setUp(self)\n\n Sets up all the internal data structures necessary for the\n execution of the singular value solver.\n\n Notes\n -----\n This function need not be called explicitly in most cases,\n since `solve()` calls it. It can be useful when one wants to\n measure the set-up time separately from the solve time.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/SVD.pyx":486 * measure the set-up time separately from the solve time. * """ * CHKERR( SVDSetUp(self.svd) ) # <<<<<<<<<<<<<< * * def solve(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetUp(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 486, __pyx_L1_error) /* "SLEPc/SVD.pyx":475 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":488 * CHKERR( SVDSetUp(self.svd) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_52solve[] = "SVD.solve(self)\n\n Solves the singular value problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/SVD.pyx":492 * Solves the singular value problem. * """ * CHKERR( SVDSolve(self.svd) ) # <<<<<<<<<<<<<< * * def getIterationNumber(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSolve(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 492, __pyx_L1_error) /* "SLEPc/SVD.pyx":488 * CHKERR( SVDSetUp(self.svd) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the singular value problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":494 * CHKERR( SVDSolve(self.svd) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_54getIterationNumber[] = "SVD.getIterationNumber(self)\n\n Gets the current iteration number. If the call to `solve()` is\n complete, then it returns the number of iterations carried out\n by the solution method.\n\n Returns\n -------\n its: int\n Iteration number.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(struct PySlepcSVDObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/SVD.pyx":505 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetIterationNumber(self.svd, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/SVD.pyx":506 * """ * cdef PetscInt ival = 0 * CHKERR( SVDGetIterationNumber(self.svd, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetIterationNumber(__pyx_v_self->svd, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 506, __pyx_L1_error) /* "SLEPc/SVD.pyx":507 * cdef PetscInt ival = 0 * CHKERR( SVDGetIterationNumber(self.svd, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getConvergedReason(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":494 * CHKERR( SVDSolve(self.svd) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":509 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_56getConvergedReason[] = "SVD.getConvergedReason(self)\n\n Gets the reason why the `solve()` iteration was stopped.\n\n Returns\n -------\n reason: `SVD.ConvergedReason` enumerate\n Negative value indicates diverged, positive value\n converged.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(struct PySlepcSVDObject *__pyx_v_self) { SVDConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/SVD.pyx":519 * converged. * """ * cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( SVDGetConvergedReason(self.svd, &val) ) * return val */ __pyx_v_val = SVD_CONVERGED_ITERATING; /* "SLEPc/SVD.pyx":520 * """ * cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING * CHKERR( SVDGetConvergedReason(self.svd, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetConvergedReason(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 520, __pyx_L1_error) /* "SLEPc/SVD.pyx":521 * cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING * CHKERR( SVDGetConvergedReason(self.svd, &val) ) * return val # <<<<<<<<<<<<<< * * def getConverged(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SVDConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":509 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":523 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged singular triplets. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_58getConverged[] = "SVD.getConverged(self)\n\n Gets the number of converged singular triplets.\n\n Returns\n -------\n nconv: int\n Number of converged singular triplets.\n\n Notes\n -----\n This function should be called after `solve()` has finished.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConverged (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(struct PySlepcSVDObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/SVD.pyx":536 * This function should be called after `solve()` has finished. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetConverged(self.svd, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/SVD.pyx":537 * """ * cdef PetscInt ival = 0 * CHKERR( SVDGetConverged(self.svd, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetConverged(__pyx_v_self->svd, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 537, __pyx_L1_error) /* "SLEPc/SVD.pyx":538 * cdef PetscInt ival = 0 * CHKERR( SVDGetConverged(self.svd, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getValue(self, int i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":523 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged singular triplets. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":540 * return toInt(ival) * * def getValue(self, int i): # <<<<<<<<<<<<<< * """ * Gets the i-th singular value as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_60getValue[] = "SVD.getValue(self, int i)\n\n Gets the i-th singular value as computed by `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n\n Returns\n -------\n s: float\n The computed singular value.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`. Singular triplets are\n indexed according to the ordering criterion established with\n `setWhichSingularTriplets()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getValue (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getValue") < 0)) __PYX_ERR(14, 540, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 540, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getValue", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 540, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i) { PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getValue", 0); /* "SLEPc/SVD.pyx":561 * `setWhichSingularTriplets()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":562 * """ * cdef PetscReal rval = 0 * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_rval), NULL, NULL)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 562, __pyx_L1_error) /* "SLEPc/SVD.pyx":563 * cdef PetscReal rval = 0 * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def getVectors(self, int i, Vec U not None, Vec V not None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":540 * return toInt(ival) * * def getValue(self, int i): # <<<<<<<<<<<<<< * """ * Gets the i-th singular value as computed by `solve()`. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":565 * return toReal(rval) * * def getVectors(self, int i, Vec U not None, Vec V not None): # <<<<<<<<<<<<<< * """ * Gets the i-th left and right singular vectors as computed by */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_62getVectors[] = "SVD.getVectors(self, int i, Vec U, Vec V)\n\n Gets the i-th left and right singular vectors as computed by\n `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n U: Vec\n Placeholder for the returned left singular vector.\n V: Vec\n Placeholder for the returned right singular vector.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`. Singular triplets are\n indexed according to the ordering criterion established with\n `setWhichSingularTriplets()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_U = 0; struct PyPetscVecObject *__pyx_v_V = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVectors (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_U,&__pyx_n_s_V,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 1); __PYX_ERR(14, 565, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 2); __PYX_ERR(14, 565, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVectors") < 0)) __PYX_ERR(14, 565, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 565, __pyx_L3_error) __pyx_v_U = ((struct PyPetscVecObject *)values[1]); __pyx_v_V = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 565, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getVectors", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "U", 0))) __PYX_ERR(14, 565, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "V", 0))) __PYX_ERR(14, 565, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_U, __pyx_v_V); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V) { PetscReal __pyx_v_dummy; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("getVectors", 0); /* "SLEPc/SVD.pyx":586 * `setWhichSingularTriplets()`. * """ * cdef PetscReal dummy = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) * */ __pyx_v_dummy = 0.0; /* "SLEPc/SVD.pyx":587 * """ * cdef PetscReal dummy = 0 * CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) # <<<<<<<<<<<<<< * * def getSingularTriplet(self, int i, Vec U=None, Vec V=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_dummy), __pyx_v_U->vec, __pyx_v_V->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 587, __pyx_L1_error) /* "SLEPc/SVD.pyx":565 * return toReal(rval) * * def getVectors(self, int i, Vec U not None, Vec V not None): # <<<<<<<<<<<<<< * """ * Gets the i-th left and right singular vectors as computed by */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getVectors", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":589 * CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) * * def getSingularTriplet(self, int i, Vec U=None, Vec V=None): # <<<<<<<<<<<<<< * """ * Gets the i-th triplet of the singular value decomposition as */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_64getSingularTriplet[] = "SVD.getSingularTriplet(self, int i, Vec U=None, Vec V=None)\n\n Gets the i-th triplet of the singular value decomposition as\n computed by `solve()`. The solution consists of the singular\n value and its left and right singular vectors.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n U: Vec\n Placeholder for the returned left singular vector.\n V: Vec\n Placeholder for the returned right singular vector.\n\n Returns\n -------\n s: float\n The computed singular value.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`. Singular triplets are\n indexed according to the ordering criterion established with\n `setWhichSingularTriplets()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_U = 0; struct PyPetscVecObject *__pyx_v_V = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSingularTriplet (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_U,&__pyx_n_s_V,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSingularTriplet") < 0)) __PYX_ERR(14, 589, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 589, __pyx_L3_error) __pyx_v_U = ((struct PyPetscVecObject *)values[1]); __pyx_v_V = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getSingularTriplet", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 589, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getSingularTriplet", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "U", 0))) __PYX_ERR(14, 589, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "V", 0))) __PYX_ERR(14, 589, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_U, __pyx_v_V); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V) { PetscReal __pyx_v_rval; Vec __pyx_v_Uvec; Vec __pyx_v_Vvec; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getSingularTriplet", 0); /* "SLEPc/SVD.pyx":616 * `setWhichSingularTriplets()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscVec Uvec = NULL * cdef PetscVec Vvec = NULL */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":617 * """ * cdef PetscReal rval = 0 * cdef PetscVec Uvec = NULL # <<<<<<<<<<<<<< * cdef PetscVec Vvec = NULL * if U is not None: Uvec = U.vec */ __pyx_v_Uvec = NULL; /* "SLEPc/SVD.pyx":618 * cdef PetscReal rval = 0 * cdef PetscVec Uvec = NULL * cdef PetscVec Vvec = NULL # <<<<<<<<<<<<<< * if U is not None: Uvec = U.vec * if V is not None: Vvec = V.vec */ __pyx_v_Vvec = NULL; /* "SLEPc/SVD.pyx":619 * cdef PetscVec Uvec = NULL * cdef PetscVec Vvec = NULL * if U is not None: Uvec = U.vec # <<<<<<<<<<<<<< * if V is not None: Vvec = V.vec * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_U) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_U->vec; __pyx_v_Uvec = __pyx_t_3; } /* "SLEPc/SVD.pyx":620 * cdef PetscVec Vvec = NULL * if U is not None: Uvec = U.vec * if V is not None: Vvec = V.vec # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) * return toReal(rval) */ __pyx_t_2 = (((PyObject *)__pyx_v_V) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_V->vec; __pyx_v_Vvec = __pyx_t_3; } /* "SLEPc/SVD.pyx":621 * if U is not None: Uvec = U.vec * if V is not None: Vvec = V.vec * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_rval), __pyx_v_Uvec, __pyx_v_Vvec)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 621, __pyx_L1_error) /* "SLEPc/SVD.pyx":622 * if V is not None: Vvec = V.vec * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) * return toReal(rval) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":589 * CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) * * def getSingularTriplet(self, int i, Vec U=None, Vec V=None): # <<<<<<<<<<<<<< * """ * Gets the i-th triplet of the singular value decomposition as */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getSingularTriplet", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":626 * # * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_66computeError[] = "SVD.computeError(self, int i, etype=None)\n\n Computes the error (based on the residual norm) associated with the i-th\n singular triplet.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n etype: `SVD.ErrorType` enumerate\n The error type to compute.\n\n Returns\n -------\n e: real\n The relative error bound, computed in various ways from the residual norm\n ``sqrt(n1^2+n2^2)`` where ``n1 = ||A*v-sigma*u||_2``,\n ``n2 = ||A^T*u-sigma*v||_2``, ``sigma`` is the singular\n value, ``u`` and ``v`` are the left and right singular\n vectors.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("computeError (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(14, 626, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 626, __pyx_L3_error) __pyx_v_etype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 626, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) { SVDErrorType __pyx_v_et; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; SVDErrorType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/SVD.pyx":652 * ``nconv-1`` (see `getConverged()`). * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE # <<<<<<<<<<<<<< * cdef PetscReal rval = 0 * if etype is not None: et = etype */ __pyx_v_et = SVD_ERROR_RELATIVE; /* "SLEPc/SVD.pyx":653 * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * if etype is not None: et = etype * CHKERR( SVDComputeError(self.svd, i, et, &rval) ) */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":654 * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * cdef PetscReal rval = 0 * if etype is not None: et = etype # <<<<<<<<<<<<<< * CHKERR( SVDComputeError(self.svd, i, et, &rval) ) * return toReal(rval) */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((SVDErrorType)__Pyx_PyInt_As_SVDErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 654, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/SVD.pyx":655 * cdef PetscReal rval = 0 * if etype is not None: et = etype * CHKERR( SVDComputeError(self.svd, i, et, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDComputeError(__pyx_v_self->svd, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 655, __pyx_L1_error) /* "SLEPc/SVD.pyx":656 * if etype is not None: et = etype * CHKERR( SVDComputeError(self.svd, i, et, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def errorView(self, etype=None, Viewer viewer=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":626 * # * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":658 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_68errorView[] = "SVD.errorView(self, etype=None, Viewer viewer=None)\n\n Displays the errors associated with the computed solution\n (as well as the eigenvalues).\n\n Parameters\n ----------\n etype: `SVD.ErrorType` enumerate, optional\n The error type to compute.\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n\n Notes\n -----\n By default, this function checks the error of all eigenpairs and prints\n the eigenvalues if all of them are below the requested tolerance.\n If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n eigenvalues and corresponding errors is printed.\n\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("errorView (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(14, 658, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_etype = values[0]; __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 658, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(14, 658, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) { SVDErrorType __pyx_v_et; PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; SVDErrorType __pyx_t_3; PetscViewer __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/SVD.pyx":679 * * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = NULL */ __pyx_v_et = SVD_ERROR_RELATIVE; /* "SLEPc/SVD.pyx":680 * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((SVDErrorType)__Pyx_PyInt_As_SVDErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 680, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/SVD.pyx":681 * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( SVDErrorView(self.svd, et, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/SVD.pyx":682 * if etype is not None: et = etype * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( SVDErrorView(self.svd, et, vwr) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_4; } /* "SLEPc/SVD.pyx":683 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( SVDErrorView(self.svd, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDErrorView(__pyx_v_self->svd, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(14, 683, __pyx_L1_error) /* "SLEPc/SVD.pyx":658 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":687 * # * * def setCrossEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_70setCrossEPS[] = "SVD.setCrossEPS(self, EPS eps)\n\n Associate an eigensolver object (`EPS`) to the singular value\n solver.\n\n Parameters\n ----------\n eps: EPS\n The eigensolver object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCrossEPS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCrossEPS") < 0)) __PYX_ERR(14, 687, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCrossEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 687, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(14, 687, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_eps); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setCrossEPS", 0); /* "SLEPc/SVD.pyx":697 * The eigensolver object. * """ * CHKERR( SVDCrossSetEPS(self.svd, eps.eps) ) # <<<<<<<<<<<<<< * * def getCrossEPS(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCrossSetEPS(__pyx_v_self->svd, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 697, __pyx_L1_error) /* "SLEPc/SVD.pyx":687 * # * * def setCrossEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":699 * CHKERR( SVDCrossSetEPS(self.svd, eps.eps) ) * * def getCrossEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (`EPS`) associated to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_72getCrossEPS[] = "SVD.getCrossEPS(self)\n\n Retrieve the eigensolver object (`EPS`) associated to the\n singular value solver.\n\n Returns\n -------\n eps: EPS\n The eigensolver object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCrossEPS (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getCrossEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCrossEPS", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(struct PySlepcSVDObject *__pyx_v_self) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getCrossEPS", 0); /* "SLEPc/SVD.pyx":709 * The eigensolver object. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":710 * """ * cdef EPS eps = EPS() * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) # <<<<<<<<<<<<<< * PetscINCREF(eps.obj) * return eps */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCrossGetEPS(__pyx_v_self->svd, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 710, __pyx_L1_error) /* "SLEPc/SVD.pyx":711 * cdef EPS eps = EPS() * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj); /* "SLEPc/SVD.pyx":712 * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) * return eps # <<<<<<<<<<<<<< * * def setCyclicEPS(self, EPS eps not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_eps)); __pyx_r = ((PyObject *)__pyx_v_eps); goto __pyx_L0; /* "SLEPc/SVD.pyx":699 * CHKERR( SVDCrossSetEPS(self.svd, eps.eps) ) * * def getCrossEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (`EPS`) associated to the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_eps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":714 * return eps * * def setCyclicEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_74setCyclicEPS[] = "SVD.setCyclicEPS(self, EPS eps)\n\n Associate an eigensolver object (`EPS`) to the singular value\n solver.\n\n Parameters\n ----------\n eps: EPS\n The eigensolver object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCyclicEPS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCyclicEPS") < 0)) __PYX_ERR(14, 714, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCyclicEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 714, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(14, 714, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_eps); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setCyclicEPS", 0); /* "SLEPc/SVD.pyx":724 * The eigensolver object. * """ * CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) ) # <<<<<<<<<<<<<< * * def getCyclicEPS(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicSetEPS(__pyx_v_self->svd, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 724, __pyx_L1_error) /* "SLEPc/SVD.pyx":714 * return eps * * def setCyclicEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":726 * CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) ) * * def getCyclicEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (`EPS`) associated to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_76getCyclicEPS[] = "SVD.getCyclicEPS(self)\n\n Retrieve the eigensolver object (`EPS`) associated to the\n singular value solver.\n\n Returns\n -------\n eps: EPS\n The eigensolver object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCyclicEPS (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getCyclicEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCyclicEPS", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(struct PySlepcSVDObject *__pyx_v_self) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getCyclicEPS", 0); /* "SLEPc/SVD.pyx":736 * The eigensolver object. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":737 * """ * cdef EPS eps = EPS() * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) # <<<<<<<<<<<<<< * PetscINCREF(eps.obj) * return eps */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicGetEPS(__pyx_v_self->svd, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 737, __pyx_L1_error) /* "SLEPc/SVD.pyx":738 * cdef EPS eps = EPS() * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj); /* "SLEPc/SVD.pyx":739 * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) * return eps # <<<<<<<<<<<<<< * * def setCyclicExplicitMatrix(self, flag=True): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_eps)); __pyx_r = ((PyObject *)__pyx_v_eps); goto __pyx_L0; /* "SLEPc/SVD.pyx":726 * CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) ) * * def getCyclicEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (`EPS`) associated to the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_eps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":741 * return eps * * def setCyclicExplicitMatrix(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0 */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix[] = "SVD.setCyclicExplicitMatrix(self, flag=True)\n\n Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0\n ]`` must be computed explicitly.\n\n Parameters\n ----------\n flag: boolean\n True if ``H(A)`` is built explicitly.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCyclicExplicitMatrix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCyclicExplicitMatrix") < 0)) __PYX_ERR(14, 741, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_flag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCyclicExplicitMatrix", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 741, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setCyclicExplicitMatrix", 0); /* "SLEPc/SVD.pyx":751 * True if ``H(A)`` is built explicitly. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * if flag: tval = PETSC_TRUE * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":752 * """ * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 752, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_tval = PETSC_TRUE; } /* "SLEPc/SVD.pyx":753 * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) # <<<<<<<<<<<<<< * * def getCyclicExplicitMatrix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicSetExplicitMatrix(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 753, __pyx_L1_error) /* "SLEPc/SVD.pyx":741 * return eps * * def setCyclicExplicitMatrix(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":755 * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) * * def getCyclicExplicitMatrix(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix[] = "SVD.getCyclicExplicitMatrix(self)\n\n Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is\n built explicitly.\n\n Returns\n -------\n flag: boolean\n True if ``H(A)`` is built explicitly.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getCyclicExplicitMatrix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getCyclicExplicitMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCyclicExplicitMatrix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getCyclicExplicitMatrix", 0); /* "SLEPc/SVD.pyx":765 * True if ``H(A)`` is built explicitly. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":766 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicGetExplicitMatrix(__pyx_v_self->svd, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 766, __pyx_L1_error) /* "SLEPc/SVD.pyx":767 * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setLanczosOneSide(self, flag=True): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":755 * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) * * def getCyclicExplicitMatrix(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":769 * return tval * * def setLanczosOneSide(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the variant of the Lanczos method to be used is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide[] = "SVD.setLanczosOneSide(self, flag=True)\n\n Indicate if the variant of the Lanczos method to be used is\n one-sided or two-sided.\n\n Parameters\n ----------\n flag: boolean\n True if the method is one-sided.\n\n Notes\n -----\n By default, a two-sided variant is selected, which is\n sometimes slightly more robust. However, the one-sided variant\n is faster because it avoids the orthogonalization associated\n to left singular vectors. It also saves the memory required\n for storing such vectors.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLanczosOneSide (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLanczosOneSide") < 0)) __PYX_ERR(14, 769, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_flag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLanczosOneSide", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 769, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setLanczosOneSide", 0); /* "SLEPc/SVD.pyx":787 * for storing such vectors. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * if flag: tval = PETSC_TRUE * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":788 * """ * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 788, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_tval = PETSC_TRUE; } /* "SLEPc/SVD.pyx":789 * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) # <<<<<<<<<<<<<< * * def setTRLanczosOneSide(self, flag=True): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDLanczosSetOneSide(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 789, __pyx_L1_error) /* "SLEPc/SVD.pyx":769 * return tval * * def setLanczosOneSide(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the variant of the Lanczos method to be used is */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":791 * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * * def setTRLanczosOneSide(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the variant of the thick-restart Lanczos method to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide[] = "SVD.setTRLanczosOneSide(self, flag=True)\n\n Indicate if the variant of the thick-restart Lanczos method to\n be used is one-sided or two-sided.\n\n Parameters\n ----------\n flag: boolean\n True if the method is one-sided.\n\n Notes\n -----\n By default, a two-sided variant is selected, which is\n sometimes slightly more robust. However, the one-sided variant\n is faster because it avoids the orthogonalization associated\n to left singular vectors.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTRLanczosOneSide (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTRLanczosOneSide") < 0)) __PYX_ERR(14, 791, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_flag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTRLanczosOneSide", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 791, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTRLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTRLanczosOneSide", 0); /* "SLEPc/SVD.pyx":808 * to left singular vectors. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * if flag: tval = PETSC_TRUE * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":809 * """ * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE # <<<<<<<<<<<<<< * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 809, __pyx_L1_error) if (__pyx_t_1) { __pyx_v_tval = PETSC_TRUE; } /* "SLEPc/SVD.pyx":810 * cdef PetscBool tval = PETSC_FALSE * if flag: tval = PETSC_TRUE * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDLanczosSetOneSide(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 810, __pyx_L1_error) /* "SLEPc/SVD.pyx":791 * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * * def setTRLanczosOneSide(self, flag=True): # <<<<<<<<<<<<<< * """ * Indicate if the variant of the thick-restart Lanczos method to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTRLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":815 * * property transpose_mode: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTransposeMode() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":816 * property transpose_mode: * def __get__(self): * return self.getTransposeMode() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTransposeMode(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransposeMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 816, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":815 * * property transpose_mode: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTransposeMode() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.transpose_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":817 * def __get__(self): * return self.getTransposeMode() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTransposeMode(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":818 * return self.getTransposeMode() * def __set__(self, value): * self.setTransposeMode(value) # <<<<<<<<<<<<<< * * property which: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTransposeMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":817 * def __get__(self): * return self.getTransposeMode() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTransposeMode(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.transpose_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":821 * * property which: * def __get__(self): # <<<<<<<<<<<<<< * return self.getWhichSingularTriplets() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":822 * property which: * def __get__(self): * return self.getWhichSingularTriplets() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setWhichSingularTriplets(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWhichSingularTriplets); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 822, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":821 * * property which: * def __get__(self): # <<<<<<<<<<<<<< * return self.getWhichSingularTriplets() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":823 * def __get__(self): * return self.getWhichSingularTriplets() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setWhichSingularTriplets(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":824 * return self.getWhichSingularTriplets() * def __set__(self, value): * self.setWhichSingularTriplets(value) # <<<<<<<<<<<<<< * * property tol: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setWhichSingularTriplets); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":823 * def __get__(self): * return self.getWhichSingularTriplets() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setWhichSingularTriplets(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.which.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":827 * * property tol: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[0] * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":828 * property tol: * def __get__(self): * return self.getTolerances()[0] # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTolerances(tol=value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 828, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":827 * * property tol: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[0] * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.tol.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":829 * def __get__(self): * return self.getTolerances()[0] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(tol=value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":830 * return self.getTolerances()[0] * def __set__(self, value): * self.setTolerances(tol=value) # <<<<<<<<<<<<<< * * property max_it: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tol, __pyx_v_value) < 0) __PYX_ERR(14, 830, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":829 * def __get__(self): * return self.getTolerances()[0] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(tol=value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.tol.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":833 * * property max_it: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[1] * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":834 * property max_it: * def __get__(self): * return self.getTolerances()[1] # <<<<<<<<<<<<<< * def __set__(self, value): * self.setTolerances(max_it=value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 834, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":833 * * property max_it: * def __get__(self): # <<<<<<<<<<<<<< * return self.getTolerances()[1] * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.max_it.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":835 * def __get__(self): * return self.getTolerances()[1] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(max_it=value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":836 * return self.getTolerances()[1] * def __set__(self, value): * self.setTolerances(max_it=value) # <<<<<<<<<<<<<< * * property bv: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_it, __pyx_v_value) < 0) __PYX_ERR(14, 836, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":835 * def __get__(self): * return self.getTolerances()[1] * def __set__(self, value): # <<<<<<<<<<<<<< * self.setTolerances(max_it=value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.max_it.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":839 * * property bv: * def __get__(self): # <<<<<<<<<<<<<< * return self.getBV() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":840 * property bv: * def __get__(self): * return self.getBV() # <<<<<<<<<<<<<< * def __set__(self, value): * self.setBV(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 840, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 840, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":839 * * property bv: * def __get__(self): # <<<<<<<<<<<<<< * return self.getBV() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.bv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":841 * def __get__(self): * return self.getBV() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setBV(value) * */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":842 * return self.getBV() * def __set__(self, value): * self.setBV(value) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":841 * def __get__(self): * return self.getBV() * def __set__(self, value): # <<<<<<<<<<<<<< * self.setBV(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.bv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":185 * ConvergedReason = PEPConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.pep * self.pep = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(struct PySlepcPEPObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/PEP.pyx":186 * * def __cinit__(self): * self.obj = &self.pep # <<<<<<<<<<<<<< * self.pep = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->pep)); /* "SLEPc/PEP.pyx":187 * def __cinit__(self): * self.obj = &self.pep * self.pep = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->pep = NULL; /* "SLEPc/PEP.pyx":185 * ConvergedReason = PEPConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.pep * self.pep = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":189 * self.pep = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the PEP data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_2view[] = "PEP.view(self, Viewer viewer=None)\n\n Prints the PEP data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(15, 189, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 189, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(15, 189, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_2view(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_2view(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/PEP.pyx":199 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( PEPView(self.pep, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/PEP.pyx":200 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( PEPView(self.pep, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/PEP.pyx":201 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( PEPView(self.pep, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPView(__pyx_v_self->pep, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 201, __pyx_L1_error) /* "SLEPc/PEP.pyx":189 * self.pep = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the PEP data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":203 * CHKERR( PEPView(self.pep, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_4destroy[] = "PEP.destroy(self)\n\n Destroys the PEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/PEP.pyx":207 * Destroys the PEP object. * """ * CHKERR( PEPDestroy(&self.pep) ) # <<<<<<<<<<<<<< * self.pep = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPDestroy((&__pyx_v_self->pep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 207, __pyx_L1_error) /* "SLEPc/PEP.pyx":208 * """ * CHKERR( PEPDestroy(&self.pep) ) * self.pep = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->pep = NULL; /* "SLEPc/PEP.pyx":209 * CHKERR( PEPDestroy(&self.pep) ) * self.pep = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/PEP.pyx":203 * CHKERR( PEPView(self.pep, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the PEP object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":211 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_6reset[] = "PEP.reset(self)\n\n Resets the PEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/PEP.pyx":215 * Resets the PEP object. * """ * CHKERR( PEPReset(self.pep) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPReset(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 215, __pyx_L1_error) /* "SLEPc/PEP.pyx":211 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the PEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":217 * CHKERR( PEPReset(self.pep) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_8create[] = "PEP.create(self, comm=None)\n\n Creates the PEP object.\n\n Parameters\n ----------\n comm: Comm, optional.\n MPI communicator. If not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(15, 217, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 217, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_8create(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_8create(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; PEP __pyx_v_newpep; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/PEP.pyx":227 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcPEP newpep = NULL * CHKERR( PEPCreate(ccomm, &newpep) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 227, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/PEP.pyx":228 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcPEP newpep = NULL # <<<<<<<<<<<<<< * CHKERR( PEPCreate(ccomm, &newpep) ) * SlepcCLEAR(self.obj); self.pep = newpep */ __pyx_v_newpep = NULL; /* "SLEPc/PEP.pyx":229 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcPEP newpep = NULL * CHKERR( PEPCreate(ccomm, &newpep) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.pep = newpep * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPCreate(__pyx_v_ccomm, (&__pyx_v_newpep))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 229, __pyx_L1_error) /* "SLEPc/PEP.pyx":230 * cdef SlepcPEP newpep = NULL * CHKERR( PEPCreate(ccomm, &newpep) ) * SlepcCLEAR(self.obj); self.pep = newpep # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->pep = __pyx_v_newpep; /* "SLEPc/PEP.pyx":231 * CHKERR( PEPCreate(ccomm, &newpep) ) * SlepcCLEAR(self.obj); self.pep = newpep * return self # <<<<<<<<<<<<<< * * def setType(self, pep_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/PEP.pyx":217 * CHKERR( PEPReset(self.pep) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the PEP object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":233 * return self * * def setType(self, pep_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_10setType[] = "PEP.setType(self, pep_type)\n\n Selects the particular solver to be used in the PEP object.\n\n Parameters\n ----------\n pep_type: `PEP.Type` enumerate\n The solver to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pep_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pep_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pep_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(15, 233, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_pep_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 233, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_pep_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_pep_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_pep_type); /* "SLEPc/PEP.pyx":242 * The solver to be used. * """ * cdef SlepcPEPType cval = NULL # <<<<<<<<<<<<<< * pep_type = str2bytes(pep_type, &cval) * CHKERR( PEPSetType(self.pep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/PEP.pyx":243 * """ * cdef SlepcPEPType cval = NULL * pep_type = str2bytes(pep_type, &cval) # <<<<<<<<<<<<<< * CHKERR( PEPSetType(self.pep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_pep_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_pep_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":244 * cdef SlepcPEPType cval = NULL * pep_type = str2bytes(pep_type, &cval) * CHKERR( PEPSetType(self.pep, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetType(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 244, __pyx_L1_error) /* "SLEPc/PEP.pyx":233 * return self * * def setType(self, pep_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the PEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pep_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":246 * CHKERR( PEPSetType(self.pep, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the PEP type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_12getType[] = "PEP.getType(self)\n\n Gets the PEP type of this object.\n\n Returns\n -------\n type: `PEP.Type` enumerate\n The solver currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(struct PySlepcPEPObject *__pyx_v_self) { const char* __pyx_v_pep_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/PEP.pyx":255 * The solver currently being used. * """ * cdef SlepcPEPType pep_type = NULL # <<<<<<<<<<<<<< * CHKERR( PEPGetType(self.pep, &pep_type) ) * return bytes2str(pep_type) */ __pyx_v_pep_type = NULL; /* "SLEPc/PEP.pyx":256 * """ * cdef SlepcPEPType pep_type = NULL * CHKERR( PEPGetType(self.pep, &pep_type) ) # <<<<<<<<<<<<<< * return bytes2str(pep_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetType(__pyx_v_self->pep, (&__pyx_v_pep_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 256, __pyx_L1_error) /* "SLEPc/PEP.pyx":257 * cdef SlepcPEPType pep_type = NULL * CHKERR( PEPGetType(self.pep, &pep_type) ) * return bytes2str(pep_type) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_pep_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":246 * CHKERR( PEPSetType(self.pep, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the PEP type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":259 * return bytes2str(pep_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all PEP options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix[] = "PEP.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all PEP options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this PEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/PEP.pyx":269 * The prefix string set for this PEP object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/PEP.pyx":270 * """ * cdef const_char *prefix = NULL * CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetOptionsPrefix(__pyx_v_self->pep, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 270, __pyx_L1_error) /* "SLEPc/PEP.pyx":271 * cdef const_char *prefix = NULL * CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":259 * return bytes2str(pep_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all PEP options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":273 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all PEP options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix[] = "PEP.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all PEP options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all PEP option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(15, 273, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 273, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/PEP.pyx":283 * The prefix string to prepend to all PEP option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/PEP.pyx":284 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":285 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) # <<<<<<<<<<<<<< * * def appendOptionsPrefix(self, prefix): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetOptionsPrefix(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 285, __pyx_L1_error) /* "SLEPc/PEP.pyx":273 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all PEP options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":287 * CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all PEP options */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix[] = "PEP.appendOptionsPrefix(self, prefix)\n\n Appends to the prefix used for searching for all PEP options\n in the database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all PEP option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(15, 287, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 287, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/PEP.pyx":297 * The prefix string to prepend to all PEP option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/PEP.pyx":298 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":299 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPAppendOptionsPrefix(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 299, __pyx_L1_error) /* "SLEPc/PEP.pyx":287 * CHKERR( PEPSetOptionsPrefix(self.pep, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all PEP options */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":301 * CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets PEP options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_20setFromOptions[] = "PEP.setFromOptions(self)\n\n Sets PEP options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/PEP.pyx":307 * the solver type. * """ * CHKERR( PEPSetFromOptions(self.pep) ) # <<<<<<<<<<<<<< * * def getBasis(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetFromOptions(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 307, __pyx_L1_error) /* "SLEPc/PEP.pyx":301 * CHKERR( PEPAppendOptionsPrefix(self.pep, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets PEP options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":309 * CHKERR( PEPSetFromOptions(self.pep) ) * * def getBasis(self): # <<<<<<<<<<<<<< * """ * Gets the type of polynomial basis used to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_22getBasis[] = "PEP.getBasis(self)\n\n Gets the type of polynomial basis used to \n describe the polynomial eigenvalue problem.\n\n Returns\n -------\n basis: `PEP.Basis` enumerate\n the basis that was previously set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBasis (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBasis", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBasis", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(struct PySlepcPEPObject *__pyx_v_self) { PEPBasis __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getBasis", 0); /* "SLEPc/PEP.pyx":319 * the basis that was previously set. * """ * cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL # <<<<<<<<<<<<<< * CHKERR( PEPGetBasis(self.pep, &val) ) * return val */ __pyx_v_val = PEP_BASIS_MONOMIAL; /* "SLEPc/PEP.pyx":320 * """ * cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL * CHKERR( PEPGetBasis(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetBasis(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 320, __pyx_L1_error) /* "SLEPc/PEP.pyx":321 * cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL * CHKERR( PEPGetBasis(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * def setBasis(self, basis): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPBasis(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":309 * CHKERR( PEPSetFromOptions(self.pep) ) * * def getBasis(self): # <<<<<<<<<<<<<< * """ * Gets the type of polynomial basis used to */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getBasis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":323 * return val * * def setBasis(self, basis): # <<<<<<<<<<<<<< * """ * Specifies the type of polynomial basis used to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_24setBasis[] = "PEP.setBasis(self, basis)\n\n Specifies the type of polynomial basis used to \n describe the polynomial eigenvalue problem.\n\n Parameters\n ----------\n basis: `PEP.Basis` enumerate\n the basis to be set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_basis = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBasis (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_basis,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_basis)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBasis") < 0)) __PYX_ERR(15, 323, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_basis = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBasis", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 323, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBasis", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_basis); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_basis) { PEPBasis __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPBasis __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setBasis", 0); /* "SLEPc/PEP.pyx":333 * the basis to be set. * """ * cdef SlepcPEPBasis val = basis # <<<<<<<<<<<<<< * CHKERR( PEPSetBasis(self.pep, val) ) * */ __pyx_t_1 = ((PEPBasis)__Pyx_PyInt_As_PEPBasis(__pyx_v_basis)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 333, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":334 * """ * cdef SlepcPEPBasis val = basis * CHKERR( PEPSetBasis(self.pep, val) ) # <<<<<<<<<<<<<< * * def getProblemType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetBasis(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 334, __pyx_L1_error) /* "SLEPc/PEP.pyx":323 * return val * * def setBasis(self, basis): # <<<<<<<<<<<<<< * """ * Specifies the type of polynomial basis used to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBasis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":336 * CHKERR( PEPSetBasis(self.pep, val) ) * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_26getProblemType[] = "PEP.getProblemType(self)\n\n Gets the problem type from the PEP object.\n\n Returns\n -------\n problem_type: `PEP.ProblemType` enumerate\n The problem type that was previously set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getProblemType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getProblemType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getProblemType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(struct PySlepcPEPObject *__pyx_v_self) { PEPProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getProblemType", 0); /* "SLEPc/PEP.pyx":345 * The problem type that was previously set. * """ * cdef SlepcPEPProblemType val = PEP_GENERAL # <<<<<<<<<<<<<< * CHKERR( PEPGetProblemType(self.pep, &val) ) * return val */ __pyx_v_val = PEP_GENERAL; /* "SLEPc/PEP.pyx":346 * """ * cdef SlepcPEPProblemType val = PEP_GENERAL * CHKERR( PEPGetProblemType(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetProblemType(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 346, __pyx_L1_error) /* "SLEPc/PEP.pyx":347 * cdef SlepcPEPProblemType val = PEP_GENERAL * CHKERR( PEPGetProblemType(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * def setProblemType(self, problem_type): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPProblemType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":336 * CHKERR( PEPSetBasis(self.pep, val) ) * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the PEP object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":349 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_28setProblemType[] = "PEP.setProblemType(self, problem_type)\n\n Specifies the type of the eigenvalue problem.\n\n Parameters\n ----------\n problem_type: `PEP.ProblemType` enumerate\n The problem type to be set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_problem_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setProblemType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problem_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_problem_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setProblemType") < 0)) __PYX_ERR(15, 349, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_problem_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setProblemType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 349, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_problem_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_problem_type) { PEPProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPProblemType __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setProblemType", 0); /* "SLEPc/PEP.pyx":358 * The problem type to be set. * """ * cdef SlepcPEPProblemType val = problem_type # <<<<<<<<<<<<<< * CHKERR( PEPSetProblemType(self.pep, val) ) * */ __pyx_t_1 = ((PEPProblemType)__Pyx_PyInt_As_PEPProblemType(__pyx_v_problem_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 358, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":359 * """ * cdef SlepcPEPProblemType val = problem_type * CHKERR( PEPSetProblemType(self.pep, val) ) # <<<<<<<<<<<<<< * * def getWhichEigenpairs(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetProblemType(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 359, __pyx_L1_error) /* "SLEPc/PEP.pyx":349 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of the eigenvalue problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":361 * CHKERR( PEPSetProblemType(self.pep, val) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs[] = "PEP.getWhichEigenpairs(self)\n\n Returns which portion of the spectrum is to be sought.\n\n Returns\n -------\n which: `PEP.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self) { PEPWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/PEP.pyx":370 * The portion of the spectrum to be sought by the solver. * """ * cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * CHKERR( PEPGetWhichEigenpairs(self.pep, &val) ) * return val */ __pyx_v_val = PEP_LARGEST_MAGNITUDE; /* "SLEPc/PEP.pyx":371 * """ * cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE * CHKERR( PEPGetWhichEigenpairs(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetWhichEigenpairs(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 371, __pyx_L1_error) /* "SLEPc/PEP.pyx":372 * cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE * CHKERR( PEPGetWhichEigenpairs(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * def setWhichEigenpairs(self, which): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":361 * CHKERR( PEPSetProblemType(self.pep, val) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":374 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs[] = "PEP.setWhichEigenpairs(self, which)\n\n Specifies which portion of the spectrum is to be sought.\n\n Parameters\n ----------\n which: `PEP.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_which = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(15, 374, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_which = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 374, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_which); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_which) { PEPWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPWhich __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/PEP.pyx":383 * The portion of the spectrum to be sought by the solver. * """ * cdef SlepcPEPWhich val = which # <<<<<<<<<<<<<< * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) * */ __pyx_t_1 = ((PEPWhich)__Pyx_PyInt_As_PEPWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 383, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":384 * """ * cdef SlepcPEPWhich val = which * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) # <<<<<<<<<<<<<< * * def getTolerances(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetWhichEigenpairs(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 384, __pyx_L1_error) /* "SLEPc/PEP.pyx":374 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":386 * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTolerances[] = "PEP.getTolerances(self)\n\n Gets the tolerance and maximum iteration count used by the\n default PEP convergence tests.\n\n Returns\n -------\n tol: float\n The convergence tolerance.\n max_it: int\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(struct PySlepcPEPObject *__pyx_v_self) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/PEP.pyx":398 * The maximum number of iterations * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) */ __pyx_v_rval = 0.0; /* "SLEPc/PEP.pyx":399 * """ * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) * return (toReal(rval), toInt(ival)) */ __pyx_v_ival = 0; /* "SLEPc/PEP.pyx":400 * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 * CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) # <<<<<<<<<<<<<< * return (toReal(rval), toInt(ival)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetTolerances(__pyx_v_self->pep, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 400, __pyx_L1_error) /* "SLEPc/PEP.pyx":401 * cdef PetscInt ival = 0 * CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, max_it=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":386 * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":403 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTolerances[] = "PEP.setTolerances(self, tol=None, max_it=None)\n\n Sets the tolerance and maximum iteration count used by the\n default PEP convergence tests.\n\n Parameters\n ----------\n tol: float, optional\n The convergence tolerance.\n max_it: int, optional\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(15, 403, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_tol = values[0]; __pyx_v_max_it = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 403, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscReal __pyx_t_3; PetscInt __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/PEP.pyx":415 * The maximum number of iterations * """ * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":416 * """ * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":417 * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) # <<<<<<<<<<<<<< * if max_it is not None: ival = asInt(max_it) * CHKERR( PEPSetTolerances(self.pep, rval, ival) ) */ __pyx_t_1 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 417, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/PEP.pyx":418 * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) # <<<<<<<<<<<<<< * CHKERR( PEPSetTolerances(self.pep, rval, ival) ) * */ __pyx_t_2 = (__pyx_v_max_it != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 418, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/PEP.pyx":419 * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) * CHKERR( PEPSetTolerances(self.pep, rval, ival) ) # <<<<<<<<<<<<<< * * def getConvergenceTest(self): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetTolerances(__pyx_v_self->pep, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(15, 419, __pyx_L1_error) /* "SLEPc/PEP.pyx":403 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":421 * CHKERR( PEPSetTolerances(self.pep, rval, ival) ) * * def getConvergenceTest(self): # <<<<<<<<<<<<<< * """ * Return the method used to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_38getConvergenceTest[] = "PEP.getConvergenceTest(self)\n\n Return the method used to compute the error estimate \n used in the convergence test. \n\n Returns\n -------\n conv: PEP.Conv\n The method used to compute the error estimate \n used in the convergence test. \n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergenceTest (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergenceTest", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergenceTest", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self) { PEPConv __pyx_v_conv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergenceTest", 0); /* "SLEPc/PEP.pyx":432 * used in the convergence test. * """ * cdef SlepcPEPConv conv = PEP_CONV_REL # <<<<<<<<<<<<<< * CHKERR( PEPGetConvergenceTest(self.pep, &conv) ) * return conv */ __pyx_v_conv = PEP_CONV_REL; /* "SLEPc/PEP.pyx":433 * """ * cdef SlepcPEPConv conv = PEP_CONV_REL * CHKERR( PEPGetConvergenceTest(self.pep, &conv) ) # <<<<<<<<<<<<<< * return conv * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConvergenceTest(__pyx_v_self->pep, (&__pyx_v_conv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 433, __pyx_L1_error) /* "SLEPc/PEP.pyx":434 * cdef SlepcPEPConv conv = PEP_CONV_REL * CHKERR( PEPGetConvergenceTest(self.pep, &conv) ) * return conv # <<<<<<<<<<<<<< * * def setConvergenceTest(self, conv): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPConv(__pyx_v_conv); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":421 * CHKERR( PEPSetTolerances(self.pep, rval, ival) ) * * def getConvergenceTest(self): # <<<<<<<<<<<<<< * """ * Return the method used to compute the error estimate */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":436 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_40setConvergenceTest[] = "PEP.setConvergenceTest(self, conv)\n\n Specifies how to compute the error estimate \n used in the convergence test. \n\n Parameters\n ----------\n conv: PEP.Conv\n The method used to compute the error estimate \n used in the convergence test.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_conv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setConvergenceTest (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConvergenceTest") < 0)) __PYX_ERR(15, 436, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_conv = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setConvergenceTest", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 436, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_conv); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_conv) { PEPConv __pyx_v_tconv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPConv __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setConvergenceTest", 0); /* "SLEPc/PEP.pyx":447 * used in the convergence test. * """ * cdef SlepcPEPConv tconv = conv # <<<<<<<<<<<<<< * CHKERR( PEPSetConvergenceTest(self.pep, tconv) ) * */ __pyx_t_1 = ((PEPConv)__Pyx_PyInt_As_PEPConv(__pyx_v_conv)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 447, __pyx_L1_error) __pyx_v_tconv = __pyx_t_1; /* "SLEPc/PEP.pyx":448 * """ * cdef SlepcPEPConv tconv = conv * CHKERR( PEPSetConvergenceTest(self.pep, tconv) ) # <<<<<<<<<<<<<< * * def getRefine(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetConvergenceTest(__pyx_v_self->pep, __pyx_v_tconv)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 448, __pyx_L1_error) /* "SLEPc/PEP.pyx":436 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":450 * CHKERR( PEPSetConvergenceTest(self.pep, tconv) ) * * def getRefine(self): # <<<<<<<<<<<<<< * """ * Gets the refinement strategy used by the PEP object, */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_42getRefine[] = "PEP.getRefine(self)\n\n Gets the refinement strategy used by the PEP object, \n and the associated parameters. \n\n Returns\n -------\n ref: PEP.Refine\n The refinement type.\n npart: int\n The number of partitions of the communicator.\n tol: real\n The convergence tolerance.\n its: int\n The maximum number of refinement iterations.\n scheme: PEP.RefineScheme\n Scheme for solving linear systems\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRefine (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRefine", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRefine", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(struct PySlepcPEPObject *__pyx_v_self) { PEPRefine __pyx_v_ref; PetscInt __pyx_v_npart; PetscReal __pyx_v_tol; PetscInt __pyx_v_its; PEPRefineScheme __pyx_v_scheme; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getRefine", 0); /* "SLEPc/PEP.pyx":468 * Scheme for solving linear systems * """ * cdef SlepcPEPRefine ref = PEP_REFINE_NONE # <<<<<<<<<<<<<< * cdef PetscInt npart = 1 * cdef PetscReal tol = PETSC_DEFAULT */ __pyx_v_ref = PEP_REFINE_NONE; /* "SLEPc/PEP.pyx":469 * """ * cdef SlepcPEPRefine ref = PEP_REFINE_NONE * cdef PetscInt npart = 1 # <<<<<<<<<<<<<< * cdef PetscReal tol = PETSC_DEFAULT * cdef PetscInt its = PETSC_DEFAULT */ __pyx_v_npart = 1; /* "SLEPc/PEP.pyx":470 * cdef SlepcPEPRefine ref = PEP_REFINE_NONE * cdef PetscInt npart = 1 * cdef PetscReal tol = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt its = PETSC_DEFAULT * cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE */ __pyx_v_tol = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":471 * cdef PetscInt npart = 1 * cdef PetscReal tol = PETSC_DEFAULT * cdef PetscInt its = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE * CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) ) */ __pyx_v_its = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":472 * cdef PetscReal tol = PETSC_DEFAULT * cdef PetscInt its = PETSC_DEFAULT * cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) ) * return (ref, toInt(npart), toReal(tol), toInt(its), scheme) */ __pyx_v_scheme = PEP_REFINE_SCHEME_MBE; /* "SLEPc/PEP.pyx":473 * cdef PetscInt its = PETSC_DEFAULT * cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE * CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) ) # <<<<<<<<<<<<<< * return (ref, toInt(npart), toReal(tol), toInt(its), scheme) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRefine(__pyx_v_self->pep, (&__pyx_v_ref), (&__pyx_v_npart), (&__pyx_v_tol), (&__pyx_v_its), (&__pyx_v_scheme))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 473, __pyx_L1_error) /* "SLEPc/PEP.pyx":474 * cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE * CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) ) * return (ref, toInt(npart), toReal(tol), toInt(its), scheme) # <<<<<<<<<<<<<< * * def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPRefine(__pyx_v_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_npart); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_tol); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_PEPRefineScheme(__pyx_v_scheme); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_6); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":450 * CHKERR( PEPSetConvergenceTest(self.pep, tconv) ) * * def getRefine(self): # <<<<<<<<<<<<<< * """ * Gets the refinement strategy used by the PEP object, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getRefine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":476 * return (ref, toInt(npart), toReal(tol), toInt(its), scheme) * * def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None): # <<<<<<<<<<<<<< * """ * Sets the refinement strategy used by the PEP object, */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_44setRefine[] = "PEP.setRefine(self, ref, npart=None, tol=None, its=None, scheme=None)\n\n Sets the refinement strategy used by the PEP object, \n and the associated parameters. \n\n Parameters\n ----------\n ref: PEP.Refine\n The refinement type.\n npart: int, optional\n The number of partitions of the communicator.\n tol: real, optional\n The convergence tolerance.\n its: int, optional\n The maximum number of refinement iterations.\n scheme: PEP.RefineScheme, optional\n Scheme for linear system solves\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ref = 0; PyObject *__pyx_v_npart = 0; PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_its = 0; PyObject *__pyx_v_scheme = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRefine (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_npart,&__pyx_n_s_tol,&__pyx_n_s_its,&__pyx_n_s_scheme,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_npart); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_its); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scheme); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRefine") < 0)) __PYX_ERR(15, 476, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ref = values[0]; __pyx_v_npart = values[1]; __pyx_v_tol = values[2]; __pyx_v_its = values[3]; __pyx_v_scheme = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRefine", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 476, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRefine", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_npart, __pyx_v_tol, __pyx_v_its, __pyx_v_scheme); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme) { PEPRefine __pyx_v_tref; PetscInt __pyx_v_tnpart; PetscReal __pyx_v_ttol; PetscInt __pyx_v_tits; PEPRefineScheme __pyx_v_tscheme; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPRefine __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PetscInt __pyx_t_4; PetscReal __pyx_t_5; PEPRefineScheme __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setRefine", 0); /* "SLEPc/PEP.pyx":494 * Scheme for linear system solves * """ * cdef SlepcPEPRefine tref = ref # <<<<<<<<<<<<<< * cdef PetscInt tnpart = 1 * cdef PetscReal ttol = PETSC_DEFAULT */ __pyx_t_1 = ((PEPRefine)__Pyx_PyInt_As_PEPRefine(__pyx_v_ref)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 494, __pyx_L1_error) __pyx_v_tref = __pyx_t_1; /* "SLEPc/PEP.pyx":495 * """ * cdef SlepcPEPRefine tref = ref * cdef PetscInt tnpart = 1 # <<<<<<<<<<<<<< * cdef PetscReal ttol = PETSC_DEFAULT * cdef PetscInt tits = PETSC_DEFAULT */ __pyx_v_tnpart = 1; /* "SLEPc/PEP.pyx":496 * cdef SlepcPEPRefine tref = ref * cdef PetscInt tnpart = 1 * cdef PetscReal ttol = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt tits = PETSC_DEFAULT * cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE */ __pyx_v_ttol = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":497 * cdef PetscInt tnpart = 1 * cdef PetscReal ttol = PETSC_DEFAULT * cdef PetscInt tits = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE * if npart is not None: tnpart = asInt(npart) */ __pyx_v_tits = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":498 * cdef PetscReal ttol = PETSC_DEFAULT * cdef PetscInt tits = PETSC_DEFAULT * cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * if npart is not None: tnpart = asInt(npart) * if tol is not None: ttol = asReal(tol) */ __pyx_v_tscheme = PEP_REFINE_SCHEME_MBE; /* "SLEPc/PEP.pyx":499 * cdef PetscInt tits = PETSC_DEFAULT * cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE * if npart is not None: tnpart = asInt(npart) # <<<<<<<<<<<<<< * if tol is not None: ttol = asReal(tol) * if its is not None: tits = asInt(its) */ __pyx_t_2 = (__pyx_v_npart != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_npart); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 499, __pyx_L1_error) __pyx_v_tnpart = __pyx_t_4; } /* "SLEPc/PEP.pyx":500 * cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE * if npart is not None: tnpart = asInt(npart) * if tol is not None: ttol = asReal(tol) # <<<<<<<<<<<<<< * if its is not None: tits = asInt(its) * if scheme is not None: tscheme = scheme */ __pyx_t_3 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_5 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 500, __pyx_L1_error) __pyx_v_ttol = __pyx_t_5; } /* "SLEPc/PEP.pyx":501 * if npart is not None: tnpart = asInt(npart) * if tol is not None: ttol = asReal(tol) * if its is not None: tits = asInt(its) # <<<<<<<<<<<<<< * if scheme is not None: tscheme = scheme * CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) */ __pyx_t_2 = (__pyx_v_its != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_its); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 501, __pyx_L1_error) __pyx_v_tits = __pyx_t_4; } /* "SLEPc/PEP.pyx":502 * if tol is not None: ttol = asReal(tol) * if its is not None: tits = asInt(its) * if scheme is not None: tscheme = scheme # <<<<<<<<<<<<<< * CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) * */ __pyx_t_3 = (__pyx_v_scheme != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_6 = ((PEPRefineScheme)__Pyx_PyInt_As_PEPRefineScheme(__pyx_v_scheme)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 502, __pyx_L1_error) __pyx_v_tscheme = __pyx_t_6; } /* "SLEPc/PEP.pyx":503 * if its is not None: tits = asInt(its) * if scheme is not None: tscheme = scheme * CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) # <<<<<<<<<<<<<< * * def getTrackAll(self): */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetRefine(__pyx_v_self->pep, __pyx_v_tref, __pyx_v_tnpart, __pyx_v_ttol, __pyx_v_tits, __pyx_v_tscheme)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 503, __pyx_L1_error) /* "SLEPc/PEP.pyx":476 * return (ref, toInt(npart), toReal(tol), toInt(its), scheme) * * def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None): # <<<<<<<<<<<<<< * """ * Sets the refinement strategy used by the PEP object, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRefine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":505 * CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_46getTrackAll[] = "PEP.getTrackAll(self)\n\n Returns the flag indicating whether all residual norms must be\n computed or not.\n\n Returns\n -------\n trackall: bool\n Whether the solver compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/PEP.pyx":515 * Whether the solver compute all residuals or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPGetTrackAll(self.pep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/PEP.pyx":516 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPGetTrackAll(self.pep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetTrackAll(__pyx_v_self->pep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 516, __pyx_L1_error) /* "SLEPc/PEP.pyx":517 * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPGetTrackAll(self.pep, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTrackAll(self, trackall): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":505 * CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":519 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_48setTrackAll[] = "PEP.setTrackAll(self, trackall)\n\n Specifies if the solver must compute the residual of all\n approximate eigenpairs or not.\n\n Parameters\n ----------\n trackall: bool\n Whether compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trackall = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(15, 519, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_trackall = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 519, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_trackall); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_trackall) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/PEP.pyx":529 * Whether compute all residuals or not. * """ * cdef PetscBool tval = trackall # <<<<<<<<<<<<<< * CHKERR( PEPSetTrackAll(self.pep, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 529, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/PEP.pyx":530 * """ * cdef PetscBool tval = trackall * CHKERR( PEPSetTrackAll(self.pep, tval) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetTrackAll(__pyx_v_self->pep, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 530, __pyx_L1_error) /* "SLEPc/PEP.pyx":519 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":532 * CHKERR( PEPSetTrackAll(self.pep, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_50getDimensions[] = "PEP.getDimensions(self)\n\n Gets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Returns\n -------\n nev: int\n Number of eigenvalues to compute.\n ncv: int\n Maximum dimension of the subspace to be used by the solver.\n mpd: int\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/PEP.pyx":546 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/PEP.pyx":547 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/PEP.pyx":548 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/PEP.pyx":549 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetDimensions(__pyx_v_self->pep, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 549, __pyx_L1_error) /* "SLEPc/PEP.pyx":550 * cdef PetscInt ival3 = 0 * CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * def setDimensions(self, nev=None, ncv=None, mpd=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":532 * CHKERR( PEPSetTrackAll(self.pep, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":552 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_52setDimensions[] = "PEP.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n Sets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Parameters\n ----------\n nev: int, optional\n Number of eigenvalues to compute.\n ncv: int, optional\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int, optional\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nev = 0; PyObject *__pyx_v_ncv = 0; PyObject *__pyx_v_mpd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(15, 552, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_nev = values[0]; __pyx_v_ncv = values[1]; __pyx_v_mpd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 552, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/PEP.pyx":567 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":568 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":569 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT # <<<<<<<<<<<<<< * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) */ __pyx_v_ival3 = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":570 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) # <<<<<<<<<<<<<< * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) */ __pyx_t_1 = (__pyx_v_nev != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 570, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/PEP.pyx":571 * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) # <<<<<<<<<<<<<< * if mpd is not None: ival3 = asInt(mpd) * CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) */ __pyx_t_2 = (__pyx_v_ncv != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 571, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/PEP.pyx":572 * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) # <<<<<<<<<<<<<< * CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) * */ __pyx_t_1 = (__pyx_v_mpd != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 572, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/PEP.pyx":573 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getST(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetDimensions(__pyx_v_self->pep, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 573, __pyx_L1_error) /* "SLEPc/PEP.pyx":552 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":575 * CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) * * def getST(self): # <<<<<<<<<<<<<< * """ * Obtain the spectral transformation (`ST`) object associated to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_54getST[] = "PEP.getST(self)\n\n Obtain the spectral transformation (`ST`) object associated to\n the eigensolver object.\n\n Returns\n -------\n st: ST\n The spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getST (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getST", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getST", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(struct PySlepcPEPObject *__pyx_v_self) { struct PySlepcSTObject *__pyx_v_st = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getST", 0); /* "SLEPc/PEP.pyx":585 * The spectral transformation. * """ * cdef ST st = ST() # <<<<<<<<<<<<<< * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":586 * """ * cdef ST st = ST() * CHKERR( PEPGetST(self.pep, &st.st) ) # <<<<<<<<<<<<<< * PetscINCREF(st.obj) * return st */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetST(__pyx_v_self->pep, (&__pyx_v_st->st))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 586, __pyx_L1_error) /* "SLEPc/PEP.pyx":587 * cdef ST st = ST() * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) # <<<<<<<<<<<<<< * return st * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj); /* "SLEPc/PEP.pyx":588 * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) * return st # <<<<<<<<<<<<<< * * def setST(self, ST st not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_st)); __pyx_r = ((PyObject *)__pyx_v_st); goto __pyx_L0; /* "SLEPc/PEP.pyx":575 * CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) ) * * def getST(self): # <<<<<<<<<<<<<< * """ * Obtain the spectral transformation (`ST`) object associated to */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getST", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_st); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":590 * return st * * def setST(self, ST st not None): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_56setST[] = "PEP.setST(self, ST st)\n\n Associates a spectral transformation object to the\n eigensolver.\n\n Parameters\n ----------\n st: ST\n The spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcSTObject *__pyx_v_st = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setST (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setST") < 0)) __PYX_ERR(15, 590, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_st = ((struct PySlepcSTObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setST", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 590, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setST", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), __pyx_ptype_8slepc4py_5SLEPc_ST, 0, "st", 0))) __PYX_ERR(15, 590, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_st); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setST", 0); /* "SLEPc/PEP.pyx":600 * The spectral transformation. * """ * CHKERR( PEPSetST(self.pep, st.st) ) # <<<<<<<<<<<<<< * * def getScale(self, Vec Dl=None, Vec Dr=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetST(__pyx_v_self->pep, __pyx_v_st->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 600, __pyx_L1_error) /* "SLEPc/PEP.pyx":590 * return st * * def setST(self, ST st not None): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setST", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":602 * CHKERR( PEPSetST(self.pep, st.st) ) * * def getScale(self, Vec Dl=None, Vec Dr=None): # <<<<<<<<<<<<<< * """ * Gets the strategy used for scaling the polynomial eigenproblem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_58getScale[] = "PEP.getScale(self, Vec Dl=None, Vec Dr=None)\n\n Gets the strategy used for scaling the polynomial eigenproblem.\n\n Parameters\n ----------\n Dl: Vec, optional\n Placeholder for the returned left diagonal matrix.\n Dr: Vec, optional\n Placeholder for the returned right diagonal matrix.\n\n Returns\n -------\n scale: `PEP.Scale` enumerate\n The scaling strategy.\n alpha: real\n The scaling factor.\n its: integer\n The number of iteration of diagonal scaling.\n lbda: real\n Approximation of the wanted eigenvalues (modulus).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_Dl = 0; struct PyPetscVecObject *__pyx_v_Dr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getScale (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Dl,&__pyx_n_s_Dr,0}; PyObject* values[2] = {0,0}; values[0] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dl); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dr); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScale") < 0)) __PYX_ERR(15, 602, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_Dl = ((struct PyPetscVecObject *)values[0]); __pyx_v_Dr = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getScale", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 602, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dl), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dl", 0))) __PYX_ERR(15, 602, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(15, 602, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_Dl, __pyx_v_Dr); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr) { PEPScale __pyx_v_scale; PetscReal __pyx_v_alpha; PetscInt __pyx_v_its; PetscReal __pyx_v_lbda; Vec __pyx_v_vecl; Vec __pyx_v_vecr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getScale", 0); /* "SLEPc/PEP.pyx":624 * Approximation of the wanted eigenvalues (modulus). * """ * cdef SlepcPEPScale scale = PEP_SCALE_NONE # <<<<<<<<<<<<<< * cdef PetscReal alpha = 0 * cdef PetscInt its = 0 */ __pyx_v_scale = PEP_SCALE_NONE; /* "SLEPc/PEP.pyx":625 * """ * cdef SlepcPEPScale scale = PEP_SCALE_NONE * cdef PetscReal alpha = 0 # <<<<<<<<<<<<<< * cdef PetscInt its = 0 * cdef PetscReal lbda = 0 */ __pyx_v_alpha = 0.0; /* "SLEPc/PEP.pyx":626 * cdef SlepcPEPScale scale = PEP_SCALE_NONE * cdef PetscReal alpha = 0 * cdef PetscInt its = 0 # <<<<<<<<<<<<<< * cdef PetscReal lbda = 0 * cdef PetscVec vecl = NULL */ __pyx_v_its = 0; /* "SLEPc/PEP.pyx":627 * cdef PetscReal alpha = 0 * cdef PetscInt its = 0 * cdef PetscReal lbda = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL */ __pyx_v_lbda = 0.0; /* "SLEPc/PEP.pyx":628 * cdef PetscInt its = 0 * cdef PetscReal lbda = 0 * cdef PetscVec vecl = NULL # <<<<<<<<<<<<<< * cdef PetscVec vecr = NULL * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) */ __pyx_v_vecl = NULL; /* "SLEPc/PEP.pyx":629 * cdef PetscReal lbda = 0 * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) * if Dl.vec != NULL: */ __pyx_v_vecr = NULL; /* "SLEPc/PEP.pyx":630 * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) # <<<<<<<<<<<<<< * if Dl.vec != NULL: * if vecl != NULL: */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetScale(__pyx_v_self->pep, (&__pyx_v_scale), (&__pyx_v_alpha), (&__pyx_v_vecl), (&__pyx_v_vecr), (&__pyx_v_its), (&__pyx_v_lbda))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 630, __pyx_L1_error) /* "SLEPc/PEP.pyx":631 * cdef PetscVec vecr = NULL * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) * if Dl.vec != NULL: # <<<<<<<<<<<<<< * if vecl != NULL: * CHKERR( VecCopy(vecl, Dl.vec) ) */ __pyx_t_2 = ((__pyx_v_Dl->vec != NULL) != 0); if (__pyx_t_2) { /* "SLEPc/PEP.pyx":632 * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) * if Dl.vec != NULL: * if vecl != NULL: # <<<<<<<<<<<<<< * CHKERR( VecCopy(vecl, Dl.vec) ) * else: */ __pyx_t_2 = ((__pyx_v_vecl != NULL) != 0); if (__pyx_t_2) { /* "SLEPc/PEP.pyx":633 * if Dl.vec != NULL: * if vecl != NULL: * CHKERR( VecCopy(vecl, Dl.vec) ) # <<<<<<<<<<<<<< * else: * CHKERR( VecSet(Dl.vec, 1.0) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecCopy(__pyx_v_vecl, __pyx_v_Dl->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 633, __pyx_L1_error) /* "SLEPc/PEP.pyx":632 * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) * if Dl.vec != NULL: * if vecl != NULL: # <<<<<<<<<<<<<< * CHKERR( VecCopy(vecl, Dl.vec) ) * else: */ goto __pyx_L4; } /* "SLEPc/PEP.pyx":635 * CHKERR( VecCopy(vecl, Dl.vec) ) * else: * CHKERR( VecSet(Dl.vec, 1.0) ) # <<<<<<<<<<<<<< * if Dr.vec != NULL: * if vecr != NULL: */ /*else*/ { __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecSet(__pyx_v_Dl->vec, 1.0)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 635, __pyx_L1_error) } __pyx_L4:; /* "SLEPc/PEP.pyx":631 * cdef PetscVec vecr = NULL * CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) ) * if Dl.vec != NULL: # <<<<<<<<<<<<<< * if vecl != NULL: * CHKERR( VecCopy(vecl, Dl.vec) ) */ } /* "SLEPc/PEP.pyx":636 * else: * CHKERR( VecSet(Dl.vec, 1.0) ) * if Dr.vec != NULL: # <<<<<<<<<<<<<< * if vecr != NULL: * CHKERR( VecCopy(vecr, Dr.vec) ) */ __pyx_t_2 = ((__pyx_v_Dr->vec != NULL) != 0); if (__pyx_t_2) { /* "SLEPc/PEP.pyx":637 * CHKERR( VecSet(Dl.vec, 1.0) ) * if Dr.vec != NULL: * if vecr != NULL: # <<<<<<<<<<<<<< * CHKERR( VecCopy(vecr, Dr.vec) ) * else: */ __pyx_t_2 = ((__pyx_v_vecr != NULL) != 0); if (__pyx_t_2) { /* "SLEPc/PEP.pyx":638 * if Dr.vec != NULL: * if vecr != NULL: * CHKERR( VecCopy(vecr, Dr.vec) ) # <<<<<<<<<<<<<< * else: * CHKERR( VecSet(Dr.vec, 1.0) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecCopy(__pyx_v_vecr, __pyx_v_Dr->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 638, __pyx_L1_error) /* "SLEPc/PEP.pyx":637 * CHKERR( VecSet(Dl.vec, 1.0) ) * if Dr.vec != NULL: * if vecr != NULL: # <<<<<<<<<<<<<< * CHKERR( VecCopy(vecr, Dr.vec) ) * else: */ goto __pyx_L6; } /* "SLEPc/PEP.pyx":640 * CHKERR( VecCopy(vecr, Dr.vec) ) * else: * CHKERR( VecSet(Dr.vec, 1.0) ) # <<<<<<<<<<<<<< * CHKERR( VecDestroy(&vecl) ) * CHKERR( VecDestroy(&vecr) ) */ /*else*/ { __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecSet(__pyx_v_Dr->vec, 1.0)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 640, __pyx_L1_error) } __pyx_L6:; /* "SLEPc/PEP.pyx":636 * else: * CHKERR( VecSet(Dl.vec, 1.0) ) * if Dr.vec != NULL: # <<<<<<<<<<<<<< * if vecr != NULL: * CHKERR( VecCopy(vecr, Dr.vec) ) */ } /* "SLEPc/PEP.pyx":641 * else: * CHKERR( VecSet(Dr.vec, 1.0) ) * CHKERR( VecDestroy(&vecl) ) # <<<<<<<<<<<<<< * CHKERR( VecDestroy(&vecr) ) * return (scale, toReal(alpha), toInt(its), toReal(lbda)) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDestroy((&__pyx_v_vecl))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 641, __pyx_L1_error) /* "SLEPc/PEP.pyx":642 * CHKERR( VecSet(Dr.vec, 1.0) ) * CHKERR( VecDestroy(&vecl) ) * CHKERR( VecDestroy(&vecr) ) # <<<<<<<<<<<<<< * return (scale, toReal(alpha), toInt(its), toReal(lbda)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDestroy((&__pyx_v_vecr))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 642, __pyx_L1_error) /* "SLEPc/PEP.pyx":643 * CHKERR( VecDestroy(&vecl) ) * CHKERR( VecDestroy(&vecr) ) * return (scale, toReal(alpha), toInt(its), toReal(lbda)) # <<<<<<<<<<<<<< * * def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_PEPScale(__pyx_v_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_alpha); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_lbda); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":602 * CHKERR( PEPSetST(self.pep, st.st) ) * * def getScale(self, Vec Dl=None, Vec Dr=None): # <<<<<<<<<<<<<< * """ * Gets the strategy used for scaling the polynomial eigenproblem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":645 * return (scale, toReal(alpha), toInt(its), toReal(lbda)) * * def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None): # <<<<<<<<<<<<<< * """ * Sets the scaling strategy to be used for scaling the polynomial problem */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_60setScale[] = "PEP.setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None)\n\n Sets the scaling strategy to be used for scaling the polynomial problem\n before attempting to solve.\n\n Parameters\n ----------\n scale: `PEP.Scale` enumerate\n The scaling strategy.\n alpha: real, optional\n The scaling factor.\n Dl: Vec, optional\n The left diagonal matrix.\n Dr: Vec, optional\n The right diagonal matrix.\n its: integer, optional\n The number of iteration of diagonal scaling.\n lbda: real, optional\n Approximation of the wanted eigenvalues (modulus).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_scale = 0; PyObject *__pyx_v_alpha = 0; struct PyPetscVecObject *__pyx_v_Dl = 0; struct PyPetscVecObject *__pyx_v_Dr = 0; PyObject *__pyx_v_its = 0; PyObject *__pyx_v_lbda = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setScale (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scale,&__pyx_n_s_alpha,&__pyx_n_s_Dl,&__pyx_n_s_Dr,&__pyx_n_s_its,&__pyx_n_s_lbda,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[3] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scale)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dl); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dr); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_its); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lbda); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScale") < 0)) __PYX_ERR(15, 645, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_scale = values[0]; __pyx_v_alpha = values[1]; __pyx_v_Dl = ((struct PyPetscVecObject *)values[2]); __pyx_v_Dr = ((struct PyPetscVecObject *)values[3]); __pyx_v_its = values[4]; __pyx_v_lbda = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setScale", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 645, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dl), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dl", 0))) __PYX_ERR(15, 645, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(15, 645, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_scale, __pyx_v_alpha, __pyx_v_Dl, __pyx_v_Dr, __pyx_v_its, __pyx_v_lbda); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_alpha, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr, PyObject *__pyx_v_its, PyObject *__pyx_v_lbda) { PEPScale __pyx_v_senum; PetscReal __pyx_v_rval1; PetscInt __pyx_v_ival; PetscReal __pyx_v_rval2; Vec __pyx_v_vecl; Vec __pyx_v_vecr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PEPScale __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PetscReal __pyx_t_4; Vec __pyx_t_5; PetscInt __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setScale", 0); /* "SLEPc/PEP.pyx":665 * Approximation of the wanted eigenvalues (modulus). * """ * cdef SlepcPEPScale senum = scale # <<<<<<<<<<<<<< * cdef PetscReal rval1 = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT */ __pyx_t_1 = ((PEPScale)__Pyx_PyInt_As_PEPScale(__pyx_v_scale)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 665, __pyx_L1_error) __pyx_v_senum = __pyx_t_1; /* "SLEPc/PEP.pyx":666 * """ * cdef SlepcPEPScale senum = scale * cdef PetscReal rval1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval2 = PETSC_DEFAULT */ __pyx_v_rval1 = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":667 * cdef SlepcPEPScale senum = scale * cdef PetscReal rval1 = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscReal rval2 = PETSC_DEFAULT * cdef PetscVec vecl = NULL */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":668 * cdef PetscReal rval1 = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL */ __pyx_v_rval2 = PETSC_DEFAULT; /* "SLEPc/PEP.pyx":669 * cdef PetscInt ival = PETSC_DEFAULT * cdef PetscReal rval2 = PETSC_DEFAULT * cdef PetscVec vecl = NULL # <<<<<<<<<<<<<< * cdef PetscVec vecr = NULL * if alpha is not None: rval1 = asReal(alpha) */ __pyx_v_vecl = NULL; /* "SLEPc/PEP.pyx":670 * cdef PetscReal rval2 = PETSC_DEFAULT * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * if alpha is not None: rval1 = asReal(alpha) * if Dl is not None: vecl = Dl.vec */ __pyx_v_vecr = NULL; /* "SLEPc/PEP.pyx":671 * cdef PetscVec vecl = NULL * cdef PetscVec vecr = NULL * if alpha is not None: rval1 = asReal(alpha) # <<<<<<<<<<<<<< * if Dl is not None: vecl = Dl.vec * if Dr is not None: vecr = Dr.vec */ __pyx_t_2 = (__pyx_v_alpha != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_alpha); if (unlikely(__pyx_t_4 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 671, __pyx_L1_error) __pyx_v_rval1 = __pyx_t_4; } /* "SLEPc/PEP.pyx":672 * cdef PetscVec vecr = NULL * if alpha is not None: rval1 = asReal(alpha) * if Dl is not None: vecl = Dl.vec # <<<<<<<<<<<<<< * if Dr is not None: vecr = Dr.vec * if its is not None: ival = asInt(its) */ __pyx_t_3 = (((PyObject *)__pyx_v_Dl) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_5 = __pyx_v_Dl->vec; __pyx_v_vecl = __pyx_t_5; } /* "SLEPc/PEP.pyx":673 * if alpha is not None: rval1 = asReal(alpha) * if Dl is not None: vecl = Dl.vec * if Dr is not None: vecr = Dr.vec # <<<<<<<<<<<<<< * if its is not None: ival = asInt(its) * if lbda is not None: rval2 = asReal(lbda) */ __pyx_t_2 = (((PyObject *)__pyx_v_Dr) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_5 = __pyx_v_Dr->vec; __pyx_v_vecr = __pyx_t_5; } /* "SLEPc/PEP.pyx":674 * if Dl is not None: vecl = Dl.vec * if Dr is not None: vecr = Dr.vec * if its is not None: ival = asInt(its) # <<<<<<<<<<<<<< * if lbda is not None: rval2 = asReal(lbda) * CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) */ __pyx_t_3 = (__pyx_v_its != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_its); if (unlikely(__pyx_t_6 == -1L && PyErr_Occurred())) __PYX_ERR(15, 674, __pyx_L1_error) __pyx_v_ival = __pyx_t_6; } /* "SLEPc/PEP.pyx":675 * if Dr is not None: vecr = Dr.vec * if its is not None: ival = asInt(its) * if lbda is not None: rval2 = asReal(lbda) # <<<<<<<<<<<<<< * CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) * */ __pyx_t_2 = (__pyx_v_lbda != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_lbda); if (unlikely(__pyx_t_4 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 675, __pyx_L1_error) __pyx_v_rval2 = __pyx_t_4; } /* "SLEPc/PEP.pyx":676 * if its is not None: ival = asInt(its) * if lbda is not None: rval2 = asReal(lbda) * CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) # <<<<<<<<<<<<<< * * def getBV(self): */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetScale(__pyx_v_self->pep, __pyx_v_senum, __pyx_v_rval1, __pyx_v_vecl, __pyx_v_vecr, __pyx_v_ival, __pyx_v_rval2)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 676, __pyx_L1_error) /* "SLEPc/PEP.pyx":645 * return (scale, toReal(alpha), toInt(its), toReal(lbda)) * * def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None): # <<<<<<<<<<<<<< * """ * Sets the scaling strategy to be used for scaling the polynomial problem */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":678 * CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors object associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_62getBV[] = "PEP.getBV(self)\n\n Obtain the basis vectors object associated to the eigensolver.\n\n Returns\n -------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBV (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(struct PySlepcPEPObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/PEP.pyx":687 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":688 * """ * cdef BV bv = BV() * CHKERR( PEPGetBV(self.pep, &bv.bv) ) # <<<<<<<<<<<<<< * PetscINCREF(bv.obj) * return bv */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetBV(__pyx_v_self->pep, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 688, __pyx_L1_error) /* "SLEPc/PEP.pyx":689 * cdef BV bv = BV() * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj); /* "SLEPc/PEP.pyx":690 * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/PEP.pyx":678 * CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors object associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_bv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":692 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_64setBV[] = "PEP.setBV(self, BV bv)\n\n Associates a basis vectors object to the eigensolver.\n\n Parameters\n ----------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBV (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(15, 692, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_bv = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 692, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(15, 692, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_bv); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/PEP.pyx":701 * The basis vectors context. * """ * CHKERR( PEPSetBV(self.pep, bv.bv) ) # <<<<<<<<<<<<<< * * def getRG(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetBV(__pyx_v_self->pep, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 701, __pyx_L1_error) /* "SLEPc/PEP.pyx":692 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":703 * CHKERR( PEPSetBV(self.pep, bv.bv) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_66getRG[] = "PEP.getRG(self)\n\n Obtain the region object associated to the eigensolver.\n\n Returns\n -------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRG (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(struct PySlepcPEPObject *__pyx_v_self) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/PEP.pyx":712 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":713 * """ * cdef RG rg = RG() * CHKERR( PEPGetRG(self.pep, &rg.rg) ) # <<<<<<<<<<<<<< * PetscINCREF(rg.obj) * return rg */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRG(__pyx_v_self->pep, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 713, __pyx_L1_error) /* "SLEPc/PEP.pyx":714 * cdef RG rg = RG() * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj); /* "SLEPc/PEP.pyx":715 * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/PEP.pyx":703 * CHKERR( PEPSetBV(self.pep, bv.bv) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":717 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_68setRG[] = "PEP.setRG(self, RG rg)\n\n Associates a region object to the eigensolver.\n\n Parameters\n ----------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRG (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(15, 717, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rg = ((struct PySlepcRGObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 717, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(15, 717, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_rg); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/PEP.pyx":726 * The region context. * """ * CHKERR( PEPSetRG(self.pep, rg.rg) ) # <<<<<<<<<<<<<< * * def getOperators(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetRG(__pyx_v_self->pep, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 726, __pyx_L1_error) /* "SLEPc/PEP.pyx":717 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":728 * CHKERR( PEPSetRG(self.pep, rg.rg) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_70getOperators[] = "PEP.getOperators(self)\n\n Gets the matrices associated with the eigenvalue problem.\n\n Returns\n -------\n operators: tuple of Mat\n The matrices associated with the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOperators (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(struct PySlepcPEPObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; Mat __pyx_v_mat; PetscInt __pyx_v_k; PetscInt __pyx_v_n; PyObject *__pyx_v_operators = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/PEP.pyx":738 * """ * cdef Mat A * cdef PetscMat mat = NULL # <<<<<<<<<<<<<< * cdef PetscInt k=0, n=0 * CHKERR( PEPGetNumMatrices(self.pep, &n) ) */ __pyx_v_mat = NULL; /* "SLEPc/PEP.pyx":739 * cdef Mat A * cdef PetscMat mat = NULL * cdef PetscInt k=0, n=0 # <<<<<<<<<<<<<< * CHKERR( PEPGetNumMatrices(self.pep, &n) ) * cdef object operators = [] */ __pyx_v_k = 0; __pyx_v_n = 0; /* "SLEPc/PEP.pyx":740 * cdef PetscMat mat = NULL * cdef PetscInt k=0, n=0 * CHKERR( PEPGetNumMatrices(self.pep, &n) ) # <<<<<<<<<<<<<< * cdef object operators = [] * for k from 0 <= k < n: */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetNumMatrices(__pyx_v_self->pep, (&__pyx_v_n))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 740, __pyx_L1_error) /* "SLEPc/PEP.pyx":741 * cdef PetscInt k=0, n=0 * CHKERR( PEPGetNumMatrices(self.pep, &n) ) * cdef object operators = [] # <<<<<<<<<<<<<< * for k from 0 <= k < n: * CHKERR( PEPGetOperators(self.pep, k, &mat) ) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_operators = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":742 * CHKERR( PEPGetNumMatrices(self.pep, &n) ) * cdef object operators = [] * for k from 0 <= k < n: # <<<<<<<<<<<<<< * CHKERR( PEPGetOperators(self.pep, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "SLEPc/PEP.pyx":743 * cdef object operators = [] * for k from 0 <= k < n: * CHKERR( PEPGetOperators(self.pep, k, &mat) ) # <<<<<<<<<<<<<< * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetOperators(__pyx_v_self->pep, __pyx_v_k, (&__pyx_v_mat))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 743, __pyx_L1_error) /* "SLEPc/PEP.pyx":744 * for k from 0 <= k < n: * CHKERR( PEPGetOperators(self.pep, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) # <<<<<<<<<<<<<< * operators.append(A) * return tuple(operators) */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_A, ((struct PyPetscMatObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_A->mat = __pyx_v_mat; __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/PEP.pyx":745 * CHKERR( PEPGetOperators(self.pep, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) # <<<<<<<<<<<<<< * return tuple(operators) * */ __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_operators, ((PyObject *)__pyx_v_A)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 745, __pyx_L1_error) } /* "SLEPc/PEP.pyx":746 * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) * return tuple(operators) # <<<<<<<<<<<<<< * * def setOperators(self, operators): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":728 * CHKERR( PEPSetRG(self.pep, rg.rg) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XDECREF(__pyx_v_operators); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":748 * return tuple(operators) * * def setOperators(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_72setOperators[] = "PEP.setOperators(self, operators)\n\n Sets the matrices associated with the eigenvalue problem.\n\n Parameters\n ----------\n operators: sequence of Mat\n The matrices associated with the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_operators = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOperators (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_operators,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operators)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(15, 748, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_operators = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOperators", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 748, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_operators); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_operators) { Mat *__pyx_v_mats; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Mat __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setOperators", 0); __Pyx_INCREF(__pyx_v_operators); /* "SLEPc/PEP.pyx":757 * The matrices associated with the eigensystem. * """ * operators = tuple(operators) # <<<<<<<<<<<<<< * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) */ __pyx_t_1 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":758 * """ * operators = tuple(operators) * cdef PetscMat *mats = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) */ __pyx_v_mats = NULL; /* "SLEPc/PEP.pyx":759 * operators = tuple(operators) * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) # <<<<<<<<<<<<<< * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat */ __pyx_v_k = 0; __pyx_t_2 = PyObject_Length(__pyx_v_operators); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 759, __pyx_L1_error) __pyx_v_n = __pyx_t_2; /* "SLEPc/PEP.pyx":760 * cdef PetscMat *mats = NULL * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) # <<<<<<<<<<<<<< * for k from 0 <= k < n: mats[k] = (operators[k]).mat * CHKERR( PEPSetOperators(self.pep, n, mats) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(Mat))), ((void **)(&__pyx_v_mats))); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":761 * cdef Py_ssize_t k=0, n = len(operators) * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat # <<<<<<<<<<<<<< * CHKERR( PEPSetOperators(self.pep, n, mats) ) * */ __pyx_t_2 = __pyx_v_n; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_2; __pyx_v_k++) { __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_operators, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(15, 761, __pyx_L1_error) __pyx_t_3 = ((struct PyPetscMatObject *)__pyx_t_1)->mat; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (__pyx_v_mats[__pyx_v_k]) = __pyx_t_3; } /* "SLEPc/PEP.pyx":762 * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat * CHKERR( PEPSetOperators(self.pep, n, mats) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetOperators(__pyx_v_self->pep, ((PetscInt)__pyx_v_n), __pyx_v_mats)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 762, __pyx_L1_error) /* "SLEPc/PEP.pyx":748 * return tuple(operators) * * def setOperators(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_operators); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":766 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_74setInitialSpace[] = "PEP.setInitialSpace(self, space)\n\n Sets the initial space from which the eigensolver starts to\n iterate.\n\n Parameters\n ----------\n space: Vec or sequence of Vec\n The initial space\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(15, 766, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_space = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 766, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_space) { Vec *__pyx_v_vs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/PEP.pyx":776 * The initial space * """ * if isinstance(space, Vec): space = [space] # <<<<<<<<<<<<<< * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_space); __Pyx_GIVEREF(__pyx_v_space); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space); __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/PEP.pyx":777 * """ * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) */ __pyx_v_vs = NULL; /* "SLEPc/PEP.pyx":778 * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 778, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/PEP.pyx":779 * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) # <<<<<<<<<<<<<< * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( PEPSetInitialSpace(self.pep, ns, vs) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":780 * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec # <<<<<<<<<<<<<< * CHKERR( PEPSetInitialSpace(self.pep, ns, vs) ) * */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(15, 780, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/PEP.pyx":781 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( PEPSetInitialSpace(self.pep, ns, vs) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetInitialSpace(__pyx_v_self->pep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 781, __pyx_L1_error) /* "SLEPc/PEP.pyx":766 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_space); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":785 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_76cancelMonitor[] = "PEP.cancelMonitor(self)\n\n Clears all monitors for a PEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/PEP.pyx":789 * Clears all monitors for a PEP object. * """ * CHKERR( PEPMonitorCancel(self.pep) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPMonitorCancel(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 789, __pyx_L1_error) /* "SLEPc/PEP.pyx":785 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a PEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":793 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_78setUp[] = "PEP.setUp(self)\n\n Sets up all the internal data structures necessary for the\n execution of the eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/PEP.pyx":798 * execution of the eigensolver. * """ * CHKERR( PEPSetUp(self.pep) ) # <<<<<<<<<<<<<< * * def solve(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetUp(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 798, __pyx_L1_error) /* "SLEPc/PEP.pyx":793 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":800 * CHKERR( PEPSetUp(self.pep) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_80solve[] = "PEP.solve(self)\n\n Solves the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/PEP.pyx":804 * Solves the eigensystem. * """ * CHKERR( PEPSolve(self.pep) ) # <<<<<<<<<<<<<< * * def getIterationNumber(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSolve(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 804, __pyx_L1_error) /* "SLEPc/PEP.pyx":800 * CHKERR( PEPSetUp(self.pep) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":806 * CHKERR( PEPSolve(self.pep) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_82getIterationNumber[] = "PEP.getIterationNumber(self)\n\n Gets the current iteration number. If the call to `solve()` is\n complete, then it returns the number of iterations carried out\n by the solution method.\n\n Returns\n -------\n its: int\n Iteration number.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/PEP.pyx":817 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetIterationNumber(self.pep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/PEP.pyx":818 * """ * cdef PetscInt ival = 0 * CHKERR( PEPGetIterationNumber(self.pep, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetIterationNumber(__pyx_v_self->pep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 818, __pyx_L1_error) /* "SLEPc/PEP.pyx":819 * cdef PetscInt ival = 0 * CHKERR( PEPGetIterationNumber(self.pep, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getConvergedReason(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":806 * CHKERR( PEPSolve(self.pep) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":821 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_84getConvergedReason[] = "PEP.getConvergedReason(self)\n\n Gets the reason why the `solve()` iteration was stopped.\n\n Returns\n -------\n reason: `PEP.ConvergedReason` enumerate\n Negative value indicates diverged, positive value\n converged.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(struct PySlepcPEPObject *__pyx_v_self) { PEPConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/PEP.pyx":831 * converged. * """ * cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( PEPGetConvergedReason(self.pep, &val) ) * return val */ __pyx_v_val = PEP_CONVERGED_ITERATING; /* "SLEPc/PEP.pyx":832 * """ * cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING * CHKERR( PEPGetConvergedReason(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConvergedReason(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 832, __pyx_L1_error) /* "SLEPc/PEP.pyx":833 * cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING * CHKERR( PEPGetConvergedReason(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PEPConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":821 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":836 * * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_86getConverged[] = "PEP.getConverged(self)\n\n Gets the number of converged eigenpairs.\n\n Returns\n -------\n nconv: int\n Number of converged eigenpairs.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConverged (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/PEP.pyx":845 * Number of converged eigenpairs. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetConverged(self.pep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/PEP.pyx":846 * """ * cdef PetscInt ival = 0 * CHKERR( PEPGetConverged(self.pep, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConverged(__pyx_v_self->pep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 846, __pyx_L1_error) /* "SLEPc/PEP.pyx":847 * cdef PetscInt ival = 0 * CHKERR( PEPGetConverged(self.pep, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":836 * * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":849 * return toInt(ival) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_88getEigenpair[] = "PEP.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n Gets the i-th solution of the eigenproblem as computed by\n `solve()`. The solution consists of both the eigenvalue and\n the eigenvector.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Vr: Vec, optional\n Placeholder for the returned eigenvector (real part).\n Vi: Vec, optional\n Placeholder for the returned eigenvector (imaginary part).\n\n Returns\n -------\n e: scalar (possibly complex)\n The computed eigenvalue.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Vr = 0; struct PyPetscVecObject *__pyx_v_Vi = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(15, 849, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 849, __pyx_L3_error) __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 849, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(15, 849, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(15, 849, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) { PetscScalar __pyx_v_sval1; PetscScalar __pyx_v_sval2; Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/PEP.pyx":869 * The computed eigenvalue. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/PEP.pyx":870 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/PEP.pyx":871 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec */ __pyx_v_vecr = NULL; /* "SLEPc/PEP.pyx":872 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL # <<<<<<<<<<<<<< * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec */ __pyx_v_veci = NULL; /* "SLEPc/PEP.pyx":873 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec # <<<<<<<<<<<<<< * if Vi is not None: veci = Vi.vec * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_Vr->vec; __pyx_v_vecr = __pyx_t_3; } /* "SLEPc/PEP.pyx":874 * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec # <<<<<<<<<<<<<< * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_Vi->vec; __pyx_v_veci = __pyx_t_3; } /* "SLEPc/PEP.pyx":875 * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return complex(toScalar(sval1), toScalar(sval2)) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetEigenpair(__pyx_v_self->pep, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 875, __pyx_L1_error) /* "SLEPc/PEP.pyx":876 * if Vi is not None: veci = Vi.vec * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) # <<<<<<<<<<<<<< * * def getErrorEstimate(self, int i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":849 * return toInt(ival) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":878 * return complex(toScalar(sval1), toScalar(sval2)) * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_90getErrorEstimate[] = "PEP.getErrorEstimate(self, int i)\n\n Returns the error estimate associated to the i-th computed\n eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n\n Returns\n -------\n error: real\n Error estimate.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(15, 878, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 878, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 878, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i) { PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/PEP.pyx":893 * Error estimate. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/PEP.pyx":894 * """ * cdef PetscReal rval = 0 * CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetErrorEstimate(__pyx_v_self->pep, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 894, __pyx_L1_error) /* "SLEPc/PEP.pyx":895 * cdef PetscReal rval = 0 * CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def computeError(self, int i, etype=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":878 * return complex(toScalar(sval1), toScalar(sval2)) * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":897 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_92computeError[] = "PEP.computeError(self, int i, etype=None)\n\n Computes the error (based on the residual norm) associated with the i-th\n computed eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n etype: `PEP.ErrorType` enumerate\n The error type to compute.\n\n Returns\n -------\n error: real\n The error bound, computed in various ways from the\n residual norm ``||P(l)x||_2`` where ``l`` is the\n eigenvalue and ``x`` is the eigenvector.\n\n Notes\n -----\n The index ``i`` should be a value between ``0`` and\n ``nconv-1`` (see `getConverged()`).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("computeError (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(15, 897, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 897, __pyx_L3_error) __pyx_v_etype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 897, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) { PEPErrorType __pyx_v_et; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PEPErrorType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/PEP.pyx":921 * ``nconv-1`` (see `getConverged()`). * """ * cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD # <<<<<<<<<<<<<< * cdef PetscReal rval = 0 * if etype is not None: et = etype */ __pyx_v_et = PEP_ERROR_BACKWARD; /* "SLEPc/PEP.pyx":922 * """ * cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * if etype is not None: et = etype * CHKERR( PEPComputeError(self.pep, i, et, &rval) ) */ __pyx_v_rval = 0.0; /* "SLEPc/PEP.pyx":923 * cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD * cdef PetscReal rval = 0 * if etype is not None: et = etype # <<<<<<<<<<<<<< * CHKERR( PEPComputeError(self.pep, i, et, &rval) ) * return toReal(rval) */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((PEPErrorType)__Pyx_PyInt_As_PEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 923, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/PEP.pyx":924 * cdef PetscReal rval = 0 * if etype is not None: et = etype * CHKERR( PEPComputeError(self.pep, i, et, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPComputeError(__pyx_v_self->pep, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 924, __pyx_L1_error) /* "SLEPc/PEP.pyx":925 * if etype is not None: et = etype * CHKERR( PEPComputeError(self.pep, i, et, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def errorView(self, etype=None, Viewer viewer=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":897 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":927 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_94errorView[] = "PEP.errorView(self, etype=None, Viewer viewer=None)\n\n Displays the errors associated with the computed solution\n (as well as the eigenvalues).\n\n Parameters\n ----------\n etype: `PEP.ErrorType` enumerate, optional\n The error type to compute.\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n\n Notes\n -----\n By default, this function checks the error of all eigenpairs and prints\n the eigenvalues if all of them are below the requested tolerance.\n If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n eigenvalues and corresponding errors is printed.\n\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("errorView (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(15, 927, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_etype = values[0]; __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 927, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(15, 927, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) { PEPErrorType __pyx_v_et; PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PEPErrorType __pyx_t_3; PetscViewer __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/PEP.pyx":948 * * """ * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = NULL */ __pyx_v_et = PEP_ERROR_RELATIVE; /* "SLEPc/PEP.pyx":949 * """ * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((PEPErrorType)__Pyx_PyInt_As_PEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 949, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/PEP.pyx":950 * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( PEPErrorView(self.pep, et, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/PEP.pyx":951 * if etype is not None: et = etype * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( PEPErrorView(self.pep, et, vwr) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_4; } /* "SLEPc/PEP.pyx":952 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( PEPErrorView(self.pep, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPErrorView(__pyx_v_self->pep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(15, 952, __pyx_L1_error) /* "SLEPc/PEP.pyx":927 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":956 * # * * def setLinearEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (EPS) to the polynomial eigenvalue solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_96setLinearEPS[] = "PEP.setLinearEPS(self, EPS eps)\n\n Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.\n\n Parameters\n ----------\n eps: EPS\n The linear eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLinearEPS (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearEPS") < 0)) __PYX_ERR(15, 956, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLinearEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 956, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(15, 956, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_eps); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setLinearEPS", 0); /* "SLEPc/PEP.pyx":965 * The linear eigensolver. * """ * CHKERR( PEPLinearSetEPS(self.pep, eps.eps) ) # <<<<<<<<<<<<<< * * def getLinearEPS(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetEPS(__pyx_v_self->pep, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 965, __pyx_L1_error) /* "SLEPc/PEP.pyx":956 * # * * def setLinearEPS(self, EPS eps not None): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (EPS) to the polynomial eigenvalue solver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":967 * CHKERR( PEPLinearSetEPS(self.pep, eps.eps) ) * * def getLinearEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (EPS) associated to the polynomial */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_98getLinearEPS[] = "PEP.getLinearEPS(self)\n\n Retrieve the eigensolver object (EPS) associated to the polynomial\n eigenvalue solver.\n \n Returns\n -------\n eps: EPS\n The linear eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLinearEPS (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLinearEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearEPS", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(struct PySlepcPEPObject *__pyx_v_self) { struct PySlepcEPSObject *__pyx_v_eps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getLinearEPS", 0); /* "SLEPc/PEP.pyx":977 * The linear eigensolver. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":978 * """ * cdef EPS eps = EPS() * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) # <<<<<<<<<<<<<< * PetscINCREF(eps.obj) * return eps */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetEPS(__pyx_v_self->pep, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 978, __pyx_L1_error) /* "SLEPc/PEP.pyx":979 * cdef EPS eps = EPS() * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj); /* "SLEPc/PEP.pyx":980 * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) * return eps # <<<<<<<<<<<<<< * * def setLinearCompanionForm(self, cform not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_eps)); __pyx_r = ((PyObject *)__pyx_v_eps); goto __pyx_L0; /* "SLEPc/PEP.pyx":967 * CHKERR( PEPLinearSetEPS(self.pep, eps.eps) ) * * def getLinearEPS(self): # <<<<<<<<<<<<<< * """ * Retrieve the eigensolver object (EPS) associated to the polynomial */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_eps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":982 * return eps * * def setLinearCompanionForm(self, cform not None): # <<<<<<<<<<<<<< * """ * Choose between the two companion forms available for the linearization of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm[] = "PEP.setLinearCompanionForm(self, cform)\n\n Choose between the two companion forms available for the linearization of\n a quadratic eigenproblem.\n\n Parameters\n ----------\n cform: integer\n 1 or 2 (first or second companion form).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cform = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLinearCompanionForm (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cform,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cform)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearCompanionForm") < 0)) __PYX_ERR(15, 982, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_cform = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLinearCompanionForm", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 982, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_cform) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "cform"); __PYX_ERR(15, 982, __pyx_L1_error) } __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_cform); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_cform) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setLinearCompanionForm", 0); /* "SLEPc/PEP.pyx":992 * 1 or 2 (first or second companion form). * """ * CHKERR( PEPLinearSetCompanionForm(self.pep, cform) ) # <<<<<<<<<<<<<< * * def getLinearCompanionForm(self): */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_cform); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(15, 992, __pyx_L1_error) __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetCompanionForm(__pyx_v_self->pep, __pyx_t_1)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 992, __pyx_L1_error) /* "SLEPc/PEP.pyx":982 * return eps * * def setLinearCompanionForm(self, cform not None): # <<<<<<<<<<<<<< * """ * Choose between the two companion forms available for the linearization of */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":994 * CHKERR( PEPLinearSetCompanionForm(self.pep, cform) ) * * def getLinearCompanionForm(self): # <<<<<<<<<<<<<< * """ * Returns the number of the companion form that will be used for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm[] = "PEP.getLinearCompanionForm(self)\n\n Returns the number of the companion form that will be used for the\n linearization of a quadratic eigenproblem. \n \n Returns\n -------\n cform: integer\n 1 or 2 (first or second companion form).\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLinearCompanionForm (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLinearCompanionForm", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearCompanionForm", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_cform; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getLinearCompanionForm", 0); /* "SLEPc/PEP.pyx":1004 * 1 or 2 (first or second companion form). * """ * cdef PetscInt cform = 0 # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) ) * return cform */ __pyx_v_cform = 0; /* "SLEPc/PEP.pyx":1005 * """ * cdef PetscInt cform = 0 * CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) ) # <<<<<<<<<<<<<< * return cform * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetCompanionForm(__pyx_v_self->pep, (&__pyx_v_cform))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 1005, __pyx_L1_error) /* "SLEPc/PEP.pyx":1006 * cdef PetscInt cform = 0 * CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) ) * return cform # <<<<<<<<<<<<<< * * def setLinearExplicitMatrix(self, flag not None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_cform); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":994 * CHKERR( PEPLinearSetCompanionForm(self.pep, cform) ) * * def getLinearCompanionForm(self): # <<<<<<<<<<<<<< * """ * Returns the number of the companion form that will be used for the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1008 * return cform * * def setLinearExplicitMatrix(self, flag not None): # <<<<<<<<<<<<<< * """ * Indicate if the matrices A and B for the linearization of the problem */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix[] = "PEP.setLinearExplicitMatrix(self, flag)\n\n Indicate if the matrices A and B for the linearization of the problem\n must be built explicitly.\n\n Parameters\n ----------\n flag: boolean\n boolean flag indicating if the matrices are built explicitly .\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLinearExplicitMatrix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearExplicitMatrix") < 0)) __PYX_ERR(15, 1008, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_flag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setLinearExplicitMatrix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 1008, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_flag) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "flag"); __PYX_ERR(15, 1008, __pyx_L1_error) } __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setLinearExplicitMatrix", 0); /* "SLEPc/PEP.pyx":1018 * boolean flag indicating if the matrices are built explicitly . * """ * cdef PetscBool sval = flag # <<<<<<<<<<<<<< * CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 1018, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/PEP.pyx":1019 * """ * cdef PetscBool sval = flag * CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) # <<<<<<<<<<<<<< * * def getLinearExplicitMatrix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetExplicitMatrix(__pyx_v_self->pep, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 1019, __pyx_L1_error) /* "SLEPc/PEP.pyx":1008 * return cform * * def setLinearExplicitMatrix(self, flag not None): # <<<<<<<<<<<<<< * """ * Indicate if the matrices A and B for the linearization of the problem */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1021 * CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) * * def getLinearExplicitMatrix(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating if the matrices A and B for the linearization */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix[] = "PEP.getLinearExplicitMatrix(self)\n\n Returns the flag indicating if the matrices A and B for the linearization\n are built explicitly.\n \n Returns\n -------\n flag: boolean\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLinearExplicitMatrix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLinearExplicitMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearExplicitMatrix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getLinearExplicitMatrix", 0); /* "SLEPc/PEP.pyx":1030 * flag: boolean * """ * cdef PetscBool sval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) * return sval */ __pyx_v_sval = PETSC_FALSE; /* "SLEPc/PEP.pyx":1031 * """ * cdef PetscBool sval = PETSC_FALSE * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) # <<<<<<<<<<<<<< * return sval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetExplicitMatrix(__pyx_v_self->pep, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 1031, __pyx_L1_error) /* "SLEPc/PEP.pyx":1032 * cdef PetscBool sval = PETSC_FALSE * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) * return sval # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1021 * CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) * * def getLinearExplicitMatrix(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating if the matrices A and B for the linearization */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":96 * RefineScheme = NEPRefineScheme * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.nep * self.nep = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(struct PySlepcNEPObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/NEP.pyx":97 * * def __cinit__(self): * self.obj = &self.nep # <<<<<<<<<<<<<< * self.nep = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->nep)); /* "SLEPc/NEP.pyx":98 * def __cinit__(self): * self.obj = &self.nep * self.nep = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->nep = NULL; /* "SLEPc/NEP.pyx":96 * RefineScheme = NEPRefineScheme * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.nep * self.nep = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":100 * self.nep = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the NEP data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_2view[] = "NEP.view(self, Viewer viewer=None)\n\n Prints the NEP data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(16, 100, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 100, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(16, 100, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_2view(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_2view(struct PySlepcNEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/NEP.pyx":110 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( NEPView(self.nep, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/NEP.pyx":111 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( NEPView(self.nep, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/NEP.pyx":112 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( NEPView(self.nep, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPView(__pyx_v_self->nep, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 112, __pyx_L1_error) /* "SLEPc/NEP.pyx":100 * self.nep = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the NEP data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":114 * CHKERR( NEPView(self.nep, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the NEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_4destroy[] = "NEP.destroy(self)\n\n Destroys the NEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/NEP.pyx":118 * Destroys the NEP object. * """ * CHKERR( NEPDestroy(&self.nep) ) # <<<<<<<<<<<<<< * self.nep = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPDestroy((&__pyx_v_self->nep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 118, __pyx_L1_error) /* "SLEPc/NEP.pyx":119 * """ * CHKERR( NEPDestroy(&self.nep) ) * self.nep = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->nep = NULL; /* "SLEPc/NEP.pyx":120 * CHKERR( NEPDestroy(&self.nep) ) * self.nep = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/NEP.pyx":114 * CHKERR( NEPView(self.nep, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the NEP object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":122 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the NEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_6reset[] = "NEP.reset(self)\n\n Resets the NEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/NEP.pyx":126 * Resets the NEP object. * """ * CHKERR( NEPReset(self.nep) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPReset(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 126, __pyx_L1_error) /* "SLEPc/NEP.pyx":122 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the NEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":128 * CHKERR( NEPReset(self.nep) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the NEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_8create[] = "NEP.create(self, comm=None)\n\n Creates the NEP object.\n\n Parameters\n ----------\n comm: Comm, optional.\n MPI communicator. If not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(16, 128, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 128, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_8create(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_8create(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; NEP __pyx_v_newnep; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/NEP.pyx":138 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcNEP newnep = NULL * CHKERR( NEPCreate(ccomm, &newnep) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 138, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/NEP.pyx":139 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcNEP newnep = NULL # <<<<<<<<<<<<<< * CHKERR( NEPCreate(ccomm, &newnep) ) * SlepcCLEAR(self.obj); self.nep = newnep */ __pyx_v_newnep = NULL; /* "SLEPc/NEP.pyx":140 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcNEP newnep = NULL * CHKERR( NEPCreate(ccomm, &newnep) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.nep = newnep * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPCreate(__pyx_v_ccomm, (&__pyx_v_newnep))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 140, __pyx_L1_error) /* "SLEPc/NEP.pyx":141 * cdef SlepcNEP newnep = NULL * CHKERR( NEPCreate(ccomm, &newnep) ) * SlepcCLEAR(self.obj); self.nep = newnep # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->nep = __pyx_v_newnep; /* "SLEPc/NEP.pyx":142 * CHKERR( NEPCreate(ccomm, &newnep) ) * SlepcCLEAR(self.obj); self.nep = newnep * return self # <<<<<<<<<<<<<< * * def setType(self, nep_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/NEP.pyx":128 * CHKERR( NEPReset(self.nep) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the NEP object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":144 * return self * * def setType(self, nep_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the NEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_10setType[] = "NEP.setType(self, nep_type)\n\n Selects the particular solver to be used in the NEP object.\n\n Parameters\n ----------\n nep_type: `NEP.Type` enumerate\n The solver to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nep_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nep_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nep_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(16, 144, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_nep_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 144, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_nep_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nep_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_nep_type); /* "SLEPc/NEP.pyx":153 * The solver to be used. * """ * cdef SlepcNEPType cval = NULL # <<<<<<<<<<<<<< * nep_type = str2bytes(nep_type, &cval) * CHKERR( NEPSetType(self.nep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/NEP.pyx":154 * """ * cdef SlepcNEPType cval = NULL * nep_type = str2bytes(nep_type, &cval) # <<<<<<<<<<<<<< * CHKERR( NEPSetType(self.nep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_nep_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_nep_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":155 * cdef SlepcNEPType cval = NULL * nep_type = str2bytes(nep_type, &cval) * CHKERR( NEPSetType(self.nep, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetType(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 155, __pyx_L1_error) /* "SLEPc/NEP.pyx":144 * return self * * def setType(self, nep_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the NEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nep_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":157 * CHKERR( NEPSetType(self.nep, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the NEP type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_12getType[] = "NEP.getType(self)\n\n Gets the NEP type of this object.\n\n Returns\n -------\n type: `NEP.Type` enumerate\n The solver currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(struct PySlepcNEPObject *__pyx_v_self) { const char* __pyx_v_nep_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/NEP.pyx":166 * The solver currently being used. * """ * cdef SlepcNEPType nep_type = NULL # <<<<<<<<<<<<<< * CHKERR( NEPGetType(self.nep, &nep_type) ) * return bytes2str(nep_type) */ __pyx_v_nep_type = NULL; /* "SLEPc/NEP.pyx":167 * """ * cdef SlepcNEPType nep_type = NULL * CHKERR( NEPGetType(self.nep, &nep_type) ) # <<<<<<<<<<<<<< * return bytes2str(nep_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetType(__pyx_v_self->nep, (&__pyx_v_nep_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 167, __pyx_L1_error) /* "SLEPc/NEP.pyx":168 * cdef SlepcNEPType nep_type = NULL * CHKERR( NEPGetType(self.nep, &nep_type) ) * return bytes2str(nep_type) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_nep_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":157 * CHKERR( NEPSetType(self.nep, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the NEP type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":170 * return bytes2str(nep_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all NEP options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix[] = "NEP.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all NEP options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this NEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/NEP.pyx":180 * The prefix string set for this NEP object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/NEP.pyx":181 * """ * cdef const_char *prefix = NULL * CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetOptionsPrefix(__pyx_v_self->nep, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 181, __pyx_L1_error) /* "SLEPc/NEP.pyx":182 * cdef const_char *prefix = NULL * CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":170 * return bytes2str(nep_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all NEP options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":184 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all NEP options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix[] = "NEP.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all NEP options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all NEP option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(16, 184, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 184, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/NEP.pyx":194 * The prefix string to prepend to all NEP option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/NEP.pyx":195 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":196 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) # <<<<<<<<<<<<<< * * def appendOptionsPrefix(self, prefix): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetOptionsPrefix(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 196, __pyx_L1_error) /* "SLEPc/NEP.pyx":184 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all NEP options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":198 * CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all NEP options */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix[] = "NEP.appendOptionsPrefix(self, prefix)\n\n Appends to the prefix used for searching for all NEP options\n in the database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all NEP option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(16, 198, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 198, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/NEP.pyx":208 * The prefix string to prepend to all NEP option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/NEP.pyx":209 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":210 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPAppendOptionsPrefix(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 210, __pyx_L1_error) /* "SLEPc/NEP.pyx":198 * CHKERR( NEPSetOptionsPrefix(self.nep, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all NEP options */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":212 * CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets NEP options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_20setFromOptions[] = "NEP.setFromOptions(self)\n\n Sets NEP options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/NEP.pyx":218 * the solver type. * """ * CHKERR( NEPSetFromOptions(self.nep) ) # <<<<<<<<<<<<<< * * def getWhichEigenpairs(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetFromOptions(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 218, __pyx_L1_error) /* "SLEPc/NEP.pyx":212 * CHKERR( NEPAppendOptionsPrefix(self.nep, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets NEP options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":220 * CHKERR( NEPSetFromOptions(self.nep) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs[] = "NEP.getWhichEigenpairs(self)\n\n Returns which portion of the spectrum is to be sought.\n\n Returns\n -------\n which: `NEP.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self) { NEPWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/NEP.pyx":229 * The portion of the spectrum to be sought by the solver. * """ * cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * CHKERR( NEPGetWhichEigenpairs(self.nep, &val) ) * return val */ __pyx_v_val = NEP_LARGEST_MAGNITUDE; /* "SLEPc/NEP.pyx":230 * """ * cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE * CHKERR( NEPGetWhichEigenpairs(self.nep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetWhichEigenpairs(__pyx_v_self->nep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 230, __pyx_L1_error) /* "SLEPc/NEP.pyx":231 * cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE * CHKERR( NEPGetWhichEigenpairs(self.nep, &val) ) * return val # <<<<<<<<<<<<<< * * def setWhichEigenpairs(self, which): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_NEPWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":220 * CHKERR( NEPSetFromOptions(self.nep) ) * * def getWhichEigenpairs(self): # <<<<<<<<<<<<<< * """ * Returns which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":233 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs[] = "NEP.setWhichEigenpairs(self, which)\n\n Specifies which portion of the spectrum is to be sought.\n\n Parameters\n ----------\n which: `NEP.Which` enumerate\n The portion of the spectrum to be sought by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_which = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(16, 233, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_which = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 233, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_which); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_which) { NEPWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations NEPWhich __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/NEP.pyx":242 * The portion of the spectrum to be sought by the solver. * """ * cdef SlepcNEPWhich val = which # <<<<<<<<<<<<<< * CHKERR( NEPSetWhichEigenpairs(self.nep, val) ) * */ __pyx_t_1 = ((NEPWhich)__Pyx_PyInt_As_NEPWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 242, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/NEP.pyx":243 * """ * cdef SlepcNEPWhich val = which * CHKERR( NEPSetWhichEigenpairs(self.nep, val) ) # <<<<<<<<<<<<<< * * def getTolerances(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetWhichEigenpairs(__pyx_v_self->nep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 243, __pyx_L1_error) /* "SLEPc/NEP.pyx":233 * return val * * def setWhichEigenpairs(self, which): # <<<<<<<<<<<<<< * """ * Specifies which portion of the spectrum is to be sought. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":245 * CHKERR( NEPSetWhichEigenpairs(self.nep, val) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_26getTolerances[] = "NEP.getTolerances(self)\n\n Gets the tolerance and maximum iteration count used by the\n default NEP convergence tests.\n\n Returns\n -------\n tol: float\n The convergence tolerance.\n maxit: int\n The maximum number of iterations.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(struct PySlepcNEPObject *__pyx_v_self) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/NEP.pyx":257 * The maximum number of iterations. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * CHKERR( NEPGetTolerances(self.nep, &rval, &ival) ) */ __pyx_v_rval = 0.0; /* "SLEPc/NEP.pyx":258 * """ * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetTolerances(self.nep, &rval, &ival) ) * return (toReal(rval), toInt(ival)) */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":259 * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 * CHKERR( NEPGetTolerances(self.nep, &rval, &ival) ) # <<<<<<<<<<<<<< * return (toReal(rval), toInt(ival)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetTolerances(__pyx_v_self->nep, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 259, __pyx_L1_error) /* "SLEPc/NEP.pyx":260 * cdef PetscInt ival = 0 * CHKERR( NEPGetTolerances(self.nep, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, maxit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":245 * CHKERR( NEPSetWhichEigenpairs(self.nep, val) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":262 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, maxit=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used in convergence tests. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_28setTolerances[] = "NEP.setTolerances(self, tol=None, maxit=None)\n\n Sets the tolerance and maximum iteration count used in convergence tests.\n\n Parameters\n ----------\n tol: float, optional\n The convergence tolerance.\n maxit: int, optional\n The maximum number of iterations.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_maxit = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_maxit,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maxit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(16, 262, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_tol = values[0]; __pyx_v_maxit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 262, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_maxit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxit) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscReal __pyx_t_3; PetscInt __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/NEP.pyx":273 * The maximum number of iterations. * """ * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/NEP.pyx":274 * """ * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * if tol is not None: rval = asReal(tol) * if maxit is not None: ival = asInt(maxit) */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/NEP.pyx":275 * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) # <<<<<<<<<<<<<< * if maxit is not None: ival = asInt(maxit) * CHKERR( NEPSetTolerances(self.nep, rval, ival) ) */ __pyx_t_1 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(16, 275, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/NEP.pyx":276 * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) * if maxit is not None: ival = asInt(maxit) # <<<<<<<<<<<<<< * CHKERR( NEPSetTolerances(self.nep, rval, ival) ) * */ __pyx_t_2 = (__pyx_v_maxit != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_maxit); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(16, 276, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/NEP.pyx":277 * if tol is not None: rval = asReal(tol) * if maxit is not None: ival = asInt(maxit) * CHKERR( NEPSetTolerances(self.nep, rval, ival) ) # <<<<<<<<<<<<<< * * def getRIILagPreconditioner(self): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetTolerances(__pyx_v_self->nep, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(16, 277, __pyx_L1_error) /* "SLEPc/NEP.pyx":262 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, maxit=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used in convergence tests. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":279 * CHKERR( NEPSetTolerances(self.nep, rval, ival) ) * * def getRIILagPreconditioner(self): # <<<<<<<<<<<<<< * """ * Indicates how often the preconditioner is rebuilt. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner[] = "NEP.getRIILagPreconditioner(self)\n\n Indicates how often the preconditioner is rebuilt.\n\n Returns\n -------\n lag: int\n The lag parameter.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRIILagPreconditioner (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRIILagPreconditioner", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRIILagPreconditioner", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getRIILagPreconditioner", 0); /* "SLEPc/NEP.pyx":288 * The lag parameter. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) ) * return ival */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":289 * """ * cdef PetscInt ival = 0 * CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) ) # <<<<<<<<<<<<<< * return ival * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPRIIGetLagPreconditioner(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 289, __pyx_L1_error) /* "SLEPc/NEP.pyx":290 * cdef PetscInt ival = 0 * CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) ) * return ival # <<<<<<<<<<<<<< * * def setRIILagPreconditioner(self, lag): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":279 * CHKERR( NEPSetTolerances(self.nep, rval, ival) ) * * def getRIILagPreconditioner(self): # <<<<<<<<<<<<<< * """ * Indicates how often the preconditioner is rebuilt. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":292 * return ival * * def setRIILagPreconditioner(self, lag): # <<<<<<<<<<<<<< * """ * Determines when the preconditioner is rebuilt in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner[] = "NEP.setRIILagPreconditioner(self, lag)\n\n Determines when the preconditioner is rebuilt in the\n nonlinear solve.\n\n Parameters\n ----------\n lag: int\n 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is\n computed within the nonlinear iteration, 2 means every second time\n the Jacobian is built, etc.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRIILagPreconditioner (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRIILagPreconditioner") < 0)) __PYX_ERR(16, 292, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_lag = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRIILagPreconditioner", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 292, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_lag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_lag) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setRIILagPreconditioner", 0); /* "SLEPc/NEP.pyx":304 * the Jacobian is built, etc. * """ * cdef PetscInt ival = lag # <<<<<<<<<<<<<< * CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) ) * */ __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_lag); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(16, 304, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/NEP.pyx":305 * """ * cdef PetscInt ival = lag * CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) ) # <<<<<<<<<<<<<< * * def getTrackAll(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPRIISetLagPreconditioner(__pyx_v_self->nep, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 305, __pyx_L1_error) /* "SLEPc/NEP.pyx":292 * return ival * * def setRIILagPreconditioner(self, lag): # <<<<<<<<<<<<<< * """ * Determines when the preconditioner is rebuilt in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":307 * CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_34getTrackAll[] = "NEP.getTrackAll(self)\n\n Returns the flag indicating whether all residual norms must be\n computed or not.\n\n Returns\n -------\n trackall: bool\n Whether the solver compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(struct PySlepcNEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/NEP.pyx":317 * Whether the solver compute all residuals or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( NEPGetTrackAll(self.nep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/NEP.pyx":318 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( NEPGetTrackAll(self.nep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetTrackAll(__pyx_v_self->nep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 318, __pyx_L1_error) /* "SLEPc/NEP.pyx":319 * cdef PetscBool tval = PETSC_FALSE * CHKERR( NEPGetTrackAll(self.nep, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTrackAll(self, trackall): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":307 * CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) ) * * def getTrackAll(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether all residual norms must be */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":321 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_36setTrackAll[] = "NEP.setTrackAll(self, trackall)\n\n Specifies if the solver must compute the residual of all\n approximate eigenpairs or not.\n\n Parameters\n ----------\n trackall: bool\n Whether compute all residuals or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trackall = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(16, 321, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_trackall = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 321, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_trackall); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_trackall) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/NEP.pyx":331 * Whether compute all residuals or not. * """ * cdef PetscBool tval = trackall # <<<<<<<<<<<<<< * CHKERR( NEPSetTrackAll(self.nep, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 331, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/NEP.pyx":332 * """ * cdef PetscBool tval = trackall * CHKERR( NEPSetTrackAll(self.nep, tval) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetTrackAll(__pyx_v_self->nep, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 332, __pyx_L1_error) /* "SLEPc/NEP.pyx":321 * return tval * * def setTrackAll(self, trackall): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the residual of all */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":334 * CHKERR( NEPSetTrackAll(self.nep, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_38getDimensions[] = "NEP.getDimensions(self)\n\n Gets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Returns\n -------\n nev: int\n Number of eigenvalues to compute.\n ncv: int\n Maximum dimension of the subspace to be used by the solver.\n mpd: int\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(struct PySlepcNEPObject *__pyx_v_self) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/NEP.pyx":348 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 */ __pyx_v_ival1 = 0; /* "SLEPc/NEP.pyx":349 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/NEP.pyx":350 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/NEP.pyx":351 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetDimensions(__pyx_v_self->nep, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 351, __pyx_L1_error) /* "SLEPc/NEP.pyx":352 * cdef PetscInt ival3 = 0 * CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * def setDimensions(self, nev=None, ncv=None, mpd=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":334 * CHKERR( NEPSetTrackAll(self.nep, tval) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":354 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_40setDimensions[] = "NEP.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n Sets the number of eigenvalues to compute and the dimension of\n the subspace.\n\n Parameters\n ----------\n nev: int, optional\n Number of eigenvalues to compute.\n ncv: int, optional\n Maximum dimension of the subspace to be used by the\n solver.\n mpd: int, optional\n Maximum dimension allowed for the projected problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nev = 0; PyObject *__pyx_v_ncv = 0; PyObject *__pyx_v_mpd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(16, 354, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_nev = values[0]; __pyx_v_ncv = values[1]; __pyx_v_mpd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 354, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) { PetscInt __pyx_v_ival1; PetscInt __pyx_v_ival2; PetscInt __pyx_v_ival3; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscInt __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/NEP.pyx":369 * Maximum dimension allowed for the projected problem. * """ * cdef PetscInt ival1 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT */ __pyx_v_ival1 = PETSC_DEFAULT; /* "SLEPc/NEP.pyx":370 * """ * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) */ __pyx_v_ival2 = PETSC_DEFAULT; /* "SLEPc/NEP.pyx":371 * cdef PetscInt ival1 = PETSC_DEFAULT * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT # <<<<<<<<<<<<<< * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) */ __pyx_v_ival3 = PETSC_DEFAULT; /* "SLEPc/NEP.pyx":372 * cdef PetscInt ival2 = PETSC_DEFAULT * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) # <<<<<<<<<<<<<< * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) */ __pyx_t_1 = (__pyx_v_nev != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 372, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/NEP.pyx":373 * cdef PetscInt ival3 = PETSC_DEFAULT * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) # <<<<<<<<<<<<<< * if mpd is not None: ival3 = asInt(mpd) * CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) */ __pyx_t_2 = (__pyx_v_ncv != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 373, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/NEP.pyx":374 * if nev is not None: ival1 = asInt(nev) * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) # <<<<<<<<<<<<<< * CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) * */ __pyx_t_1 = (__pyx_v_mpd != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 374, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/NEP.pyx":375 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getBV(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetDimensions(__pyx_v_self->nep, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 375, __pyx_L1_error) /* "SLEPc/NEP.pyx":354 * return (toInt(ival1), toInt(ival2), toInt(ival3)) * * def setDimensions(self, nev=None, ncv=None, mpd=None): # <<<<<<<<<<<<<< * """ * Sets the number of eigenvalues to compute and the dimension of */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":377 * CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors object associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_42getBV[] = "NEP.getBV(self)\n\n Obtain the basis vectors object associated to the eigensolver.\n\n Returns\n -------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBV (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(struct PySlepcNEPObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/NEP.pyx":386 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":387 * """ * cdef BV bv = BV() * CHKERR( NEPGetBV(self.nep, &bv.bv) ) # <<<<<<<<<<<<<< * PetscINCREF(bv.obj) * return bv */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetBV(__pyx_v_self->nep, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 387, __pyx_L1_error) /* "SLEPc/NEP.pyx":388 * cdef BV bv = BV() * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj); /* "SLEPc/NEP.pyx":389 * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/NEP.pyx":377 * CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vectors object associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_bv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":391 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_44setBV[] = "NEP.setBV(self, BV bv)\n\n Associates a basis vectors object to the eigensolver.\n\n Parameters\n ----------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBV (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(16, 391, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_bv = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 391, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(16, 391, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_bv); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/NEP.pyx":400 * The basis vectors context. * """ * CHKERR( NEPSetBV(self.nep, bv.bv) ) # <<<<<<<<<<<<<< * * def getRG(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetBV(__pyx_v_self->nep, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 400, __pyx_L1_error) /* "SLEPc/NEP.pyx":391 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":402 * CHKERR( NEPSetBV(self.nep, bv.bv) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_46getRG[] = "NEP.getRG(self)\n\n Obtain the region object associated to the eigensolver.\n\n Returns\n -------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getRG (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(struct PySlepcNEPObject *__pyx_v_self) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/NEP.pyx":411 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":412 * """ * cdef RG rg = RG() * CHKERR( NEPGetRG(self.nep, &rg.rg) ) # <<<<<<<<<<<<<< * PetscINCREF(rg.obj) * return rg */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetRG(__pyx_v_self->nep, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 412, __pyx_L1_error) /* "SLEPc/NEP.pyx":413 * cdef RG rg = RG() * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj); /* "SLEPc/NEP.pyx":414 * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/NEP.pyx":402 * CHKERR( NEPSetBV(self.nep, bv.bv) ) * * def getRG(self): # <<<<<<<<<<<<<< * """ * Obtain the region object associated to the eigensolver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":416 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_48setRG[] = "NEP.setRG(self, RG rg)\n\n Associates a region object to the eigensolver.\n\n Parameters\n ----------\n rg: RG\n The region context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcRGObject *__pyx_v_rg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRG (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(16, 416, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rg = ((struct PySlepcRGObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 416, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(16, 416, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_rg); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/NEP.pyx":425 * The region context. * """ * CHKERR( NEPSetRG(self.nep, rg.rg) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetRG(__pyx_v_self->nep, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 425, __pyx_L1_error) /* "SLEPc/NEP.pyx":416 * return rg * * def setRG(self, RG rg not None): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":429 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_50setInitialSpace[] = "NEP.setInitialSpace(self, space)\n\n Sets the initial space from which the eigensolver starts to\n iterate.\n\n Parameters\n ----------\n space: Vec or sequence of Vec\n The initial space\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(16, 429, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_space = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 429, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_space) { Vec *__pyx_v_vs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_ns; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Vec __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/NEP.pyx":439 * The initial space * """ * if isinstance(space, Vec): space = [space] # <<<<<<<<<<<<<< * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_space); __Pyx_GIVEREF(__pyx_v_space); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space); __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/NEP.pyx":440 * """ * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) */ __pyx_v_vs = NULL; /* "SLEPc/NEP.pyx":441 * if isinstance(space, Vec): space = [space] * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) # <<<<<<<<<<<<<< * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 441, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/NEP.pyx":442 * cdef PetscVec *vs = NULL * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) # <<<<<<<<<<<<<< * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( NEPSetInitialSpace(self.nep, ns, vs) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":443 * cdef Py_ssize_t i = 0, ns = len(space) * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec # <<<<<<<<<<<<<< * CHKERR( NEPSetInitialSpace(self.nep, ns, vs) ) * */ __pyx_t_4 = __pyx_v_ns; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(16, 443, __pyx_L1_error) __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6; } /* "SLEPc/NEP.pyx":444 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( NEPSetInitialSpace(self.nep, ns, vs) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetInitialSpace(__pyx_v_self->nep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(16, 444, __pyx_L1_error) /* "SLEPc/NEP.pyx":429 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_space); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":448 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a NEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_52cancelMonitor[] = "NEP.cancelMonitor(self)\n\n Clears all monitors for a NEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/NEP.pyx":452 * Clears all monitors for a NEP object. * """ * CHKERR( NEPMonitorCancel(self.nep) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPMonitorCancel(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 452, __pyx_L1_error) /* "SLEPc/NEP.pyx":448 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a NEP object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":456 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_54setUp[] = "NEP.setUp(self)\n\n Sets up all the internal data structures necessary for the\n execution of the eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/NEP.pyx":461 * execution of the eigensolver. * """ * CHKERR( NEPSetUp(self.nep) ) # <<<<<<<<<<<<<< * * def solve(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetUp(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 461, __pyx_L1_error) /* "SLEPc/NEP.pyx":456 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":463 * CHKERR( NEPSetUp(self.nep) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_56solve[] = "NEP.solve(self)\n\n Solves the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(struct PySlepcNEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/NEP.pyx":467 * Solves the eigensystem. * """ * CHKERR( NEPSolve(self.nep) ) # <<<<<<<<<<<<<< * * def getIterationNumber(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSolve(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 467, __pyx_L1_error) /* "SLEPc/NEP.pyx":463 * CHKERR( NEPSetUp(self.nep) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":469 * CHKERR( NEPSolve(self.nep) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_58getIterationNumber[] = "NEP.getIterationNumber(self)\n\n Gets the current iteration number. If the call to `solve()` is\n complete, then it returns the number of iterations carried out\n by the solution method.\n\n Returns\n -------\n its: int\n Iteration number.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(struct PySlepcNEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/NEP.pyx":480 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetIterationNumber(self.nep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":481 * """ * cdef PetscInt ival = 0 * CHKERR( NEPGetIterationNumber(self.nep, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetIterationNumber(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 481, __pyx_L1_error) /* "SLEPc/NEP.pyx":482 * cdef PetscInt ival = 0 * CHKERR( NEPGetIterationNumber(self.nep, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getConvergedReason(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":469 * CHKERR( NEPSolve(self.nep) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":484 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_60getConvergedReason[] = "NEP.getConvergedReason(self)\n\n Gets the reason why the `solve()` iteration was stopped.\n\n Returns\n -------\n reason: `NEP.ConvergedReason` enumerate\n Negative value indicates diverged, positive value\n converged.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(struct PySlepcNEPObject *__pyx_v_self) { NEPConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/NEP.pyx":494 * converged. * """ * cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( NEPGetConvergedReason(self.nep, &val) ) * return val */ __pyx_v_val = NEP_CONVERGED_ITERATING; /* "SLEPc/NEP.pyx":495 * """ * cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING * CHKERR( NEPGetConvergedReason(self.nep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetConvergedReason(__pyx_v_self->nep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 495, __pyx_L1_error) /* "SLEPc/NEP.pyx":496 * cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING * CHKERR( NEPGetConvergedReason(self.nep, &val) ) * return val # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_NEPConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":484 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":499 * * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_62getConverged[] = "NEP.getConverged(self)\n\n Gets the number of converged eigenpairs.\n\n Returns\n -------\n nconv: int\n Number of converged eigenpairs.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConverged (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(struct PySlepcNEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/NEP.pyx":508 * Number of converged eigenpairs. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetConverged(self.nep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":509 * """ * cdef PetscInt ival = 0 * CHKERR( NEPGetConverged(self.nep, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetConverged(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 509, __pyx_L1_error) /* "SLEPc/NEP.pyx":510 * cdef PetscInt ival = 0 * CHKERR( NEPGetConverged(self.nep, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":499 * * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":512 * return toInt(ival) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_64getEigenpair[] = "NEP.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n Gets the i-th solution of the eigenproblem as computed by\n `solve()`. The solution consists of both the eigenvalue and\n the eigenvector.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Vr: Vec, optional\n Placeholder for the returned eigenvector (real part).\n Vi: Vec, optional\n Placeholder for the returned eigenvector (imaginary part).\n\n Returns\n -------\n e: scalar (possibly complex)\n The computed eigenvalue.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Vr = 0; struct PyPetscVecObject *__pyx_v_Vi = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None); values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(16, 512, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 512, __pyx_L3_error) __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 512, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(16, 512, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(16, 512, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) { PetscScalar __pyx_v_sval1; PetscScalar __pyx_v_sval2; Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Vec __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/NEP.pyx":532 * The computed eigenvalue. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/NEP.pyx":533 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/NEP.pyx":534 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec */ __pyx_v_vecr = NULL; /* "SLEPc/NEP.pyx":535 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL # <<<<<<<<<<<<<< * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec */ __pyx_v_veci = NULL; /* "SLEPc/NEP.pyx":536 * cdef PetscVec vecr = NULL * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec # <<<<<<<<<<<<<< * if Vi is not None: veci = Vi.vec * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_Vr->vec; __pyx_v_vecr = __pyx_t_3; } /* "SLEPc/NEP.pyx":537 * cdef PetscVec veci = NULL * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec # <<<<<<<<<<<<<< * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_Vi->vec; __pyx_v_veci = __pyx_t_3; } /* "SLEPc/NEP.pyx":538 * if Vr is not None: vecr = Vr.vec * if Vi is not None: veci = Vi.vec * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return complex(toScalar(sval1), toScalar(sval2)) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetEigenpair(__pyx_v_self->nep, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 538, __pyx_L1_error) /* "SLEPc/NEP.pyx":539 * if Vi is not None: veci = Vi.vec * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) * return complex(toScalar(sval1), toScalar(sval2)) # <<<<<<<<<<<<<< * * def getErrorEstimate(self, int i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":512 * return toInt(ival) * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th solution of the eigenproblem as computed by */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":541 * return complex(toScalar(sval1), toScalar(sval2)) * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_66getErrorEstimate[] = "NEP.getErrorEstimate(self, int i)\n\n Returns the error estimate associated to the i-th computed\n eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n\n Returns\n -------\n error: real\n Error estimate.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(16, 541, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 541, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 541, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i) { PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/NEP.pyx":556 * Error estimate. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/NEP.pyx":557 * """ * cdef PetscReal rval = 0 * CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetErrorEstimate(__pyx_v_self->nep, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 557, __pyx_L1_error) /* "SLEPc/NEP.pyx":558 * cdef PetscReal rval = 0 * CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def computeError(self, int i, etype=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":541 * return complex(toScalar(sval1), toScalar(sval2)) * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":560 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_68computeError[] = "NEP.computeError(self, int i, etype=None)\n\n Computes the error (based on the residual norm) associated with the i-th\n computed eigenpair.\n\n Parameters\n ----------\n i: int\n Index of the solution to be considered.\n etype: `NEP.ErrorType` enumerate\n The error type to compute.\n\n Returns\n -------\n error: real\n The error bound, computed in various ways from the residual norm\n ``||T(lambda)x||_2`` where ``lambda`` is the eigenvalue and\n ``x`` is the eigenvector.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("computeError (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(16, 560, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 560, __pyx_L3_error) __pyx_v_etype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 560, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) { NEPErrorType __pyx_v_et; PetscReal __pyx_v_rval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; NEPErrorType __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/NEP.pyx":579 * ``x`` is the eigenvector. * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * cdef PetscReal rval = 0 * if etype is not None: et = etype */ __pyx_v_et = NEP_ERROR_RELATIVE; /* "SLEPc/NEP.pyx":580 * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * if etype is not None: et = etype * CHKERR( NEPComputeError(self.nep, i, et, &rval) ) */ __pyx_v_rval = 0.0; /* "SLEPc/NEP.pyx":581 * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * cdef PetscReal rval = 0 * if etype is not None: et = etype # <<<<<<<<<<<<<< * CHKERR( NEPComputeError(self.nep, i, et, &rval) ) * return toReal(rval) */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((NEPErrorType)__Pyx_PyInt_As_NEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 581, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/NEP.pyx":582 * cdef PetscReal rval = 0 * if etype is not None: et = etype * CHKERR( NEPComputeError(self.nep, i, et, &rval) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPComputeError(__pyx_v_self->nep, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 582, __pyx_L1_error) /* "SLEPc/NEP.pyx":583 * if etype is not None: et = etype * CHKERR( NEPComputeError(self.nep, i, et, &rval) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def errorView(self, etype=None, Viewer viewer=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":560 * return toReal(rval) * * def computeError(self, int i, etype=None): # <<<<<<<<<<<<<< * """ * Computes the error (based on the residual norm) associated with the i-th */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":585 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_70errorView[] = "NEP.errorView(self, etype=None, Viewer viewer=None)\n\n Displays the errors associated with the computed solution\n (as well as the eigenvalues).\n\n Parameters\n ----------\n etype: `NEP.ErrorType` enumerate, optional\n The error type to compute.\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n\n Notes\n -----\n By default, this function checks the error of all eigenpairs and prints\n the eigenvalues if all of them are below the requested tolerance.\n If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n eigenvalues and corresponding errors is printed.\n\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("errorView (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(16, 585, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_etype = values[0]; __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 585, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(16, 585, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) { NEPErrorType __pyx_v_et; PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; NEPErrorType __pyx_t_3; PetscViewer __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/NEP.pyx":606 * * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = NULL */ __pyx_v_et = NEP_ERROR_RELATIVE; /* "SLEPc/NEP.pyx":607 * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr */ __pyx_t_1 = (__pyx_v_etype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = ((NEPErrorType)__Pyx_PyInt_As_NEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 607, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/NEP.pyx":608 * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( NEPErrorView(self.nep, et, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/NEP.pyx":609 * if etype is not None: et = etype * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( NEPErrorView(self.nep, et, vwr) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_4; } /* "SLEPc/NEP.pyx":610 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( NEPErrorView(self.nep, et, vwr) ) # <<<<<<<<<<<<<< * * def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPErrorView(__pyx_v_self->nep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(16, 610, __pyx_L1_error) /* "SLEPc/NEP.pyx":585 * return toReal(rval) * * def errorView(self, etype=None, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Displays the errors associated with the computed solution */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":612 * CHKERR( NEPErrorView(self.nep, et, vwr) ) * * def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets the function to compute the nonlinear Function T(lambda) */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_72setFunction[] = "NEP.setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None)\n\n Sets the function to compute the nonlinear Function T(lambda)\n as well as the location to store the matrix.\n\n Parameters\n ----------\n function:\n Function evaluation routine\n F: Mat\n Function matrix\n P: Mat\n preconditioner matrix (usually same as the Function)\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_function = 0; struct PyPetscMatObject *__pyx_v_F = 0; struct PyPetscMatObject *__pyx_v_P = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFunction (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function,&__pyx_n_s_F,&__pyx_n_s_P,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = (PyObject *)((struct PyPetscMatObject *)Py_None); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_F)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setFunction", 0, 2, 5, 1); __PYX_ERR(16, 612, __pyx_L3_error) } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_P); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kargs); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFunction") < 0)) __PYX_ERR(16, 612, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_function = values[0]; __pyx_v_F = ((struct PyPetscMatObject *)values[1]); __pyx_v_P = ((struct PyPetscMatObject *)values[2]); __pyx_v_args = values[3]; __pyx_v_kargs = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setFunction", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 612, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_F), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "F", 0))) __PYX_ERR(16, 612, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_P), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "P", 0))) __PYX_ERR(16, 612, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_function, __pyx_v_F, __pyx_v_P, __pyx_v_args, __pyx_v_kargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_function, struct PyPetscMatObject *__pyx_v_F, struct PyPetscMatObject *__pyx_v_P, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { Mat __pyx_v_Fmat; Mat __pyx_v_Pmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Mat __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("setFunction", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/NEP.pyx":626 * preconditioner matrix (usually same as the Function) * """ * cdef PetscMat Fmat=NULL # <<<<<<<<<<<<<< * if F is not None: Fmat = F.mat * cdef PetscMat Pmat=Fmat */ __pyx_v_Fmat = NULL; /* "SLEPc/NEP.pyx":627 * """ * cdef PetscMat Fmat=NULL * if F is not None: Fmat = F.mat # <<<<<<<<<<<<<< * cdef PetscMat Pmat=Fmat * if P is not None: Pmat = P.mat */ __pyx_t_1 = (((PyObject *)__pyx_v_F) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_F->mat; __pyx_v_Fmat = __pyx_t_3; } /* "SLEPc/NEP.pyx":628 * cdef PetscMat Fmat=NULL * if F is not None: Fmat = F.mat * cdef PetscMat Pmat=Fmat # <<<<<<<<<<<<<< * if P is not None: Pmat = P.mat * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) */ __pyx_v_Pmat = __pyx_v_Fmat; /* "SLEPc/NEP.pyx":629 * if F is not None: Fmat = F.mat * cdef PetscMat Pmat=Fmat * if P is not None: Pmat = P.mat # <<<<<<<<<<<<<< * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) * if args is None: args = () */ __pyx_t_2 = (((PyObject *)__pyx_v_P) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_P->mat; __pyx_v_Pmat = __pyx_t_3; } /* "SLEPc/NEP.pyx":630 * cdef PetscMat Pmat=Fmat * if P is not None: Pmat = P.mat * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetFunction(__pyx_v_self->nep, __pyx_v_Fmat, __pyx_v_Pmat, __pyx_f_8slepc4py_5SLEPc_NEP_Function, NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 630, __pyx_L1_error) /* "SLEPc/NEP.pyx":631 * if P is not None: Pmat = P.mat * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) * if args is None: args = () # <<<<<<<<<<<<<< * if kargs is None: kargs = {} * self.set_attr('__function__', (function, args, kargs)) */ __pyx_t_1 = (__pyx_v_args == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple); } /* "SLEPc/NEP.pyx":632 * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) * if args is None: args = () * if kargs is None: kargs = {} # <<<<<<<<<<<<<< * self.set_attr('__function__', (function, args, kargs)) * */ __pyx_t_2 = (__pyx_v_kargs == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5); __pyx_t_5 = 0; } /* "SLEPc/NEP.pyx":633 * if args is None: args = () * if kargs is None: kargs = {} * self.set_attr('__function__', (function, args, kargs)) # <<<<<<<<<<<<<< * * def setJacobian(self, jacobian, Mat J, args=None, kargs=None): */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_function); __Pyx_GIVEREF(__pyx_v_function); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_function); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); __Pyx_GIVEREF(__pyx_v_kargs); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_kargs); __pyx_t_6 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__function__"), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "SLEPc/NEP.pyx":612 * CHKERR( NEPErrorView(self.nep, et, vwr) ) * * def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets the function to compute the nonlinear Function T(lambda) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":635 * self.set_attr('__function__', (function, args, kargs)) * * def setJacobian(self, jacobian, Mat J, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets the function to compute Jacobian T'(lambda) as well */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_74setJacobian[] = "NEP.setJacobian(self, jacobian, Mat J, args=None, kargs=None)\n\n Sets the function to compute Jacobian T'(lambda) as well\n as the location to store the matrix.\n\n Parameters\n ----------\n jacobian:\n Jacobian evaluation routine\n J: Mat\n Jacobian matrix\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_jacobian = 0; struct PyPetscMatObject *__pyx_v_J = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setJacobian (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_jacobian,&__pyx_n_s_J,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_J)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setJacobian", 0, 2, 4, 1); __PYX_ERR(16, 635, __pyx_L3_error) } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kargs); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setJacobian") < 0)) __PYX_ERR(16, 635, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_jacobian = values[0]; __pyx_v_J = ((struct PyPetscMatObject *)values[1]); __pyx_v_args = values[2]; __pyx_v_kargs = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setJacobian", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 635, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_J), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "J", 0))) __PYX_ERR(16, 635, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_jacobian, __pyx_v_J, __pyx_v_args, __pyx_v_kargs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_jacobian, struct PyPetscMatObject *__pyx_v_J, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { Mat __pyx_v_Jmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Mat __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("setJacobian", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/NEP.pyx":647 * Jacobian matrix * """ * cdef PetscMat Jmat=NULL # <<<<<<<<<<<<<< * if J is not None: Jmat = J.mat * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) */ __pyx_v_Jmat = NULL; /* "SLEPc/NEP.pyx":648 * """ * cdef PetscMat Jmat=NULL * if J is not None: Jmat = J.mat # <<<<<<<<<<<<<< * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) * if args is None: args = () */ __pyx_t_1 = (((PyObject *)__pyx_v_J) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_J->mat; __pyx_v_Jmat = __pyx_t_3; } /* "SLEPc/NEP.pyx":649 * cdef PetscMat Jmat=NULL * if J is not None: Jmat = J.mat * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetJacobian(__pyx_v_self->nep, __pyx_v_Jmat, __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian, NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 649, __pyx_L1_error) /* "SLEPc/NEP.pyx":650 * if J is not None: Jmat = J.mat * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) * if args is None: args = () # <<<<<<<<<<<<<< * if kargs is None: kargs = {} * self.set_attr('__jacobian__', (jacobian, args, kargs)) */ __pyx_t_2 = (__pyx_v_args == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple); } /* "SLEPc/NEP.pyx":651 * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) * if args is None: args = () * if kargs is None: kargs = {} # <<<<<<<<<<<<<< * self.set_attr('__jacobian__', (jacobian, args, kargs)) * */ __pyx_t_1 = (__pyx_v_kargs == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5); __pyx_t_5 = 0; } /* "SLEPc/NEP.pyx":652 * if args is None: args = () * if kargs is None: kargs = {} * self.set_attr('__jacobian__', (jacobian, args, kargs)) # <<<<<<<<<<<<<< * * def setSplitOperator(self, A, f, structure=None): */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_jacobian); __Pyx_GIVEREF(__pyx_v_jacobian); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_jacobian); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); __Pyx_GIVEREF(__pyx_v_kargs); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_kargs); __pyx_t_6 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__jacobian__"), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "SLEPc/NEP.pyx":635 * self.set_attr('__function__', (function, args, kargs)) * * def setJacobian(self, jacobian, Mat J, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets the function to compute Jacobian T'(lambda) as well */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":654 * self.set_attr('__jacobian__', (jacobian, args, kargs)) * * def setSplitOperator(self, A, f, structure=None): # <<<<<<<<<<<<<< * """ * Sets the operator of the nonlinear eigenvalue problem */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_76setSplitOperator[] = "NEP.setSplitOperator(self, A, f, structure=None)\n\n Sets the operator of the nonlinear eigenvalue problem\n in split form.\n\n Parameters\n ----------\n A: Mat or sequence of Mat\n Coefficient matrices of the split form.\n f: sequence of FN\n Scalar functions of the split form.\n structure: `PETSc.Mat.Structure` enumerate, optional\n Structure flag for matrices.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_A = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_structure = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSplitOperator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_f,&__pyx_n_s_structure,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSplitOperator", 0, 2, 3, 1); __PYX_ERR(16, 654, __pyx_L3_error) } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSplitOperator") < 0)) __PYX_ERR(16, 654, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_A = values[0]; __pyx_v_f = values[1]; __pyx_v_structure = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setSplitOperator", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 654, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setSplitOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_A, __pyx_v_f, __pyx_v_structure); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_A, PyObject *__pyx_v_f, PyObject *__pyx_v_structure) { Mat *__pyx_v_As; FN *__pyx_v_Fs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; MatStructure __pyx_v_mstr; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; MatStructure __pyx_t_5; Py_ssize_t __pyx_t_6; Mat __pyx_t_7; FN __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("setSplitOperator", 0); __Pyx_INCREF(__pyx_v_A); __Pyx_INCREF(__pyx_v_f); /* "SLEPc/NEP.pyx":668 * Structure flag for matrices. * """ * if isinstance(A, Mat): A = [A] # <<<<<<<<<<<<<< * if isinstance(f, FN): f = [f] * cdef PetscMat *As = NULL */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_A, __pyx_ptype_8petsc4py_5PETSc_Mat); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_A); __Pyx_GIVEREF(__pyx_v_A); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_A); __Pyx_DECREF_SET(__pyx_v_A, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/NEP.pyx":669 * """ * if isinstance(A, Mat): A = [A] * if isinstance(f, FN): f = [f] # <<<<<<<<<<<<<< * cdef PetscMat *As = NULL * cdef SlepcFN *Fs = NULL */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_8slepc4py_5SLEPc_FN); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_f); __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/NEP.pyx":670 * if isinstance(A, Mat): A = [A] * if isinstance(f, FN): f = [f] * cdef PetscMat *As = NULL # <<<<<<<<<<<<<< * cdef SlepcFN *Fs = NULL * cdef Py_ssize_t i = 0, n = len(A) */ __pyx_v_As = NULL; /* "SLEPc/NEP.pyx":671 * if isinstance(f, FN): f = [f] * cdef PetscMat *As = NULL * cdef SlepcFN *Fs = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, n = len(A) * cdef PetscMatStructure mstr = matstructure(structure) */ __pyx_v_Fs = NULL; /* "SLEPc/NEP.pyx":672 * cdef PetscMat *As = NULL * cdef SlepcFN *Fs = NULL * cdef Py_ssize_t i = 0, n = len(A) # <<<<<<<<<<<<<< * cdef PetscMatStructure mstr = matstructure(structure) * assert n == len(f) */ __pyx_v_i = 0; __pyx_t_4 = PyObject_Length(__pyx_v_A); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 672, __pyx_L1_error) __pyx_v_n = __pyx_t_4; /* "SLEPc/NEP.pyx":673 * cdef SlepcFN *Fs = NULL * cdef Py_ssize_t i = 0, n = len(A) * cdef PetscMatStructure mstr = matstructure(structure) # <<<<<<<<<<<<<< * assert n == len(f) * cdef tmp1 = allocate(n*sizeof(Mat),&As) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_5 == ((MatStructure)-1L))) __PYX_ERR(16, 673, __pyx_L1_error) __pyx_v_mstr = __pyx_t_5; /* "SLEPc/NEP.pyx":674 * cdef Py_ssize_t i = 0, n = len(A) * cdef PetscMatStructure mstr = matstructure(structure) * assert n == len(f) # <<<<<<<<<<<<<< * cdef tmp1 = allocate(n*sizeof(Mat),&As) * cdef tmp2 = allocate(n*sizeof(FN),&Fs) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 674, __pyx_L1_error) if (unlikely(!((__pyx_v_n == __pyx_t_4) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(16, 674, __pyx_L1_error) } } #endif /* "SLEPc/NEP.pyx":675 * cdef PetscMatStructure mstr = matstructure(structure) * assert n == len(f) * cdef tmp1 = allocate(n*sizeof(Mat),&As) # <<<<<<<<<<<<<< * cdef tmp2 = allocate(n*sizeof(FN),&Fs) * for i in range(n): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(struct PyPetscMatObject))), ((void **)(&__pyx_v_As))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":676 * assert n == len(f) * cdef tmp1 = allocate(n*sizeof(Mat),&As) * cdef tmp2 = allocate(n*sizeof(FN),&Fs) # <<<<<<<<<<<<<< * for i in range(n): * As[i] = (A[i]).mat */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(struct PySlepcFNObject))), ((void **)(&__pyx_v_Fs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":677 * cdef tmp1 = allocate(n*sizeof(Mat),&As) * cdef tmp2 = allocate(n*sizeof(FN),&Fs) * for i in range(n): # <<<<<<<<<<<<<< * As[i] = (A[i]).mat * Fs[i] = (f[i]).fn */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "SLEPc/NEP.pyx":678 * cdef tmp2 = allocate(n*sizeof(FN),&Fs) * for i in range(n): * As[i] = (A[i]).mat # <<<<<<<<<<<<<< * Fs[i] = (f[i]).fn * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_A, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(16, 678, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscMatObject *)__pyx_t_3)->mat; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_As[__pyx_v_i]) = __pyx_t_7; /* "SLEPc/NEP.pyx":679 * for i in range(n): * As[i] = (A[i]).mat * Fs[i] = (f[i]).fn # <<<<<<<<<<<<<< * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) * */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8slepc4py_5SLEPc_FN)))) __PYX_ERR(16, 679, __pyx_L1_error) __pyx_t_8 = ((struct PySlepcFNObject *)__pyx_t_3)->fn; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_Fs[__pyx_v_i]) = __pyx_t_8; } /* "SLEPc/NEP.pyx":680 * As[i] = (A[i]).mat * Fs[i] = (f[i]).fn * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_9 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetSplitOperator(__pyx_v_self->nep, ((PetscInt)__pyx_v_n), __pyx_v_As, __pyx_v_Fs, __pyx_v_mstr)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(16, 680, __pyx_L1_error) /* "SLEPc/NEP.pyx":654 * self.set_attr('__jacobian__', (jacobian, args, kargs)) * * def setSplitOperator(self, A, f, structure=None): # <<<<<<<<<<<<<< * """ * Sets the operator of the nonlinear eigenvalue problem */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setSplitOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_A); __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":34 * ConvergedReason = MFNConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.mfn * self.mfn = NULL */ /* Python wrapper */ static int __pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(struct PySlepcMFNObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "SLEPc/MFN.pyx":35 * * def __cinit__(self): * self.obj = &self.mfn # <<<<<<<<<<<<<< * self.mfn = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->mfn)); /* "SLEPc/MFN.pyx":36 * def __cinit__(self): * self.obj = &self.mfn * self.mfn = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->mfn = NULL; /* "SLEPc/MFN.pyx":34 * ConvergedReason = MFNConvergedReason * * def __cinit__(self): # <<<<<<<<<<<<<< * self.obj = &self.mfn * self.mfn = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":38 * self.mfn = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the MFN data structure. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_2view[] = "MFN.view(self, Viewer viewer=None)\n\n Prints the MFN data structure.\n\n Parameters\n ----------\n viewer: Viewer, optional.\n Visualization context; if not provided, the standard\n output is used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscViewerObject *__pyx_v_viewer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyPetscViewerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(17, 38, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 38, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(17, 38, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_2view(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_viewer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_2view(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_v_vwr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscViewer __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/MFN.pyx":48 * output is used. * """ * cdef PetscViewer vwr = NULL # <<<<<<<<<<<<<< * if viewer is not None: vwr = viewer.vwr * CHKERR( MFNView(self.mfn, vwr) ) */ __pyx_v_vwr = NULL; /* "SLEPc/MFN.pyx":49 * """ * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr # <<<<<<<<<<<<<< * CHKERR( MFNView(self.mfn, vwr) ) * */ __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_viewer->vwr; __pyx_v_vwr = __pyx_t_3; } /* "SLEPc/MFN.pyx":50 * cdef PetscViewer vwr = NULL * if viewer is not None: vwr = viewer.vwr * CHKERR( MFNView(self.mfn, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNView(__pyx_v_self->mfn, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(17, 50, __pyx_L1_error) /* "SLEPc/MFN.pyx":38 * self.mfn = NULL * * def view(self, Viewer viewer=None): # <<<<<<<<<<<<<< * """ * Prints the MFN data structure. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":52 * CHKERR( MFNView(self.mfn, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_4destroy[] = "MFN.destroy(self)\n\n Destroys the MFN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(struct PySlepcMFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/MFN.pyx":56 * Destroys the MFN object. * """ * CHKERR( MFNDestroy(&self.mfn) ) # <<<<<<<<<<<<<< * self.mfn = NULL * return self */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNDestroy((&__pyx_v_self->mfn))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 56, __pyx_L1_error) /* "SLEPc/MFN.pyx":57 * """ * CHKERR( MFNDestroy(&self.mfn) ) * self.mfn = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->mfn = NULL; /* "SLEPc/MFN.pyx":58 * CHKERR( MFNDestroy(&self.mfn) ) * self.mfn = NULL * return self # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/MFN.pyx":52 * CHKERR( MFNView(self.mfn, vwr) ) * * def destroy(self): # <<<<<<<<<<<<<< * """ * Destroys the MFN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":60 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_6reset[] = "MFN.reset(self)\n\n Resets the MFN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(struct PySlepcMFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/MFN.pyx":64 * Resets the MFN object. * """ * CHKERR( MFNReset(self.mfn) ) # <<<<<<<<<<<<<< * * def create(self, comm=None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNReset(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 64, __pyx_L1_error) /* "SLEPc/MFN.pyx":60 * return self * * def reset(self): # <<<<<<<<<<<<<< * """ * Resets the MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":66 * CHKERR( MFNReset(self.mfn) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_8create[] = "MFN.create(self, comm=None)\n\n Creates the MFN object.\n\n Parameters\n ----------\n comm: Comm, optional.\n MPI communicator. If not provided, it defaults to all\n processes.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(17, 66, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 66, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_8create(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_8create(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_comm) { MPI_Comm __pyx_v_ccomm; MFN __pyx_v_newmfn; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/MFN.pyx":76 * processes. * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) # <<<<<<<<<<<<<< * cdef SlepcMFN newmfn = NULL * CHKERR( MFNCreate(ccomm, &newmfn) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 76, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/MFN.pyx":77 * """ * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcMFN newmfn = NULL # <<<<<<<<<<<<<< * CHKERR( MFNCreate(ccomm, &newmfn) ) * SlepcCLEAR(self.obj); self.mfn = newmfn */ __pyx_v_newmfn = NULL; /* "SLEPc/MFN.pyx":78 * cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT()) * cdef SlepcMFN newmfn = NULL * CHKERR( MFNCreate(ccomm, &newmfn) ) # <<<<<<<<<<<<<< * SlepcCLEAR(self.obj); self.mfn = newmfn * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNCreate(__pyx_v_ccomm, (&__pyx_v_newmfn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 78, __pyx_L1_error) /* "SLEPc/MFN.pyx":79 * cdef SlepcMFN newmfn = NULL * CHKERR( MFNCreate(ccomm, &newmfn) ) * SlepcCLEAR(self.obj); self.mfn = newmfn # <<<<<<<<<<<<<< * return self * */ __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj); __pyx_v_self->mfn = __pyx_v_newmfn; /* "SLEPc/MFN.pyx":80 * CHKERR( MFNCreate(ccomm, &newmfn) ) * SlepcCLEAR(self.obj); self.mfn = newmfn * return self # <<<<<<<<<<<<<< * * def setType(self, mfn_type): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/MFN.pyx":66 * CHKERR( MFNReset(self.mfn) ) * * def create(self, comm=None): # <<<<<<<<<<<<<< * """ * Creates the MFN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":82 * return self * * def setType(self, mfn_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_10setType[] = "MFN.setType(self, mfn_type)\n\n Selects the particular solver to be used in the MFN object.\n\n Parameters\n ----------\n mfn_type: `MFN.Type` enumerate\n The solver to be used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mfn_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setType (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mfn_type,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mfn_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(17, 82, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_mfn_type = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 82, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_mfn_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_mfn_type) { const char* __pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_mfn_type); /* "SLEPc/MFN.pyx":91 * The solver to be used. * """ * cdef SlepcMFNType cval = NULL # <<<<<<<<<<<<<< * mfn_type = str2bytes(mfn_type, &cval) * CHKERR( MFNSetType(self.mfn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/MFN.pyx":92 * """ * cdef SlepcMFNType cval = NULL * mfn_type = str2bytes(mfn_type, &cval) # <<<<<<<<<<<<<< * CHKERR( MFNSetType(self.mfn, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_mfn_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_mfn_type, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":93 * cdef SlepcMFNType cval = NULL * mfn_type = str2bytes(mfn_type, &cval) * CHKERR( MFNSetType(self.mfn, cval) ) # <<<<<<<<<<<<<< * * def getType(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetType(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 93, __pyx_L1_error) /* "SLEPc/MFN.pyx":82 * return self * * def setType(self, mfn_type): # <<<<<<<<<<<<<< * """ * Selects the particular solver to be used in the MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mfn_type); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":95 * CHKERR( MFNSetType(self.mfn, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the MFN type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_12getType[] = "MFN.getType(self)\n\n Gets the MFN type of this object.\n\n Returns\n -------\n type: `MFN.Type` enumerate\n The solver currently being used.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getType (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(struct PySlepcMFNObject *__pyx_v_self) { const char* __pyx_v_mfn_type; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/MFN.pyx":104 * The solver currently being used. * """ * cdef SlepcMFNType mfn_type = NULL # <<<<<<<<<<<<<< * CHKERR( MFNGetType(self.mfn, &mfn_type) ) * return bytes2str(mfn_type) */ __pyx_v_mfn_type = NULL; /* "SLEPc/MFN.pyx":105 * """ * cdef SlepcMFNType mfn_type = NULL * CHKERR( MFNGetType(self.mfn, &mfn_type) ) # <<<<<<<<<<<<<< * return bytes2str(mfn_type) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetType(__pyx_v_self->mfn, (&__pyx_v_mfn_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 105, __pyx_L1_error) /* "SLEPc/MFN.pyx":106 * cdef SlepcMFNType mfn_type = NULL * CHKERR( MFNGetType(self.mfn, &mfn_type) ) * return bytes2str(mfn_type) # <<<<<<<<<<<<<< * * def getOptionsPrefix(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_mfn_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":95 * CHKERR( MFNSetType(self.mfn, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the MFN type of this object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":108 * return bytes2str(mfn_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all MFN options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix[] = "MFN.getOptionsPrefix(self)\n\n Gets the prefix used for searching for all MFN options in the\n database.\n\n Returns\n -------\n prefix: string\n The prefix string set for this MFN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self) { const char *__pyx_v_prefix; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/MFN.pyx":118 * The prefix string set for this MFN object. * """ * cdef const_char *prefix = NULL # <<<<<<<<<<<<<< * CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) ) * return bytes2str(prefix) */ __pyx_v_prefix = NULL; /* "SLEPc/MFN.pyx":119 * """ * cdef const_char *prefix = NULL * CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) ) # <<<<<<<<<<<<<< * return bytes2str(prefix) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetOptionsPrefix(__pyx_v_self->mfn, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 119, __pyx_L1_error) /* "SLEPc/MFN.pyx":120 * cdef const_char *prefix = NULL * CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) ) * return bytes2str(prefix) # <<<<<<<<<<<<<< * * def setOptionsPrefix(self, prefix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":108 * return bytes2str(mfn_type) * * def getOptionsPrefix(self): # <<<<<<<<<<<<<< * """ * Gets the prefix used for searching for all MFN options in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":122 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all MFN options in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix[] = "MFN.setOptionsPrefix(self, prefix)\n\n Sets the prefix used for searching for all MFN options in the\n database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all MFN option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(17, 122, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 122, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/MFN.pyx":132 * The prefix string to prepend to all MFN option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/MFN.pyx":133 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":134 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) # <<<<<<<<<<<<<< * * def appendOptionsPrefix(self, prefix): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetOptionsPrefix(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 134, __pyx_L1_error) /* "SLEPc/MFN.pyx":122 * return bytes2str(prefix) * * def setOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Sets the prefix used for searching for all MFN options in the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":136 * CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all MFN options */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix[] = "MFN.appendOptionsPrefix(self, prefix)\n\n Appends to the prefix used for searching for all MFN options\n in the database.\n\n Parameters\n ----------\n prefix: string\n The prefix string to prepend to all MFN option requests.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(17, 136, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_prefix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 136, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) { const char *__pyx_v_cval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/MFN.pyx":146 * The prefix string to prepend to all MFN option requests. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/MFN.pyx":147 * """ * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) # <<<<<<<<<<<<<< * CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":148 * cdef const_char *cval = NULL * prefix = str2bytes(prefix, &cval) * CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) # <<<<<<<<<<<<<< * * def setFromOptions(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNAppendOptionsPrefix(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 148, __pyx_L1_error) /* "SLEPc/MFN.pyx":136 * CHKERR( MFNSetOptionsPrefix(self.mfn, cval) ) * * def appendOptionsPrefix(self, prefix): # <<<<<<<<<<<<<< * """ * Appends to the prefix used for searching for all MFN options */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":150 * CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets MFN options from the options database. This routine must */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_20setFromOptions[] = "MFN.setFromOptions(self)\n\n Sets MFN options from the options database. This routine must\n be called before `setUp()` if the user is to be allowed to set\n the solver type.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(struct PySlepcMFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/MFN.pyx":156 * the solver type. * """ * CHKERR( MFNSetFromOptions(self.mfn) ) # <<<<<<<<<<<<<< * * def getTolerances(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetFromOptions(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 156, __pyx_L1_error) /* "SLEPc/MFN.pyx":150 * CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) ) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets MFN options from the options database. This routine must */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":158 * CHKERR( MFNSetFromOptions(self.mfn) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_22getTolerances[] = "MFN.getTolerances(self)\n\n Gets the tolerance and maximum iteration count used by the\n default MFN convergence tests.\n\n Returns\n -------\n tol: float\n The convergence tolerance.\n max_it: int\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(struct PySlepcMFNObject *__pyx_v_self) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/MFN.pyx":170 * The maximum number of iterations * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival = 0 * CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) ) */ __pyx_v_rval = 0.0; /* "SLEPc/MFN.pyx":171 * """ * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) ) * return (toReal(rval), toInt(ival)) */ __pyx_v_ival = 0; /* "SLEPc/MFN.pyx":172 * cdef PetscReal rval = 0 * cdef PetscInt ival = 0 * CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) ) # <<<<<<<<<<<<<< * return (toReal(rval), toInt(ival)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetTolerances(__pyx_v_self->mfn, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 172, __pyx_L1_error) /* "SLEPc/MFN.pyx":173 * cdef PetscInt ival = 0 * CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, max_it=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":158 * CHKERR( MFNSetFromOptions(self.mfn) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":175 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_24setTolerances[] = "MFN.setTolerances(self, tol=None, max_it=None)\n\n Sets the tolerance and maximum iteration count used by the\n default MFN convergence tests.\n\n Parameters\n ----------\n tol: float, optional\n The convergence tolerance.\n max_it: int, optional\n The maximum number of iterations\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(17, 175, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_tol = values[0]; __pyx_v_max_it = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) { PetscReal __pyx_v_rval; PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PetscReal __pyx_t_3; PetscInt __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/MFN.pyx":187 * The maximum number of iterations * """ * cdef PetscReal rval = PETSC_DEFAULT # <<<<<<<<<<<<<< * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) */ __pyx_v_rval = PETSC_DEFAULT; /* "SLEPc/MFN.pyx":188 * """ * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT # <<<<<<<<<<<<<< * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) */ __pyx_v_ival = PETSC_DEFAULT; /* "SLEPc/MFN.pyx":189 * cdef PetscReal rval = PETSC_DEFAULT * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) # <<<<<<<<<<<<<< * if max_it is not None: ival = asInt(max_it) * CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) */ __pyx_t_1 = (__pyx_v_tol != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(17, 189, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/MFN.pyx":190 * cdef PetscInt ival = PETSC_DEFAULT * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) # <<<<<<<<<<<<<< * CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) * */ __pyx_t_2 = (__pyx_v_max_it != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(17, 190, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/MFN.pyx":191 * if tol is not None: rval = asReal(tol) * if max_it is not None: ival = asInt(max_it) * CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) # <<<<<<<<<<<<<< * * def getDimensions(self): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetTolerances(__pyx_v_self->mfn, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(17, 191, __pyx_L1_error) /* "SLEPc/MFN.pyx":175 * return (toReal(rval), toInt(ival)) * * def setTolerances(self, tol=None, max_it=None): # <<<<<<<<<<<<<< * """ * Sets the tolerance and maximum iteration count used by the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":193 * CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the dimension of the subspace used by the solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_26getDimensions[] = "MFN.getDimensions(self)\n\n Gets the dimension of the subspace used by the solver.\n\n Returns\n -------\n ncv: int\n Maximum dimension of the subspace to be used by the solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(struct PySlepcMFNObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/MFN.pyx":202 * Maximum dimension of the subspace to be used by the solver. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( MFNGetDimensions(self.mfn, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/MFN.pyx":203 * """ * cdef PetscInt ival = 0 * CHKERR( MFNGetDimensions(self.mfn, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetDimensions(__pyx_v_self->mfn, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 203, __pyx_L1_error) /* "SLEPc/MFN.pyx":204 * cdef PetscInt ival = 0 * CHKERR( MFNGetDimensions(self.mfn, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def setDimensions(self, ncv): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":193 * CHKERR( MFNSetTolerances(self.mfn, rval, ival) ) * * def getDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the dimension of the subspace used by the solver. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":206 * return toInt(ival) * * def setDimensions(self, ncv): # <<<<<<<<<<<<<< * """ * Sets the dimension of the subspace to be used by the solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_28setDimensions[] = "MFN.setDimensions(self, ncv)\n\n Sets the dimension of the subspace to be used by the solver.\n\n Parameters\n ----------\n ncv: int\n Maximum dimension of the subspace to be used by the\n solver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ncv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ncv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(17, 206, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ncv = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setDimensions", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 206, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_ncv); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_ncv) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/MFN.pyx":216 * solver. * """ * cdef PetscInt ival = asInt(ncv) # <<<<<<<<<<<<<< * CHKERR( MFNSetDimensions(self.mfn, ival) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(17, 216, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/MFN.pyx":217 * """ * cdef PetscInt ival = asInt(ncv) * CHKERR( MFNSetDimensions(self.mfn, ival) ) # <<<<<<<<<<<<<< * * def getFN(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetDimensions(__pyx_v_self->mfn, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 217, __pyx_L1_error) /* "SLEPc/MFN.pyx":206 * return toInt(ival) * * def setDimensions(self, ncv): # <<<<<<<<<<<<<< * """ * Sets the dimension of the subspace to be used by the solver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":219 * CHKERR( MFNSetDimensions(self.mfn, ival) ) * * def getFN(self): # <<<<<<<<<<<<<< * """ * Obtain the math function object associated to the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_30getFN[] = "MFN.getFN(self)\n\n Obtain the math function object associated to the MFN object.\n\n Returns\n -------\n fn: FN\n The math function context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getFN (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getFN", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getFN", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(struct PySlepcMFNObject *__pyx_v_self) { struct PySlepcFNObject *__pyx_v_fn = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getFN", 0); /* "SLEPc/MFN.pyx":228 * The math function context. * """ * cdef FN fn = FN() # <<<<<<<<<<<<<< * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fn = ((struct PySlepcFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":229 * """ * cdef FN fn = FN() * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) # <<<<<<<<<<<<<< * PetscINCREF(fn.obj) * return fn */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetFN(__pyx_v_self->mfn, (&__pyx_v_fn->fn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 229, __pyx_L1_error) /* "SLEPc/MFN.pyx":230 * cdef FN fn = FN() * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) # <<<<<<<<<<<<<< * return fn * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_fn->__pyx_base.obj); /* "SLEPc/MFN.pyx":231 * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) * return fn # <<<<<<<<<<<<<< * * def setFN(self, FN fn not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_fn)); __pyx_r = ((PyObject *)__pyx_v_fn); goto __pyx_L0; /* "SLEPc/MFN.pyx":219 * CHKERR( MFNSetDimensions(self.mfn, ival) ) * * def getFN(self): # <<<<<<<<<<<<<< * """ * Obtain the math function object associated to the MFN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getFN", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_fn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":233 * return fn * * def setFN(self, FN fn not None): # <<<<<<<<<<<<<< * """ * Associates a math function object to the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_32setFN[] = "MFN.setFN(self, FN fn)\n\n Associates a math function object to the MFN object.\n\n Parameters\n ----------\n fn: FN\n The math function context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcFNObject *__pyx_v_fn = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setFN (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFN") < 0)) __PYX_ERR(17, 233, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_fn = ((struct PySlepcFNObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setFN", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 233, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFN", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fn), __pyx_ptype_8slepc4py_5SLEPc_FN, 0, "fn", 0))) __PYX_ERR(17, 233, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_fn); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcFNObject *__pyx_v_fn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setFN", 0); /* "SLEPc/MFN.pyx":242 * The math function context. * """ * CHKERR( MFNSetFN(self.mfn, fn.fn) ) # <<<<<<<<<<<<<< * * def getBV(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetFN(__pyx_v_self->mfn, __pyx_v_fn->fn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 242, __pyx_L1_error) /* "SLEPc/MFN.pyx":233 * return fn * * def setFN(self, FN fn not None): # <<<<<<<<<<<<<< * """ * Associates a math function object to the MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFN", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":244 * CHKERR( MFNSetFN(self.mfn, fn.fn) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vector object associated to the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_34getBV[] = "MFN.getBV(self)\n\n Obtain the basis vector object associated to the MFN object.\n\n Returns\n -------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getBV (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(struct PySlepcMFNObject *__pyx_v_self) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/MFN.pyx":253 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":254 * """ * cdef BV bv = BV() * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) # <<<<<<<<<<<<<< * PetscINCREF(bv.obj) * return bv */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetBV(__pyx_v_self->mfn, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 254, __pyx_L1_error) /* "SLEPc/MFN.pyx":255 * cdef BV bv = BV() * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj); /* "SLEPc/MFN.pyx":256 * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/MFN.pyx":244 * CHKERR( MFNSetFN(self.mfn, fn.fn) ) * * def getBV(self): # <<<<<<<<<<<<<< * """ * Obtain the basis vector object associated to the MFN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_bv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":258 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vector object to the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_36setBV[] = "MFN.setBV(self, BV bv)\n\n Associates a basis vector object to the MFN object.\n\n Parameters\n ----------\n bv: BV\n The basis vectors context.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setBV (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(17, 258, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_bv = ((struct PySlepcBVObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 258, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(17, 258, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_bv); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/MFN.pyx":267 * The basis vectors context. * """ * CHKERR( MFNSetBV(self.mfn, bv.bv) ) # <<<<<<<<<<<<<< * * def getOperator(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetBV(__pyx_v_self->mfn, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 267, __pyx_L1_error) /* "SLEPc/MFN.pyx":258 * return bv * * def setBV(self, BV bv not None): # <<<<<<<<<<<<<< * """ * Associates a basis vector object to the MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":269 * CHKERR( MFNSetBV(self.mfn, bv.bv) ) * * def getOperator(self): # <<<<<<<<<<<<<< * """ * Gets the matrix associated with the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_38getOperator[] = "MFN.getOperator(self)\n\n Gets the matrix associated with the MFN object.\n\n Returns\n -------\n A: Mat\n The matrix for which the matrix function is to be computed.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getOperator (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getOperator", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperator", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(struct PySlepcMFNObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_A = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("getOperator", 0); /* "SLEPc/MFN.pyx":278 * The matrix for which the matrix function is to be computed. * """ * cdef Mat A = Mat() # <<<<<<<<<<<<<< * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":279 * """ * cdef Mat A = Mat() * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(A.obj) * return A */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetOperator(__pyx_v_self->mfn, (&__pyx_v_A->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 279, __pyx_L1_error) /* "SLEPc/MFN.pyx":280 * cdef Mat A = Mat() * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * return A * */ __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj); /* "SLEPc/MFN.pyx":281 * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) * PetscINCREF(A.obj) * return A # <<<<<<<<<<<<<< * * def setOperator(self, Mat A not None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_A)); __pyx_r = ((PyObject *)__pyx_v_A); goto __pyx_L0; /* "SLEPc/MFN.pyx":269 * CHKERR( MFNSetBV(self.mfn, bv.bv) ) * * def getOperator(self): # <<<<<<<<<<<<<< * """ * Gets the matrix associated with the MFN object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_A); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":283 * return A * * def setOperator(self, Mat A not None): # <<<<<<<<<<<<<< * """ * Sets the matrix associated with the MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_40setOperator[] = "MFN.setOperator(self, Mat A)\n\n Sets the matrix associated with the MFN object.\n\n Parameters\n ----------\n A: Mat\n The problem matrix.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setOperator (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperator") < 0)) __PYX_ERR(17, 283, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_A = ((struct PyPetscMatObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setOperator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 283, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(17, 283, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_A); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setOperator", 0); /* "SLEPc/MFN.pyx":292 * The problem matrix. * """ * CHKERR( MFNSetOperator(self.mfn, A.mat) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetOperator(__pyx_v_self->mfn, __pyx_v_A->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 292, __pyx_L1_error) /* "SLEPc/MFN.pyx":283 * return A * * def setOperator(self, Mat A not None): # <<<<<<<<<<<<<< * """ * Sets the matrix associated with the MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":296 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a MFN object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_42cancelMonitor[] = "MFN.cancelMonitor(self)\n\n Clears all monitors for a MFN object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(struct PySlepcMFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/MFN.pyx":300 * Clears all monitors for a MFN object. * """ * CHKERR( MFNMonitorCancel(self.mfn) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNMonitorCancel(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 300, __pyx_L1_error) /* "SLEPc/MFN.pyx":296 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a MFN object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":304 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_44setUp[] = "MFN.setUp(self)\n\n Sets up all the internal data structures necessary for the\n execution of the eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setUp (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(struct PySlepcMFNObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/MFN.pyx":309 * execution of the eigensolver. * """ * CHKERR( MFNSetUp(self.mfn) ) # <<<<<<<<<<<<<< * * def solve(self, Vec b not None, Vec x not None): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetUp(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 309, __pyx_L1_error) /* "SLEPc/MFN.pyx":304 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":311 * CHKERR( MFNSetUp(self.mfn) ) * * def solve(self, Vec b not None, Vec x not None): # <<<<<<<<<<<<<< * """ * Solves the matrix function problem. Given a vector b, the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_46solve[] = "MFN.solve(self, Vec b, Vec x)\n\n Solves the matrix function problem. Given a vector b, the\n vector x = f(alpha*A)*b is returned.\n\n Parameters\n ----------\n b: Vec\n The right hand side vector.\n x: Vec\n The solution.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_b = 0; struct PyPetscVecObject *__pyx_v_x = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("solve (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_b,&__pyx_n_s_x,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, 1); __PYX_ERR(17, 311, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solve") < 0)) __PYX_ERR(17, 311, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_b = ((struct PyPetscVecObject *)values[0]); __pyx_v_x = ((struct PyPetscVecObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 311, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "b", 0))) __PYX_ERR(17, 311, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(17, 311, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_b, __pyx_v_x); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_b, struct PyPetscVecObject *__pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/MFN.pyx":323 * The solution. * """ * CHKERR( MFNSolve(self.mfn, b.vec, x.vec) ) # <<<<<<<<<<<<<< * * def getIterationNumber(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSolve(__pyx_v_self->mfn, __pyx_v_b->vec, __pyx_v_x->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 323, __pyx_L1_error) /* "SLEPc/MFN.pyx":311 * CHKERR( MFNSetUp(self.mfn) ) * * def solve(self, Vec b not None, Vec x not None): # <<<<<<<<<<<<<< * """ * Solves the matrix function problem. Given a vector b, the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.MFN.solve", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":325 * CHKERR( MFNSolve(self.mfn, b.vec, x.vec) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_48getIterationNumber[] = "MFN.getIterationNumber(self)\n\n Gets the current iteration number. If the call to `solve()` is\n complete, then it returns the number of iterations carried out\n by the solution method.\n\n Returns\n -------\n its: int\n Iteration number.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(struct PySlepcMFNObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/MFN.pyx":336 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( MFNGetIterationNumber(self.mfn, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/MFN.pyx":337 * """ * cdef PetscInt ival = 0 * CHKERR( MFNGetIterationNumber(self.mfn, &ival) ) # <<<<<<<<<<<<<< * return toInt(ival) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetIterationNumber(__pyx_v_self->mfn, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 337, __pyx_L1_error) /* "SLEPc/MFN.pyx":338 * cdef PetscInt ival = 0 * CHKERR( MFNGetIterationNumber(self.mfn, &ival) ) * return toInt(ival) # <<<<<<<<<<<<<< * * def getConvergedReason(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":325 * CHKERR( MFNSolve(self.mfn, b.vec, x.vec) ) * * def getIterationNumber(self): # <<<<<<<<<<<<<< * """ * Gets the current iteration number. If the call to `solve()` is */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/MFN.pyx":340 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3MFN_50getConvergedReason[] = "MFN.getConvergedReason(self)\n\n Gets the reason why the `solve()` iteration was stopped.\n\n Returns\n -------\n reason: `MFN.ConvergedReason` enumerate\n Negative value indicates diverged, positive value\n converged.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(((struct PySlepcMFNObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(struct PySlepcMFNObject *__pyx_v_self) { MFNConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/MFN.pyx":350 * converged. * """ * cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( MFNGetConvergedReason(self.mfn, &val) ) * return val */ __pyx_v_val = MFN_CONVERGED_ITERATING; /* "SLEPc/MFN.pyx":351 * """ * cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING * CHKERR( MFNGetConvergedReason(self.mfn, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetConvergedReason(__pyx_v_self->mfn, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 351, __pyx_L1_error) /* "SLEPc/MFN.pyx":352 * cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING * CHKERR( MFNGetConvergedReason(self.mfn, &val) ) * return val # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MFNConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":340 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":3 * # ----------------------------------------------------------------------------- * * cdef inline int setref(void *d, void *s) except -1: # <<<<<<<<<<<<<< * cdef PetscObject *dest = d * cdef PetscObject source = s */ static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_setref(void *__pyx_v_d, void *__pyx_v_s) { PetscObject *__pyx_v_dest; PetscObject __pyx_v_source; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setref", 0); /* "SLEPc/CAPI.pyx":4 * * cdef inline int setref(void *d, void *s) except -1: * cdef PetscObject *dest = d # <<<<<<<<<<<<<< * cdef PetscObject source = s * CHKERR( PetscINCREF(&source) ) */ __pyx_v_dest = ((PetscObject *)__pyx_v_d); /* "SLEPc/CAPI.pyx":5 * cdef inline int setref(void *d, void *s) except -1: * cdef PetscObject *dest = d * cdef PetscObject source = s # <<<<<<<<<<<<<< * CHKERR( PetscINCREF(&source) ) * dest[0] = source */ __pyx_v_source = ((PetscObject)__pyx_v_s); /* "SLEPc/CAPI.pyx":6 * cdef PetscObject *dest = d * cdef PetscObject source = s * CHKERR( PetscINCREF(&source) ) # <<<<<<<<<<<<<< * dest[0] = source * return 0 */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(__pyx_f_8slepc4py_5SLEPc_PetscINCREF((&__pyx_v_source))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(18, 6, __pyx_L1_error) /* "SLEPc/CAPI.pyx":7 * cdef PetscObject source = s * CHKERR( PetscINCREF(&source) ) * dest[0] = source # <<<<<<<<<<<<<< * return 0 * */ (__pyx_v_dest[0]) = __pyx_v_source; /* "SLEPc/CAPI.pyx":8 * CHKERR( PetscINCREF(&source) ) * dest[0] = source * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/CAPI.pyx":3 * # ----------------------------------------------------------------------------- * * cdef inline int setref(void *d, void *s) except -1: # <<<<<<<<<<<<<< * cdef PetscObject *dest = d * cdef PetscObject source = s */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.setref", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":14 * # -- ST -- * * cdef api object PySlepcST_New(SlepcST arg): # <<<<<<<<<<<<<< * cdef ST retv = ST() * setref(&retv.st, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcST_New(ST __pyx_v_arg) { struct PySlepcSTObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcST_New", 0); /* "SLEPc/CAPI.pyx":15 * * cdef api object PySlepcST_New(SlepcST arg): * cdef ST retv = ST() # <<<<<<<<<<<<<< * setref(&retv.st, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":16 * cdef api object PySlepcST_New(SlepcST arg): * cdef ST retv = ST() * setref(&retv.st, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->st), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 16, __pyx_L1_error) /* "SLEPc/CAPI.pyx":17 * cdef ST retv = ST() * setref(&retv.st, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":14 * # -- ST -- * * cdef api object PySlepcST_New(SlepcST arg): # <<<<<<<<<<<<<< * cdef ST retv = ST() * setref(&retv.st, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcST_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":19 * return retv * * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcST retv = NULL * cdef ST ob = arg */ static ST __pyx_f_8slepc4py_5SLEPc_PySlepcST_Get(PyObject *__pyx_v_arg) { ST __pyx_v_retv; struct PySlepcSTObject *__pyx_v_ob = 0; ST __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; ST __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcST_Get", 0); /* "SLEPc/CAPI.pyx":20 * * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: * cdef SlepcST retv = NULL # <<<<<<<<<<<<<< * cdef ST ob = arg * retv = ob.st */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":21 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: * cdef SlepcST retv = NULL * cdef ST ob = arg # <<<<<<<<<<<<<< * retv = ob.st * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_ST)))) __PYX_ERR(18, 21, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":22 * cdef SlepcST retv = NULL * cdef ST ob = arg * retv = ob.st # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->st; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":23 * cdef ST ob = arg * retv = ob.st * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":19 * return retv * * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcST retv = NULL * cdef ST ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcST_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":29 * # -- BV -- * * cdef api object PySlepcBV_New(SlepcBV arg): # <<<<<<<<<<<<<< * cdef BV retv = BV() * setref(&retv.bv, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New(BV __pyx_v_arg) { struct PySlepcBVObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcBV_New", 0); /* "SLEPc/CAPI.pyx":30 * * cdef api object PySlepcBV_New(SlepcBV arg): * cdef BV retv = BV() # <<<<<<<<<<<<<< * setref(&retv.bv, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":31 * cdef api object PySlepcBV_New(SlepcBV arg): * cdef BV retv = BV() * setref(&retv.bv, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->bv), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 31, __pyx_L1_error) /* "SLEPc/CAPI.pyx":32 * cdef BV retv = BV() * setref(&retv.bv, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":29 * # -- BV -- * * cdef api object PySlepcBV_New(SlepcBV arg): # <<<<<<<<<<<<<< * cdef BV retv = BV() * setref(&retv.bv, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcBV_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":34 * return retv * * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcBV retv = NULL * cdef BV ob = arg */ static BV __pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get(PyObject *__pyx_v_arg) { BV __pyx_v_retv; struct PySlepcBVObject *__pyx_v_ob = 0; BV __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; BV __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcBV_Get", 0); /* "SLEPc/CAPI.pyx":35 * * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: * cdef SlepcBV retv = NULL # <<<<<<<<<<<<<< * cdef BV ob = arg * retv = ob.bv */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":36 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: * cdef SlepcBV retv = NULL * cdef BV ob = arg # <<<<<<<<<<<<<< * retv = ob.bv * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_BV)))) __PYX_ERR(18, 36, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":37 * cdef SlepcBV retv = NULL * cdef BV ob = arg * retv = ob.bv # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->bv; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":38 * cdef BV ob = arg * retv = ob.bv * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":34 * return retv * * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcBV retv = NULL * cdef BV ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcBV_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":44 * # -- DS -- * * cdef api object PySlepcDS_New(SlepcDS arg): # <<<<<<<<<<<<<< * cdef DS retv = DS() * setref(&retv.ds, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New(DS __pyx_v_arg) { struct PySlepcDSObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcDS_New", 0); /* "SLEPc/CAPI.pyx":45 * * cdef api object PySlepcDS_New(SlepcDS arg): * cdef DS retv = DS() # <<<<<<<<<<<<<< * setref(&retv.ds, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcDSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":46 * cdef api object PySlepcDS_New(SlepcDS arg): * cdef DS retv = DS() * setref(&retv.ds, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->ds), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 46, __pyx_L1_error) /* "SLEPc/CAPI.pyx":47 * cdef DS retv = DS() * setref(&retv.ds, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":44 * # -- DS -- * * cdef api object PySlepcDS_New(SlepcDS arg): # <<<<<<<<<<<<<< * cdef DS retv = DS() * setref(&retv.ds, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcDS_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":49 * return retv * * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcDS retv = NULL * cdef DS ob = arg */ static DS __pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get(PyObject *__pyx_v_arg) { DS __pyx_v_retv; struct PySlepcDSObject *__pyx_v_ob = 0; DS __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; DS __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcDS_Get", 0); /* "SLEPc/CAPI.pyx":50 * * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: * cdef SlepcDS retv = NULL # <<<<<<<<<<<<<< * cdef DS ob = arg * retv = ob.ds */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":51 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: * cdef SlepcDS retv = NULL * cdef DS ob = arg # <<<<<<<<<<<<<< * retv = ob.ds * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_DS)))) __PYX_ERR(18, 51, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcDSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":52 * cdef SlepcDS retv = NULL * cdef DS ob = arg * retv = ob.ds # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->ds; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":53 * cdef DS ob = arg * retv = ob.ds * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":49 * return retv * * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcDS retv = NULL * cdef DS ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcDS_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":59 * # -- FN -- * * cdef api object PySlepcFN_New(SlepcFN arg): # <<<<<<<<<<<<<< * cdef FN retv = FN() * setref(&retv.fn, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New(FN __pyx_v_arg) { struct PySlepcFNObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcFN_New", 0); /* "SLEPc/CAPI.pyx":60 * * cdef api object PySlepcFN_New(SlepcFN arg): * cdef FN retv = FN() # <<<<<<<<<<<<<< * setref(&retv.fn, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":61 * cdef api object PySlepcFN_New(SlepcFN arg): * cdef FN retv = FN() * setref(&retv.fn, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->fn), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 61, __pyx_L1_error) /* "SLEPc/CAPI.pyx":62 * cdef FN retv = FN() * setref(&retv.fn, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":59 * # -- FN -- * * cdef api object PySlepcFN_New(SlepcFN arg): # <<<<<<<<<<<<<< * cdef FN retv = FN() * setref(&retv.fn, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcFN_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":64 * return retv * * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcFN retv = NULL * cdef FN ob = arg */ static FN __pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get(PyObject *__pyx_v_arg) { FN __pyx_v_retv; struct PySlepcFNObject *__pyx_v_ob = 0; FN __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; FN __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcFN_Get", 0); /* "SLEPc/CAPI.pyx":65 * * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: * cdef SlepcFN retv = NULL # <<<<<<<<<<<<<< * cdef FN ob = arg * retv = ob.fn */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":66 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: * cdef SlepcFN retv = NULL * cdef FN ob = arg # <<<<<<<<<<<<<< * retv = ob.fn * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_FN)))) __PYX_ERR(18, 66, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":67 * cdef SlepcFN retv = NULL * cdef FN ob = arg * retv = ob.fn # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->fn; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":68 * cdef FN ob = arg * retv = ob.fn * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":64 * return retv * * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcFN retv = NULL * cdef FN ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcFN_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":74 * # -- RG -- * * cdef api object PySlepcRG_New(SlepcRG arg): # <<<<<<<<<<<<<< * cdef RG retv = RG() * setref(&retv.rg, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New(RG __pyx_v_arg) { struct PySlepcRGObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcRG_New", 0); /* "SLEPc/CAPI.pyx":75 * * cdef api object PySlepcRG_New(SlepcRG arg): * cdef RG retv = RG() # <<<<<<<<<<<<<< * setref(&retv.rg, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":76 * cdef api object PySlepcRG_New(SlepcRG arg): * cdef RG retv = RG() * setref(&retv.rg, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->rg), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 76, __pyx_L1_error) /* "SLEPc/CAPI.pyx":77 * cdef RG retv = RG() * setref(&retv.rg, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":74 * # -- RG -- * * cdef api object PySlepcRG_New(SlepcRG arg): # <<<<<<<<<<<<<< * cdef RG retv = RG() * setref(&retv.rg, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcRG_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":79 * return retv * * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcRG retv = NULL * cdef RG ob = arg */ static RG __pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get(PyObject *__pyx_v_arg) { RG __pyx_v_retv; struct PySlepcRGObject *__pyx_v_ob = 0; RG __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; RG __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcRG_Get", 0); /* "SLEPc/CAPI.pyx":80 * * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: * cdef SlepcRG retv = NULL # <<<<<<<<<<<<<< * cdef RG ob = arg * retv = ob.rg */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":81 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: * cdef SlepcRG retv = NULL * cdef RG ob = arg # <<<<<<<<<<<<<< * retv = ob.rg * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_RG)))) __PYX_ERR(18, 81, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":82 * cdef SlepcRG retv = NULL * cdef RG ob = arg * retv = ob.rg # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->rg; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":83 * cdef RG ob = arg * retv = ob.rg * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":79 * return retv * * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcRG retv = NULL * cdef RG ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcRG_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":89 * # -- EPS -- * * cdef api object PySlepcEPS_New(SlepcEPS arg): # <<<<<<<<<<<<<< * cdef EPS retv = EPS() * setref(&retv.eps, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New(EPS __pyx_v_arg) { struct PySlepcEPSObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcEPS_New", 0); /* "SLEPc/CAPI.pyx":90 * * cdef api object PySlepcEPS_New(SlepcEPS arg): * cdef EPS retv = EPS() # <<<<<<<<<<<<<< * setref(&retv.eps, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":91 * cdef api object PySlepcEPS_New(SlepcEPS arg): * cdef EPS retv = EPS() * setref(&retv.eps, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->eps), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 91, __pyx_L1_error) /* "SLEPc/CAPI.pyx":92 * cdef EPS retv = EPS() * setref(&retv.eps, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":89 * # -- EPS -- * * cdef api object PySlepcEPS_New(SlepcEPS arg): # <<<<<<<<<<<<<< * cdef EPS retv = EPS() * setref(&retv.eps, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcEPS_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":94 * return retv * * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcEPS retv = NULL * cdef EPS ob = arg */ static EPS __pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get(PyObject *__pyx_v_arg) { EPS __pyx_v_retv; struct PySlepcEPSObject *__pyx_v_ob = 0; EPS __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; EPS __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcEPS_Get", 0); /* "SLEPc/CAPI.pyx":95 * * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: * cdef SlepcEPS retv = NULL # <<<<<<<<<<<<<< * cdef EPS ob = arg * retv = ob.eps */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":96 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: * cdef SlepcEPS retv = NULL * cdef EPS ob = arg # <<<<<<<<<<<<<< * retv = ob.eps * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_EPS)))) __PYX_ERR(18, 96, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":97 * cdef SlepcEPS retv = NULL * cdef EPS ob = arg * retv = ob.eps # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->eps; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":98 * cdef EPS ob = arg * retv = ob.eps * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":94 * return retv * * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcEPS retv = NULL * cdef EPS ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcEPS_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":104 * # -- SVD -- * * cdef api object PySlepcSVD_New(SlepcSVD arg): # <<<<<<<<<<<<<< * cdef SVD retv = SVD() * setref(&retv.svd, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New(SVD __pyx_v_arg) { struct PySlepcSVDObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcSVD_New", 0); /* "SLEPc/CAPI.pyx":105 * * cdef api object PySlepcSVD_New(SlepcSVD arg): * cdef SVD retv = SVD() # <<<<<<<<<<<<<< * setref(&retv.svd, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcSVDObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":106 * cdef api object PySlepcSVD_New(SlepcSVD arg): * cdef SVD retv = SVD() * setref(&retv.svd, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->svd), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 106, __pyx_L1_error) /* "SLEPc/CAPI.pyx":107 * cdef SVD retv = SVD() * setref(&retv.svd, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":104 * # -- SVD -- * * cdef api object PySlepcSVD_New(SlepcSVD arg): # <<<<<<<<<<<<<< * cdef SVD retv = SVD() * setref(&retv.svd, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcSVD_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":109 * return retv * * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcSVD retv = NULL * cdef SVD ob = arg */ static SVD __pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get(PyObject *__pyx_v_arg) { SVD __pyx_v_retv; struct PySlepcSVDObject *__pyx_v_ob = 0; SVD __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; SVD __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcSVD_Get", 0); /* "SLEPc/CAPI.pyx":110 * * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: * cdef SlepcSVD retv = NULL # <<<<<<<<<<<<<< * cdef SVD ob = arg * retv = ob.svd */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":111 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: * cdef SlepcSVD retv = NULL * cdef SVD ob = arg # <<<<<<<<<<<<<< * retv = ob.svd * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_SVD)))) __PYX_ERR(18, 111, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcSVDObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":112 * cdef SlepcSVD retv = NULL * cdef SVD ob = arg * retv = ob.svd # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->svd; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":113 * cdef SVD ob = arg * retv = ob.svd * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":109 * return retv * * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcSVD retv = NULL * cdef SVD ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcSVD_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":119 * # -- PEP -- * * cdef api object PySlepcPEP_New(SlepcPEP arg): # <<<<<<<<<<<<<< * cdef PEP retv = PEP() * setref(&retv.pep, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New(PEP __pyx_v_arg) { struct PySlepcPEPObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcPEP_New", 0); /* "SLEPc/CAPI.pyx":120 * * cdef api object PySlepcPEP_New(SlepcPEP arg): * cdef PEP retv = PEP() # <<<<<<<<<<<<<< * setref(&retv.pep, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcPEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":121 * cdef api object PySlepcPEP_New(SlepcPEP arg): * cdef PEP retv = PEP() * setref(&retv.pep, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->pep), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 121, __pyx_L1_error) /* "SLEPc/CAPI.pyx":122 * cdef PEP retv = PEP() * setref(&retv.pep, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":119 * # -- PEP -- * * cdef api object PySlepcPEP_New(SlepcPEP arg): # <<<<<<<<<<<<<< * cdef PEP retv = PEP() * setref(&retv.pep, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcPEP_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":124 * return retv * * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcPEP retv = NULL * cdef PEP ob = arg */ static PEP __pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get(PyObject *__pyx_v_arg) { PEP __pyx_v_retv; struct PySlepcPEPObject *__pyx_v_ob = 0; PEP __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PEP __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcPEP_Get", 0); /* "SLEPc/CAPI.pyx":125 * * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: * cdef SlepcPEP retv = NULL # <<<<<<<<<<<<<< * cdef PEP ob = arg * retv = ob.pep */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":126 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: * cdef SlepcPEP retv = NULL * cdef PEP ob = arg # <<<<<<<<<<<<<< * retv = ob.pep * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_PEP)))) __PYX_ERR(18, 126, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcPEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":127 * cdef SlepcPEP retv = NULL * cdef PEP ob = arg * retv = ob.pep # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->pep; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":128 * cdef PEP ob = arg * retv = ob.pep * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":124 * return retv * * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcPEP retv = NULL * cdef PEP ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcPEP_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":134 * # -- NEP -- * * cdef api object PySlepcNEP_New(SlepcNEP arg): # <<<<<<<<<<<<<< * cdef NEP retv = NEP() * setref(&retv.nep, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New(NEP __pyx_v_arg) { struct PySlepcNEPObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcNEP_New", 0); /* "SLEPc/CAPI.pyx":135 * * cdef api object PySlepcNEP_New(SlepcNEP arg): * cdef NEP retv = NEP() # <<<<<<<<<<<<<< * setref(&retv.nep, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":136 * cdef api object PySlepcNEP_New(SlepcNEP arg): * cdef NEP retv = NEP() * setref(&retv.nep, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->nep), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 136, __pyx_L1_error) /* "SLEPc/CAPI.pyx":137 * cdef NEP retv = NEP() * setref(&retv.nep, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":134 * # -- NEP -- * * cdef api object PySlepcNEP_New(SlepcNEP arg): # <<<<<<<<<<<<<< * cdef NEP retv = NEP() * setref(&retv.nep, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcNEP_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":139 * return retv * * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcNEP retv = NULL * cdef NEP ob = arg */ static NEP __pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get(PyObject *__pyx_v_arg) { NEP __pyx_v_retv; struct PySlepcNEPObject *__pyx_v_ob = 0; NEP __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; NEP __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcNEP_Get", 0); /* "SLEPc/CAPI.pyx":140 * * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: * cdef SlepcNEP retv = NULL # <<<<<<<<<<<<<< * cdef NEP ob = arg * retv = ob.nep */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":141 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: * cdef SlepcNEP retv = NULL * cdef NEP ob = arg # <<<<<<<<<<<<<< * retv = ob.nep * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_NEP)))) __PYX_ERR(18, 141, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":142 * cdef SlepcNEP retv = NULL * cdef NEP ob = arg * retv = ob.nep # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->nep; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":143 * cdef NEP ob = arg * retv = ob.nep * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":139 * return retv * * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcNEP retv = NULL * cdef NEP ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcNEP_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":149 * # -- MFN -- * * cdef api object PySlepcMFN_New(SlepcMFN arg): # <<<<<<<<<<<<<< * cdef MFN retv = MFN() * setref(&retv.mfn, arg) */ static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New(MFN __pyx_v_arg) { struct PySlepcMFNObject *__pyx_v_retv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcMFN_New", 0); /* "SLEPc/CAPI.pyx":150 * * cdef api object PySlepcMFN_New(SlepcMFN arg): * cdef MFN retv = MFN() # <<<<<<<<<<<<<< * setref(&retv.mfn, arg) * return retv */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_retv = ((struct PySlepcMFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":151 * cdef api object PySlepcMFN_New(SlepcMFN arg): * cdef MFN retv = MFN() * setref(&retv.mfn, arg) # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->mfn), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 151, __pyx_L1_error) /* "SLEPc/CAPI.pyx":152 * cdef MFN retv = MFN() * setref(&retv.mfn, arg) * return retv # <<<<<<<<<<<<<< * * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_retv)); __pyx_r = ((PyObject *)__pyx_v_retv); goto __pyx_L0; /* "SLEPc/CAPI.pyx":149 * # -- MFN -- * * cdef api object PySlepcMFN_New(SlepcMFN arg): # <<<<<<<<<<<<<< * cdef MFN retv = MFN() * setref(&retv.mfn, arg) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcMFN_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_retv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/CAPI.pyx":154 * return retv * * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcMFN retv = NULL * cdef MFN ob = arg */ static MFN __pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get(PyObject *__pyx_v_arg) { MFN __pyx_v_retv; struct PySlepcMFNObject *__pyx_v_ob = 0; MFN __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; MFN __pyx_t_2; __Pyx_RefNannySetupContext("PySlepcMFN_Get", 0); /* "SLEPc/CAPI.pyx":155 * * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: * cdef SlepcMFN retv = NULL # <<<<<<<<<<<<<< * cdef MFN ob = arg * retv = ob.mfn */ __pyx_v_retv = NULL; /* "SLEPc/CAPI.pyx":156 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: * cdef SlepcMFN retv = NULL * cdef MFN ob = arg # <<<<<<<<<<<<<< * retv = ob.mfn * return retv */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_MFN)))) __PYX_ERR(18, 156, __pyx_L1_error) __pyx_t_1 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_v_ob = ((struct PySlepcMFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/CAPI.pyx":157 * cdef SlepcMFN retv = NULL * cdef MFN ob = arg * retv = ob.mfn # <<<<<<<<<<<<<< * return retv * */ __pyx_t_2 = __pyx_v_ob->mfn; __pyx_v_retv = __pyx_t_2; /* "SLEPc/CAPI.pyx":158 * cdef MFN ob = arg * retv = ob.mfn * return retv # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = __pyx_v_retv; goto __pyx_L0; /* "SLEPc/CAPI.pyx":154 * return retv * * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL: # <<<<<<<<<<<<<< * cdef SlepcMFN retv = NULL * cdef MFN ob = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcMFN_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":171 * int fprintf(FILE *, char *, ...) * * cdef int initialize(object args) except -1: # <<<<<<<<<<<<<< * if (SlepcInitializeCalled): return 1 * # initialize SLEPC */ static int __pyx_f_8slepc4py_5SLEPc_initialize(CYTHON_UNUSED PyObject *__pyx_v_args) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("initialize", 0); /* "SLEPc/SLEPc.pyx":172 * * cdef int initialize(object args) except -1: * if (SlepcInitializeCalled): return 1 # <<<<<<<<<<<<<< * # initialize SLEPC * CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) ) */ __pyx_t_1 = (((int)SlepcInitializeCalled) != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "SLEPc/SLEPc.pyx":174 * if (SlepcInitializeCalled): return 1 * # initialize SLEPC * CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) ) # <<<<<<<<<<<<<< * # register finalization function * if Py_AtExit(finalize) < 0: */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcInitialize(NULL, NULL, NULL, NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(4, 174, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":176 * CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) ) * # register finalization function * if Py_AtExit(finalize) < 0: # <<<<<<<<<<<<<< * PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()", * b"SlepcFinalize()") */ __pyx_t_1 = ((Py_AtExit(__pyx_f_8slepc4py_5SLEPc_finalize) < 0) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":177 * # register finalization function * if Py_AtExit(finalize) < 0: * PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()", # <<<<<<<<<<<<<< * b"SlepcFinalize()") * return 1 # and we are done, enjoy !! */ PySys_WriteStderr(((char *)"warning: could not register %s with Py_AtExit()"), ((char *)"SlepcFinalize()")); /* "SLEPc/SLEPc.pyx":176 * CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) ) * # register finalization function * if Py_AtExit(finalize) < 0: # <<<<<<<<<<<<<< * PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()", * b"SlepcFinalize()") */ } /* "SLEPc/SLEPc.pyx":179 * PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()", * b"SlepcFinalize()") * return 1 # and we are done, enjoy !! # <<<<<<<<<<<<<< * * from petsc4py.PETSc cimport PyPetscType_Register */ __pyx_r = 1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":171 * int fprintf(FILE *, char *, ...) * * cdef int initialize(object args) except -1: # <<<<<<<<<<<<<< * if (SlepcInitializeCalled): return 1 * # initialize SLEPC */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":197 * PetscClassId SLEPC_MFN_CLASSID "MFN_CLASSID" * * cdef int register(char path[]) except -1: # <<<<<<<<<<<<<< * # make sure all SLEPc packages are initialized * CHKERR( SlepcInitializePackageAll() ) */ static int __pyx_f_8slepc4py_5SLEPc_register(CYTHON_UNUSED char *__pyx_v_path) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("register", 0); /* "SLEPc/SLEPc.pyx":199 * cdef int register(char path[]) except -1: * # make sure all SLEPc packages are initialized * CHKERR( SlepcInitializePackageAll() ) # <<<<<<<<<<<<<< * # register Python types * PyPetscType_Register(SLEPC_ST_CLASSID, ST) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcInitializePackageAll()); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 199, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":201 * CHKERR( SlepcInitializePackageAll() ) * # register Python types * PyPetscType_Register(SLEPC_ST_CLASSID, ST) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_BV_CLASSID, BV) * PyPetscType_Register(SLEPC_DS_CLASSID, DS) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(ST_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_ST); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 201, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":202 * # register Python types * PyPetscType_Register(SLEPC_ST_CLASSID, ST) * PyPetscType_Register(SLEPC_BV_CLASSID, BV) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_DS_CLASSID, DS) * PyPetscType_Register(SLEPC_FN_CLASSID, FN) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(BV_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_BV); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 202, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":203 * PyPetscType_Register(SLEPC_ST_CLASSID, ST) * PyPetscType_Register(SLEPC_BV_CLASSID, BV) * PyPetscType_Register(SLEPC_DS_CLASSID, DS) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_FN_CLASSID, FN) * PyPetscType_Register(SLEPC_RG_CLASSID, RG) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(DS_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_DS); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 203, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":204 * PyPetscType_Register(SLEPC_BV_CLASSID, BV) * PyPetscType_Register(SLEPC_DS_CLASSID, DS) * PyPetscType_Register(SLEPC_FN_CLASSID, FN) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_RG_CLASSID, RG) * PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(FN_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_FN); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 204, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":205 * PyPetscType_Register(SLEPC_DS_CLASSID, DS) * PyPetscType_Register(SLEPC_FN_CLASSID, FN) * PyPetscType_Register(SLEPC_RG_CLASSID, RG) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) * PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(RG_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_RG); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 205, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":206 * PyPetscType_Register(SLEPC_FN_CLASSID, FN) * PyPetscType_Register(SLEPC_RG_CLASSID, RG) * PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) * PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(EPS_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_EPS); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 206, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":207 * PyPetscType_Register(SLEPC_RG_CLASSID, RG) * PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) * PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) * PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(SVD_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_SVD); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 207, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":208 * PyPetscType_Register(SLEPC_EPS_CLASSID, EPS) * PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) * PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) * PyPetscType_Register(SLEPC_MFN_CLASSID, MFN) */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(PEP_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_PEP); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 208, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":209 * PyPetscType_Register(SLEPC_SVD_CLASSID, SVD) * PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) * PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) # <<<<<<<<<<<<<< * PyPetscType_Register(SLEPC_MFN_CLASSID, MFN) * return 0 */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(NEP_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_NEP); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 209, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":210 * PyPetscType_Register(SLEPC_PEP_CLASSID, PEP) * PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) * PyPetscType_Register(SLEPC_MFN_CLASSID, MFN) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(MFN_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_MFN); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 210, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":211 * PyPetscType_Register(SLEPC_NEP_CLASSID, NEP) * PyPetscType_Register(SLEPC_MFN_CLASSID, MFN) * return 0 # <<<<<<<<<<<<<< * * cdef void finalize() nogil: */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":197 * PetscClassId SLEPC_MFN_CLASSID "MFN_CLASSID" * * cdef int register(char path[]) except -1: # <<<<<<<<<<<<<< * # make sure all SLEPc packages are initialized * CHKERR( SlepcInitializePackageAll() ) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.register", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":213 * return 0 * * cdef void finalize() nogil: # <<<<<<<<<<<<<< * # finalize SLEPc * cdef int ierr = 0 */ static void __pyx_f_8slepc4py_5SLEPc_finalize(void) { int __pyx_v_ierr; int __pyx_t_1; /* "SLEPc/SLEPc.pyx":215 * cdef void finalize() nogil: * # finalize SLEPc * cdef int ierr = 0 # <<<<<<<<<<<<<< * ierr = SlepcFinalize() * if ierr != 0: */ __pyx_v_ierr = 0; /* "SLEPc/SLEPc.pyx":216 * # finalize SLEPc * cdef int ierr = 0 * ierr = SlepcFinalize() # <<<<<<<<<<<<<< * if ierr != 0: * fprintf(stderr, "SlepcFinalize() failed " */ __pyx_v_ierr = SlepcFinalize(); /* "SLEPc/SLEPc.pyx":217 * cdef int ierr = 0 * ierr = SlepcFinalize() * if ierr != 0: # <<<<<<<<<<<<<< * fprintf(stderr, "SlepcFinalize() failed " * "[error code: %d]\n", ierr) */ __pyx_t_1 = ((__pyx_v_ierr != 0) != 0); if (__pyx_t_1) { /* "SLEPc/SLEPc.pyx":218 * ierr = SlepcFinalize() * if ierr != 0: * fprintf(stderr, "SlepcFinalize() failed " # <<<<<<<<<<<<<< * "[error code: %d]\n", ierr) * # and we are done, see you later !! */ fprintf(stderr, ((char *)"SlepcFinalize() failed [error code: %d]\n"), __pyx_v_ierr); /* "SLEPc/SLEPc.pyx":217 * cdef int ierr = 0 * ierr = SlepcFinalize() * if ierr != 0: # <<<<<<<<<<<<<< * fprintf(stderr, "SlepcFinalize() failed " * "[error code: %d]\n", ierr) */ } /* "SLEPc/SLEPc.pyx":213 * return 0 * * cdef void finalize() nogil: # <<<<<<<<<<<<<< * # finalize SLEPc * cdef int ierr = 0 */ /* function exit code */ } /* "SLEPc/SLEPc.pyx":224 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_1_initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc__initialize[] = "_initialize(args=None)"; static PyMethodDef __pyx_mdef_8slepc4py_5SLEPc_1_initialize = {"_initialize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_1_initialize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc__initialize}; static PyObject *__pyx_pw_8slepc4py_5SLEPc_1_initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_initialize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_initialize") < 0)) __PYX_ERR(4, 224, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_args = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_initialize", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 224, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc._initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc__initialize(__pyx_self, __pyx_v_args); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc__initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) { int __pyx_v_ready; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_initialize", 0); /* "SLEPc/SLEPc.pyx":225 * * def _initialize(args=None): * cdef int ready = initialize(args) # <<<<<<<<<<<<<< * if ready: register(NULL) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_initialize(__pyx_v_args); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 225, __pyx_L1_error) __pyx_v_ready = __pyx_t_1; /* "SLEPc/SLEPc.pyx":226 * def _initialize(args=None): * cdef int ready = initialize(args) * if ready: register(NULL) # <<<<<<<<<<<<<< * * def _finalize(): */ __pyx_t_2 = (__pyx_v_ready != 0); if (__pyx_t_2) { __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_register(NULL); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 226, __pyx_L1_error) } /* "SLEPc/SLEPc.pyx":224 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc._initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":228 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3_finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2_finalize[] = "_finalize()"; static PyMethodDef __pyx_mdef_8slepc4py_5SLEPc_3_finalize = {"_finalize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3_finalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2_finalize}; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3_finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_finalize (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("_finalize", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_finalize", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2_finalize(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2_finalize(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_finalize", 0); /* "SLEPc/SLEPc.pyx":229 * * def _finalize(): * finalize() # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_f_8slepc4py_5SLEPc_finalize(); /* "SLEPc/SLEPc.pyx":228 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_8slepc4py_5SLEPc_ST __pyx_vtable_8slepc4py_5SLEPc_ST; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_ST(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcSTObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcSTObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_ST; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_ST(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_ST); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_ST(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_ST)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_ST(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_ST); return 0; } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_shift(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_2ST_shift(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_mat_mode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_2ST_mat_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_ksp(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_2ST_ksp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_ST[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_12getType}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_14setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_16getOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_18setFromOptions}, {"setShift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_20setShift}, {"getShift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_22getShift}, {"setTransform", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_24setTransform}, {"getTransform", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_26getTransform}, {"setMatMode", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_28setMatMode}, {"getMatMode", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_30getMatMode}, {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_32setOperators}, {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_34getOperators}, {"setMatStructure", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_36setMatStructure}, {"setKSP", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_38setKSP}, {"getKSP", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_40getKSP}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_42setUp}, {"apply", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_45apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_44apply}, {"applyTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_46applyTranspose}, {"setCayleyAntishift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_48setCayleyAntishift}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_ST[] = { {(char *)"shift", __pyx_getprop_8slepc4py_5SLEPc_2ST_shift, __pyx_setprop_8slepc4py_5SLEPc_2ST_shift, (char *)0, 0}, {(char *)"mat_mode", __pyx_getprop_8slepc4py_5SLEPc_2ST_mat_mode, __pyx_setprop_8slepc4py_5SLEPc_2ST_mat_mode, (char *)0, 0}, {(char *)"ksp", __pyx_getprop_8slepc4py_5SLEPc_2ST_ksp, __pyx_setprop_8slepc4py_5SLEPc_2ST_ksp, (char *)0, 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcST_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.ST", /*tp_name*/ sizeof(struct PySlepcSTObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_ST, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n ST\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_ST, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_ST, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_ST, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_8slepc4py_5SLEPc_ST, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_ST, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV __pyx_vtable_8slepc4py_5SLEPc_BV; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_BV(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcBVObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcBVObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_BV; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_BV(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_BV); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_BV(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_BV)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_BV(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_BV); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_BV[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_4destroy}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_6create}, {"duplicate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_8duplicate}, {"copy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_11copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_10copy}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_13setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_12setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_15getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_14getType}, {"setSizes", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_16setSizes}, {"setSizesFromVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizesFromVec}, {"getSizes", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_20getSizes}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_22setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_24getOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_26setFromOptions}, {"getOrthogonalization", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_28getOrthogonalization}, {"setOrthogonalization", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_30setOrthogonalization}, {"getMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_32getMatrix}, {"setMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_34setMatrix}, {"applyMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_36applyMatrix}, {"setActiveColumns", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_38setActiveColumns}, {"getActiveColumns", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_40getActiveColumns}, {"scaleColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_42scaleColumn}, {"scale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_45scale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_44scale}, {"insertVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_46insertVec}, {"insertVecs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVecs}, {"dotVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_50dotVec}, {"getColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_52getColumn}, {"restoreColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_54restoreColumn}, {"dot", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_57dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_56dot}, {"matProject", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_58matProject}, {"matMult", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_60matMult}, {"matMultHermitianTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose}, {"multVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_64multVec}, {"normColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_66normColumn}, {"norm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_69norm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_68norm}, {"setRandom", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_70setRandom}, {"orthogonalizeVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_72orthogonalizeVec}, {"orthogonalize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_74orthogonalize}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcBV_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.BV", /*tp_name*/ sizeof(struct PySlepcBVObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_BV, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n BV\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_BV, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_BV, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_BV, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_BV, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS __pyx_vtable_8slepc4py_5SLEPc_DS; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_DS(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcDSObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcDSObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_DS; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_DS(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_DS); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_DS(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_DS)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_DS(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_DS); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_DS[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_12getType}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_14setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_16getOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_18setFromOptions}, {"allocate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_20allocate}, {"getLeadingDimension", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_22getLeadingDimension}, {"setState", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_25setState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_24setState}, {"getState", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_27getState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_26getState}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_28setDimensions}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_30getDimensions}, {"setMethod", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_32setMethod}, {"getMethod", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_34getMethod}, {"setCompact", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_36setCompact}, {"getCompact", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_38getCompact}, {"setExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_40setExtraRow}, {"getExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_42getExtraRow}, {"setRefined", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_44setRefined}, {"getRefined", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_46getRefined}, {"truncate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_48truncate}, {"updateExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_50updateExtraRow}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcDS_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.DS", /*tp_name*/ sizeof(struct PySlepcDSObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_DS, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n DS\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_DS, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_DS, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_DS, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_DS, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN __pyx_vtable_8slepc4py_5SLEPc_FN; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_FN(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcFNObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcFNObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_FN; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_FN(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_FN); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_FN(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_FN)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_FN(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_FN); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_FN[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_4destroy}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_6create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_8setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_10getType}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_12setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_14getOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_16setFromOptions}, {"evaluateFunction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_18evaluateFunction}, {"evaluateDerivative", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_20evaluateDerivative}, {"setScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_22setScale}, {"getScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_24getScale}, {"setRationalNumerator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_26setRationalNumerator}, {"setRationalDenominator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_28setRationalDenominator}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcFN_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.FN", /*tp_name*/ sizeof(struct PySlepcFNObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_FN, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n FN\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_FN, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_FN, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_FN, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_FN, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG __pyx_vtable_8slepc4py_5SLEPc_RG; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_RG(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcRGObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcRGObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_RG; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_RG(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_RG); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_RG(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_RG)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_RG(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_RG); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_RG[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_4destroy}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_6create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_8setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_10getType}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_12setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_14getOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_16setFromOptions}, {"isTrivial", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_18isTrivial}, {"getComplement", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_20getComplement}, {"setComplement", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_22setComplement}, {"setEllipseParameters", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_24setEllipseParameters}, {"getEllipseParameters", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_26getEllipseParameters}, {"setIntervalEndpoints", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints}, {"getIntervalEndpoints", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcRG_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.RG", /*tp_name*/ sizeof(struct PySlepcRGObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_RG, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n RG\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_RG, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_RG, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_RG, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_RG, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS __pyx_vtable_8slepc4py_5SLEPc_EPS; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_EPS(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcEPSObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcEPSObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_EPS; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_EPS(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_EPS)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_EPS(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_EPS); return 0; } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_problem_type(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_problem_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_extraction(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_extraction(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_which(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_which(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_target(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_tol(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_tol(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_max_it(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_max_it(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_st(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_st(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_bv(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_bv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_EPS[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_12getType}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_20setFromOptions}, {"getProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_22getProblemType}, {"setProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_24setProblemType}, {"isGeneralized", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_26isGeneralized}, {"isHermitian", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_28isHermitian}, {"isPositive", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_30isPositive}, {"getBalance", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_32getBalance}, {"setBalance", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_34setBalance}, {"getExtraction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_36getExtraction}, {"setExtraction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_38setExtraction}, {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs}, {"getTarget", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_44getTarget}, {"setTarget", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_46setTarget}, {"getInterval", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_48getInterval}, {"setInterval", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_50setInterval}, {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_52getTolerances}, {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_54setTolerances}, {"getConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_56getConvergenceTest}, {"setConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_58setConvergenceTest}, {"getTrueResidual", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_60getTrueResidual}, {"setTrueResidual", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_62setTrueResidual}, {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrackAll}, {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrackAll}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_68getDimensions}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_70setDimensions}, {"getST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_72getST}, {"setST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_74setST}, {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_76getBV}, {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_78setBV}, {"getDS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_80getDS}, {"setDS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_82setDS}, {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_84getRG}, {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_86setRG}, {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_88getOperators}, {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_90setOperators}, {"setDeflationSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_92setDeflationSpace}, {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_94setInitialSpace}, {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_96cancelMonitor}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_98setUp}, {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_100solve}, {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_102getIterationNumber}, {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_104getConvergedReason}, {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_106getConverged}, {"getEigenvalue", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_108getEigenvalue}, {"getEigenvector", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_110getEigenvector}, {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_112getEigenpair}, {"getInvariantSubspace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace}, {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_116getErrorEstimate}, {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_118computeError}, {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_120errorView}, {"setPowerShiftType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_122setPowerShiftType}, {"getPowerShiftType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_124getPowerShiftType}, {"setArnoldiDelayed", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed}, {"getArnoldiDelayed", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed}, {"setLanczosReorthogType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType}, {"getLanczosReorthogType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType}, {"setKrylovSchurRestart", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart}, {"getKrylovSchurRestart", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart}, {"setKrylovSchurLocking", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking}, {"getKrylovSchurLocking", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking}, {"setKrylovSchurPartitions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions}, {"getKrylovSchurPartitions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions}, {"setKrylovSchurDetectZeros", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros}, {"getKrylovSchurDetectZeros", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros}, {"setKrylovSchurDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions}, {"getKrylovSchurDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions}, {"getKrylovSchurSubcommInfo", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo}, {"getKrylovSchurSubcommPairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs}, {"getKrylovSchurSubcommMats", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats}, {"updateKrylovSchurSubcommMats", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats}, {"setKrylovSchurSubintervals", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals}, {"setRQCGReset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_164setRQCGReset}, {"getRQCGReset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_166getRQCGReset}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_EPS[] = { {(char *)"problem_type", __pyx_getprop_8slepc4py_5SLEPc_3EPS_problem_type, __pyx_setprop_8slepc4py_5SLEPc_3EPS_problem_type, (char *)0, 0}, {(char *)"extraction", __pyx_getprop_8slepc4py_5SLEPc_3EPS_extraction, __pyx_setprop_8slepc4py_5SLEPc_3EPS_extraction, (char *)0, 0}, {(char *)"which", __pyx_getprop_8slepc4py_5SLEPc_3EPS_which, __pyx_setprop_8slepc4py_5SLEPc_3EPS_which, (char *)0, 0}, {(char *)"target", __pyx_getprop_8slepc4py_5SLEPc_3EPS_target, __pyx_setprop_8slepc4py_5SLEPc_3EPS_target, (char *)0, 0}, {(char *)"tol", __pyx_getprop_8slepc4py_5SLEPc_3EPS_tol, __pyx_setprop_8slepc4py_5SLEPc_3EPS_tol, (char *)0, 0}, {(char *)"max_it", __pyx_getprop_8slepc4py_5SLEPc_3EPS_max_it, __pyx_setprop_8slepc4py_5SLEPc_3EPS_max_it, (char *)0, 0}, {(char *)"st", __pyx_getprop_8slepc4py_5SLEPc_3EPS_st, __pyx_setprop_8slepc4py_5SLEPc_3EPS_st, (char *)0, 0}, {(char *)"bv", __pyx_getprop_8slepc4py_5SLEPc_3EPS_bv, __pyx_setprop_8slepc4py_5SLEPc_3EPS_bv, (char *)0, 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcEPS_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.EPS", /*tp_name*/ sizeof(struct PySlepcEPSObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n EPS\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_EPS, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_EPS, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_EPS, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_8slepc4py_5SLEPc_EPS, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_EPS, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD __pyx_vtable_8slepc4py_5SLEPc_SVD; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_SVD(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcSVDObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcSVDObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_SVD; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_SVD(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_SVD)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_SVD(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_SVD); return 0; } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_transpose_mode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_transpose_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_which(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_which(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_tol(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_tol(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_max_it(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_max_it(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_bv(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(o); } static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_bv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_SVD[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_12getType}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_20setFromOptions}, {"getImplicitTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose}, {"setImplicitTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose}, {"getWhichSingularTriplets", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets}, {"setWhichSingularTriplets", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets}, {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_30getTolerances}, {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_32setTolerances}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_34getDimensions}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_36setDimensions}, {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_38getBV}, {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_40setBV}, {"getOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_42getOperator}, {"setOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_44setOperator}, {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_46setInitialSpace}, {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_48cancelMonitor}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_50setUp}, {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_52solve}, {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_54getIterationNumber}, {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_56getConvergedReason}, {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_58getConverged}, {"getValue", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_60getValue}, {"getVectors", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_62getVectors}, {"getSingularTriplet", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_64getSingularTriplet}, {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_66computeError}, {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_68errorView}, {"setCrossEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_70setCrossEPS}, {"getCrossEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_72getCrossEPS}, {"setCyclicEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_74setCyclicEPS}, {"getCyclicEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_76getCyclicEPS}, {"setCyclicExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix}, {"getCyclicExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix}, {"setLanczosOneSide", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide}, {"setTRLanczosOneSide", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_SVD[] = { {(char *)"transpose_mode", __pyx_getprop_8slepc4py_5SLEPc_3SVD_transpose_mode, __pyx_setprop_8slepc4py_5SLEPc_3SVD_transpose_mode, (char *)0, 0}, {(char *)"which", __pyx_getprop_8slepc4py_5SLEPc_3SVD_which, __pyx_setprop_8slepc4py_5SLEPc_3SVD_which, (char *)0, 0}, {(char *)"tol", __pyx_getprop_8slepc4py_5SLEPc_3SVD_tol, __pyx_setprop_8slepc4py_5SLEPc_3SVD_tol, (char *)0, 0}, {(char *)"max_it", __pyx_getprop_8slepc4py_5SLEPc_3SVD_max_it, __pyx_setprop_8slepc4py_5SLEPc_3SVD_max_it, (char *)0, 0}, {(char *)"bv", __pyx_getprop_8slepc4py_5SLEPc_3SVD_bv, __pyx_setprop_8slepc4py_5SLEPc_3SVD_bv, (char *)0, 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcSVD_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.SVD", /*tp_name*/ sizeof(struct PySlepcSVDObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n SVD\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_SVD, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_SVD, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_SVD, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_8slepc4py_5SLEPc_SVD, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_SVD, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP __pyx_vtable_8slepc4py_5SLEPc_PEP; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_PEP(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcPEPObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcPEPObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_PEP; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_PEP(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_PEP)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_PEP(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_PEP); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_PEP[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_12getType}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_20setFromOptions}, {"getBasis", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_22getBasis}, {"setBasis", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_24setBasis}, {"getProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_26getProblemType}, {"setProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_28setProblemType}, {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs}, {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTolerances}, {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTolerances}, {"getConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_38getConvergenceTest}, {"setConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_40setConvergenceTest}, {"getRefine", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_42getRefine}, {"setRefine", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_44setRefine}, {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_46getTrackAll}, {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_48setTrackAll}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_50getDimensions}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_52setDimensions}, {"getST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_54getST}, {"setST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_56setST}, {"getScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_58getScale}, {"setScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_60setScale}, {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_62getBV}, {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_64setBV}, {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_66getRG}, {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_68setRG}, {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_70getOperators}, {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_72setOperators}, {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_74setInitialSpace}, {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_76cancelMonitor}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_78setUp}, {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_80solve}, {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_82getIterationNumber}, {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_84getConvergedReason}, {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_86getConverged}, {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_88getEigenpair}, {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_90getErrorEstimate}, {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_92computeError}, {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_94errorView}, {"setLinearEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_96setLinearEPS}, {"getLinearEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_98getLinearEPS}, {"setLinearCompanionForm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm}, {"getLinearCompanionForm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm}, {"setLinearExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix}, {"getLinearExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcPEP_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.PEP", /*tp_name*/ sizeof(struct PySlepcPEPObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n PEP\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_PEP, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_PEP, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_PEP, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_PEP, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP __pyx_vtable_8slepc4py_5SLEPc_NEP; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_NEP(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcNEPObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcNEPObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_NEP; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_NEP(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_NEP)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_NEP(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_NEP); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_NEP[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_12getType}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_20setFromOptions}, {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs}, {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_26getTolerances}, {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_28setTolerances}, {"getRIILagPreconditioner", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner}, {"setRIILagPreconditioner", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner}, {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_34getTrackAll}, {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_36setTrackAll}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_38getDimensions}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_40setDimensions}, {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_42getBV}, {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_44setBV}, {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_46getRG}, {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_48setRG}, {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_50setInitialSpace}, {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_52cancelMonitor}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_54setUp}, {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_56solve}, {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_58getIterationNumber}, {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_60getConvergedReason}, {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_62getConverged}, {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_64getEigenpair}, {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_66getErrorEstimate}, {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_68computeError}, {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_70errorView}, {"setFunction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_72setFunction}, {"setJacobian", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_74setJacobian}, {"setSplitOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_76setSplitOperator}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcNEP_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.NEP", /*tp_name*/ sizeof(struct PySlepcNEPObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n NEP\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_NEP, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_NEP, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_NEP, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_NEP, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN __pyx_vtable_8slepc4py_5SLEPc_MFN; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_MFN(PyTypeObject *t, PyObject *a, PyObject *k) { struct PySlepcMFNObject *p; PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct PySlepcMFNObject *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_MFN; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN); } static int __pyx_tp_traverse_8slepc4py_5SLEPc_MFN(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_MFN)); if (e) return e; return 0; } static int __pyx_tp_clear_8slepc4py_5SLEPc_MFN(PyObject *o) { if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_MFN); return 0; } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_MFN[] = { {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_2view}, {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_4destroy}, {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_6reset}, {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_8create}, {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_10setType}, {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_12getType}, {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_20setFromOptions}, {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_22getTolerances}, {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_24setTolerances}, {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_26getDimensions}, {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_28setDimensions}, {"getFN", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_30getFN}, {"setFN", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_32setFN}, {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_34getBV}, {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_36setBV}, {"getOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_38getOperator}, {"setOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_40setOperator}, {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_42cancelMonitor}, {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_44setUp}, {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_46solve}, {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_48getIterationNumber}, {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_50getConvergedReason}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PySlepcMFN_Type = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.MFN", /*tp_name*/ sizeof(struct PySlepcMFNObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n MFN\n ", /*tp_doc*/ __pyx_tp_traverse_8slepc4py_5SLEPc_MFN, /*tp_traverse*/ __pyx_tp_clear_8slepc4py_5SLEPc_MFN, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_MFN, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_MFN, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc__p_mem(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc__p_mem(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc__p_mem[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_8slepc4py_5SLEPc__p_mem = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc._p_mem", /*tp_name*/ sizeof(struct __pyx_obj_8slepc4py_5SLEPc__p_mem), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc__p_mem, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc__p_mem, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc__p_mem, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_Sys(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_Sys(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_Sys[] = { {"getVersion", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3Sys_getVersion}, {"getVersionInfo", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3Sys_2getVersionInfo}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_8slepc4py_5SLEPc_Sys = { PyVarObject_HEAD_INIT(0, 0) "slepc4py.SLEPc.Sys", /*tp_name*/ sizeof(struct __pyx_obj_8slepc4py_5SLEPc_Sys), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8slepc4py_5SLEPc_Sys, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8slepc4py_5SLEPc_Sys, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8slepc4py_5SLEPc_Sys, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "SLEPc", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ (freefunc)__pyx_module_cleanup /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, {&__pyx_n_s_ABS, __pyx_k_ABS, sizeof(__pyx_k_ABS), 0, 0, 1, 1}, {&__pyx_n_s_ABSOLUTE, __pyx_k_ABSOLUTE, sizeof(__pyx_k_ABSOLUTE), 0, 0, 1, 1}, {&__pyx_n_s_ADD, __pyx_k_ADD, sizeof(__pyx_k_ADD), 0, 0, 1, 1}, {&__pyx_n_s_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 0, 0, 1, 1}, {&__pyx_n_s_ALWAYS, __pyx_k_ALWAYS, sizeof(__pyx_k_ALWAYS), 0, 0, 1, 1}, {&__pyx_n_s_ARNOLDI, __pyx_k_ARNOLDI, sizeof(__pyx_k_ARNOLDI), 0, 0, 1, 1}, {&__pyx_n_s_ARPACK, __pyx_k_ARPACK, sizeof(__pyx_k_ARPACK), 0, 0, 1, 1}, {&__pyx_n_s_Au, __pyx_k_Au, sizeof(__pyx_k_Au), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_n_s_BACKWARD, __pyx_k_BACKWARD, sizeof(__pyx_k_BACKWARD), 0, 0, 1, 1}, {&__pyx_n_s_BLOPEX, __pyx_k_BLOPEX, sizeof(__pyx_k_BLOPEX), 0, 0, 1, 1}, {&__pyx_n_s_BLZPACK, __pyx_k_BLZPACK, sizeof(__pyx_k_BLZPACK), 0, 0, 1, 1}, {&__pyx_n_s_BOTH, __pyx_k_BOTH, sizeof(__pyx_k_BOTH), 0, 0, 1, 1}, {&__pyx_n_s_BVOrthogBlockType, __pyx_k_BVOrthogBlockType, sizeof(__pyx_k_BVOrthogBlockType), 0, 0, 1, 1}, {&__pyx_n_s_BVOrthogRefineType, __pyx_k_BVOrthogRefineType, sizeof(__pyx_k_BVOrthogRefineType), 0, 0, 1, 1}, {&__pyx_n_s_BVOrthogType, __pyx_k_BVOrthogType, sizeof(__pyx_k_BVOrthogType), 0, 0, 1, 1}, {&__pyx_n_s_BVType, __pyx_k_BVType, sizeof(__pyx_k_BVType), 0, 0, 1, 1}, {&__pyx_kp_s_BV_block_orthogonalization_type, __pyx_k_BV_block_orthogonalization_type, sizeof(__pyx_k_BV_block_orthogonalization_type), 0, 0, 1, 0}, {&__pyx_kp_s_BV_orthogonalization_refinement, __pyx_k_BV_orthogonalization_refinement, sizeof(__pyx_k_BV_orthogonalization_refinement), 0, 0, 1, 0}, {&__pyx_kp_s_BV_orthogonalization_types_CGS, __pyx_k_BV_orthogonalization_types_CGS, sizeof(__pyx_k_BV_orthogonalization_types_CGS), 0, 0, 1, 0}, {&__pyx_kp_s_BV_type, __pyx_k_BV_type, sizeof(__pyx_k_BV_type), 0, 0, 1, 0}, {&__pyx_n_s_Balance, __pyx_k_Balance, sizeof(__pyx_k_Balance), 0, 0, 1, 1}, {&__pyx_n_s_Basis, __pyx_k_Basis, sizeof(__pyx_k_Basis), 0, 0, 1, 1}, {&__pyx_n_s_BlockType, __pyx_k_BlockType, sizeof(__pyx_k_BlockType), 0, 0, 1, 1}, {&__pyx_n_s_Bu, __pyx_k_Bu, sizeof(__pyx_k_Bu), 0, 0, 1, 1}, {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, {&__pyx_n_s_CAYLEY, __pyx_k_CAYLEY, sizeof(__pyx_k_CAYLEY), 0, 0, 1, 1}, {&__pyx_n_s_CGS, __pyx_k_CGS, sizeof(__pyx_k_CGS), 0, 0, 1, 1}, {&__pyx_n_s_CHEBYSHEV1, __pyx_k_CHEBYSHEV1, sizeof(__pyx_k_CHEBYSHEV1), 0, 0, 1, 1}, {&__pyx_n_s_CHEBYSHEV2, __pyx_k_CHEBYSHEV2, sizeof(__pyx_k_CHEBYSHEV2), 0, 0, 1, 1}, {&__pyx_n_s_CHOL, __pyx_k_CHOL, sizeof(__pyx_k_CHOL), 0, 0, 1, 1}, {&__pyx_n_s_CISS, __pyx_k_CISS, sizeof(__pyx_k_CISS), 0, 0, 1, 1}, {&__pyx_n_s_COMBINE, __pyx_k_COMBINE, sizeof(__pyx_k_COMBINE), 0, 0, 1, 1}, {&__pyx_n_s_COMM_NULL, __pyx_k_COMM_NULL, sizeof(__pyx_k_COMM_NULL), 0, 0, 1, 1}, {&__pyx_n_s_COMM_SELF, __pyx_k_COMM_SELF, sizeof(__pyx_k_COMM_SELF), 0, 0, 1, 1}, {&__pyx_n_s_COMM_WORLD, __pyx_k_COMM_WORLD, sizeof(__pyx_k_COMM_WORLD), 0, 0, 1, 1}, {&__pyx_n_s_COMPOSE, __pyx_k_COMPOSE, sizeof(__pyx_k_COMPOSE), 0, 0, 1, 1}, {&__pyx_n_s_CONDENSED, __pyx_k_CONDENSED, sizeof(__pyx_k_CONDENSED), 0, 0, 1, 1}, {&__pyx_n_s_CONSTANT, __pyx_k_CONSTANT, sizeof(__pyx_k_CONSTANT), 0, 0, 1, 1}, {&__pyx_n_s_CONTIGUOUS, __pyx_k_CONTIGUOUS, sizeof(__pyx_k_CONTIGUOUS), 0, 0, 1, 1}, {&__pyx_n_s_CONVERGED_ITERATING, __pyx_k_CONVERGED_ITERATING, sizeof(__pyx_k_CONVERGED_ITERATING), 0, 0, 1, 1}, {&__pyx_n_s_CONVERGED_ITS, __pyx_k_CONVERGED_ITS, sizeof(__pyx_k_CONVERGED_ITS), 0, 0, 1, 1}, {&__pyx_n_s_CONVERGED_TOL, __pyx_k_CONVERGED_TOL, sizeof(__pyx_k_CONVERGED_TOL), 0, 0, 1, 1}, {&__pyx_n_s_CONVERGED_USER, __pyx_k_CONVERGED_USER, sizeof(__pyx_k_CONVERGED_USER), 0, 0, 1, 1}, {&__pyx_n_s_COPY, __pyx_k_COPY, sizeof(__pyx_k_COPY), 0, 0, 1, 1}, {&__pyx_n_s_CROSS, __pyx_k_CROSS, sizeof(__pyx_k_CROSS), 0, 0, 1, 1}, {&__pyx_n_s_CYCLIC, __pyx_k_CYCLIC, sizeof(__pyx_k_CYCLIC), 0, 0, 1, 1}, {&__pyx_n_s_CombineType, __pyx_k_CombineType, sizeof(__pyx_k_CombineType), 0, 0, 1, 1}, {&__pyx_n_s_Conv, __pyx_k_Conv, sizeof(__pyx_k_Conv), 0, 0, 1, 1}, {&__pyx_n_s_ConvergedReason, __pyx_k_ConvergedReason, sizeof(__pyx_k_ConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, {&__pyx_n_s_DECIDE, __pyx_k_DECIDE, sizeof(__pyx_k_DECIDE), 0, 0, 1, 1}, {&__pyx_n_s_DEFAULT, __pyx_k_DEFAULT, sizeof(__pyx_k_DEFAULT), 0, 0, 1, 1}, {&__pyx_n_s_DELAYED, __pyx_k_DELAYED, sizeof(__pyx_k_DELAYED), 0, 0, 1, 1}, {&__pyx_n_s_DETERMINE, __pyx_k_DETERMINE, sizeof(__pyx_k_DETERMINE), 0, 0, 1, 1}, {&__pyx_n_s_DIAGONAL, __pyx_k_DIAGONAL, sizeof(__pyx_k_DIAGONAL), 0, 0, 1, 1}, {&__pyx_n_s_DIVERGED_BREAKDOWN, __pyx_k_DIVERGED_BREAKDOWN, sizeof(__pyx_k_DIVERGED_BREAKDOWN), 0, 0, 1, 1}, {&__pyx_n_s_DIVERGED_ITS, __pyx_k_DIVERGED_ITS, sizeof(__pyx_k_DIVERGED_ITS), 0, 0, 1, 1}, {&__pyx_n_s_DIVERGED_LINEAR_SOLVE, __pyx_k_DIVERGED_LINEAR_SOLVE, sizeof(__pyx_k_DIVERGED_LINEAR_SOLVE), 0, 0, 1, 1}, {&__pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_k_DIVERGED_SYMMETRY_LOST, sizeof(__pyx_k_DIVERGED_SYMMETRY_LOST), 0, 0, 1, 1}, {&__pyx_n_s_DIVIDE, __pyx_k_DIVIDE, sizeof(__pyx_k_DIVIDE), 0, 0, 1, 1}, {&__pyx_n_s_DSMatType, __pyx_k_DSMatType, sizeof(__pyx_k_DSMatType), 0, 0, 1, 1}, {&__pyx_n_s_DSStateType, __pyx_k_DSStateType, sizeof(__pyx_k_DSStateType), 0, 0, 1, 1}, {&__pyx_n_s_DSType, __pyx_k_DSType, sizeof(__pyx_k_DSType), 0, 0, 1, 1}, {&__pyx_kp_s_DS_state_types_RAW_Not_processe, __pyx_k_DS_state_types_RAW_Not_processe, sizeof(__pyx_k_DS_state_types_RAW_Not_processe), 0, 0, 1, 0}, {&__pyx_kp_s_DS_type, __pyx_k_DS_type, sizeof(__pyx_k_DS_type), 0, 0, 1, 0}, {&__pyx_n_s_Dl, __pyx_k_Dl, sizeof(__pyx_k_Dl), 0, 0, 1, 1}, {&__pyx_n_s_Dr, __pyx_k_Dr, sizeof(__pyx_k_Dr), 0, 0, 1, 1}, {&__pyx_n_s_ELLIPSE, __pyx_k_ELLIPSE, sizeof(__pyx_k_ELLIPSE), 0, 0, 1, 1}, {&__pyx_n_s_EPSBalance, __pyx_k_EPSBalance, sizeof(__pyx_k_EPSBalance), 0, 0, 1, 1}, {&__pyx_n_s_EPSConv, __pyx_k_EPSConv, sizeof(__pyx_k_EPSConv), 0, 0, 1, 1}, {&__pyx_n_s_EPSConvergedReason, __pyx_k_EPSConvergedReason, sizeof(__pyx_k_EPSConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_EPSErrorType, __pyx_k_EPSErrorType, sizeof(__pyx_k_EPSErrorType), 0, 0, 1, 1}, {&__pyx_n_s_EPSExtraction, __pyx_k_EPSExtraction, sizeof(__pyx_k_EPSExtraction), 0, 0, 1, 1}, {&__pyx_n_s_EPSLanczosReorthogType, __pyx_k_EPSLanczosReorthogType, sizeof(__pyx_k_EPSLanczosReorthogType), 0, 0, 1, 1}, {&__pyx_n_s_EPSPowerShiftType, __pyx_k_EPSPowerShiftType, sizeof(__pyx_k_EPSPowerShiftType), 0, 0, 1, 1}, {&__pyx_n_s_EPSProblemType, __pyx_k_EPSProblemType, sizeof(__pyx_k_EPSProblemType), 0, 0, 1, 1}, {&__pyx_n_s_EPSType, __pyx_k_EPSType, sizeof(__pyx_k_EPSType), 0, 0, 1, 1}, {&__pyx_n_s_EPSWhich, __pyx_k_EPSWhich, sizeof(__pyx_k_EPSWhich), 0, 0, 1, 1}, {&__pyx_kp_s_EPS_Lanczos_reorthogonalization, __pyx_k_EPS_Lanczos_reorthogonalization, sizeof(__pyx_k_EPS_Lanczos_reorthogonalization), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_Power_shift_type_CONSTANT_R, __pyx_k_EPS_Power_shift_type_CONSTANT_R, sizeof(__pyx_k_EPS_Power_shift_type_CONSTANT_R), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_convergence_reasons_CONVERG, __pyx_k_EPS_convergence_reasons_CONVERG, sizeof(__pyx_k_EPS_convergence_reasons_CONVERG), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_convergence_test_ABS_REL_NO, __pyx_k_EPS_convergence_test_ABS_REL_NO, sizeof(__pyx_k_EPS_convergence_test_ABS_REL_NO), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_desired_piece_of_spectrum_L, __pyx_k_EPS_desired_piece_of_spectrum_L, sizeof(__pyx_k_EPS_desired_piece_of_spectrum_L), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_error_type_to_assess_accura, __pyx_k_EPS_error_type_to_assess_accura, sizeof(__pyx_k_EPS_error_type_to_assess_accura), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_extraction_technique_RITZ_S, __pyx_k_EPS_extraction_technique_RITZ_S, sizeof(__pyx_k_EPS_extraction_technique_RITZ_S), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_problem_type_HEP_Hermitian, __pyx_k_EPS_problem_type_HEP_Hermitian, sizeof(__pyx_k_EPS_problem_type_HEP_Hermitian), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_type_Native_sparse_eigensol, __pyx_k_EPS_type_Native_sparse_eigensol, sizeof(__pyx_k_EPS_type_Native_sparse_eigensol), 0, 0, 1, 0}, {&__pyx_kp_s_EPS_type_of_balancing_used_for, __pyx_k_EPS_type_of_balancing_used_for, sizeof(__pyx_k_EPS_type_of_balancing_used_for), 0, 0, 1, 0}, {&__pyx_n_s_EXP, __pyx_k_EXP, sizeof(__pyx_k_EXP), 0, 0, 1, 1}, {&__pyx_n_s_EXPLICIT, __pyx_k_EXPLICIT, sizeof(__pyx_k_EXPLICIT), 0, 0, 1, 1}, {&__pyx_n_s_EXPOKIT, __pyx_k_EXPOKIT, sizeof(__pyx_k_EXPOKIT), 0, 0, 1, 1}, {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1}, {&__pyx_n_s_ErrorType, __pyx_k_ErrorType, sizeof(__pyx_k_ErrorType), 0, 0, 1, 1}, {&__pyx_n_s_Extract, __pyx_k_Extract, sizeof(__pyx_k_Extract), 0, 0, 1, 1}, {&__pyx_n_s_Extraction, __pyx_k_Extraction, sizeof(__pyx_k_Extraction), 0, 0, 1, 1}, {&__pyx_kp_s_Extraction_strategy_used_to_obt, __pyx_k_Extraction_strategy_used_to_obt, sizeof(__pyx_k_Extraction_strategy_used_to_obt), 0, 0, 1, 0}, {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1}, {&__pyx_n_s_FEAST, __pyx_k_FEAST, sizeof(__pyx_k_FEAST), 0, 0, 1, 1}, {&__pyx_n_s_FNCombineType, __pyx_k_FNCombineType, sizeof(__pyx_k_FNCombineType), 0, 0, 1, 1}, {&__pyx_n_s_FNType, __pyx_k_FNType, sizeof(__pyx_k_FNType), 0, 0, 1, 1}, {&__pyx_kp_s_FN_type, __pyx_k_FN_type, sizeof(__pyx_k_FN_type), 0, 0, 1, 0}, {&__pyx_kp_s_FN_type_of_combination_of_child, __pyx_k_FN_type_of_combination_of_child, sizeof(__pyx_k_FN_type_of_combination_of_child), 0, 0, 1, 0}, {&__pyx_n_s_FULL, __pyx_k_FULL, sizeof(__pyx_k_FULL), 0, 0, 1, 1}, {&__pyx_n_s_GD, __pyx_k_GD, sizeof(__pyx_k_GD), 0, 0, 1, 1}, {&__pyx_n_s_GENERAL, __pyx_k_GENERAL, sizeof(__pyx_k_GENERAL), 0, 0, 1, 1}, {&__pyx_n_s_GHEP, __pyx_k_GHEP, sizeof(__pyx_k_GHEP), 0, 0, 1, 1}, {&__pyx_n_s_GHIEP, __pyx_k_GHIEP, sizeof(__pyx_k_GHIEP), 0, 0, 1, 1}, {&__pyx_n_s_GNHEP, __pyx_k_GNHEP, sizeof(__pyx_k_GNHEP), 0, 0, 1, 1}, {&__pyx_n_s_GS, __pyx_k_GS, sizeof(__pyx_k_GS), 0, 0, 1, 1}, {&__pyx_n_s_GYROSCOPIC, __pyx_k_GYROSCOPIC, sizeof(__pyx_k_GYROSCOPIC), 0, 0, 1, 1}, {&__pyx_n_s_HARMONIC, __pyx_k_HARMONIC, sizeof(__pyx_k_HARMONIC), 0, 0, 1, 1}, {&__pyx_n_s_HARMONIC_LARGEST, __pyx_k_HARMONIC_LARGEST, sizeof(__pyx_k_HARMONIC_LARGEST), 0, 0, 1, 1}, {&__pyx_n_s_HARMONIC_RELATIVE, __pyx_k_HARMONIC_RELATIVE, sizeof(__pyx_k_HARMONIC_RELATIVE), 0, 0, 1, 1}, {&__pyx_n_s_HARMONIC_RIGHT, __pyx_k_HARMONIC_RIGHT, sizeof(__pyx_k_HARMONIC_RIGHT), 0, 0, 1, 1}, {&__pyx_n_s_HEP, __pyx_k_HEP, sizeof(__pyx_k_HEP), 0, 0, 1, 1}, {&__pyx_n_s_HERMITE, __pyx_k_HERMITE, sizeof(__pyx_k_HERMITE), 0, 0, 1, 1}, {&__pyx_n_s_HERMITIAN, __pyx_k_HERMITIAN, sizeof(__pyx_k_HERMITIAN), 0, 0, 1, 1}, {&__pyx_n_s_IFNEEDED, __pyx_k_IFNEEDED, sizeof(__pyx_k_IFNEEDED), 0, 0, 1, 1}, {&__pyx_n_s_INPLACE, __pyx_k_INPLACE, sizeof(__pyx_k_INPLACE), 0, 0, 1, 1}, {&__pyx_n_s_INTERMEDIATE, __pyx_k_INTERMEDIATE, sizeof(__pyx_k_INTERMEDIATE), 0, 0, 1, 1}, {&__pyx_n_s_INTERPOL, __pyx_k_INTERPOL, sizeof(__pyx_k_INTERPOL), 0, 0, 1, 1}, {&__pyx_n_s_INTERVAL, __pyx_k_INTERVAL, sizeof(__pyx_k_INTERVAL), 0, 0, 1, 1}, {&__pyx_n_s_INVSQRT, __pyx_k_INVSQRT, sizeof(__pyx_k_INVSQRT), 0, 0, 1, 1}, {&__pyx_n_s_ITERATING, __pyx_k_ITERATING, sizeof(__pyx_k_ITERATING), 0, 0, 1, 1}, {&__pyx_n_s_J, __pyx_k_J, sizeof(__pyx_k_J), 0, 0, 1, 1}, {&__pyx_n_s_JD, __pyx_k_JD, sizeof(__pyx_k_JD), 0, 0, 1, 1}, {&__pyx_n_s_KRYLOV, __pyx_k_KRYLOV, sizeof(__pyx_k_KRYLOV), 0, 0, 1, 1}, {&__pyx_n_s_KRYLOVSCHUR, __pyx_k_KRYLOVSCHUR, sizeof(__pyx_k_KRYLOVSCHUR), 0, 0, 1, 1}, {&__pyx_n_s_LAGUERRE, __pyx_k_LAGUERRE, sizeof(__pyx_k_LAGUERRE), 0, 0, 1, 1}, {&__pyx_n_s_LANCZOS, __pyx_k_LANCZOS, sizeof(__pyx_k_LANCZOS), 0, 0, 1, 1}, {&__pyx_n_s_LAPACK, __pyx_k_LAPACK, sizeof(__pyx_k_LAPACK), 0, 0, 1, 1}, {&__pyx_n_s_LARGEST, __pyx_k_LARGEST, sizeof(__pyx_k_LARGEST), 0, 0, 1, 1}, {&__pyx_n_s_LARGEST_IMAGINARY, __pyx_k_LARGEST_IMAGINARY, sizeof(__pyx_k_LARGEST_IMAGINARY), 0, 0, 1, 1}, {&__pyx_n_s_LARGEST_MAGNITUDE, __pyx_k_LARGEST_MAGNITUDE, sizeof(__pyx_k_LARGEST_MAGNITUDE), 0, 0, 1, 1}, {&__pyx_n_s_LARGEST_REAL, __pyx_k_LARGEST_REAL, sizeof(__pyx_k_LARGEST_REAL), 0, 0, 1, 1}, {&__pyx_n_s_LEGENDRE, __pyx_k_LEGENDRE, sizeof(__pyx_k_LEGENDRE), 0, 0, 1, 1}, {&__pyx_n_s_LINEAR, __pyx_k_LINEAR, sizeof(__pyx_k_LINEAR), 0, 0, 1, 1}, {&__pyx_n_s_LOBPCG, __pyx_k_LOBPCG, sizeof(__pyx_k_LOBPCG), 0, 0, 1, 1}, {&__pyx_n_s_LOCAL, __pyx_k_LOCAL, sizeof(__pyx_k_LOCAL), 0, 0, 1, 1}, {&__pyx_n_s_LOG, __pyx_k_LOG, sizeof(__pyx_k_LOG), 0, 0, 1, 1}, {&__pyx_n_s_LanczosReorthogType, __pyx_k_LanczosReorthogType, sizeof(__pyx_k_LanczosReorthogType), 0, 0, 1, 1}, {&__pyx_n_s_MAT, __pyx_k_MAT, sizeof(__pyx_k_MAT), 0, 0, 1, 1}, {&__pyx_n_s_MBE, __pyx_k_MBE, sizeof(__pyx_k_MBE), 0, 0, 1, 1}, {&__pyx_n_s_MFNConvergedReason, __pyx_k_MFNConvergedReason, sizeof(__pyx_k_MFNConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_MFNType, __pyx_k_MFNType, sizeof(__pyx_k_MFNType), 0, 0, 1, 1}, {&__pyx_kp_s_MFN_type_Action_of_a_matrix_fun, __pyx_k_MFN_type_Action_of_a_matrix_fun, sizeof(__pyx_k_MFN_type_Action_of_a_matrix_fun), 0, 0, 1, 0}, {&__pyx_n_s_MGS, __pyx_k_MGS, sizeof(__pyx_k_MGS), 0, 0, 1, 1}, {&__pyx_n_s_MONOMIAL, __pyx_k_MONOMIAL, sizeof(__pyx_k_MONOMIAL), 0, 0, 1, 1}, {&__pyx_n_s_MULTIPLE, __pyx_k_MULTIPLE, sizeof(__pyx_k_MULTIPLE), 0, 0, 1, 1}, {&__pyx_n_s_MULTIPLY, __pyx_k_MULTIPLY, sizeof(__pyx_k_MULTIPLY), 0, 0, 1, 1}, {&__pyx_n_s_MatMode, __pyx_k_MatMode, sizeof(__pyx_k_MatMode), 0, 0, 1, 1}, {&__pyx_n_s_MatType, __pyx_k_MatType, sizeof(__pyx_k_MatType), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_NARNOLDI, __pyx_k_NARNOLDI, sizeof(__pyx_k_NARNOLDI), 0, 0, 1, 1}, {&__pyx_n_s_NEP, __pyx_k_NEP, sizeof(__pyx_k_NEP), 0, 0, 1, 1}, {&__pyx_n_s_NEPConvergedReason, __pyx_k_NEPConvergedReason, sizeof(__pyx_k_NEPConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_NEPErrorType, __pyx_k_NEPErrorType, sizeof(__pyx_k_NEPErrorType), 0, 0, 1, 1}, {&__pyx_n_s_NEPRefine, __pyx_k_NEPRefine, sizeof(__pyx_k_NEPRefine), 0, 0, 1, 1}, {&__pyx_n_s_NEPRefineScheme, __pyx_k_NEPRefineScheme, sizeof(__pyx_k_NEPRefineScheme), 0, 0, 1, 1}, {&__pyx_n_s_NEPType, __pyx_k_NEPType, sizeof(__pyx_k_NEPType), 0, 0, 1, 1}, {&__pyx_n_s_NEPWhich, __pyx_k_NEPWhich, sizeof(__pyx_k_NEPWhich), 0, 0, 1, 1}, {&__pyx_kp_s_NEP_error_type_to_assess_accura, __pyx_k_NEP_error_type_to_assess_accura, sizeof(__pyx_k_NEP_error_type_to_assess_accura), 0, 0, 1, 0}, {&__pyx_kp_s_NEP_refinement_strategy_NONE_No, __pyx_k_NEP_refinement_strategy_NONE_No, sizeof(__pyx_k_NEP_refinement_strategy_NONE_No), 0, 0, 1, 0}, {&__pyx_kp_s_NEP_type_Nonlinear_eigensolvers, __pyx_k_NEP_type_Nonlinear_eigensolvers, sizeof(__pyx_k_NEP_type_Nonlinear_eigensolvers), 0, 0, 1, 0}, {&__pyx_n_s_NEVER, __pyx_k_NEVER, sizeof(__pyx_k_NEVER), 0, 0, 1, 1}, {&__pyx_n_s_NHEP, __pyx_k_NHEP, sizeof(__pyx_k_NHEP), 0, 0, 1, 1}, {&__pyx_n_s_NLEIGS, __pyx_k_NLEIGS, sizeof(__pyx_k_NLEIGS), 0, 0, 1, 1}, {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1}, {&__pyx_n_s_NORM, __pyx_k_NORM, sizeof(__pyx_k_NORM), 0, 0, 1, 1}, {&__pyx_n_s_ONESIDE, __pyx_k_ONESIDE, sizeof(__pyx_k_ONESIDE), 0, 0, 1, 1}, {&__pyx_n_s_OrthogBlockType, __pyx_k_OrthogBlockType, sizeof(__pyx_k_OrthogBlockType), 0, 0, 1, 1}, {&__pyx_n_s_OrthogRefineType, __pyx_k_OrthogRefineType, sizeof(__pyx_k_OrthogRefineType), 0, 0, 1, 1}, {&__pyx_n_s_OrthogType, __pyx_k_OrthogType, sizeof(__pyx_k_OrthogType), 0, 0, 1, 1}, {&__pyx_n_s_P, __pyx_k_P, sizeof(__pyx_k_P), 0, 0, 1, 1}, {&__pyx_n_s_PARTIAL, __pyx_k_PARTIAL, sizeof(__pyx_k_PARTIAL), 0, 0, 1, 1}, {&__pyx_n_s_PEP, __pyx_k_PEP, sizeof(__pyx_k_PEP), 0, 0, 1, 1}, {&__pyx_n_s_PEPBasis, __pyx_k_PEPBasis, sizeof(__pyx_k_PEPBasis), 0, 0, 1, 1}, {&__pyx_n_s_PEPConv, __pyx_k_PEPConv, sizeof(__pyx_k_PEPConv), 0, 0, 1, 1}, {&__pyx_n_s_PEPConvergedReason, __pyx_k_PEPConvergedReason, sizeof(__pyx_k_PEPConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_PEPErrorType, __pyx_k_PEPErrorType, sizeof(__pyx_k_PEPErrorType), 0, 0, 1, 1}, {&__pyx_n_s_PEPExtract, __pyx_k_PEPExtract, sizeof(__pyx_k_PEPExtract), 0, 0, 1, 1}, {&__pyx_n_s_PEPProblemType, __pyx_k_PEPProblemType, sizeof(__pyx_k_PEPProblemType), 0, 0, 1, 1}, {&__pyx_n_s_PEPRefine, __pyx_k_PEPRefine, sizeof(__pyx_k_PEPRefine), 0, 0, 1, 1}, {&__pyx_n_s_PEPRefineScheme, __pyx_k_PEPRefineScheme, sizeof(__pyx_k_PEPRefineScheme), 0, 0, 1, 1}, {&__pyx_n_s_PEPScale, __pyx_k_PEPScale, sizeof(__pyx_k_PEPScale), 0, 0, 1, 1}, {&__pyx_n_s_PEPType, __pyx_k_PEPType, sizeof(__pyx_k_PEPType), 0, 0, 1, 1}, {&__pyx_n_s_PEPWhich, __pyx_k_PEPWhich, sizeof(__pyx_k_PEPWhich), 0, 0, 1, 1}, {&__pyx_kp_s_PEP_convergence_reasons_CONVERG, __pyx_k_PEP_convergence_reasons_CONVERG, sizeof(__pyx_k_PEP_convergence_reasons_CONVERG), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_convergence_test_ABS_REL_NO, __pyx_k_PEP_convergence_test_ABS_REL_NO, sizeof(__pyx_k_PEP_convergence_test_ABS_REL_NO), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_desired_part_of_spectrum_LA, __pyx_k_PEP_desired_part_of_spectrum_LA, sizeof(__pyx_k_PEP_desired_part_of_spectrum_LA), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_error_type_to_assess_accura, __pyx_k_PEP_error_type_to_assess_accura, sizeof(__pyx_k_PEP_error_type_to_assess_accura), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_problem_type_GENERAL_No_str, __pyx_k_PEP_problem_type_GENERAL_No_str, sizeof(__pyx_k_PEP_problem_type_GENERAL_No_str), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_refinement_strategy_NONE_No, __pyx_k_PEP_refinement_strategy_NONE_No, sizeof(__pyx_k_PEP_refinement_strategy_NONE_No), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_scaling_strategy_NONE_No_sc, __pyx_k_PEP_scaling_strategy_NONE_No_sc, sizeof(__pyx_k_PEP_scaling_strategy_NONE_No_sc), 0, 0, 1, 0}, {&__pyx_kp_s_PEP_type_Polynomial_eigensolver, __pyx_k_PEP_type_Polynomial_eigensolver, sizeof(__pyx_k_PEP_type_Polynomial_eigensolver), 0, 0, 1, 0}, {&__pyx_n_s_PERIODIC, __pyx_k_PERIODIC, sizeof(__pyx_k_PERIODIC), 0, 0, 1, 1}, {&__pyx_n_s_PGNHEP, __pyx_k_PGNHEP, sizeof(__pyx_k_PGNHEP), 0, 0, 1, 1}, {&__pyx_n_s_PHI, __pyx_k_PHI, sizeof(__pyx_k_PHI), 0, 0, 1, 1}, {&__pyx_n_s_POLYGON, __pyx_k_POLYGON, sizeof(__pyx_k_POLYGON), 0, 0, 1, 1}, {&__pyx_n_s_POWER, __pyx_k_POWER, sizeof(__pyx_k_POWER), 0, 0, 1, 1}, {&__pyx_n_s_PRECOND, __pyx_k_PRECOND, sizeof(__pyx_k_PRECOND), 0, 0, 1, 1}, {&__pyx_n_s_PRIMME, __pyx_k_PRIMME, sizeof(__pyx_k_PRIMME), 0, 0, 1, 1}, {&__pyx_n_s_PowerShiftType, __pyx_k_PowerShiftType, sizeof(__pyx_k_PowerShiftType), 0, 0, 1, 1}, {&__pyx_n_s_ProblemType, __pyx_k_ProblemType, sizeof(__pyx_k_ProblemType), 0, 0, 1, 1}, {&__pyx_n_s_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 1, 1}, {&__pyx_n_s_QARNOLDI, __pyx_k_QARNOLDI, sizeof(__pyx_k_QARNOLDI), 0, 0, 1, 1}, {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1}, {&__pyx_n_s_RATIONAL, __pyx_k_RATIONAL, sizeof(__pyx_k_RATIONAL), 0, 0, 1, 1}, {&__pyx_n_s_RAW, __pyx_k_RAW, sizeof(__pyx_k_RAW), 0, 0, 1, 1}, {&__pyx_n_s_RAYLEIGH, __pyx_k_RAYLEIGH, sizeof(__pyx_k_RAYLEIGH), 0, 0, 1, 1}, {&__pyx_n_s_REFINED, __pyx_k_REFINED, sizeof(__pyx_k_REFINED), 0, 0, 1, 1}, {&__pyx_n_s_REFINED_HARMONIC, __pyx_k_REFINED_HARMONIC, sizeof(__pyx_k_REFINED_HARMONIC), 0, 0, 1, 1}, {&__pyx_n_s_REL, __pyx_k_REL, sizeof(__pyx_k_REL), 0, 0, 1, 1}, {&__pyx_n_s_RELATIVE, __pyx_k_RELATIVE, sizeof(__pyx_k_RELATIVE), 0, 0, 1, 1}, {&__pyx_n_s_RESIDUAL, __pyx_k_RESIDUAL, sizeof(__pyx_k_RESIDUAL), 0, 0, 1, 1}, {&__pyx_n_s_RGType, __pyx_k_RGType, sizeof(__pyx_k_RGType), 0, 0, 1, 1}, {&__pyx_kp_s_RG_type, __pyx_k_RG_type, sizeof(__pyx_k_RG_type), 0, 0, 1, 0}, {&__pyx_n_s_RII, __pyx_k_RII, sizeof(__pyx_k_RII), 0, 0, 1, 1}, {&__pyx_n_s_RING, __pyx_k_RING, sizeof(__pyx_k_RING), 0, 0, 1, 1}, {&__pyx_n_s_RITZ, __pyx_k_RITZ, sizeof(__pyx_k_RITZ), 0, 0, 1, 1}, {&__pyx_n_s_RQCG, __pyx_k_RQCG, sizeof(__pyx_k_RQCG), 0, 0, 1, 1}, {&__pyx_n_s_Refine, __pyx_k_Refine, sizeof(__pyx_k_Refine), 0, 0, 1, 1}, {&__pyx_n_s_RefineScheme, __pyx_k_RefineScheme, sizeof(__pyx_k_RefineScheme), 0, 0, 1, 1}, {&__pyx_n_s_RefineType, __pyx_k_RefineType, sizeof(__pyx_k_RefineType), 0, 0, 1, 1}, {&__pyx_n_s_SCALAR, __pyx_k_SCALAR, sizeof(__pyx_k_SCALAR), 0, 0, 1, 1}, {&__pyx_n_s_SCHUR, __pyx_k_SCHUR, sizeof(__pyx_k_SCHUR), 0, 0, 1, 1}, {&__pyx_n_s_SELECTIVE, __pyx_k_SELECTIVE, sizeof(__pyx_k_SELECTIVE), 0, 0, 1, 1}, {&__pyx_n_s_SHELL, __pyx_k_SHELL, sizeof(__pyx_k_SHELL), 0, 0, 1, 1}, {&__pyx_n_s_SHIFT, __pyx_k_SHIFT, sizeof(__pyx_k_SHIFT), 0, 0, 1, 1}, {&__pyx_n_s_SIMPLE, __pyx_k_SIMPLE, sizeof(__pyx_k_SIMPLE), 0, 0, 1, 1}, {&__pyx_n_s_SINVERT, __pyx_k_SINVERT, sizeof(__pyx_k_SINVERT), 0, 0, 1, 1}, {&__pyx_n_s_SLP, __pyx_k_SLP, sizeof(__pyx_k_SLP), 0, 0, 1, 1}, {&__pyx_n_s_SMALLEST, __pyx_k_SMALLEST, sizeof(__pyx_k_SMALLEST), 0, 0, 1, 1}, {&__pyx_n_s_SMALLEST_IMAGINARY, __pyx_k_SMALLEST_IMAGINARY, sizeof(__pyx_k_SMALLEST_IMAGINARY), 0, 0, 1, 1}, {&__pyx_n_s_SMALLEST_MAGNITUDE, __pyx_k_SMALLEST_MAGNITUDE, sizeof(__pyx_k_SMALLEST_MAGNITUDE), 0, 0, 1, 1}, {&__pyx_n_s_SMALLEST_REAL, __pyx_k_SMALLEST_REAL, sizeof(__pyx_k_SMALLEST_REAL), 0, 0, 1, 1}, {&__pyx_n_s_SQRT, __pyx_k_SQRT, sizeof(__pyx_k_SQRT), 0, 0, 1, 1}, {&__pyx_n_s_STMatMode, __pyx_k_STMatMode, sizeof(__pyx_k_STMatMode), 0, 0, 1, 1}, {&__pyx_n_s_STOAR, __pyx_k_STOAR, sizeof(__pyx_k_STOAR), 0, 0, 1, 1}, {&__pyx_n_s_STRUCTURED, __pyx_k_STRUCTURED, sizeof(__pyx_k_STRUCTURED), 0, 0, 1, 1}, {&__pyx_n_s_STType, __pyx_k_STType, sizeof(__pyx_k_STType), 0, 0, 1, 1}, {&__pyx_kp_s_ST_matrix_mode_COPY_A_working_c, __pyx_k_ST_matrix_mode_COPY_A_working_c, sizeof(__pyx_k_ST_matrix_mode_COPY_A_working_c), 0, 0, 1, 0}, {&__pyx_kp_s_ST_types_SHELL_User_defined_SHI, __pyx_k_ST_types_SHELL_User_defined_SHI, sizeof(__pyx_k_ST_types_SHELL_User_defined_SHI), 0, 0, 1, 0}, {&__pyx_n_s_SUBSPACE, __pyx_k_SUBSPACE, sizeof(__pyx_k_SUBSPACE), 0, 0, 1, 1}, {&__pyx_n_s_SVD, __pyx_k_SVD, sizeof(__pyx_k_SVD), 0, 0, 1, 1}, {&__pyx_n_s_SVDConvergedReason, __pyx_k_SVDConvergedReason, sizeof(__pyx_k_SVDConvergedReason), 0, 0, 1, 1}, {&__pyx_n_s_SVDErrorType, __pyx_k_SVDErrorType, sizeof(__pyx_k_SVDErrorType), 0, 0, 1, 1}, {&__pyx_n_s_SVDType, __pyx_k_SVDType, sizeof(__pyx_k_SVDType), 0, 0, 1, 1}, {&__pyx_n_s_SVDWhich, __pyx_k_SVDWhich, sizeof(__pyx_k_SVDWhich), 0, 0, 1, 1}, {&__pyx_kp_s_SVD_convergence_reasons_CONVERG, __pyx_k_SVD_convergence_reasons_CONVERG, sizeof(__pyx_k_SVD_convergence_reasons_CONVERG), 0, 0, 1, 0}, {&__pyx_kp_s_SVD_desired_piece_of_spectrum_L, __pyx_k_SVD_desired_piece_of_spectrum_L, sizeof(__pyx_k_SVD_desired_piece_of_spectrum_L), 0, 0, 1, 0}, {&__pyx_kp_s_SVD_error_type_to_assess_accura, __pyx_k_SVD_error_type_to_assess_accura, sizeof(__pyx_k_SVD_error_type_to_assess_accura), 0, 0, 1, 0}, {&__pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi, __pyx_k_SVD_types_CROSS_Eigenproblem_wi, sizeof(__pyx_k_SVD_types_CROSS_Eigenproblem_wi), 0, 0, 1, 0}, {&__pyx_n_s_SVEC, __pyx_k_SVEC, sizeof(__pyx_k_SVEC), 0, 0, 1, 1}, {&__pyx_kp_s_Scalable_Library_for_Eigenvalue, __pyx_k_Scalable_Library_for_Eigenvalue, sizeof(__pyx_k_Scalable_Library_for_Eigenvalue), 0, 0, 1, 0}, {&__pyx_n_s_Scale, __pyx_k_Scale, sizeof(__pyx_k_Scale), 0, 0, 1, 1}, {&__pyx_kp_s_Scheme_for_solving_linear_syste, __pyx_k_Scheme_for_solving_linear_syste, sizeof(__pyx_k_Scheme_for_solving_linear_syste), 0, 0, 1, 0}, {&__pyx_n_s_StateType, __pyx_k_StateType, sizeof(__pyx_k_StateType), 0, 0, 1, 1}, {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1}, {&__pyx_n_s_TARGET_IMAGINARY, __pyx_k_TARGET_IMAGINARY, sizeof(__pyx_k_TARGET_IMAGINARY), 0, 0, 1, 1}, {&__pyx_n_s_TARGET_MAGNITUDE, __pyx_k_TARGET_MAGNITUDE, sizeof(__pyx_k_TARGET_MAGNITUDE), 0, 0, 1, 1}, {&__pyx_n_s_TARGET_REAL, __pyx_k_TARGET_REAL, sizeof(__pyx_k_TARGET_REAL), 0, 0, 1, 1}, {&__pyx_n_s_TOAR, __pyx_k_TOAR, sizeof(__pyx_k_TOAR), 0, 0, 1, 1}, {&__pyx_n_s_TRLAN, __pyx_k_TRLAN, sizeof(__pyx_k_TRLAN), 0, 0, 1, 1}, {&__pyx_n_s_TRLANCZOS, __pyx_k_TRLANCZOS, sizeof(__pyx_k_TRLANCZOS), 0, 0, 1, 1}, {&__pyx_n_s_TRUNCATED, __pyx_k_TRUNCATED, sizeof(__pyx_k_TRUNCATED), 0, 0, 1, 1}, {&__pyx_n_s_TWOSIDE, __pyx_k_TWOSIDE, sizeof(__pyx_k_TWOSIDE), 0, 0, 1, 1}, {&__pyx_kp_s_To_refer_to_one_of_the_matrices, __pyx_k_To_refer_to_one_of_the_matrices, sizeof(__pyx_k_To_refer_to_one_of_the_matrices), 0, 0, 1, 0}, {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1}, {&__pyx_n_s_USER, __pyx_k_USER, sizeof(__pyx_k_USER), 0, 0, 1, 1}, {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1}, {&__pyx_n_s_VECS, __pyx_k_VECS, sizeof(__pyx_k_VECS), 0, 0, 1, 1}, {&__pyx_n_s_VT, __pyx_k_VT, sizeof(__pyx_k_VT), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_Vi, __pyx_k_Vi, sizeof(__pyx_k_Vi), 0, 0, 1, 1}, {&__pyx_n_s_Vr, __pyx_k_Vr, sizeof(__pyx_k_Vr), 0, 0, 1, 1}, {&__pyx_n_s_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1}, {&__pyx_n_s_WILKINSON, __pyx_k_WILKINSON, sizeof(__pyx_k_WILKINSON), 0, 0, 1, 1}, {&__pyx_n_s_Which, __pyx_k_Which, sizeof(__pyx_k_Which), 0, 0, 1, 1}, {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1}, {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1}, {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1}, {&__pyx_n_s_authorinfo, __pyx_k_authorinfo, sizeof(__pyx_k_authorinfo), 0, 0, 1, 1}, {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_n_s_balance, __pyx_k_balance, sizeof(__pyx_k_balance), 0, 0, 1, 1}, {&__pyx_n_s_basis, __pyx_k_basis, sizeof(__pyx_k_basis), 0, 0, 1, 1}, {&__pyx_n_s_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 0, 0, 1, 1}, {&__pyx_n_s_block, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1}, {&__pyx_n_s_bv, __pyx_k_bv, sizeof(__pyx_k_bv), 0, 0, 1, 1}, {&__pyx_n_s_bv_type, __pyx_k_bv_type, sizeof(__pyx_k_bv_type), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1}, {&__pyx_n_s_cform, __pyx_k_cform, sizeof(__pyx_k_cform), 0, 0, 1, 1}, {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1}, {&__pyx_n_s_comp, __pyx_k_comp, sizeof(__pyx_k_comp), 0, 0, 1, 1}, {&__pyx_n_s_conv, __pyx_k_conv, sizeof(__pyx_k_conv), 0, 0, 1, 1}, {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1}, {&__pyx_n_s_createDense, __pyx_k_createDense, sizeof(__pyx_k_createDense), 0, 0, 1, 1}, {&__pyx_n_s_cutoff, __pyx_k_cutoff, sizeof(__pyx_k_cutoff), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_delayed, __pyx_k_delayed, sizeof(__pyx_k_delayed), 0, 0, 1, 1}, {&__pyx_n_s_detect, __pyx_k_detect, sizeof(__pyx_k_detect), 0, 0, 1, 1}, {&__pyx_n_s_devel, __pyx_k_devel, sizeof(__pyx_k_devel), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_ds, __pyx_k_ds, sizeof(__pyx_k_ds), 0, 0, 1, 1}, {&__pyx_n_s_ds_type, __pyx_k_ds_type, sizeof(__pyx_k_ds_type), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 0, 0, 1, 1}, {&__pyx_n_s_eps_type, __pyx_k_eps_type, sizeof(__pyx_k_eps_type), 0, 0, 1, 1}, {&__pyx_n_s_eta, __pyx_k_eta, sizeof(__pyx_k_eta), 0, 0, 1, 1}, {&__pyx_n_s_etype, __pyx_k_etype, sizeof(__pyx_k_etype), 0, 0, 1, 1}, {&__pyx_n_s_ext, __pyx_k_ext, sizeof(__pyx_k_ext), 0, 0, 1, 1}, {&__pyx_n_s_extraction, __pyx_k_extraction, sizeof(__pyx_k_extraction), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1}, {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1}, {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1}, {&__pyx_n_s_fn_type, __pyx_k_fn_type, sizeof(__pyx_k_fn_type), 0, 0, 1, 1}, {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1}, {&__pyx_n_s_getActiveColumns, __pyx_k_getActiveColumns, sizeof(__pyx_k_getActiveColumns), 0, 0, 1, 1}, {&__pyx_n_s_getBV, __pyx_k_getBV, sizeof(__pyx_k_getBV), 0, 0, 1, 1}, {&__pyx_n_s_getExtraction, __pyx_k_getExtraction, sizeof(__pyx_k_getExtraction), 0, 0, 1, 1}, {&__pyx_n_s_getKSP, __pyx_k_getKSP, sizeof(__pyx_k_getKSP), 0, 0, 1, 1}, {&__pyx_n_s_getMatMode, __pyx_k_getMatMode, sizeof(__pyx_k_getMatMode), 0, 0, 1, 1}, {&__pyx_n_s_getProblemType, __pyx_k_getProblemType, sizeof(__pyx_k_getProblemType), 0, 0, 1, 1}, {&__pyx_n_s_getST, __pyx_k_getST, sizeof(__pyx_k_getST), 0, 0, 1, 1}, {&__pyx_n_s_getShift, __pyx_k_getShift, sizeof(__pyx_k_getShift), 0, 0, 1, 1}, {&__pyx_n_s_getTarget, __pyx_k_getTarget, sizeof(__pyx_k_getTarget), 0, 0, 1, 1}, {&__pyx_n_s_getTolerances, __pyx_k_getTolerances, sizeof(__pyx_k_getTolerances), 0, 0, 1, 1}, {&__pyx_n_s_getTransposeMode, __pyx_k_getTransposeMode, sizeof(__pyx_k_getTransposeMode), 0, 0, 1, 1}, {&__pyx_n_s_getVersion, __pyx_k_getVersion, sizeof(__pyx_k_getVersion), 0, 0, 1, 1}, {&__pyx_n_s_getVersionInfo, __pyx_k_getVersionInfo, sizeof(__pyx_k_getVersionInfo), 0, 0, 1, 1}, {&__pyx_n_s_getWhichEigenpairs, __pyx_k_getWhichEigenpairs, sizeof(__pyx_k_getWhichEigenpairs), 0, 0, 1, 1}, {&__pyx_n_s_getWhichSingularTriplets, __pyx_k_getWhichSingularTriplets, sizeof(__pyx_k_getWhichSingularTriplets), 0, 0, 1, 1}, {&__pyx_n_s_ghostUpdate, __pyx_k_ghostUpdate, sizeof(__pyx_k_ghostUpdate), 0, 0, 1, 1}, {&__pyx_n_s_globalup, __pyx_k_globalup, sizeof(__pyx_k_globalup), 0, 0, 1, 1}, {&__pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_k_home_dalcinl_Devel_slepc4py_dev, sizeof(__pyx_k_home_dalcinl_Devel_slepc4py_dev), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_indef, __pyx_k_indef, sizeof(__pyx_k_indef), 0, 0, 1, 1}, {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1}, {&__pyx_n_s_inta, __pyx_k_inta, sizeof(__pyx_k_inta), 0, 0, 1, 1}, {&__pyx_n_s_intb, __pyx_k_intb, sizeof(__pyx_k_intb), 0, 0, 1, 1}, {&__pyx_n_s_iterations, __pyx_k_iterations, sizeof(__pyx_k_iterations), 0, 0, 1, 1}, {&__pyx_n_s_its, __pyx_k_its, sizeof(__pyx_k_its), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_kargs, __pyx_k_kargs, sizeof(__pyx_k_kargs), 0, 0, 1, 1}, {&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1}, {&__pyx_n_s_ksp, __pyx_k_ksp, sizeof(__pyx_k_ksp), 0, 0, 1, 1}, {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, {&__pyx_n_s_lag, __pyx_k_lag, sizeof(__pyx_k_lag), 0, 0, 1, 1}, {&__pyx_n_s_lbda, __pyx_k_lbda, sizeof(__pyx_k_lbda), 0, 0, 1, 1}, {&__pyx_n_s_ld, __pyx_k_ld, sizeof(__pyx_k_ld), 0, 0, 1, 1}, {&__pyx_kp_s_local_and_global_sizes_cannot_be, __pyx_k_local_and_global_sizes_cannot_be, sizeof(__pyx_k_local_and_global_sizes_cannot_be), 0, 0, 1, 0}, {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1}, {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1}, {&__pyx_n_s_max_it, __pyx_k_max_it, sizeof(__pyx_k_max_it), 0, 0, 1, 1}, {&__pyx_n_s_maxit, __pyx_k_maxit, sizeof(__pyx_k_maxit), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_meth, __pyx_k_meth, sizeof(__pyx_k_meth), 0, 0, 1, 1}, {&__pyx_n_s_mfn_type, __pyx_k_mfn_type, sizeof(__pyx_k_mfn_type), 0, 0, 1, 1}, {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mpd, __pyx_k_mpd, sizeof(__pyx_k_mpd), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_ncv, __pyx_k_ncv, sizeof(__pyx_k_ncv), 0, 0, 1, 1}, {&__pyx_n_s_nep_type, __pyx_k_nep_type, sizeof(__pyx_k_nep_type), 0, 0, 1, 1}, {&__pyx_n_s_nev, __pyx_k_nev, sizeof(__pyx_k_nev), 0, 0, 1, 1}, {&__pyx_n_s_norm_type, __pyx_k_norm_type, sizeof(__pyx_k_norm_type), 0, 0, 1, 1}, {&__pyx_n_s_npart, __pyx_k_npart, sizeof(__pyx_k_npart), 0, 0, 1, 1}, {&__pyx_n_s_nrest, __pyx_k_nrest, sizeof(__pyx_k_nrest), 0, 0, 1, 1}, {&__pyx_n_s_nsv, __pyx_k_nsv, sizeof(__pyx_k_nsv), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_operators, __pyx_k_operators, sizeof(__pyx_k_operators), 0, 0, 1, 1}, {&__pyx_n_s_orth, __pyx_k_orth, sizeof(__pyx_k_orth), 0, 0, 1, 1}, {&__pyx_n_s_patch, __pyx_k_patch, sizeof(__pyx_k_patch), 0, 0, 1, 1}, {&__pyx_n_s_pep_type, __pyx_k_pep_type, sizeof(__pyx_k_pep_type), 0, 0, 1, 1}, {&__pyx_n_s_petsc4py_PETSc, __pyx_k_petsc4py_PETSc, sizeof(__pyx_k_petsc4py_PETSc), 0, 0, 1, 1}, {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_problem_type, __pyx_k_problem_type, sizeof(__pyx_k_problem_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_ready, __pyx_k_ready, sizeof(__pyx_k_ready), 0, 0, 1, 1}, {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, {&__pyx_n_s_refine, __pyx_k_refine, sizeof(__pyx_k_refine), 0, 0, 1, 1}, {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1}, {&__pyx_n_s_reorthog, __pyx_k_reorthog, sizeof(__pyx_k_reorthog), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_rg, __pyx_k_rg, sizeof(__pyx_k_rg), 0, 0, 1, 1}, {&__pyx_n_s_rg_type, __pyx_k_rg_type, sizeof(__pyx_k_rg_type), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1}, {&__pyx_n_s_scheme, __pyx_k_scheme, sizeof(__pyx_k_scheme), 0, 0, 1, 1}, {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1}, {&__pyx_n_s_setArray, __pyx_k_setArray, sizeof(__pyx_k_setArray), 0, 0, 1, 1}, {&__pyx_n_s_setBV, __pyx_k_setBV, sizeof(__pyx_k_setBV), 0, 0, 1, 1}, {&__pyx_n_s_setExtraction, __pyx_k_setExtraction, sizeof(__pyx_k_setExtraction), 0, 0, 1, 1}, {&__pyx_n_s_setKSP, __pyx_k_setKSP, sizeof(__pyx_k_setKSP), 0, 0, 1, 1}, {&__pyx_n_s_setMatMode, __pyx_k_setMatMode, sizeof(__pyx_k_setMatMode), 0, 0, 1, 1}, {&__pyx_n_s_setOrthogonalization, __pyx_k_setOrthogonalization, sizeof(__pyx_k_setOrthogonalization), 0, 0, 1, 1}, {&__pyx_n_s_setProblemType, __pyx_k_setProblemType, sizeof(__pyx_k_setProblemType), 0, 0, 1, 1}, {&__pyx_n_s_setST, __pyx_k_setST, sizeof(__pyx_k_setST), 0, 0, 1, 1}, {&__pyx_n_s_setShift, __pyx_k_setShift, sizeof(__pyx_k_setShift), 0, 0, 1, 1}, {&__pyx_n_s_setSizes, __pyx_k_setSizes, sizeof(__pyx_k_setSizes), 0, 0, 1, 1}, {&__pyx_n_s_setTarget, __pyx_k_setTarget, sizeof(__pyx_k_setTarget), 0, 0, 1, 1}, {&__pyx_n_s_setTolerances, __pyx_k_setTolerances, sizeof(__pyx_k_setTolerances), 0, 0, 1, 1}, {&__pyx_n_s_setTransposeMode, __pyx_k_setTransposeMode, sizeof(__pyx_k_setTransposeMode), 0, 0, 1, 1}, {&__pyx_n_s_setType, __pyx_k_setType, sizeof(__pyx_k_setType), 0, 0, 1, 1}, {&__pyx_n_s_setUp, __pyx_k_setUp, sizeof(__pyx_k_setUp), 0, 0, 1, 1}, {&__pyx_n_s_setWhichEigenpairs, __pyx_k_setWhichEigenpairs, sizeof(__pyx_k_setWhichEigenpairs), 0, 0, 1, 1}, {&__pyx_n_s_setWhichSingularTriplets, __pyx_k_setWhichSingularTriplets, sizeof(__pyx_k_setWhichSingularTriplets), 0, 0, 1, 1}, {&__pyx_n_s_shift, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1}, {&__pyx_n_s_sizes, __pyx_k_sizes, sizeof(__pyx_k_sizes), 0, 0, 1, 1}, {&__pyx_n_s_slepc4py_SLEPc, __pyx_k_slepc4py_SLEPc, sizeof(__pyx_k_slepc4py_SLEPc), 0, 0, 1, 1}, {&__pyx_n_s_space, __pyx_k_space, sizeof(__pyx_k_space), 0, 0, 1, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1}, {&__pyx_n_s_st_type, __pyx_k_st_type, sizeof(__pyx_k_st_type), 0, 0, 1, 1}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, {&__pyx_n_s_structure, __pyx_k_structure, sizeof(__pyx_k_structure), 0, 0, 1, 1}, {&__pyx_n_s_subint, __pyx_k_subint, sizeof(__pyx_k_subint), 0, 0, 1, 1}, {&__pyx_n_s_subminor, __pyx_k_subminor, sizeof(__pyx_k_subminor), 0, 0, 1, 1}, {&__pyx_n_s_svd_type, __pyx_k_svd_type, sizeof(__pyx_k_svd_type), 0, 0, 1, 1}, {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1}, {&__pyx_n_s_tol, __pyx_k_tol, sizeof(__pyx_k_tol), 0, 0, 1, 1}, {&__pyx_n_s_trackall, __pyx_k_trackall, sizeof(__pyx_k_trackall), 0, 0, 1, 1}, {&__pyx_n_s_trueres, __pyx_k_trueres, sizeof(__pyx_k_trueres), 0, 0, 1, 1}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_viewer, __pyx_k_viewer, sizeof(__pyx_k_viewer), 0, 0, 1, 1}, {&__pyx_n_s_vscale, __pyx_k_vscale, sizeof(__pyx_k_vscale), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_n_s_which, __pyx_k_which, sizeof(__pyx_k_which), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 3, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 21, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(2, 83, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 83, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(3, 461, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "SLEPc/slepcbv.pxi":87 * if on is not None: n = asInt(on) * if oN is not None: N = asInt(oN) * if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError( # <<<<<<<<<<<<<< * "local and global sizes cannot be both 'DECIDE'") * # return result to the caller */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_local_and_global_sizes_cannot_be); if (unlikely(!__pyx_tuple_)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "SLEPc/Sys.pyx":26 * out.append(bytes2str(cdate)) * if author: * author = bytes2str(cauthorinfo).split('\n') # <<<<<<<<<<<<<< * author = [s.strip() for s in author if s] * out.append(author) */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(9, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "SLEPc/Sys.pyx":40 * cdef const_char *cdate = SLEPC_VERSION_DATE * cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO * author = bytes2str(cauthorinfo).split('\n') # <<<<<<<<<<<<<< * author = [s.strip() for s in author if s] * return dict(major = cmajor, */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(9, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "SLEPc/BV.pyx":496 * * v = Vec().create(COMM_SELF) * v.setType('seq') # <<<<<<<<<<<<<< * v.setSizes((DECIDE,k-l)) * v.setArray([mval[i] for i in range(0, k - l)]) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(3, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "SLEPc/SLEPc.pyx":224 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_ready); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(4, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_n_s_initialize, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(4, 224, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":228 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_n_s_finalize, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(4, 228, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(19, 1, __pyx_L1_error); __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(19, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initSLEPc(void); /*proto*/ PyMODINIT_FUNC initSLEPc(void) #else PyMODINIT_FUNC PyInit_SLEPc(void); /*proto*/ PyMODINIT_FUNC PyInit_SLEPc(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_SLEPc(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(19, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("SLEPc", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(19, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(19, 1, __pyx_L1_error) #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(19, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_slepc4py__SLEPc) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(19, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(19, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "slepc4py.SLEPc")) { if (unlikely(PyDict_SetItemString(modules, "slepc4py.SLEPc", __pyx_m) < 0)) __PYX_ERR(19, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(19, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(19, 1, __pyx_L1_error) /*--- Global init code ---*/ __pyx_v_8slepc4py_5SLEPc_PetscError = Py_None; Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ if (__Pyx_ExportFunction("PySlepcST_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_New, "PyObject *(ST)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcST_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_Get, "ST (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcBV_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New, "PyObject *(BV)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcBV_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get, "BV (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcDS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New, "PyObject *(DS)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcDS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get, "DS (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New, "PyObject *(FN)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get, "FN (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcRG_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New, "PyObject *(RG)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcRG_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get, "RG (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcEPS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New, "PyObject *(EPS)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcEPS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get, "EPS (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcSVD_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New, "PyObject *(SVD)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcSVD_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get, "SVD (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcPEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New, "PyObject *(PEP)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcPEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get, "PEP (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcNEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New, "PyObject *(NEP)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcNEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get, "NEP (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcMFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New, "PyObject *(MFN)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcMFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get, "MFN (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) /*--- Type init code ---*/ __pyx_ptype_8petsc4py_5PETSc_Object = __Pyx_ImportType("petsc4py.PETSc", "Object", sizeof(struct PyPetscObjectObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Object)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Object = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Object->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Object)) __PYX_ERR(19, 1, __pyx_L1_error) __pyx_vtabptr_8slepc4py_5SLEPc_ST = &__pyx_vtable_8slepc4py_5SLEPc_ST; __pyx_vtable_8slepc4py_5SLEPc_ST.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcST_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcST_Type) < 0) __PYX_ERR(0, 34, __pyx_L1_error) PySlepcST_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcST_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_ST) < 0) __PYX_ERR(0, 34, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "ST", (PyObject *)&PySlepcST_Type) < 0) __PYX_ERR(0, 34, __pyx_L1_error) if (PySlepcST_Type.tp_weaklistoffset == 0) PySlepcST_Type.tp_weaklistoffset = offsetof(struct PySlepcSTObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_ST = &PySlepcST_Type; __pyx_vtabptr_8slepc4py_5SLEPc_BV = &__pyx_vtable_8slepc4py_5SLEPc_BV; __pyx_vtable_8slepc4py_5SLEPc_BV.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcBV_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcBV_Type) < 0) __PYX_ERR(3, 46, __pyx_L1_error) PySlepcBV_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcBV_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_BV) < 0) __PYX_ERR(3, 46, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BV", (PyObject *)&PySlepcBV_Type) < 0) __PYX_ERR(3, 46, __pyx_L1_error) if (PySlepcBV_Type.tp_weaklistoffset == 0) PySlepcBV_Type.tp_weaklistoffset = offsetof(struct PySlepcBVObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_BV = &PySlepcBV_Type; __pyx_vtabptr_8slepc4py_5SLEPc_DS = &__pyx_vtable_8slepc4py_5SLEPc_DS; __pyx_vtable_8slepc4py_5SLEPc_DS.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcDS_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcDS_Type) < 0) __PYX_ERR(10, 62, __pyx_L1_error) PySlepcDS_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcDS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_DS) < 0) __PYX_ERR(10, 62, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "DS", (PyObject *)&PySlepcDS_Type) < 0) __PYX_ERR(10, 62, __pyx_L1_error) if (PySlepcDS_Type.tp_weaklistoffset == 0) PySlepcDS_Type.tp_weaklistoffset = offsetof(struct PySlepcDSObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_DS = &PySlepcDS_Type; __pyx_vtabptr_8slepc4py_5SLEPc_FN = &__pyx_vtable_8slepc4py_5SLEPc_FN; __pyx_vtable_8slepc4py_5SLEPc_FN.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcFN_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcFN_Type) < 0) __PYX_ERR(11, 31, __pyx_L1_error) PySlepcFN_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_FN) < 0) __PYX_ERR(11, 31, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "FN", (PyObject *)&PySlepcFN_Type) < 0) __PYX_ERR(11, 31, __pyx_L1_error) if (PySlepcFN_Type.tp_weaklistoffset == 0) PySlepcFN_Type.tp_weaklistoffset = offsetof(struct PySlepcFNObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_FN = &PySlepcFN_Type; __pyx_vtabptr_8slepc4py_5SLEPc_RG = &__pyx_vtable_8slepc4py_5SLEPc_RG; __pyx_vtable_8slepc4py_5SLEPc_RG.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcRG_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcRG_Type) < 0) __PYX_ERR(12, 14, __pyx_L1_error) PySlepcRG_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcRG_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_RG) < 0) __PYX_ERR(12, 14, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "RG", (PyObject *)&PySlepcRG_Type) < 0) __PYX_ERR(12, 14, __pyx_L1_error) if (PySlepcRG_Type.tp_weaklistoffset == 0) PySlepcRG_Type.tp_weaklistoffset = offsetof(struct PySlepcRGObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_RG = &PySlepcRG_Type; __pyx_vtabptr_8slepc4py_5SLEPc_EPS = &__pyx_vtable_8slepc4py_5SLEPc_EPS; __pyx_vtable_8slepc4py_5SLEPc_EPS.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcEPS_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcEPS_Type) < 0) __PYX_ERR(13, 209, __pyx_L1_error) PySlepcEPS_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcEPS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_EPS) < 0) __PYX_ERR(13, 209, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "EPS", (PyObject *)&PySlepcEPS_Type) < 0) __PYX_ERR(13, 209, __pyx_L1_error) if (PySlepcEPS_Type.tp_weaklistoffset == 0) PySlepcEPS_Type.tp_weaklistoffset = offsetof(struct PySlepcEPSObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_EPS = &PySlepcEPS_Type; __pyx_vtabptr_8slepc4py_5SLEPc_SVD = &__pyx_vtable_8slepc4py_5SLEPc_SVD; __pyx_vtable_8slepc4py_5SLEPc_SVD.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcSVD_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcSVD_Type) < 0) __PYX_ERR(14, 58, __pyx_L1_error) PySlepcSVD_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcSVD_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_SVD) < 0) __PYX_ERR(14, 58, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "SVD", (PyObject *)&PySlepcSVD_Type) < 0) __PYX_ERR(14, 58, __pyx_L1_error) if (PySlepcSVD_Type.tp_weaklistoffset == 0) PySlepcSVD_Type.tp_weaklistoffset = offsetof(struct PySlepcSVDObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_SVD = &PySlepcSVD_Type; __pyx_vtabptr_8slepc4py_5SLEPc_PEP = &__pyx_vtable_8slepc4py_5SLEPc_PEP; __pyx_vtable_8slepc4py_5SLEPc_PEP.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcPEP_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcPEP_Type) < 0) __PYX_ERR(15, 167, __pyx_L1_error) PySlepcPEP_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcPEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_PEP) < 0) __PYX_ERR(15, 167, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "PEP", (PyObject *)&PySlepcPEP_Type) < 0) __PYX_ERR(15, 167, __pyx_L1_error) if (PySlepcPEP_Type.tp_weaklistoffset == 0) PySlepcPEP_Type.tp_weaklistoffset = offsetof(struct PySlepcPEPObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_PEP = &PySlepcPEP_Type; __pyx_vtabptr_8slepc4py_5SLEPc_NEP = &__pyx_vtable_8slepc4py_5SLEPc_NEP; __pyx_vtable_8slepc4py_5SLEPc_NEP.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcNEP_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcNEP_Type) < 0) __PYX_ERR(16, 83, __pyx_L1_error) PySlepcNEP_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcNEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_NEP) < 0) __PYX_ERR(16, 83, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "NEP", (PyObject *)&PySlepcNEP_Type) < 0) __PYX_ERR(16, 83, __pyx_L1_error) if (PySlepcNEP_Type.tp_weaklistoffset == 0) PySlepcNEP_Type.tp_weaklistoffset = offsetof(struct PySlepcNEPObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_NEP = &PySlepcNEP_Type; __pyx_vtabptr_8slepc4py_5SLEPc_MFN = &__pyx_vtable_8slepc4py_5SLEPc_MFN; __pyx_vtable_8slepc4py_5SLEPc_MFN.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object; PySlepcMFN_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object; if (PyType_Ready(&PySlepcMFN_Type) < 0) __PYX_ERR(17, 25, __pyx_L1_error) PySlepcMFN_Type.tp_print = 0; if (__Pyx_SetVtable(PySlepcMFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_MFN) < 0) __PYX_ERR(17, 25, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "MFN", (PyObject *)&PySlepcMFN_Type) < 0) __PYX_ERR(17, 25, __pyx_L1_error) if (PySlepcMFN_Type.tp_weaklistoffset == 0) PySlepcMFN_Type.tp_weaklistoffset = offsetof(struct PySlepcMFNObject, __pyx_base.__weakref__); __pyx_ptype_8slepc4py_5SLEPc_MFN = &PySlepcMFN_Type; if (PyType_Ready(&__pyx_type_8slepc4py_5SLEPc__p_mem) < 0) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_type_8slepc4py_5SLEPc__p_mem.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "_p_mem", (PyObject *)&__pyx_type_8slepc4py_5SLEPc__p_mem) < 0) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_ptype_8slepc4py_5SLEPc__p_mem = &__pyx_type_8slepc4py_5SLEPc__p_mem; if (PyType_Ready(&__pyx_type_8slepc4py_5SLEPc_Sys) < 0) __PYX_ERR(9, 3, __pyx_L1_error) __pyx_type_8slepc4py_5SLEPc_Sys.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "Sys", (PyObject *)&__pyx_type_8slepc4py_5SLEPc_Sys) < 0) __PYX_ERR(9, 3, __pyx_L1_error) __pyx_ptype_8slepc4py_5SLEPc_Sys = &__pyx_type_8slepc4py_5SLEPc_Sys; /*--- Type import code ---*/ __pyx_ptype_8petsc4py_5PETSc_Comm = __Pyx_ImportType("petsc4py.PETSc", "Comm", sizeof(struct PyPetscCommObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Comm)) __PYX_ERR(20, 70, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Viewer = __Pyx_ImportType("petsc4py.PETSc", "Viewer", sizeof(struct PyPetscViewerObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Viewer)) __PYX_ERR(20, 90, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Viewer = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Viewer->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Viewer)) __PYX_ERR(20, 90, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Random = __Pyx_ImportType("petsc4py.PETSc", "Random", sizeof(struct PyPetscRandomObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Random)) __PYX_ERR(20, 96, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Random = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Random*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Random->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Random)) __PYX_ERR(20, 96, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_IS = __Pyx_ImportType("petsc4py.PETSc", "IS", sizeof(struct PyPetscISObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_IS)) __PYX_ERR(20, 102, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_IS = (struct __pyx_vtabstruct_8petsc4py_5PETSc_IS*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_IS->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_IS)) __PYX_ERR(20, 102, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_LGMap = __Pyx_ImportType("petsc4py.PETSc", "LGMap", sizeof(struct PyPetscLGMapObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_LGMap)) __PYX_ERR(20, 108, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_LGMap = (struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_LGMap->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_LGMap)) __PYX_ERR(20, 108, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_SF = __Pyx_ImportType("petsc4py.PETSc", "SF", sizeof(struct PyPetscSFObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_SF)) __PYX_ERR(20, 114, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_SF = (struct __pyx_vtabstruct_8petsc4py_5PETSc_SF*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_SF->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_SF)) __PYX_ERR(20, 114, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Vec = __Pyx_ImportType("petsc4py.PETSc", "Vec", sizeof(struct PyPetscVecObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Vec)) __PYX_ERR(20, 120, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Vec = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Vec->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Vec)) __PYX_ERR(20, 120, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Scatter = __Pyx_ImportType("petsc4py.PETSc", "Scatter", sizeof(struct PyPetscScatterObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Scatter)) __PYX_ERR(20, 126, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Scatter = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Scatter->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Scatter)) __PYX_ERR(20, 126, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Section = __Pyx_ImportType("petsc4py.PETSc", "Section", sizeof(struct PyPetscSectionObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Section)) __PYX_ERR(20, 132, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Section = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Section*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Section->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Section)) __PYX_ERR(20, 132, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Mat = __Pyx_ImportType("petsc4py.PETSc", "Mat", sizeof(struct PyPetscMatObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Mat)) __PYX_ERR(20, 138, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Mat = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Mat->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Mat)) __PYX_ERR(20, 138, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_NullSpace = __Pyx_ImportType("petsc4py.PETSc", "NullSpace", sizeof(struct PyPetscNullSpaceObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_NullSpace)) __PYX_ERR(20, 144, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_NullSpace = (struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_NullSpace->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_NullSpace)) __PYX_ERR(20, 144, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_PC = __Pyx_ImportType("petsc4py.PETSc", "PC", sizeof(struct PyPetscPCObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_PC)) __PYX_ERR(20, 150, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_PC = (struct __pyx_vtabstruct_8petsc4py_5PETSc_PC*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_PC->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_PC)) __PYX_ERR(20, 150, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_KSP = __Pyx_ImportType("petsc4py.PETSc", "KSP", sizeof(struct PyPetscKSPObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_KSP)) __PYX_ERR(20, 156, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_KSP = (struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_KSP->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_KSP)) __PYX_ERR(20, 156, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_SNES = __Pyx_ImportType("petsc4py.PETSc", "SNES", sizeof(struct PyPetscSNESObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_SNES)) __PYX_ERR(20, 162, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_SNES = (struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_SNES->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_SNES)) __PYX_ERR(20, 162, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_TS = __Pyx_ImportType("petsc4py.PETSc", "TS", sizeof(struct PyPetscTSObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_TS)) __PYX_ERR(20, 168, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_TS = (struct __pyx_vtabstruct_8petsc4py_5PETSc_TS*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_TS->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_TS)) __PYX_ERR(20, 168, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_TAO = __Pyx_ImportType("petsc4py.PETSc", "TAO", sizeof(struct PyPetscTAOObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_TAO)) __PYX_ERR(20, 174, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_TAO = (struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_TAO->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_TAO)) __PYX_ERR(20, 174, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_AO = __Pyx_ImportType("petsc4py.PETSc", "AO", sizeof(struct PyPetscAOObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_AO)) __PYX_ERR(20, 180, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_AO = (struct __pyx_vtabstruct_8petsc4py_5PETSc_AO*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_AO->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_AO)) __PYX_ERR(20, 180, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_DM = __Pyx_ImportType("petsc4py.PETSc", "DM", sizeof(struct PyPetscDMObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_DM)) __PYX_ERR(20, 186, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_DM = (struct __pyx_vtabstruct_8petsc4py_5PETSc_DM*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_DM->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_DM)) __PYX_ERR(20, 186, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Partitioner = __Pyx_ImportType("petsc4py.PETSc", "Partitioner", sizeof(struct PyPetscPartitionerObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Partitioner)) __PYX_ERR(20, 192, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Partitioner = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Partitioner->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Partitioner)) __PYX_ERR(20, 192, __pyx_L1_error) /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("petsc4py.PETSc"); if (!__pyx_t_1) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "GetComm", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetComm, "MPI_Comm (PyObject *, MPI_Comm)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "GetCommDefault", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetCommDefault, "MPI_Comm (void)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "PyPetscType_Register", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_PyPetscType_Register, "int (int, PyTypeObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error) Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(19, 1, __pyx_L1_error) #endif /* "SLEPc/SLEPc.pyx":3 * # ----------------------------------------------------------------------------- * * from petsc4py.PETSc import COMM_NULL # <<<<<<<<<<<<<< * from petsc4py.PETSc import COMM_SELF * from petsc4py.PETSc import COMM_WORLD */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_COMM_NULL); __Pyx_GIVEREF(__pyx_n_s_COMM_NULL); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_COMM_NULL); __pyx_t_3 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_COMM_NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_NULL, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SLEPc.pyx":4 * * from petsc4py.PETSc import COMM_NULL * from petsc4py.PETSc import COMM_SELF # <<<<<<<<<<<<<< * from petsc4py.PETSc import COMM_WORLD * */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_COMM_SELF); __Pyx_GIVEREF(__pyx_n_s_COMM_SELF); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_COMM_SELF); __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_SELF, __pyx_t_3) < 0) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":5 * from petsc4py.PETSc import COMM_NULL * from petsc4py.PETSc import COMM_SELF * from petsc4py.PETSc import COMM_WORLD # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_COMM_WORLD); __Pyx_GIVEREF(__pyx_n_s_COMM_WORLD); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_COMM_WORLD); __pyx_t_3 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_COMM_WORLD); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_WORLD, __pyx_t_2) < 0) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SLEPc.pyx":62 * void *PyExc_RuntimeError * * cdef object PetscError = PyExc_RuntimeError # <<<<<<<<<<<<<< * from petsc4py.PETSc import Error as PetscError * */ __pyx_t_3 = ((PyObject *)PyExc_RuntimeError); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError); __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SLEPc.pyx":63 * * cdef object PetscError = PyExc_RuntimeError * from petsc4py.PETSc import Error as PetscError # <<<<<<<<<<<<<< * * cdef inline int SETERR(int ierr) with gil: */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_Error); __Pyx_GIVEREF(__pyx_n_s_Error); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Error); __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError); __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":136 * * __doc__ = \ * """ # <<<<<<<<<<<<<< * Scalable Library for Eigenvalue Problem Computations. * """ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_doc, __pyx_kp_s_Scalable_Library_for_Eigenvalue) < 0) __PYX_ERR(4, 135, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":140 * """ * * DECIDE = PETSC_DECIDE # <<<<<<<<<<<<<< * DEFAULT = PETSC_DEFAULT * DETERMINE = PETSC_DETERMINE */ __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DECIDE); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DECIDE, __pyx_t_2) < 0) __PYX_ERR(4, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":141 * * DECIDE = PETSC_DECIDE * DEFAULT = PETSC_DEFAULT # <<<<<<<<<<<<<< * DETERMINE = PETSC_DETERMINE * */ __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT, __pyx_t_2) < 0) __PYX_ERR(4, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":142 * DECIDE = PETSC_DECIDE * DEFAULT = PETSC_DEFAULT * DETERMINE = PETSC_DETERMINE # <<<<<<<<<<<<<< * * include "Sys.pyx" */ __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DETERMINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DETERMINE, __pyx_t_2) < 0) __PYX_ERR(4, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, patch=False, devel=False, # <<<<<<<<<<<<<< * date=False, author=False): * cdef int cmajor = SLEPC_VERSION_MAJOR */ __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersion); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/Sys.pyx":5 * cdef class Sys: * * @classmethod # <<<<<<<<<<<<<< * def getVersion(cls, patch=False, devel=False, * date=False, author=False): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersion, __pyx_t_3) < 0) __PYX_ERR(9, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys); /* "SLEPc/Sys.pyx":32 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * cdef int cmajor = SLEPC_VERSION_MAJOR * cdef int cminor = SLEPC_VERSION_MINOR */ __pyx_t_3 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersionInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "SLEPc/Sys.pyx":31 * return tuple(out) * * @classmethod # <<<<<<<<<<<<<< * def getVersionInfo(cls): * cdef int cmajor = SLEPC_VERSION_MAJOR */ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersionInfo, __pyx_t_2) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys); /* "SLEPc/ST.pyx":3 * # ----------------------------------------------------------------------------- * * class STType(object): # <<<<<<<<<<<<<< * """ * ST types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_STType, __pyx_n_s_STType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_ST_types_SHELL_User_defined_SHI); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/ST.pyx":13 * - `PRECOND`: Preconditioner. * """ * SHELL = S_(STSHELL) # <<<<<<<<<<<<<< * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSHELL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHELL, __pyx_t_5) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":14 * """ * SHELL = S_(STSHELL) * SHIFT = S_(STSHIFT) # <<<<<<<<<<<<<< * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSHIFT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHIFT, __pyx_t_5) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":15 * SHELL = S_(STSHELL) * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) # <<<<<<<<<<<<<< * CAYLEY = S_(STCAYLEY) * PRECOND = S_(STPRECOND) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSINVERT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SINVERT, __pyx_t_5) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":16 * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) # <<<<<<<<<<<<<< * PRECOND = S_(STPRECOND) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STCAYLEY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CAYLEY, __pyx_t_5) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":17 * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) * PRECOND = S_(STPRECOND) # <<<<<<<<<<<<<< * * class STMatMode(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STPRECOND); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECOND, __pyx_t_5) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":3 * # ----------------------------------------------------------------------------- * * class STType(object): # <<<<<<<<<<<<<< * """ * ST types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_STType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_STType, __pyx_t_5) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/ST.pyx":19 * PRECOND = S_(STPRECOND) * * class STMatMode(object): # <<<<<<<<<<<<<< * """ * ST matrix mode */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_STMatMode, __pyx_n_s_STMatMode, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_ST_matrix_mode_COPY_A_working_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/ST.pyx":28 * implicit matrix. * """ * COPY = ST_MATMODE_COPY # <<<<<<<<<<<<<< * INPLACE = ST_MATMODE_INPLACE * SHELL = ST_MATMODE_SHELL */ __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_COPY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COPY, __pyx_t_5) < 0) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":29 * """ * COPY = ST_MATMODE_COPY * INPLACE = ST_MATMODE_INPLACE # <<<<<<<<<<<<<< * SHELL = ST_MATMODE_SHELL * */ __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_INPLACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INPLACE, __pyx_t_5) < 0) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":30 * COPY = ST_MATMODE_COPY * INPLACE = ST_MATMODE_INPLACE * SHELL = ST_MATMODE_SHELL # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_SHELL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHELL, __pyx_t_5) < 0) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/ST.pyx":19 * PRECOND = S_(STPRECOND) * * class STMatMode(object): # <<<<<<<<<<<<<< * """ * ST matrix mode */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_STMatMode, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_STMatMode, __pyx_t_5) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/ST.pyx":40 * """ * * Type = STType # <<<<<<<<<<<<<< * MatMode = STMatMode * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST); /* "SLEPc/ST.pyx":41 * * Type = STType * MatMode = STMatMode # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_MatMode, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST); /* "SLEPc/ST.pyx":469 * # ----------------------------------------------------------------------------- * * del STType # <<<<<<<<<<<<<< * del STMatMode * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STType) < 0) __PYX_ERR(0, 469, __pyx_L1_error) /* "SLEPc/ST.pyx":470 * * del STType * del STMatMode # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STMatMode) < 0) __PYX_ERR(0, 470, __pyx_L1_error) /* "SLEPc/BV.pyx":3 * # ----------------------------------------------------------------------------- * * class BVType(object): # <<<<<<<<<<<<<< * """ * BV type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVType, __pyx_n_s_BVType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/BV.pyx":7 * BV type * """ * MAT = S_(BVMAT) # <<<<<<<<<<<<<< * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVMAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MAT, __pyx_t_5) < 0) __PYX_ERR(3, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":8 * """ * MAT = S_(BVMAT) * SVEC = S_(BVSVEC) # <<<<<<<<<<<<<< * VECS = S_(BVVECS) * CONTIGUOUS = S_(BVCONTIGUOUS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVSVEC); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SVEC, __pyx_t_5) < 0) __PYX_ERR(3, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":9 * MAT = S_(BVMAT) * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) # <<<<<<<<<<<<<< * CONTIGUOUS = S_(BVCONTIGUOUS) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVVECS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_VECS, __pyx_t_5) < 0) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":10 * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) * CONTIGUOUS = S_(BVCONTIGUOUS) # <<<<<<<<<<<<<< * * class BVOrthogType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVCONTIGUOUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONTIGUOUS, __pyx_t_5) < 0) __PYX_ERR(3, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":3 * # ----------------------------------------------------------------------------- * * class BVType(object): # <<<<<<<<<<<<<< * """ * BV type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVType, __pyx_t_5) < 0) __PYX_ERR(3, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":12 * CONTIGUOUS = S_(BVCONTIGUOUS) * * class BVOrthogType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogType, __pyx_n_s_BVOrthogType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_orthogonalization_types_CGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/BV.pyx":19 * - `MGS`: Modified Gram-Schmidt. * """ * CGS = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * MGS = BV_ORTHOG_MGS * */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_CGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CGS, __pyx_t_5) < 0) __PYX_ERR(3, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":20 * """ * CGS = BV_ORTHOG_CGS * MGS = BV_ORTHOG_MGS # <<<<<<<<<<<<<< * * class BVOrthogRefineType(object): */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_MGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MGS, __pyx_t_5) < 0) __PYX_ERR(3, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":12 * CONTIGUOUS = S_(BVCONTIGUOUS) * * class BVOrthogType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogType, __pyx_t_5) < 0) __PYX_ERR(3, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":22 * MGS = BV_ORTHOG_MGS * * class BVOrthogRefineType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization refinement types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogRefineType, __pyx_n_s_BVOrthogRefineType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_orthogonalization_refinement); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/BV.pyx":30 * - `ALWAYS`: Always reorthogonalize. * """ * IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * NEVER = BV_ORTHOG_REFINE_NEVER * ALWAYS = BV_ORTHOG_REFINE_ALWAYS */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_IFNEEDED); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_IFNEEDED, __pyx_t_5) < 0) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":31 * """ * IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED * NEVER = BV_ORTHOG_REFINE_NEVER # <<<<<<<<<<<<<< * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_NEVER); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NEVER, __pyx_t_5) < 0) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":32 * IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED * NEVER = BV_ORTHOG_REFINE_NEVER * ALWAYS = BV_ORTHOG_REFINE_ALWAYS # <<<<<<<<<<<<<< * * class BVOrthogBlockType(object): */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_ALWAYS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALWAYS, __pyx_t_5) < 0) __PYX_ERR(3, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":22 * MGS = BV_ORTHOG_MGS * * class BVOrthogRefineType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization refinement types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogRefineType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogRefineType, __pyx_t_5) < 0) __PYX_ERR(3, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":34 * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * * class BVOrthogBlockType(object): # <<<<<<<<<<<<<< * """ * BV block-orthogonalization types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogBlockType, __pyx_n_s_BVOrthogBlockType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_block_orthogonalization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/BV.pyx":41 * - `CHOL`: Cholesky. * """ * GS = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * CHOL = BV_ORTHOG_BLOCK_CHOL * */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_GS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GS, __pyx_t_5) < 0) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":42 * """ * GS = BV_ORTHOG_BLOCK_GS * CHOL = BV_ORTHOG_BLOCK_CHOL # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_CHOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHOL, __pyx_t_5) < 0) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/BV.pyx":34 * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * * class BVOrthogBlockType(object): # <<<<<<<<<<<<<< * """ * BV block-orthogonalization types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogBlockType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogBlockType, __pyx_t_5) < 0) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":52 * """ * * Type = BVType # <<<<<<<<<<<<<< * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":53 * * Type = BVType * OrthogType = BVOrthogType # <<<<<<<<<<<<<< * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogType, __pyx_t_2) < 0) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":54 * Type = BVType * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType # <<<<<<<<<<<<<< * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogRefineType, __pyx_t_2) < 0) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":55 * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType # <<<<<<<<<<<<<< * OrthogBlockType = BVOrthogBlockType * BlockType = BVOrthogBlockType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_RefineType, __pyx_t_2) < 0) __PYX_ERR(3, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":56 * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType # <<<<<<<<<<<<<< * BlockType = BVOrthogBlockType * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogBlockType, __pyx_t_2) < 0) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":57 * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType * BlockType = BVOrthogBlockType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_BlockType, __pyx_t_2) < 0) __PYX_ERR(3, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":845 * # ----------------------------------------------------------------------------- * * del BVType # <<<<<<<<<<<<<< * del BVOrthogType * del BVOrthogRefineType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVType) < 0) __PYX_ERR(3, 845, __pyx_L1_error) /* "SLEPc/BV.pyx":846 * * del BVType * del BVOrthogType # <<<<<<<<<<<<<< * del BVOrthogRefineType * del BVOrthogBlockType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogType) < 0) __PYX_ERR(3, 846, __pyx_L1_error) /* "SLEPc/BV.pyx":847 * del BVType * del BVOrthogType * del BVOrthogRefineType # <<<<<<<<<<<<<< * del BVOrthogBlockType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogRefineType) < 0) __PYX_ERR(3, 847, __pyx_L1_error) /* "SLEPc/BV.pyx":848 * del BVOrthogType * del BVOrthogRefineType * del BVOrthogBlockType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogBlockType) < 0) __PYX_ERR(3, 848, __pyx_L1_error) /* "SLEPc/DS.pyx":3 * # ----------------------------------------------------------------------------- * * class DSType(object): # <<<<<<<<<<<<<< * """ * DS type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSType, __pyx_n_s_DSType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_DS_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/DS.pyx":7 * DS type * """ * HEP = S_(DSHEP) # <<<<<<<<<<<<<< * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HEP, __pyx_t_5) < 0) __PYX_ERR(10, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":8 * """ * HEP = S_(DSHEP) * NHEP = S_(DSNHEP) # <<<<<<<<<<<<<< * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NHEP, __pyx_t_5) < 0) __PYX_ERR(10, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":9 * HEP = S_(DSHEP) * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) # <<<<<<<<<<<<<< * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHEP, __pyx_t_5) < 0) __PYX_ERR(10, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":10 * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) # <<<<<<<<<<<<<< * GNHEP = S_(DSGNHEP) * SVD = S_(DSSVD) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHIEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHIEP, __pyx_t_5) < 0) __PYX_ERR(10, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":11 * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) # <<<<<<<<<<<<<< * SVD = S_(DSSVD) * PEP = S_(DSPEP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GNHEP, __pyx_t_5) < 0) __PYX_ERR(10, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":12 * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) * SVD = S_(DSSVD) # <<<<<<<<<<<<<< * PEP = S_(DSPEP) * NEP = S_(DSNEP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSSVD); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SVD, __pyx_t_5) < 0) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":13 * GNHEP = S_(DSGNHEP) * SVD = S_(DSSVD) * PEP = S_(DSPEP) # <<<<<<<<<<<<<< * NEP = S_(DSNEP) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSPEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PEP, __pyx_t_5) < 0) __PYX_ERR(10, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":14 * SVD = S_(DSSVD) * PEP = S_(DSPEP) * NEP = S_(DSNEP) # <<<<<<<<<<<<<< * * class DSStateType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSNEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NEP, __pyx_t_5) < 0) __PYX_ERR(10, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":3 * # ----------------------------------------------------------------------------- * * class DSType(object): # <<<<<<<<<<<<<< * """ * DS type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSType, __pyx_t_5) < 0) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/DS.pyx":16 * NEP = S_(DSNEP) * * class DSStateType(object): # <<<<<<<<<<<<<< * """ * DS state types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSStateType, __pyx_n_s_DSStateType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_DS_state_types_RAW_Not_processe); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/DS.pyx":25 * - `TRUNCATED`: Condensed form truncated to a smaller size. * """ * RAW = DS_STATE_RAW # <<<<<<<<<<<<<< * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED */ __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_RAW); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RAW, __pyx_t_5) < 0) __PYX_ERR(10, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":26 * """ * RAW = DS_STATE_RAW * INTERMEDIATE = DS_STATE_INTERMEDIATE # <<<<<<<<<<<<<< * CONDENSED = DS_STATE_CONDENSED * TRUNCATED = DS_STATE_TRUNCATED */ __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_INTERMEDIATE); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERMEDIATE, __pyx_t_5) < 0) __PYX_ERR(10, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":27 * RAW = DS_STATE_RAW * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED # <<<<<<<<<<<<<< * TRUNCATED = DS_STATE_TRUNCATED * */ __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_CONDENSED); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONDENSED, __pyx_t_5) < 0) __PYX_ERR(10, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":28 * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED * TRUNCATED = DS_STATE_TRUNCATED # <<<<<<<<<<<<<< * * class DSMatType(object): */ __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_TRUNCATED); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRUNCATED, __pyx_t_5) < 0) __PYX_ERR(10, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":16 * NEP = S_(DSNEP) * * class DSStateType(object): # <<<<<<<<<<<<<< * """ * DS state types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSStateType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSStateType, __pyx_t_5) < 0) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/DS.pyx":30 * TRUNCATED = DS_STATE_TRUNCATED * * class DSMatType(object): # <<<<<<<<<<<<<< * """ * To refer to one of the matrices stored internally in DS */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSMatType, __pyx_n_s_DSMatType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_To_refer_to_one_of_the_matrices); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/DS.pyx":47 * - `W`: workspace matrix. * """ * A = DS_MAT_A # <<<<<<<<<<<<<< * B = DS_MAT_B * C = DS_MAT_C */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_A); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_A, __pyx_t_5) < 0) __PYX_ERR(10, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":48 * """ * A = DS_MAT_A * B = DS_MAT_B # <<<<<<<<<<<<<< * C = DS_MAT_C * T = DS_MAT_T */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_B); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_B, __pyx_t_5) < 0) __PYX_ERR(10, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":49 * A = DS_MAT_A * B = DS_MAT_B * C = DS_MAT_C # <<<<<<<<<<<<<< * T = DS_MAT_T * D = DS_MAT_D */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_C, __pyx_t_5) < 0) __PYX_ERR(10, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":50 * B = DS_MAT_B * C = DS_MAT_C * T = DS_MAT_T # <<<<<<<<<<<<<< * D = DS_MAT_D * Q = DS_MAT_Q */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_T); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_T, __pyx_t_5) < 0) __PYX_ERR(10, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":51 * C = DS_MAT_C * T = DS_MAT_T * D = DS_MAT_D # <<<<<<<<<<<<<< * Q = DS_MAT_Q * Z = DS_MAT_Z */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_D); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_D, __pyx_t_5) < 0) __PYX_ERR(10, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":52 * T = DS_MAT_T * D = DS_MAT_D * Q = DS_MAT_Q # <<<<<<<<<<<<<< * Z = DS_MAT_Z * X = DS_MAT_X */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Q); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Q, __pyx_t_5) < 0) __PYX_ERR(10, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":53 * D = DS_MAT_D * Q = DS_MAT_Q * Z = DS_MAT_Z # <<<<<<<<<<<<<< * X = DS_MAT_X * Y = DS_MAT_Y */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Z); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Z, __pyx_t_5) < 0) __PYX_ERR(10, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":54 * Q = DS_MAT_Q * Z = DS_MAT_Z * X = DS_MAT_X # <<<<<<<<<<<<<< * Y = DS_MAT_Y * U = DS_MAT_U */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_X); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_X, __pyx_t_5) < 0) __PYX_ERR(10, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":55 * Z = DS_MAT_Z * X = DS_MAT_X * Y = DS_MAT_Y # <<<<<<<<<<<<<< * U = DS_MAT_U * VT = DS_MAT_VT */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Y); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Y, __pyx_t_5) < 0) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":56 * X = DS_MAT_X * Y = DS_MAT_Y * U = DS_MAT_U # <<<<<<<<<<<<<< * VT = DS_MAT_VT * W = DS_MAT_W */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_U); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_U, __pyx_t_5) < 0) __PYX_ERR(10, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":57 * Y = DS_MAT_Y * U = DS_MAT_U * VT = DS_MAT_VT # <<<<<<<<<<<<<< * W = DS_MAT_W * */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_VT); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_VT, __pyx_t_5) < 0) __PYX_ERR(10, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":58 * U = DS_MAT_U * VT = DS_MAT_VT * W = DS_MAT_W # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_W); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_W, __pyx_t_5) < 0) __PYX_ERR(10, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/DS.pyx":30 * TRUNCATED = DS_STATE_TRUNCATED * * class DSMatType(object): # <<<<<<<<<<<<<< * """ * To refer to one of the matrices stored internally in DS */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSMatType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSMatType, __pyx_t_5) < 0) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/DS.pyx":68 * """ * * Type = DSType # <<<<<<<<<<<<<< * StateType = DSStateType * MatType = DSMatType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(10, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":69 * * Type = DSType * StateType = DSStateType # <<<<<<<<<<<<<< * MatType = DSMatType * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSStateType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_StateType, __pyx_t_2) < 0) __PYX_ERR(10, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":70 * Type = DSType * StateType = DSStateType * MatType = DSMatType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSMatType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_MatType, __pyx_t_2) < 0) __PYX_ERR(10, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":468 * # ----------------------------------------------------------------------------- * * del DSType # <<<<<<<<<<<<<< * del DSStateType * del DSMatType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSType) < 0) __PYX_ERR(10, 468, __pyx_L1_error) /* "SLEPc/DS.pyx":469 * * del DSType * del DSStateType # <<<<<<<<<<<<<< * del DSMatType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSStateType) < 0) __PYX_ERR(10, 469, __pyx_L1_error) /* "SLEPc/DS.pyx":470 * del DSType * del DSStateType * del DSMatType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSMatType) < 0) __PYX_ERR(10, 470, __pyx_L1_error) /* "SLEPc/FN.pyx":3 * # ----------------------------------------------------------------------------- * * class FNType(object): # <<<<<<<<<<<<<< * """ * FN type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_FNType, __pyx_n_s_FNType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_FN_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/FN.pyx":7 * FN type * """ * COMBINE = S_(FNCOMBINE) # <<<<<<<<<<<<<< * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNCOMBINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COMBINE, __pyx_t_5) < 0) __PYX_ERR(11, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":8 * """ * COMBINE = S_(FNCOMBINE) * RATIONAL = S_(FNRATIONAL) # <<<<<<<<<<<<<< * EXP = S_(FNEXP) * LOG = S_(FNLOG) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNRATIONAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RATIONAL, __pyx_t_5) < 0) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":9 * COMBINE = S_(FNCOMBINE) * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) # <<<<<<<<<<<<<< * LOG = S_(FNLOG) * PHI = S_(FNPHI) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNEXP); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXP, __pyx_t_5) < 0) __PYX_ERR(11, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":10 * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) * LOG = S_(FNLOG) # <<<<<<<<<<<<<< * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNLOG); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOG, __pyx_t_5) < 0) __PYX_ERR(11, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":11 * EXP = S_(FNEXP) * LOG = S_(FNLOG) * PHI = S_(FNPHI) # <<<<<<<<<<<<<< * SQRT = S_(FNSQRT) * INVSQRT = S_(FNINVSQRT) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNPHI); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PHI, __pyx_t_5) < 0) __PYX_ERR(11, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":12 * LOG = S_(FNLOG) * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) # <<<<<<<<<<<<<< * INVSQRT = S_(FNINVSQRT) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNSQRT); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SQRT, __pyx_t_5) < 0) __PYX_ERR(11, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":13 * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) * INVSQRT = S_(FNINVSQRT) # <<<<<<<<<<<<<< * * class FNCombineType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNINVSQRT); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INVSQRT, __pyx_t_5) < 0) __PYX_ERR(11, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":3 * # ----------------------------------------------------------------------------- * * class FNType(object): # <<<<<<<<<<<<<< * """ * FN type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_FNType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNType, __pyx_t_5) < 0) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/FN.pyx":15 * INVSQRT = S_(FNINVSQRT) * * class FNCombineType(object): # <<<<<<<<<<<<<< * """ * FN type of combination of child functions */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_FNCombineType, __pyx_n_s_FNCombineType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_FN_type_of_combination_of_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/FN.pyx":24 * - `COMPOSE`: Composition f(x) = f2(f1(x)) * """ * ADD = FN_COMBINE_ADD # <<<<<<<<<<<<<< * MULTIPLY = FN_COMBINE_MULTIPLY * DIVIDE = FN_COMBINE_DIVIDE */ __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_ADD); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ADD, __pyx_t_5) < 0) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":25 * """ * ADD = FN_COMBINE_ADD * MULTIPLY = FN_COMBINE_MULTIPLY # <<<<<<<<<<<<<< * DIVIDE = FN_COMBINE_DIVIDE * COMPOSE = FN_COMBINE_COMPOSE */ __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_MULTIPLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLY, __pyx_t_5) < 0) __PYX_ERR(11, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":26 * ADD = FN_COMBINE_ADD * MULTIPLY = FN_COMBINE_MULTIPLY * DIVIDE = FN_COMBINE_DIVIDE # <<<<<<<<<<<<<< * COMPOSE = FN_COMBINE_COMPOSE * */ __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_DIVIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVIDE, __pyx_t_5) < 0) __PYX_ERR(11, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":27 * MULTIPLY = FN_COMBINE_MULTIPLY * DIVIDE = FN_COMBINE_DIVIDE * COMPOSE = FN_COMBINE_COMPOSE # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_COMPOSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COMPOSE, __pyx_t_5) < 0) __PYX_ERR(11, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/FN.pyx":15 * INVSQRT = S_(FNINVSQRT) * * class FNCombineType(object): # <<<<<<<<<<<<<< * """ * FN type of combination of child functions */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_FNCombineType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNCombineType, __pyx_t_5) < 0) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/FN.pyx":37 * """ * * Type = FNType # <<<<<<<<<<<<<< * CombineType = FNCombineType * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FNType); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(11, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN); /* "SLEPc/FN.pyx":38 * * Type = FNType * CombineType = FNCombineType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FNCombineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_CombineType, __pyx_t_2) < 0) __PYX_ERR(11, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN); /* "SLEPc/FN.pyx":256 * # ----------------------------------------------------------------------------- * * del FNType # <<<<<<<<<<<<<< * del FNCombineType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNType) < 0) __PYX_ERR(11, 256, __pyx_L1_error) /* "SLEPc/FN.pyx":257 * * del FNType * del FNCombineType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNCombineType) < 0) __PYX_ERR(11, 257, __pyx_L1_error) /* "SLEPc/RG.pyx":3 * # ----------------------------------------------------------------------------- * * class RGType(object): # <<<<<<<<<<<<<< * """ * RG type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_RGType, __pyx_n_s_RGType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_RG_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/RG.pyx":7 * RG type * """ * INTERVAL = S_(RGINTERVAL) # <<<<<<<<<<<<<< * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGINTERVAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERVAL, __pyx_t_5) < 0) __PYX_ERR(12, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/RG.pyx":8 * """ * INTERVAL = S_(RGINTERVAL) * POLYGON = S_(RGPOLYGON) # <<<<<<<<<<<<<< * ELLIPSE = S_(RGELLIPSE) * RING = S_(RGRING) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGPOLYGON); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_POLYGON, __pyx_t_5) < 0) __PYX_ERR(12, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/RG.pyx":9 * INTERVAL = S_(RGINTERVAL) * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) # <<<<<<<<<<<<<< * RING = S_(RGRING) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGELLIPSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ELLIPSE, __pyx_t_5) < 0) __PYX_ERR(12, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/RG.pyx":10 * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) * RING = S_(RGRING) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RING, __pyx_t_5) < 0) __PYX_ERR(12, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/RG.pyx":3 * # ----------------------------------------------------------------------------- * * class RGType(object): # <<<<<<<<<<<<<< * """ * RG type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_RGType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_RGType, __pyx_t_5) < 0) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/RG.pyx":20 * """ * * Type = RGType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RGType); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(12, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_RG); /* "SLEPc/RG.pyx":263 * # ----------------------------------------------------------------------------- * * del RGType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_RGType) < 0) __PYX_ERR(12, 263, __pyx_L1_error) /* "SLEPc/EPS.pyx":3 * # ----------------------------------------------------------------------------- * * class EPSType(object): # <<<<<<<<<<<<<< * """ * EPS type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSType, __pyx_n_s_EPSType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_type_Native_sparse_eigensol); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":32 * """ * # provided implementations * POWER = S_(EPSPOWER) # <<<<<<<<<<<<<< * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPOWER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_POWER, __pyx_t_5) < 0) __PYX_ERR(13, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":33 * # provided implementations * POWER = S_(EPSPOWER) * SUBSPACE = S_(EPSSUBSPACE) # <<<<<<<<<<<<<< * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSSUBSPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SUBSPACE, __pyx_t_5) < 0) __PYX_ERR(13, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":34 * POWER = S_(EPSPOWER) * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) # <<<<<<<<<<<<<< * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ARNOLDI, __pyx_t_5) < 0) __PYX_ERR(13, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":35 * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) # <<<<<<<<<<<<<< * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LANCZOS, __pyx_t_5) < 0) __PYX_ERR(13, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":36 * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) # <<<<<<<<<<<<<< * GD = S_(EPSGD) * JD = S_(EPSJD) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSKRYLOVSCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_KRYLOVSCHUR, __pyx_t_5) < 0) __PYX_ERR(13, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":37 * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) # <<<<<<<<<<<<<< * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSGD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GD, __pyx_t_5) < 0) __PYX_ERR(13, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":38 * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) * JD = S_(EPSJD) # <<<<<<<<<<<<<< * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSJD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_JD, __pyx_t_5) < 0) __PYX_ERR(13, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":39 * GD = S_(EPSGD) * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) # <<<<<<<<<<<<<< * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSRQCG); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RQCG, __pyx_t_5) < 0) __PYX_ERR(13, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":40 * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) # <<<<<<<<<<<<<< * CISS = S_(EPSCISS) * LAPACK = S_(EPSLAPACK) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLOBPCG); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOBPCG, __pyx_t_5) < 0) __PYX_ERR(13, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":41 * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) # <<<<<<<<<<<<<< * LAPACK = S_(EPSLAPACK) * # with external libraries */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSCISS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CISS, __pyx_t_5) < 0) __PYX_ERR(13, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":42 * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) * LAPACK = S_(EPSLAPACK) # <<<<<<<<<<<<<< * # with external libraries * ARPACK = S_(EPSARPACK) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLAPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAPACK, __pyx_t_5) < 0) __PYX_ERR(13, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":44 * LAPACK = S_(EPSLAPACK) * # with external libraries * ARPACK = S_(EPSARPACK) # <<<<<<<<<<<<<< * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ARPACK, __pyx_t_5) < 0) __PYX_ERR(13, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":45 * # with external libraries * ARPACK = S_(EPSARPACK) * BLZPACK = S_(EPSBLZPACK) # <<<<<<<<<<<<<< * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLZPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BLZPACK, __pyx_t_5) < 0) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":46 * ARPACK = S_(EPSARPACK) * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) # <<<<<<<<<<<<<< * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSTRLAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRLAN, __pyx_t_5) < 0) __PYX_ERR(13, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":47 * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) # <<<<<<<<<<<<<< * PRIMME = S_(EPSPRIMME) * FEAST = S_(EPSFEAST) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLOPEX); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BLOPEX, __pyx_t_5) < 0) __PYX_ERR(13, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":48 * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) # <<<<<<<<<<<<<< * FEAST = S_(EPSFEAST) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPRIMME); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRIMME, __pyx_t_5) < 0) __PYX_ERR(13, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":49 * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) * FEAST = S_(EPSFEAST) # <<<<<<<<<<<<<< * * class EPSProblemType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSFEAST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_FEAST, __pyx_t_5) < 0) __PYX_ERR(13, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":3 * # ----------------------------------------------------------------------------- * * class EPSType(object): # <<<<<<<<<<<<<< * """ * EPS type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSType, __pyx_t_5) < 0) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":51 * FEAST = S_(EPSFEAST) * * class EPSProblemType(object): # <<<<<<<<<<<<<< * """ * EPS problem type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSProblemType, __pyx_n_s_EPSProblemType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_problem_type_HEP_Hermitian); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":63 * - `GHIEP`: Generalized Hermitian-indefinite eigenproblem. * """ * HEP = EPS_HEP # <<<<<<<<<<<<<< * NHEP = EPS_NHEP * GHEP = EPS_GHEP */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_HEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HEP, __pyx_t_5) < 0) __PYX_ERR(13, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":64 * """ * HEP = EPS_HEP * NHEP = EPS_NHEP # <<<<<<<<<<<<<< * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_NHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NHEP, __pyx_t_5) < 0) __PYX_ERR(13, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":65 * HEP = EPS_HEP * NHEP = EPS_NHEP * GHEP = EPS_GHEP # <<<<<<<<<<<<<< * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHEP, __pyx_t_5) < 0) __PYX_ERR(13, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":66 * NHEP = EPS_NHEP * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP # <<<<<<<<<<<<<< * PGNHEP = EPS_PGNHEP * GHIEP = EPS_GHIEP */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GNHEP, __pyx_t_5) < 0) __PYX_ERR(13, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":67 * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP # <<<<<<<<<<<<<< * GHIEP = EPS_GHIEP * */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_PGNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PGNHEP, __pyx_t_5) < 0) __PYX_ERR(13, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":68 * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP * GHIEP = EPS_GHIEP # <<<<<<<<<<<<<< * * class EPSExtraction(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GHIEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHIEP, __pyx_t_5) < 0) __PYX_ERR(13, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":51 * FEAST = S_(EPSFEAST) * * class EPSProblemType(object): # <<<<<<<<<<<<<< * """ * EPS problem type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSProblemType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSProblemType, __pyx_t_5) < 0) __PYX_ERR(13, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":70 * GHIEP = EPS_GHIEP * * class EPSExtraction(object): # <<<<<<<<<<<<<< * """ * EPS extraction technique */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSExtraction, __pyx_n_s_EPSExtraction, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_extraction_technique_RITZ_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":82 * - `REFINED_HARMONIC`: Refined harmonic extraction. * """ * RITZ = EPS_RITZ # <<<<<<<<<<<<<< * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_RITZ); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RITZ, __pyx_t_5) < 0) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":83 * """ * RITZ = EPS_RITZ * HARMONIC = EPS_HARMONIC # <<<<<<<<<<<<<< * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC, __pyx_t_5) < 0) __PYX_ERR(13, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":84 * RITZ = EPS_RITZ * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE # <<<<<<<<<<<<<< * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(13, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":85 * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT # <<<<<<<<<<<<<< * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RIGHT); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_RIGHT, __pyx_t_5) < 0) __PYX_ERR(13, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":86 * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST # <<<<<<<<<<<<<< * REFINED = EPS_REFINED * REFINED_HARMONIC = EPS_REFINED_HARMONIC */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_LARGEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_LARGEST, __pyx_t_5) < 0) __PYX_ERR(13, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":87 * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED # <<<<<<<<<<<<<< * REFINED_HARMONIC = EPS_REFINED_HARMONIC * */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REFINED, __pyx_t_5) < 0) __PYX_ERR(13, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":88 * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED * REFINED_HARMONIC = EPS_REFINED_HARMONIC # <<<<<<<<<<<<<< * * class EPSBalance(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED_HARMONIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REFINED_HARMONIC, __pyx_t_5) < 0) __PYX_ERR(13, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":70 * GHIEP = EPS_GHIEP * * class EPSExtraction(object): # <<<<<<<<<<<<<< * """ * EPS extraction technique */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSExtraction, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSExtraction, __pyx_t_5) < 0) __PYX_ERR(13, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":90 * REFINED_HARMONIC = EPS_REFINED_HARMONIC * * class EPSBalance(object): # <<<<<<<<<<<<<< * """ * EPS type of balancing used for non-Hermitian problems */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSBalance, __pyx_n_s_EPSBalance, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_type_of_balancing_used_for); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":99 * - `USER`: User-defined. * """ * NONE = EPS_BALANCE_NONE # <<<<<<<<<<<<<< * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE */ __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(13, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":100 * """ * NONE = EPS_BALANCE_NONE * ONESIDE = EPS_BALANCE_ONESIDE # <<<<<<<<<<<<<< * TWOSIDE = EPS_BALANCE_TWOSIDE * USER = EPS_BALANCE_USER */ __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_ONESIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ONESIDE, __pyx_t_5) < 0) __PYX_ERR(13, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":101 * NONE = EPS_BALANCE_NONE * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE # <<<<<<<<<<<<<< * USER = EPS_BALANCE_USER * */ __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_TWOSIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TWOSIDE, __pyx_t_5) < 0) __PYX_ERR(13, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":102 * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE * USER = EPS_BALANCE_USER # <<<<<<<<<<<<<< * * class EPSErrorType(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":90 * REFINED_HARMONIC = EPS_REFINED_HARMONIC * * class EPSBalance(object): # <<<<<<<<<<<<<< * """ * EPS type of balancing used for non-Hermitian problems */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSBalance, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSBalance, __pyx_t_5) < 0) __PYX_ERR(13, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":104 * USER = EPS_BALANCE_USER * * class EPSErrorType(object): # <<<<<<<<<<<<<< * """ * EPS error type to assess accuracy of computed solutions */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSErrorType, __pyx_n_s_EPSErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":112 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = EPS_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = EPS_ERROR_RELATIVE * BACKWARD = EPS_ERROR_BACKWARD */ __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(13, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":113 * """ * ABSOLUTE = EPS_ERROR_ABSOLUTE * RELATIVE = EPS_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = EPS_ERROR_BACKWARD * */ __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(13, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":114 * ABSOLUTE = EPS_ERROR_ABSOLUTE * RELATIVE = EPS_ERROR_RELATIVE * BACKWARD = EPS_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class EPSWhich(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(13, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":104 * USER = EPS_BALANCE_USER * * class EPSErrorType(object): # <<<<<<<<<<<<<< * """ * EPS error type to assess accuracy of computed solutions */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSErrorType, __pyx_t_5) < 0) __PYX_ERR(13, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":116 * BACKWARD = EPS_ERROR_BACKWARD * * class EPSWhich(object): # <<<<<<<<<<<<<< * """ * EPS desired piece of spectrum */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSWhich, __pyx_n_s_EPSWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_desired_piece_of_spectrum_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":132 * - `USER`: User defined ordering. * """ * LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * LARGEST_REAL = EPS_LARGEST_REAL * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":133 * """ * LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE * LARGEST_REAL = EPS_LARGEST_REAL # <<<<<<<<<<<<<< * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":134 * LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE * LARGEST_REAL = EPS_LARGEST_REAL * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY # <<<<<<<<<<<<<< * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE * SMALLEST_REAL = EPS_SMALLEST_REAL */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":135 * LARGEST_REAL = EPS_LARGEST_REAL * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE # <<<<<<<<<<<<<< * SMALLEST_REAL = EPS_SMALLEST_REAL * SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":136 * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE * SMALLEST_REAL = EPS_SMALLEST_REAL # <<<<<<<<<<<<<< * SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":137 * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE * SMALLEST_REAL = EPS_SMALLEST_REAL * SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY # <<<<<<<<<<<<<< * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE * TARGET_REAL = EPS_TARGET_REAL */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":138 * SMALLEST_REAL = EPS_SMALLEST_REAL * SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE # <<<<<<<<<<<<<< * TARGET_REAL = EPS_TARGET_REAL * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":139 * SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE * TARGET_REAL = EPS_TARGET_REAL # <<<<<<<<<<<<<< * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY * ALL = EPS_ALL */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":140 * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE * TARGET_REAL = EPS_TARGET_REAL * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY # <<<<<<<<<<<<<< * ALL = EPS_ALL * USER = EPS_WHICH_USER */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":141 * TARGET_REAL = EPS_TARGET_REAL * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY * ALL = EPS_ALL # <<<<<<<<<<<<<< * USER = EPS_WHICH_USER * */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_ALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALL, __pyx_t_5) < 0) __PYX_ERR(13, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":142 * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY * ALL = EPS_ALL * USER = EPS_WHICH_USER # <<<<<<<<<<<<<< * * class EPSConv(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":116 * BACKWARD = EPS_ERROR_BACKWARD * * class EPSWhich(object): # <<<<<<<<<<<<<< * """ * EPS desired piece of spectrum */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSWhich, __pyx_t_5) < 0) __PYX_ERR(13, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":144 * USER = EPS_WHICH_USER * * class EPSConv(object): # <<<<<<<<<<<<<< * """ * EPS convergence test */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSConv, __pyx_n_s_EPSConv, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_convergence_test_ABS_REL_NO); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":153 * - `USER`: * """ * ABS = EPS_CONV_ABS # <<<<<<<<<<<<<< * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM */ __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_ABS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABS, __pyx_t_5) < 0) __PYX_ERR(13, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":154 * """ * ABS = EPS_CONV_ABS * REL = EPS_CONV_REL # <<<<<<<<<<<<<< * NORM = EPS_CONV_NORM * USER = EPS_CONV_USER */ __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_REL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REL, __pyx_t_5) < 0) __PYX_ERR(13, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":155 * ABS = EPS_CONV_ABS * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM # <<<<<<<<<<<<<< * USER = EPS_CONV_USER * */ __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(13, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":156 * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM * USER = EPS_CONV_USER # <<<<<<<<<<<<<< * * class EPSConvergedReason(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":144 * USER = EPS_WHICH_USER * * class EPSConv(object): # <<<<<<<<<<<<<< * """ * EPS convergence test */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSConv, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConv, __pyx_t_5) < 0) __PYX_ERR(13, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":158 * USER = EPS_CONV_USER * * class EPSConvergedReason(object): # <<<<<<<<<<<<<< * """ * EPS convergence reasons */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSConvergedReason, __pyx_n_s_EPSConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":169 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = EPS_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = EPS_CONVERGED_USER * DIVERGED_ITS = EPS_DIVERGED_ITS */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(13, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":170 * """ * CONVERGED_TOL = EPS_CONVERGED_TOL * CONVERGED_USER = EPS_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = EPS_DIVERGED_ITS * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(13, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":171 * CONVERGED_TOL = EPS_CONVERGED_TOL * CONVERGED_USER = EPS_CONVERGED_USER * DIVERGED_ITS = EPS_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(13, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":172 * CONVERGED_USER = EPS_CONVERGED_USER * DIVERGED_ITS = EPS_DIVERGED_ITS * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(13, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":173 * DIVERGED_ITS = EPS_DIVERGED_ITS * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST # <<<<<<<<<<<<<< * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING * ITERATING = EPS_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_5) < 0) __PYX_ERR(13, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":174 * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = EPS_CONVERGED_ITERATING * */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(13, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":175 * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING * ITERATING = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * class EPSPowerShiftType(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(13, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":158 * USER = EPS_CONV_USER * * class EPSConvergedReason(object): # <<<<<<<<<<<<<< * """ * EPS convergence reasons */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConvergedReason, __pyx_t_5) < 0) __PYX_ERR(13, 158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":177 * ITERATING = EPS_CONVERGED_ITERATING * * class EPSPowerShiftType(object): # <<<<<<<<<<<<<< * """ * EPS Power shift type. */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSPowerShiftType, __pyx_n_s_EPSPowerShiftType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_Power_shift_type_CONSTANT_R); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":185 * - `WILKINSON`: * """ * CONSTANT = EPS_POWER_SHIFT_CONSTANT # <<<<<<<<<<<<<< * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH * WILKINSON = EPS_POWER_SHIFT_WILKINSON */ __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_CONSTANT); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONSTANT, __pyx_t_5) < 0) __PYX_ERR(13, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":186 * """ * CONSTANT = EPS_POWER_SHIFT_CONSTANT * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH # <<<<<<<<<<<<<< * WILKINSON = EPS_POWER_SHIFT_WILKINSON * */ __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_RAYLEIGH); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RAYLEIGH, __pyx_t_5) < 0) __PYX_ERR(13, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":187 * CONSTANT = EPS_POWER_SHIFT_CONSTANT * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH * WILKINSON = EPS_POWER_SHIFT_WILKINSON # <<<<<<<<<<<<<< * * class EPSLanczosReorthogType(object): */ __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_WILKINSON); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_WILKINSON, __pyx_t_5) < 0) __PYX_ERR(13, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":177 * ITERATING = EPS_CONVERGED_ITERATING * * class EPSPowerShiftType(object): # <<<<<<<<<<<<<< * """ * EPS Power shift type. */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSPowerShiftType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSPowerShiftType, __pyx_t_5) < 0) __PYX_ERR(13, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":189 * WILKINSON = EPS_POWER_SHIFT_WILKINSON * * class EPSLanczosReorthogType(object): # <<<<<<<<<<<<<< * """ * EPS Lanczos reorthogonalization type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSLanczosReorthogType, __pyx_n_s_EPSLanczosReorthogType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_Lanczos_reorthogonalization); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/EPS.pyx":200 * - `DELAYED`: * """ * LOCAL = EPS_LANCZOS_REORTHOG_LOCAL # <<<<<<<<<<<<<< * FULL = EPS_LANCZOS_REORTHOG_FULL * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_LOCAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOCAL, __pyx_t_5) < 0) __PYX_ERR(13, 200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":201 * """ * LOCAL = EPS_LANCZOS_REORTHOG_LOCAL * FULL = EPS_LANCZOS_REORTHOG_FULL # <<<<<<<<<<<<<< * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_FULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_FULL, __pyx_t_5) < 0) __PYX_ERR(13, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":202 * LOCAL = EPS_LANCZOS_REORTHOG_LOCAL * FULL = EPS_LANCZOS_REORTHOG_FULL * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE # <<<<<<<<<<<<<< * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_SELECTIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SELECTIVE, __pyx_t_5) < 0) __PYX_ERR(13, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":203 * FULL = EPS_LANCZOS_REORTHOG_FULL * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC # <<<<<<<<<<<<<< * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL * DELAYED = EPS_LANCZOS_REORTHOG_DELAYED */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PERIODIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PERIODIC, __pyx_t_5) < 0) __PYX_ERR(13, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":204 * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL # <<<<<<<<<<<<<< * DELAYED = EPS_LANCZOS_REORTHOG_DELAYED * */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PARTIAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PARTIAL, __pyx_t_5) < 0) __PYX_ERR(13, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":205 * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL * DELAYED = EPS_LANCZOS_REORTHOG_DELAYED # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_DELAYED); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DELAYED, __pyx_t_5) < 0) __PYX_ERR(13, 205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/EPS.pyx":189 * WILKINSON = EPS_POWER_SHIFT_WILKINSON * * class EPSLanczosReorthogType(object): # <<<<<<<<<<<<<< * """ * EPS Lanczos reorthogonalization type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSLanczosReorthogType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSLanczosReorthogType, __pyx_t_5) < 0) __PYX_ERR(13, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":215 * """ * * Type = EPSType # <<<<<<<<<<<<<< * ProblemType = EPSProblemType * Extraction = EPSExtraction */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(13, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":216 * * Type = EPSType * ProblemType = EPSProblemType # <<<<<<<<<<<<<< * Extraction = EPSExtraction * Balance = EPSBalance */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ProblemType, __pyx_t_2) < 0) __PYX_ERR(13, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":217 * Type = EPSType * ProblemType = EPSProblemType * Extraction = EPSExtraction # <<<<<<<<<<<<<< * Balance = EPSBalance * ErrorType = EPSErrorType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Extraction, __pyx_t_2) < 0) __PYX_ERR(13, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":218 * ProblemType = EPSProblemType * Extraction = EPSExtraction * Balance = EPSBalance # <<<<<<<<<<<<<< * ErrorType = EPSErrorType * Which = EPSWhich */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSBalance); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Balance, __pyx_t_2) < 0) __PYX_ERR(13, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":219 * Extraction = EPSExtraction * Balance = EPSBalance * ErrorType = EPSErrorType # <<<<<<<<<<<<<< * Which = EPSWhich * Conv = EPSConv */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(13, 219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":220 * Balance = EPSBalance * ErrorType = EPSErrorType * Which = EPSWhich # <<<<<<<<<<<<<< * Conv = EPSConv * ConvergedReason = EPSConvergedReason */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(13, 220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":221 * ErrorType = EPSErrorType * Which = EPSWhich * Conv = EPSConv # <<<<<<<<<<<<<< * ConvergedReason = EPSConvergedReason * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSConv); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Conv, __pyx_t_2) < 0) __PYX_ERR(13, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":222 * Which = EPSWhich * Conv = EPSConv * ConvergedReason = EPSConvergedReason # <<<<<<<<<<<<<< * * PowerShiftType = EPSPowerShiftType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(13, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":224 * ConvergedReason = EPSConvergedReason * * PowerShiftType = EPSPowerShiftType # <<<<<<<<<<<<<< * LanczosReorthogType = EPSLanczosReorthogType * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSPowerShiftType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_PowerShiftType, __pyx_t_2) < 0) __PYX_ERR(13, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":225 * * PowerShiftType = EPSPowerShiftType * LanczosReorthogType = EPSLanczosReorthogType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSLanczosReorthogType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_LanczosReorthogType, __pyx_t_2) < 0) __PYX_ERR(13, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":1860 * # ----------------------------------------------------------------------------- * * del EPSType # <<<<<<<<<<<<<< * del EPSProblemType * del EPSExtraction */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSType) < 0) __PYX_ERR(13, 1860, __pyx_L1_error) /* "SLEPc/EPS.pyx":1861 * * del EPSType * del EPSProblemType # <<<<<<<<<<<<<< * del EPSExtraction * del EPSBalance */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSProblemType) < 0) __PYX_ERR(13, 1861, __pyx_L1_error) /* "SLEPc/EPS.pyx":1862 * del EPSType * del EPSProblemType * del EPSExtraction # <<<<<<<<<<<<<< * del EPSBalance * del EPSErrorType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSExtraction) < 0) __PYX_ERR(13, 1862, __pyx_L1_error) /* "SLEPc/EPS.pyx":1863 * del EPSProblemType * del EPSExtraction * del EPSBalance # <<<<<<<<<<<<<< * del EPSErrorType * del EPSWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSBalance) < 0) __PYX_ERR(13, 1863, __pyx_L1_error) /* "SLEPc/EPS.pyx":1864 * del EPSExtraction * del EPSBalance * del EPSErrorType # <<<<<<<<<<<<<< * del EPSWhich * del EPSConv */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSErrorType) < 0) __PYX_ERR(13, 1864, __pyx_L1_error) /* "SLEPc/EPS.pyx":1865 * del EPSBalance * del EPSErrorType * del EPSWhich # <<<<<<<<<<<<<< * del EPSConv * del EPSConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSWhich) < 0) __PYX_ERR(13, 1865, __pyx_L1_error) /* "SLEPc/EPS.pyx":1866 * del EPSErrorType * del EPSWhich * del EPSConv # <<<<<<<<<<<<<< * del EPSConvergedReason * del EPSPowerShiftType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConv) < 0) __PYX_ERR(13, 1866, __pyx_L1_error) /* "SLEPc/EPS.pyx":1867 * del EPSWhich * del EPSConv * del EPSConvergedReason # <<<<<<<<<<<<<< * del EPSPowerShiftType * del EPSLanczosReorthogType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConvergedReason) < 0) __PYX_ERR(13, 1867, __pyx_L1_error) /* "SLEPc/EPS.pyx":1868 * del EPSConv * del EPSConvergedReason * del EPSPowerShiftType # <<<<<<<<<<<<<< * del EPSLanczosReorthogType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSPowerShiftType) < 0) __PYX_ERR(13, 1868, __pyx_L1_error) /* "SLEPc/EPS.pyx":1869 * del EPSConvergedReason * del EPSPowerShiftType * del EPSLanczosReorthogType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSLanczosReorthogType) < 0) __PYX_ERR(13, 1869, __pyx_L1_error) /* "SLEPc/SVD.pyx":3 * # ----------------------------------------------------------------------------- * * class SVDType(object): # <<<<<<<<<<<<<< * """ * SVD types */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDType, __pyx_n_s_SVDType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/SVD.pyx":13 * - `TRLANCZOS`: Thick-restart Lanczos. * """ * CROSS = S_(SVDCROSS) # <<<<<<<<<<<<<< * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCROSS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CROSS, __pyx_t_5) < 0) __PYX_ERR(14, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":14 * """ * CROSS = S_(SVDCROSS) * CYCLIC = S_(SVDCYCLIC) # <<<<<<<<<<<<<< * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCYCLIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CYCLIC, __pyx_t_5) < 0) __PYX_ERR(14, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":15 * CROSS = S_(SVDCROSS) * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) # <<<<<<<<<<<<<< * LANCZOS = S_(SVDLANCZOS) * TRLANCZOS = S_(SVDTRLANCZOS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLAPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAPACK, __pyx_t_5) < 0) __PYX_ERR(14, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":16 * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) # <<<<<<<<<<<<<< * TRLANCZOS = S_(SVDTRLANCZOS) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LANCZOS, __pyx_t_5) < 0) __PYX_ERR(14, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":17 * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) * TRLANCZOS = S_(SVDTRLANCZOS) # <<<<<<<<<<<<<< * * class SVDErrorType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDTRLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRLANCZOS, __pyx_t_5) < 0) __PYX_ERR(14, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":3 * # ----------------------------------------------------------------------------- * * class SVDType(object): # <<<<<<<<<<<<<< * """ * SVD types */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDType, __pyx_t_5) < 0) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SVD.pyx":19 * TRLANCZOS = S_(SVDTRLANCZOS) * * class SVDErrorType(object): # <<<<<<<<<<<<<< * """ * SVD error type to assess accuracy of computed solutions */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDErrorType, __pyx_n_s_SVDErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/SVD.pyx":26 * - `RELATIVE`: Relative error. * """ * ABSOLUTE = SVD_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = SVD_ERROR_RELATIVE * */ __pyx_t_5 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(14, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":27 * """ * ABSOLUTE = SVD_ERROR_ABSOLUTE * RELATIVE = SVD_ERROR_RELATIVE # <<<<<<<<<<<<<< * * class SVDWhich(object): */ __pyx_t_5 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(14, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":19 * TRLANCZOS = S_(SVDTRLANCZOS) * * class SVDErrorType(object): # <<<<<<<<<<<<<< * """ * SVD error type to assess accuracy of computed solutions */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDErrorType, __pyx_t_5) < 0) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SVD.pyx":29 * RELATIVE = SVD_ERROR_RELATIVE * * class SVDWhich(object): # <<<<<<<<<<<<<< * """ * SVD desired piece of spectrum */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDWhich, __pyx_n_s_SVDWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_desired_piece_of_spectrum_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/SVD.pyx":36 * - `SMALLEST`: smallest singular values. * """ * LARGEST = SVD_LARGEST # <<<<<<<<<<<<<< * SMALLEST = SVD_SMALLEST * */ __pyx_t_5 = __Pyx_PyInt_From_SVDWhich(SVD_LARGEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST, __pyx_t_5) < 0) __PYX_ERR(14, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":37 * """ * LARGEST = SVD_LARGEST * SMALLEST = SVD_SMALLEST # <<<<<<<<<<<<<< * * class SVDConvergedReason(object): */ __pyx_t_5 = __Pyx_PyInt_From_SVDWhich(SVD_SMALLEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST, __pyx_t_5) < 0) __PYX_ERR(14, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":29 * RELATIVE = SVD_ERROR_RELATIVE * * class SVDWhich(object): # <<<<<<<<<<<<<< * """ * SVD desired piece of spectrum */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDWhich, __pyx_t_5) < 0) __PYX_ERR(14, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SVD.pyx":39 * SMALLEST = SVD_SMALLEST * * class SVDConvergedReason(object): # <<<<<<<<<<<<<< * """ * SVD convergence reasons */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDConvergedReason, __pyx_n_s_SVDConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/SVD.pyx":49 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = SVD_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = SVD_CONVERGED_USER * DIVERGED_ITS = SVD_DIVERGED_ITS */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(14, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":50 * """ * CONVERGED_TOL = SVD_CONVERGED_TOL * CONVERGED_USER = SVD_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(14, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":51 * CONVERGED_TOL = SVD_CONVERGED_TOL * CONVERGED_USER = SVD_CONVERGED_USER * DIVERGED_ITS = SVD_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(14, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":52 * CONVERGED_USER = SVD_CONVERGED_USER * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING * ITERATING = SVD_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":53 * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = SVD_CONVERGED_ITERATING * */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":54 * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING * ITERATING = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(14, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/SVD.pyx":39 * SMALLEST = SVD_SMALLEST * * class SVDConvergedReason(object): # <<<<<<<<<<<<<< * """ * SVD convergence reasons */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDConvergedReason, __pyx_t_5) < 0) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SVD.pyx":64 * """ * * Type = SVDType # <<<<<<<<<<<<<< * ErrorType = SVDErrorType * Which = SVDWhich */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDType); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(14, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":65 * * Type = SVDType * ErrorType = SVDErrorType # <<<<<<<<<<<<<< * Which = SVDWhich * ConvergedReason = SVDConvergedReason */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(14, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":66 * Type = SVDType * ErrorType = SVDErrorType * Which = SVDWhich # <<<<<<<<<<<<<< * ConvergedReason = SVDConvergedReason * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(14, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":67 * ErrorType = SVDErrorType * Which = SVDWhich * ConvergedReason = SVDConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(14, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":846 * # ----------------------------------------------------------------------------- * * del SVDType # <<<<<<<<<<<<<< * del SVDErrorType * del SVDWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDType) < 0) __PYX_ERR(14, 846, __pyx_L1_error) /* "SLEPc/SVD.pyx":847 * * del SVDType * del SVDErrorType # <<<<<<<<<<<<<< * del SVDWhich * del SVDConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDErrorType) < 0) __PYX_ERR(14, 847, __pyx_L1_error) /* "SLEPc/SVD.pyx":848 * del SVDType * del SVDErrorType * del SVDWhich # <<<<<<<<<<<<<< * del SVDConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDWhich) < 0) __PYX_ERR(14, 848, __pyx_L1_error) /* "SLEPc/SVD.pyx":849 * del SVDErrorType * del SVDWhich * del SVDConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDConvergedReason) < 0) __PYX_ERR(14, 849, __pyx_L1_error) /* "SLEPc/PEP.pyx":3 * # ----------------------------------------------------------------------------- * * class PEPType(object): # <<<<<<<<<<<<<< * """ * PEP type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPType, __pyx_n_s_PEPType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_type_Polynomial_eigensolver); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":15 * - `JD`: Polynomial Jacobi-Davidson. * """ * LINEAR = S_(PEPLINEAR) # <<<<<<<<<<<<<< * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPLINEAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LINEAR, __pyx_t_5) < 0) __PYX_ERR(15, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":16 * """ * LINEAR = S_(PEPLINEAR) * QARNOLDI = S_(PEPQARNOLDI) # <<<<<<<<<<<<<< * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPQARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_QARNOLDI, __pyx_t_5) < 0) __PYX_ERR(15, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":17 * LINEAR = S_(PEPLINEAR) * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) # <<<<<<<<<<<<<< * STOAR = S_(PEPSTOAR) * JD = S_(PEPJD) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPTOAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TOAR, __pyx_t_5) < 0) __PYX_ERR(15, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":18 * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) # <<<<<<<<<<<<<< * JD = S_(PEPJD) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPSTOAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_STOAR, __pyx_t_5) < 0) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":19 * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) * JD = S_(PEPJD) # <<<<<<<<<<<<<< * * class PEPProblemType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPJD); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_JD, __pyx_t_5) < 0) __PYX_ERR(15, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":3 * # ----------------------------------------------------------------------------- * * class PEPType(object): # <<<<<<<<<<<<<< * """ * PEP type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPType, __pyx_t_5) < 0) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":21 * JD = S_(PEPJD) * * class PEPProblemType(object): # <<<<<<<<<<<<<< * """ * PEP problem type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPProblemType, __pyx_n_s_PEPProblemType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_problem_type_GENERAL_No_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":29 * - `GYROSCOPIC`: Hamiltonian structure. * """ * GENERAL = PEP_GENERAL # <<<<<<<<<<<<<< * HERMITIAN = PEP_HERMITIAN * GYROSCOPIC = PEP_GYROSCOPIC */ __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_GENERAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GENERAL, __pyx_t_5) < 0) __PYX_ERR(15, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":30 * """ * GENERAL = PEP_GENERAL * HERMITIAN = PEP_HERMITIAN # <<<<<<<<<<<<<< * GYROSCOPIC = PEP_GYROSCOPIC * */ __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_HERMITIAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HERMITIAN, __pyx_t_5) < 0) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":31 * GENERAL = PEP_GENERAL * HERMITIAN = PEP_HERMITIAN * GYROSCOPIC = PEP_GYROSCOPIC # <<<<<<<<<<<<<< * * class PEPWhich(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_GYROSCOPIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GYROSCOPIC, __pyx_t_5) < 0) __PYX_ERR(15, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":21 * JD = S_(PEPJD) * * class PEPProblemType(object): # <<<<<<<<<<<<<< * """ * PEP problem type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPProblemType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPProblemType, __pyx_t_5) < 0) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":33 * GYROSCOPIC = PEP_GYROSCOPIC * * class PEPWhich(object): # <<<<<<<<<<<<<< * """ * PEP desired part of spectrum */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPWhich, __pyx_n_s_PEPWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_desired_part_of_spectrum_LA); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":48 * - `USER`: User-defined criterion. * """ * LARGEST_MAGNITUDE = PEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE * LARGEST_REAL = PEP_LARGEST_REAL */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":49 * """ * LARGEST_MAGNITUDE = PEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE # <<<<<<<<<<<<<< * LARGEST_REAL = PEP_LARGEST_REAL * SMALLEST_REAL = PEP_SMALLEST_REAL */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":50 * LARGEST_MAGNITUDE = PEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE * LARGEST_REAL = PEP_LARGEST_REAL # <<<<<<<<<<<<<< * SMALLEST_REAL = PEP_SMALLEST_REAL * LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":51 * SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE * LARGEST_REAL = PEP_LARGEST_REAL * SMALLEST_REAL = PEP_SMALLEST_REAL # <<<<<<<<<<<<<< * LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":52 * LARGEST_REAL = PEP_LARGEST_REAL * SMALLEST_REAL = PEP_SMALLEST_REAL * LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY # <<<<<<<<<<<<<< * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":53 * SMALLEST_REAL = PEP_SMALLEST_REAL * LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY # <<<<<<<<<<<<<< * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE * TARGET_REAL = PEP_TARGET_REAL */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":54 * LARGEST_IMAGINARY = PEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE # <<<<<<<<<<<<<< * TARGET_REAL = PEP_TARGET_REAL * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":55 * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE * TARGET_REAL = PEP_TARGET_REAL # <<<<<<<<<<<<<< * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY * USER = PEP_WHICH_USER */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":56 * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE * TARGET_REAL = PEP_TARGET_REAL * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY # <<<<<<<<<<<<<< * USER = PEP_WHICH_USER * */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":57 * TARGET_REAL = PEP_TARGET_REAL * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY * USER = PEP_WHICH_USER # <<<<<<<<<<<<<< * * class PEPBasis(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(15, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":33 * GYROSCOPIC = PEP_GYROSCOPIC * * class PEPWhich(object): # <<<<<<<<<<<<<< * """ * PEP desired part of spectrum */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPWhich, __pyx_t_5) < 0) __PYX_ERR(15, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":59 * USER = PEP_WHICH_USER * * class PEPBasis(object): # <<<<<<<<<<<<<< * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPBasis, __pyx_n_s_PEPBasis, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":60 * * class PEPBasis(object): * MONOMIAL = PEP_BASIS_MONOMIAL # <<<<<<<<<<<<<< * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_MONOMIAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MONOMIAL, __pyx_t_5) < 0) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":61 * class PEPBasis(object): * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 # <<<<<<<<<<<<<< * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHEBYSHEV1, __pyx_t_5) < 0) __PYX_ERR(15, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":62 * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 # <<<<<<<<<<<<<< * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV2); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHEBYSHEV2, __pyx_t_5) < 0) __PYX_ERR(15, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":63 * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE # <<<<<<<<<<<<<< * LAGUERRE = PEP_BASIS_LAGUERRE * HERMITE = PEP_BASIS_HERMITE */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LEGENDRE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LEGENDRE, __pyx_t_5) < 0) __PYX_ERR(15, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":64 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE # <<<<<<<<<<<<<< * HERMITE = PEP_BASIS_HERMITE * */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LAGUERRE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAGUERRE, __pyx_t_5) < 0) __PYX_ERR(15, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":65 * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE * HERMITE = PEP_BASIS_HERMITE # <<<<<<<<<<<<<< * * class PEPScale(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_HERMITE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HERMITE, __pyx_t_5) < 0) __PYX_ERR(15, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":59 * USER = PEP_WHICH_USER * * class PEPBasis(object): # <<<<<<<<<<<<<< * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPBasis, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPBasis, __pyx_t_5) < 0) __PYX_ERR(15, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":67 * HERMITE = PEP_BASIS_HERMITE * * class PEPScale(object): # <<<<<<<<<<<<<< * """ * PEP scaling strategy */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPScale, __pyx_n_s_PEPScale, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_scaling_strategy_NONE_No_sc); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":76 * - `BOTH`: Both parameter and diagonal scaling. * """ * NONE = PEP_SCALE_NONE # <<<<<<<<<<<<<< * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL */ __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":77 * """ * NONE = PEP_SCALE_NONE * SCALAR = PEP_SCALE_SCALAR # <<<<<<<<<<<<<< * DIAGONAL = PEP_SCALE_DIAGONAL * BOTH = PEP_SCALE_BOTH */ __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_SCALAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCALAR, __pyx_t_5) < 0) __PYX_ERR(15, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":78 * NONE = PEP_SCALE_NONE * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL # <<<<<<<<<<<<<< * BOTH = PEP_SCALE_BOTH * */ __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_DIAGONAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIAGONAL, __pyx_t_5) < 0) __PYX_ERR(15, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":79 * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL * BOTH = PEP_SCALE_BOTH # <<<<<<<<<<<<<< * * class PEPRefine(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_BOTH); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BOTH, __pyx_t_5) < 0) __PYX_ERR(15, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":67 * HERMITE = PEP_BASIS_HERMITE * * class PEPScale(object): # <<<<<<<<<<<<<< * """ * PEP scaling strategy */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPScale, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPScale, __pyx_t_5) < 0) __PYX_ERR(15, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":81 * BOTH = PEP_SCALE_BOTH * * class PEPRefine(object): # <<<<<<<<<<<<<< * """ * PEP refinement strategy */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPRefine, __pyx_n_s_PEPRefine, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_refinement_strategy_NONE_No); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":89 * - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair). * """ * NONE = PEP_REFINE_NONE # <<<<<<<<<<<<<< * SIMPLE = PEP_REFINE_SIMPLE * MULTIPLE = PEP_REFINE_MULTIPLE */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":90 * """ * NONE = PEP_REFINE_NONE * SIMPLE = PEP_REFINE_SIMPLE # <<<<<<<<<<<<<< * MULTIPLE = PEP_REFINE_MULTIPLE * */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SIMPLE, __pyx_t_5) < 0) __PYX_ERR(15, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":91 * NONE = PEP_REFINE_NONE * SIMPLE = PEP_REFINE_SIMPLE * MULTIPLE = PEP_REFINE_MULTIPLE # <<<<<<<<<<<<<< * * class PEPRefineScheme(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLE, __pyx_t_5) < 0) __PYX_ERR(15, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":81 * BOTH = PEP_SCALE_BOTH * * class PEPRefine(object): # <<<<<<<<<<<<<< * """ * PEP refinement strategy */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPRefine, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefine, __pyx_t_5) < 0) __PYX_ERR(15, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":93 * MULTIPLE = PEP_REFINE_MULTIPLE * * class PEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPRefineScheme, __pyx_n_s_PEPRefineScheme, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Scheme_for_solving_linear_syste); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":101 * - `EXPLICIT`: Build the explicit matrix. * """ * SCHUR = PEP_REFINE_SCHEME_SCHUR # <<<<<<<<<<<<<< * MBE = PEP_REFINE_SCHEME_MBE * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCHUR, __pyx_t_5) < 0) __PYX_ERR(15, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":102 * """ * SCHUR = PEP_REFINE_SCHEME_SCHUR * MBE = PEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MBE, __pyx_t_5) < 0) __PYX_ERR(15, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":103 * SCHUR = PEP_REFINE_SCHEME_SCHUR * MBE = PEP_REFINE_SCHEME_MBE * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT # <<<<<<<<<<<<<< * * class PEPExtract(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPLICIT, __pyx_t_5) < 0) __PYX_ERR(15, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":93 * MULTIPLE = PEP_REFINE_MULTIPLE * * class PEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPRefineScheme, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefineScheme, __pyx_t_5) < 0) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":105 * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * * class PEPExtract(object): # <<<<<<<<<<<<<< * """ * Extraction strategy used to obtain eigenvectors of the PEP from the */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPExtract, __pyx_n_s_PEPExtract, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Extraction_strategy_used_to_obt); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":115 * - `STRUCTURED`: Combine all blocks in a certain way. * """ * NONE = PEP_EXTRACT_NONE # <<<<<<<<<<<<<< * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL */ __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":116 * """ * NONE = PEP_EXTRACT_NONE * NORM = PEP_EXTRACT_NORM # <<<<<<<<<<<<<< * RESIDUAL = PEP_EXTRACT_RESIDUAL * STRUCTURED = PEP_EXTRACT_STRUCTURED */ __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(15, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":117 * NONE = PEP_EXTRACT_NONE * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL # <<<<<<<<<<<<<< * STRUCTURED = PEP_EXTRACT_STRUCTURED * */ __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_RESIDUAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RESIDUAL, __pyx_t_5) < 0) __PYX_ERR(15, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":118 * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL * STRUCTURED = PEP_EXTRACT_STRUCTURED # <<<<<<<<<<<<<< * * class PEPErrorType(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_STRUCTURED); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_STRUCTURED, __pyx_t_5) < 0) __PYX_ERR(15, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":105 * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * * class PEPExtract(object): # <<<<<<<<<<<<<< * """ * Extraction strategy used to obtain eigenvectors of the PEP from the */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPExtract, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPExtract, __pyx_t_5) < 0) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":120 * STRUCTURED = PEP_EXTRACT_STRUCTURED * * class PEPErrorType(object): # <<<<<<<<<<<<<< * """ * PEP error type to assess accuracy of computed solutions */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPErrorType, __pyx_n_s_PEPErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":128 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = PEP_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = PEP_ERROR_RELATIVE * BACKWARD = PEP_ERROR_BACKWARD */ __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(15, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":129 * """ * ABSOLUTE = PEP_ERROR_ABSOLUTE * RELATIVE = PEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = PEP_ERROR_BACKWARD * */ __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(15, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":130 * ABSOLUTE = PEP_ERROR_ABSOLUTE * RELATIVE = PEP_ERROR_RELATIVE * BACKWARD = PEP_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class PEPConv(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(15, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":120 * STRUCTURED = PEP_EXTRACT_STRUCTURED * * class PEPErrorType(object): # <<<<<<<<<<<<<< * """ * PEP error type to assess accuracy of computed solutions */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPErrorType, __pyx_t_5) < 0) __PYX_ERR(15, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":132 * BACKWARD = PEP_ERROR_BACKWARD * * class PEPConv(object): # <<<<<<<<<<<<<< * """ * PEP convergence test */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPConv, __pyx_n_s_PEPConv, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_convergence_test_ABS_REL_NO); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":141 * - `USER`: * """ * ABS = PEP_CONV_ABS # <<<<<<<<<<<<<< * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM */ __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_ABS); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABS, __pyx_t_5) < 0) __PYX_ERR(15, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":142 * """ * ABS = PEP_CONV_ABS * REL = PEP_CONV_REL # <<<<<<<<<<<<<< * NORM = PEP_CONV_NORM * USER = PEP_CONV_USER */ __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_REL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REL, __pyx_t_5) < 0) __PYX_ERR(15, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":143 * ABS = PEP_CONV_ABS * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM # <<<<<<<<<<<<<< * USER = PEP_CONV_USER * */ __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(15, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":144 * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM * USER = PEP_CONV_USER # <<<<<<<<<<<<<< * * class PEPConvergedReason(object): */ __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(15, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":132 * BACKWARD = PEP_ERROR_BACKWARD * * class PEPConv(object): # <<<<<<<<<<<<<< * """ * PEP convergence test */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPConv, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConv, __pyx_t_5) < 0) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":146 * USER = PEP_CONV_USER * * class PEPConvergedReason(object): # <<<<<<<<<<<<<< * """ * PEP convergence reasons */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPConvergedReason, __pyx_n_s_PEPConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/PEP.pyx":157 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = PEP_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = PEP_CONVERGED_USER * DIVERGED_ITS = PEP_DIVERGED_ITS */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(15, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":158 * """ * CONVERGED_TOL = PEP_CONVERGED_TOL * CONVERGED_USER = PEP_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = PEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(15, 158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":159 * CONVERGED_TOL = PEP_CONVERGED_TOL * CONVERGED_USER = PEP_CONVERGED_USER * DIVERGED_ITS = PEP_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(15, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":160 * CONVERGED_USER = PEP_CONVERGED_USER * DIVERGED_ITS = PEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(15, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":161 * DIVERGED_ITS = PEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST # <<<<<<<<<<<<<< * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING * ITERATING = PEP_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_5) < 0) __PYX_ERR(15, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":162 * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = PEP_CONVERGED_ITERATING * */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(15, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":163 * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING * ITERATING = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(15, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/PEP.pyx":146 * USER = PEP_CONV_USER * * class PEPConvergedReason(object): # <<<<<<<<<<<<<< * """ * PEP convergence reasons */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConvergedReason, __pyx_t_5) < 0) __PYX_ERR(15, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":173 * """ * * Type = PEPType # <<<<<<<<<<<<<< * ProblemType = PEPProblemType * Which = PEPWhich */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(15, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":174 * * Type = PEPType * ProblemType = PEPProblemType # <<<<<<<<<<<<<< * Which = PEPWhich * Basis = PEPBasis */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ProblemType, __pyx_t_2) < 0) __PYX_ERR(15, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":175 * Type = PEPType * ProblemType = PEPProblemType * Which = PEPWhich # <<<<<<<<<<<<<< * Basis = PEPBasis * Scale = PEPScale */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(15, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":176 * ProblemType = PEPProblemType * Which = PEPWhich * Basis = PEPBasis # <<<<<<<<<<<<<< * Scale = PEPScale * Refine = PEPRefine */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPBasis); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Basis, __pyx_t_2) < 0) __PYX_ERR(15, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":177 * Which = PEPWhich * Basis = PEPBasis * Scale = PEPScale # <<<<<<<<<<<<<< * Refine = PEPRefine * RefineScheme = PEPRefineScheme */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPScale); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Scale, __pyx_t_2) < 0) __PYX_ERR(15, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":178 * Basis = PEPBasis * Scale = PEPScale * Refine = PEPRefine # <<<<<<<<<<<<<< * RefineScheme = PEPRefineScheme * Extract = PEPExtract */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPRefine); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Refine, __pyx_t_2) < 0) __PYX_ERR(15, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":179 * Scale = PEPScale * Refine = PEPRefine * RefineScheme = PEPRefineScheme # <<<<<<<<<<<<<< * Extract = PEPExtract * ErrorType = PEPErrorType */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPRefineScheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_2) < 0) __PYX_ERR(15, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":180 * Refine = PEPRefine * RefineScheme = PEPRefineScheme * Extract = PEPExtract # <<<<<<<<<<<<<< * ErrorType = PEPErrorType * Conv = PEPConv */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPExtract); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Extract, __pyx_t_2) < 0) __PYX_ERR(15, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":181 * RefineScheme = PEPRefineScheme * Extract = PEPExtract * ErrorType = PEPErrorType # <<<<<<<<<<<<<< * Conv = PEPConv * ConvergedReason = PEPConvergedReason */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(15, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":182 * Extract = PEPExtract * ErrorType = PEPErrorType * Conv = PEPConv # <<<<<<<<<<<<<< * ConvergedReason = PEPConvergedReason * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPConv); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Conv, __pyx_t_2) < 0) __PYX_ERR(15, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":183 * ErrorType = PEPErrorType * Conv = PEPConv * ConvergedReason = PEPConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(15, 183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":1036 * # ----------------------------------------------------------------------------- * * del PEPType # <<<<<<<<<<<<<< * del PEPProblemType * del PEPWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPType) < 0) __PYX_ERR(15, 1036, __pyx_L1_error) /* "SLEPc/PEP.pyx":1037 * * del PEPType * del PEPProblemType # <<<<<<<<<<<<<< * del PEPWhich * del PEPBasis */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPProblemType) < 0) __PYX_ERR(15, 1037, __pyx_L1_error) /* "SLEPc/PEP.pyx":1038 * del PEPType * del PEPProblemType * del PEPWhich # <<<<<<<<<<<<<< * del PEPBasis * del PEPScale */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPWhich) < 0) __PYX_ERR(15, 1038, __pyx_L1_error) /* "SLEPc/PEP.pyx":1039 * del PEPProblemType * del PEPWhich * del PEPBasis # <<<<<<<<<<<<<< * del PEPScale * del PEPRefine */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPBasis) < 0) __PYX_ERR(15, 1039, __pyx_L1_error) /* "SLEPc/PEP.pyx":1040 * del PEPWhich * del PEPBasis * del PEPScale # <<<<<<<<<<<<<< * del PEPRefine * del PEPRefineScheme */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPScale) < 0) __PYX_ERR(15, 1040, __pyx_L1_error) /* "SLEPc/PEP.pyx":1041 * del PEPBasis * del PEPScale * del PEPRefine # <<<<<<<<<<<<<< * del PEPRefineScheme * del PEPExtract */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefine) < 0) __PYX_ERR(15, 1041, __pyx_L1_error) /* "SLEPc/PEP.pyx":1042 * del PEPScale * del PEPRefine * del PEPRefineScheme # <<<<<<<<<<<<<< * del PEPExtract * del PEPErrorType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefineScheme) < 0) __PYX_ERR(15, 1042, __pyx_L1_error) /* "SLEPc/PEP.pyx":1043 * del PEPRefine * del PEPRefineScheme * del PEPExtract # <<<<<<<<<<<<<< * del PEPErrorType * del PEPConv */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPExtract) < 0) __PYX_ERR(15, 1043, __pyx_L1_error) /* "SLEPc/PEP.pyx":1044 * del PEPRefineScheme * del PEPExtract * del PEPErrorType # <<<<<<<<<<<<<< * del PEPConv * del PEPConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPErrorType) < 0) __PYX_ERR(15, 1044, __pyx_L1_error) /* "SLEPc/PEP.pyx":1045 * del PEPExtract * del PEPErrorType * del PEPConv # <<<<<<<<<<<<<< * del PEPConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConv) < 0) __PYX_ERR(15, 1045, __pyx_L1_error) /* "SLEPc/PEP.pyx":1046 * del PEPErrorType * del PEPConv * del PEPConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConvergedReason) < 0) __PYX_ERR(15, 1046, __pyx_L1_error) /* "SLEPc/NEP.pyx":3 * # ----------------------------------------------------------------------------- * * class NEPType(object): # <<<<<<<<<<<<<< * """ * NEP type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPType, __pyx_n_s_NEPType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_type_Nonlinear_eigensolvers); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":16 * - `NLEIGS`: Fully rational Krylov method for nonlinear eigenproblems. * """ * RII = S_(NEPRII) # <<<<<<<<<<<<<< * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPRII); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RII, __pyx_t_5) < 0) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":17 * """ * RII = S_(NEPRII) * SLP = S_(NEPSLP) # <<<<<<<<<<<<<< * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPSLP); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SLP, __pyx_t_5) < 0) __PYX_ERR(16, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":18 * RII = S_(NEPRII) * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) # <<<<<<<<<<<<<< * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NARNOLDI, __pyx_t_5) < 0) __PYX_ERR(16, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":19 * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) # <<<<<<<<<<<<<< * INTERPOL = S_(NEPINTERPOL) * NLEIGS = S_(NEPNLEIGS) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPCISS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CISS, __pyx_t_5) < 0) __PYX_ERR(16, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":20 * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) # <<<<<<<<<<<<<< * NLEIGS = S_(NEPNLEIGS) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPINTERPOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERPOL, __pyx_t_5) < 0) __PYX_ERR(16, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":21 * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) * NLEIGS = S_(NEPNLEIGS) # <<<<<<<<<<<<<< * * class NEPErrorType(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNLEIGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NLEIGS, __pyx_t_5) < 0) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":3 * # ----------------------------------------------------------------------------- * * class NEPType(object): # <<<<<<<<<<<<<< * """ * NEP type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPType, __pyx_t_5) < 0) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":23 * NLEIGS = S_(NEPNLEIGS) * * class NEPErrorType(object): # <<<<<<<<<<<<<< * """ * NEP error type to assess accuracy of computed solutions */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPErrorType, __pyx_n_s_NEPErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":31 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = NEP_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = NEP_ERROR_RELATIVE * BACKWARD = NEP_ERROR_BACKWARD */ __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(16, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":32 * """ * ABSOLUTE = NEP_ERROR_ABSOLUTE * RELATIVE = NEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = NEP_ERROR_BACKWARD * */ __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(16, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":33 * ABSOLUTE = NEP_ERROR_ABSOLUTE * RELATIVE = NEP_ERROR_RELATIVE * BACKWARD = NEP_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class NEPWhich(object): */ __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":23 * NLEIGS = S_(NEPNLEIGS) * * class NEPErrorType(object): # <<<<<<<<<<<<<< * """ * NEP error type to assess accuracy of computed solutions */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPErrorType, __pyx_t_5) < 0) __PYX_ERR(16, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":35 * BACKWARD = NEP_ERROR_BACKWARD * * class NEPWhich(object): # <<<<<<<<<<<<<< * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPWhich, __pyx_n_s_NEPWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":36 * * class NEPWhich(object): * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE * LARGEST_REAL = NEP_LARGEST_REAL */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":37 * class NEPWhich(object): * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE # <<<<<<<<<<<<<< * LARGEST_REAL = NEP_LARGEST_REAL * SMALLEST_REAL = NEP_SMALLEST_REAL */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":38 * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE * LARGEST_REAL = NEP_LARGEST_REAL # <<<<<<<<<<<<<< * SMALLEST_REAL = NEP_SMALLEST_REAL * LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":39 * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE * LARGEST_REAL = NEP_LARGEST_REAL * SMALLEST_REAL = NEP_SMALLEST_REAL # <<<<<<<<<<<<<< * LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":40 * LARGEST_REAL = NEP_LARGEST_REAL * SMALLEST_REAL = NEP_SMALLEST_REAL * LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY # <<<<<<<<<<<<<< * SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":41 * SMALLEST_REAL = NEP_SMALLEST_REAL * LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY # <<<<<<<<<<<<<< * TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE * TARGET_REAL = NEP_TARGET_REAL */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":42 * LARGEST_IMAGINARY = NEP_LARGEST_IMAGINARY * SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE # <<<<<<<<<<<<<< * TARGET_REAL = NEP_TARGET_REAL * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":43 * SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE * TARGET_REAL = NEP_TARGET_REAL # <<<<<<<<<<<<<< * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY * ALL = NEP_ALL */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":44 * TARGET_MAGNITUDE = NEP_TARGET_MAGNITUDE * TARGET_REAL = NEP_TARGET_REAL * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY # <<<<<<<<<<<<<< * ALL = NEP_ALL * USER = NEP_WHICH_USER */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":45 * TARGET_REAL = NEP_TARGET_REAL * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY * ALL = NEP_ALL # <<<<<<<<<<<<<< * USER = NEP_WHICH_USER * */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_ALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALL, __pyx_t_5) < 0) __PYX_ERR(16, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":46 * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY * ALL = NEP_ALL * USER = NEP_WHICH_USER # <<<<<<<<<<<<<< * * class NEPConvergedReason(object): */ __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(16, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":35 * BACKWARD = NEP_ERROR_BACKWARD * * class NEPWhich(object): # <<<<<<<<<<<<<< * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPWhich, __pyx_t_5) < 0) __PYX_ERR(16, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":48 * USER = NEP_WHICH_USER * * class NEPConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPConvergedReason, __pyx_n_s_NEPConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":49 * * class NEPConvergedReason(object): * CONVERGED_TOL = NEP_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = NEP_CONVERGED_USER * DIVERGED_ITS = NEP_DIVERGED_ITS */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(16, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":50 * class NEPConvergedReason(object): * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = NEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(16, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":51 * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER * DIVERGED_ITS = NEP_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN * DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(16, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":52 * CONVERGED_USER = NEP_CONVERGED_USER * DIVERGED_ITS = NEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE * CONVERGED_ITERATING = NEP_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":53 * DIVERGED_ITS = NEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN * DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE # <<<<<<<<<<<<<< * CONVERGED_ITERATING = NEP_CONVERGED_ITERATING * ITERATING = NEP_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_LINEAR_SOLVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_LINEAR_SOLVE, __pyx_t_5) < 0) __PYX_ERR(16, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":54 * DIVERGED_BREAKDOWN = NEP_DIVERGED_BREAKDOWN * DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE * CONVERGED_ITERATING = NEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = NEP_CONVERGED_ITERATING * */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(16, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":55 * DIVERGED_LINEAR_SOLVE = NEP_DIVERGED_LINEAR_SOLVE * CONVERGED_ITERATING = NEP_CONVERGED_ITERATING * ITERATING = NEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * class NEPRefine(object): */ __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(16, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":48 * USER = NEP_WHICH_USER * * class NEPConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPConvergedReason, __pyx_t_5) < 0) __PYX_ERR(16, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":57 * ITERATING = NEP_CONVERGED_ITERATING * * class NEPRefine(object): # <<<<<<<<<<<<<< * """ * NEP refinement strategy */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPRefine, __pyx_n_s_NEPRefine, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_refinement_strategy_NONE_No); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":65 * - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair). * """ * NONE = NEP_REFINE_NONE # <<<<<<<<<<<<<< * SIMPLE = NEP_REFINE_SIMPLE * MULTIPLE = NEP_REFINE_MULTIPLE */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":66 * """ * NONE = NEP_REFINE_NONE * SIMPLE = NEP_REFINE_SIMPLE # <<<<<<<<<<<<<< * MULTIPLE = NEP_REFINE_MULTIPLE * */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SIMPLE, __pyx_t_5) < 0) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":67 * NONE = NEP_REFINE_NONE * SIMPLE = NEP_REFINE_SIMPLE * MULTIPLE = NEP_REFINE_MULTIPLE # <<<<<<<<<<<<<< * * class NEPRefineScheme(object): */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLE, __pyx_t_5) < 0) __PYX_ERR(16, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":57 * ITERATING = NEP_CONVERGED_ITERATING * * class NEPRefine(object): # <<<<<<<<<<<<<< * """ * NEP refinement strategy */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPRefine, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefine, __pyx_t_5) < 0) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":69 * MULTIPLE = NEP_REFINE_MULTIPLE * * class NEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPRefineScheme, __pyx_n_s_NEPRefineScheme, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Scheme_for_solving_linear_syste); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/NEP.pyx":77 * - `EXPLICIT`: Build the explicit matrix. * """ * SCHUR = NEP_REFINE_SCHEME_SCHUR # <<<<<<<<<<<<<< * MBE = NEP_REFINE_SCHEME_MBE * EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCHUR, __pyx_t_5) < 0) __PYX_ERR(16, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":78 * """ * SCHUR = NEP_REFINE_SCHEME_SCHUR * MBE = NEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT * */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MBE, __pyx_t_5) < 0) __PYX_ERR(16, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":79 * SCHUR = NEP_REFINE_SCHEME_SCHUR * MBE = NEP_REFINE_SCHEME_MBE * EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPLICIT, __pyx_t_5) < 0) __PYX_ERR(16, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/NEP.pyx":69 * MULTIPLE = NEP_REFINE_MULTIPLE * * class NEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPRefineScheme, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefineScheme, __pyx_t_5) < 0) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/NEP.pyx":89 * """ * * Type = NEPType # <<<<<<<<<<<<<< * ErrorType = NEPErrorType * Which = NEPWhich */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPType); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(16, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":90 * * Type = NEPType * ErrorType = NEPErrorType # <<<<<<<<<<<<<< * Which = NEPWhich * ConvergedReason = NEPConvergedReason */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(16, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":91 * Type = NEPType * ErrorType = NEPErrorType * Which = NEPWhich # <<<<<<<<<<<<<< * ConvergedReason = NEPConvergedReason * Refine = NEPRefine */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(16, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":92 * ErrorType = NEPErrorType * Which = NEPWhich * ConvergedReason = NEPConvergedReason # <<<<<<<<<<<<<< * Refine = NEPRefine * RefineScheme = NEPRefineScheme */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(16, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":93 * Which = NEPWhich * ConvergedReason = NEPConvergedReason * Refine = NEPRefine # <<<<<<<<<<<<<< * RefineScheme = NEPRefineScheme * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPRefine); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Refine, __pyx_t_2) < 0) __PYX_ERR(16, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":94 * ConvergedReason = NEPConvergedReason * Refine = NEPRefine * RefineScheme = NEPRefineScheme # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPRefineScheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_2) < 0) __PYX_ERR(16, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":684 * # ----------------------------------------------------------------------------- * * del NEPType # <<<<<<<<<<<<<< * del NEPErrorType * del NEPWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPType) < 0) __PYX_ERR(16, 684, __pyx_L1_error) /* "SLEPc/NEP.pyx":685 * * del NEPType * del NEPErrorType # <<<<<<<<<<<<<< * del NEPWhich * del NEPConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPErrorType) < 0) __PYX_ERR(16, 685, __pyx_L1_error) /* "SLEPc/NEP.pyx":686 * del NEPType * del NEPErrorType * del NEPWhich # <<<<<<<<<<<<<< * del NEPConvergedReason * del NEPRefine */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPWhich) < 0) __PYX_ERR(16, 686, __pyx_L1_error) /* "SLEPc/NEP.pyx":687 * del NEPErrorType * del NEPWhich * del NEPConvergedReason # <<<<<<<<<<<<<< * del NEPRefine * del NEPRefineScheme */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPConvergedReason) < 0) __PYX_ERR(16, 687, __pyx_L1_error) /* "SLEPc/NEP.pyx":688 * del NEPWhich * del NEPConvergedReason * del NEPRefine # <<<<<<<<<<<<<< * del NEPRefineScheme * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefine) < 0) __PYX_ERR(16, 688, __pyx_L1_error) /* "SLEPc/NEP.pyx":689 * del NEPConvergedReason * del NEPRefine * del NEPRefineScheme # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefineScheme) < 0) __PYX_ERR(16, 689, __pyx_L1_error) /* "SLEPc/MFN.pyx":3 * # ----------------------------------------------------------------------------- * * class MFNType(object): # <<<<<<<<<<<<<< * """ * MFN type */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_MFNType, __pyx_n_s_MFNType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_MFN_type_Action_of_a_matrix_fun); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/MFN.pyx":12 * - `EXPOKIT`: Implementation of the method in Expokit. * """ * KRYLOV = S_(MFNKRYLOV) # <<<<<<<<<<<<<< * EXPOKIT = S_(MFNEXPOKIT) * */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(MFNKRYLOV); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_KRYLOV, __pyx_t_5) < 0) __PYX_ERR(17, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":13 * """ * KRYLOV = S_(MFNKRYLOV) * EXPOKIT = S_(MFNEXPOKIT) # <<<<<<<<<<<<<< * * class MFNConvergedReason(object): */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(MFNEXPOKIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPOKIT, __pyx_t_5) < 0) __PYX_ERR(17, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":3 * # ----------------------------------------------------------------------------- * * class MFNType(object): # <<<<<<<<<<<<<< * """ * MFN type */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_MFNType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNType, __pyx_t_5) < 0) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/MFN.pyx":15 * EXPOKIT = S_(MFNEXPOKIT) * * class MFNConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_MFNConvergedReason, __pyx_n_s_MFNConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "SLEPc/MFN.pyx":16 * * class MFNConvergedReason(object): * CONVERGED_TOL = MFN_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_ITS = MFN_CONVERGED_ITS * DIVERGED_ITS = MFN_DIVERGED_ITS */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(17, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":17 * class MFNConvergedReason(object): * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_ITS = MFN_DIVERGED_ITS * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":18 * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS * DIVERGED_ITS = MFN_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = MFN_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(17, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":19 * CONVERGED_ITS = MFN_CONVERGED_ITS * DIVERGED_ITS = MFN_DIVERGED_ITS * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * CONVERGED_ITERATING = MFN_CONVERGED_ITERATING * ITERATING = MFN_CONVERGED_ITERATING */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(17, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":20 * DIVERGED_ITS = MFN_DIVERGED_ITS * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = MFN_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = MFN_CONVERGED_ITERATING * */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(17, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":21 * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = MFN_CONVERGED_ITERATING * ITERATING = MFN_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(17, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/MFN.pyx":15 * EXPOKIT = S_(MFNEXPOKIT) * * class MFNConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS */ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_MFNConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNConvergedReason, __pyx_t_5) < 0) __PYX_ERR(17, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/MFN.pyx":31 * """ * * Type = MFNType # <<<<<<<<<<<<<< * ConvergedReason = MFNConvergedReason * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MFNType); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(17, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN); /* "SLEPc/MFN.pyx":32 * * Type = MFNType * ConvergedReason = MFNConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MFNConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(17, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN); /* "SLEPc/MFN.pyx":357 * # ----------------------------------------------------------------------------- * * del MFNType # <<<<<<<<<<<<<< * del MFNConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNType) < 0) __PYX_ERR(17, 357, __pyx_L1_error) /* "SLEPc/MFN.pyx":358 * * del MFNType * del MFNConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNConvergedReason) < 0) __PYX_ERR(17, 358, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":224 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_1_initialize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize, __pyx_t_2) < 0) __PYX_ERR(4, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":228 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_3_finalize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_finalize, __pyx_t_2) < 0) __PYX_ERR(4, 228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ if (__Pyx_RegisterCleanup()) __PYX_ERR(19, 1, __pyx_L1_error); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init slepc4py.SLEPc", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init slepc4py.SLEPc"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } static void __Pyx_CleanupGlobals(void) { Py_CLEAR(__pyx_tuple_); Py_CLEAR(__pyx_tuple__3); Py_CLEAR(__pyx_tuple__4); Py_CLEAR(__pyx_tuple__5); Py_CLEAR(__pyx_tuple__6); Py_CLEAR(__pyx_codeobj__7); Py_CLEAR(__pyx_codeobj__8); /* CodeObjectCache.cleanup */ if (__pyx_code_cache.entries) { __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; int i, count = __pyx_code_cache.count; __pyx_code_cache.count = 0; __pyx_code_cache.max_count = 0; __pyx_code_cache.entries = NULL; for (i=0; i= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* decode_c_bytes */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { if (unlikely((start < 0) | (stop < 0))) { if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (stop > length) stop = length; length = stop - start; if (unlikely(length <= 0)) return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* KeywordStringCheck */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* PyErrFetchRestore */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* SaveResetException */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { PyObject *exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; return PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { #endif PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* GetItemInt */ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* PyObjectCallMethod1 */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); bad: Py_XDECREF(method); return result; } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* ArgTypeTest */ static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* GetModuleGlobalName */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } /* CallNextTpDealloc */ static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_dealloc != current_tp_dealloc) type = type->tp_base; while (type && type->tp_dealloc == current_tp_dealloc) type = type->tp_base; if (type) type->tp_dealloc(obj); } /* CallNextTpTraverse */ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; while (type && type->tp_traverse == current_tp_traverse) type = type->tp_base; if (type && type->tp_traverse) return type->tp_traverse(obj, v, a); return 0; } /* CallNextTpClear */ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; while (type && type->tp_clear == current_tp_clear) type = type->tp_base; if (type && type->tp_clear) type->tp_clear(obj); } /* GetVTable */ static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 ptr = PyCapsule_GetPointer(ob, 0); #else ptr = PyCObject_AsVoidPtr(ob); #endif if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* SetVTable */ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* GetNameInClass */ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) result = __Pyx_GetModuleGlobalName(name); return result; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } /* ModuleImport */ #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif /* RegisterModuleCleanup */ #if PY_MAJOR_VERSION < 3 static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { __pyx_module_cleanup(module); Py_INCREF(Py_None); return Py_None; } static int __Pyx_RegisterCleanup(void) { static PyMethodDef cleanup_def = { "__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0}; PyObject *cleanup_func = 0; PyObject *atexit = 0; PyObject *reg = 0; PyObject *args = 0; PyObject *res = 0; int ret = -1; cleanup_func = PyCFunction_New(&cleanup_def, 0); if (!cleanup_func) goto bad; atexit = __Pyx_ImportModule("atexit"); if (!atexit) goto bad; reg = PyObject_GetAttrString(atexit, "_exithandlers"); if (reg && PyList_Check(reg)) { PyObject *a, *kw; a = PyTuple_New(0); kw = PyDict_New(); if (!a || !kw) { Py_XDECREF(a); Py_XDECREF(kw); goto bad; } args = PyTuple_Pack(3, cleanup_func, a, kw); Py_DECREF(a); Py_DECREF(kw); if (!args) goto bad; ret = PyList_Insert(reg, 0, args); } else { if (!reg) PyErr_Clear(); Py_XDECREF(reg); reg = PyObject_GetAttrString(atexit, "register"); if (!reg) goto bad; args = PyTuple_Pack(1, cleanup_func); if (!args) goto bad; res = PyObject_CallObject(reg, args); if (!res) goto bad; ret = 0; } bad: Py_XDECREF(cleanup_func); Py_XDECREF(atexit); Py_XDECREF(reg); Py_XDECREF(args); Py_XDECREF(res); return ret; } #else static int __Pyx_RegisterCleanup(void) { if (0) __Pyx_ImportModule(NULL); return 0; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_STMatMode(STMatMode value) { const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(STMatMode) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(STMatMode) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(STMatMode) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(STMatMode), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogType(BVOrthogType value) { const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(BVOrthogType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(BVOrthogType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(BVOrthogType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogRefineType(BVOrthogRefineType value) { const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(BVOrthogRefineType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(BVOrthogRefineType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(BVOrthogRefineType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogBlockType(BVOrthogBlockType value) { const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(BVOrthogBlockType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(BVOrthogBlockType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(BVOrthogBlockType), little, !is_unsigned); } } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSStateType(DSStateType value) { const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(DSStateType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(DSStateType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(DSStateType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(DSStateType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSMatType(DSMatType value) { const DSMatType neg_one = (DSMatType) -1, const_zero = (DSMatType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(DSMatType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(DSMatType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(DSMatType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(DSMatType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(DSMatType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(DSMatType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FNCombineType(FNCombineType value) { const FNCombineType neg_one = (FNCombineType) -1, const_zero = (FNCombineType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(FNCombineType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(FNCombineType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(FNCombineType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(FNCombineType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(FNCombineType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(FNCombineType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSProblemType(EPSProblemType value) { const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSProblemType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSProblemType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSProblemType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSProblemType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSExtraction(EPSExtraction value) { const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSExtraction) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSExtraction) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSExtraction) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSExtraction), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSBalance(EPSBalance value) { const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSBalance) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSBalance) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSBalance) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSBalance), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSErrorType(EPSErrorType value) { const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSErrorType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSErrorType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSErrorType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSWhich(EPSWhich value) { const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSWhich) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSWhich) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSWhich), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConv(EPSConv value) { const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSConv) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSConv) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSConv) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSConv), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConvergedReason(EPSConvergedReason value) { const EPSConvergedReason neg_one = (EPSConvergedReason) -1, const_zero = (EPSConvergedReason) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSConvergedReason) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSConvergedReason), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSPowerShiftType(EPSPowerShiftType value) { const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSPowerShiftType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSPowerShiftType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSPowerShiftType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSLanczosReorthogType(EPSLanczosReorthogType value) { const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(EPSLanczosReorthogType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(EPSLanczosReorthogType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(EPSLanczosReorthogType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDErrorType(SVDErrorType value) { const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SVDErrorType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDErrorType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(SVDErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SVDErrorType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDWhich(SVDWhich value) { const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SVDWhich) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDWhich) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(SVDWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SVDWhich), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDConvergedReason(SVDConvergedReason value) { const SVDConvergedReason neg_one = (SVDConvergedReason) -1, const_zero = (SVDConvergedReason) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SVDConvergedReason) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDConvergedReason) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(SVDConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(SVDConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SVDConvergedReason), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPProblemType(PEPProblemType value) { const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPProblemType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPProblemType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPProblemType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPProblemType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPWhich(PEPWhich value) { const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPWhich) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPWhich) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPWhich), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPBasis(PEPBasis value) { const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPBasis) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPBasis) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPBasis) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPBasis), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPScale(PEPScale value) { const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPScale) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPScale) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPScale) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPScale), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefine(PEPRefine value) { const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPRefine) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPRefine) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPRefine) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPRefine), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefineScheme(PEPRefineScheme value) { const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPRefineScheme) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPRefineScheme) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPRefineScheme), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPExtract(PEPExtract value) { const PEPExtract neg_one = (PEPExtract) -1, const_zero = (PEPExtract) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPExtract) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPExtract) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPExtract) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPExtract) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPExtract) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPExtract), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPErrorType(PEPErrorType value) { const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPErrorType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPErrorType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPErrorType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConv(PEPConv value) { const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPConv) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPConv) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPConv) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPConv), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConvergedReason(PEPConvergedReason value) { const PEPConvergedReason neg_one = (PEPConvergedReason) -1, const_zero = (PEPConvergedReason) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PEPConvergedReason) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPConvergedReason) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PEPConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PEPConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PEPConvergedReason), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPErrorType(NEPErrorType value) { const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(NEPErrorType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPErrorType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(NEPErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(NEPErrorType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPWhich(NEPWhich value) { const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(NEPWhich) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPWhich) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(NEPWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(NEPWhich), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPConvergedReason(NEPConvergedReason value) { const NEPConvergedReason neg_one = (NEPConvergedReason) -1, const_zero = (NEPConvergedReason) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(NEPConvergedReason) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPConvergedReason) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(NEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(NEPConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(NEPConvergedReason), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefine(NEPRefine value) { const NEPRefine neg_one = (NEPRefine) -1, const_zero = (NEPRefine) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(NEPRefine) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPRefine) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(NEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(NEPRefine) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPRefine) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(NEPRefine), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefineScheme(NEPRefineScheme value) { const NEPRefineScheme neg_one = (NEPRefineScheme) -1, const_zero = (NEPRefineScheme) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(NEPRefineScheme) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPRefineScheme) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(NEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(NEPRefineScheme) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(NEPRefineScheme) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(NEPRefineScheme), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MFNConvergedReason(MFNConvergedReason value) { const MFNConvergedReason neg_one = (MFNConvergedReason) -1, const_zero = (MFNConvergedReason) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(MFNConvergedReason) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MFNConvergedReason) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(MFNConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(MFNConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MFNConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(MFNConvergedReason), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscInt(PetscInt value) { const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PetscInt) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PetscInt) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PetscInt) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PetscInt), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value) { const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PetscBool) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PetscBool) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(PetscBool) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PetscBool), little, !is_unsigned); } } /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); if (!meth) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } if (PyObject_TypeCheck(method, methoddescr_type)) { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else if (PyCFunction_Check(method)) { return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { return PyClassMethod_New(method); } #endif PyErr_SetString(PyExc_TypeError, "Class-level classmethod() can only be called on " "a method_descriptor or instance method."); return NULL; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE PetscInt __Pyx_PyInt_As_PetscInt(PyObject *x) { const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PetscInt) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PetscInt, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PetscInt) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PetscInt) 0; case 1: __PYX_VERIFY_RETURN_INT(PetscInt, digit, digits[0]) case 2: if (8 * sizeof(PetscInt) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) >= 2 * PyLong_SHIFT) { return (PetscInt) (((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])); } } break; case 3: if (8 * sizeof(PetscInt) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) >= 3 * PyLong_SHIFT) { return (PetscInt) (((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])); } } break; case 4: if (8 * sizeof(PetscInt) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) >= 4 * PyLong_SHIFT) { return (PetscInt) (((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PetscInt) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PetscInt) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PetscInt) 0; case -1: __PYX_VERIFY_RETURN_INT(PetscInt, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PetscInt, digit, +digits[0]) case -2: if (8 * sizeof(PetscInt) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) { return (PetscInt) (((PetscInt)-1)*(((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; case 2: if (8 * sizeof(PetscInt) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) { return (PetscInt) ((((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; case -3: if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) { return (PetscInt) (((PetscInt)-1)*(((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; case 3: if (8 * sizeof(PetscInt) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) { return (PetscInt) ((((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; case -4: if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 4 * PyLong_SHIFT) { return (PetscInt) (((PetscInt)-1)*(((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; case 4: if (8 * sizeof(PetscInt) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscInt) - 1 > 4 * PyLong_SHIFT) { return (PetscInt) ((((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]))); } } break; } #endif if (sizeof(PetscInt) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, long, PyLong_AsLong(x)) } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PetscInt val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PetscInt) -1; } } else { PetscInt val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PetscInt) -1; val = __Pyx_PyInt_As_PetscInt(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PetscInt"); return (PetscInt) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PetscInt"); return (PetscInt) -1; } /* CIntFromPy */ static CYTHON_INLINE MatStructure __Pyx_PyInt_As_MatStructure(PyObject *x) { const MatStructure neg_one = (MatStructure) -1, const_zero = (MatStructure) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(MatStructure) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(MatStructure, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (MatStructure) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MatStructure) 0; case 1: __PYX_VERIFY_RETURN_INT(MatStructure, digit, digits[0]) case 2: if (8 * sizeof(MatStructure) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) >= 2 * PyLong_SHIFT) { return (MatStructure) (((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])); } } break; case 3: if (8 * sizeof(MatStructure) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) >= 3 * PyLong_SHIFT) { return (MatStructure) (((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])); } } break; case 4: if (8 * sizeof(MatStructure) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) >= 4 * PyLong_SHIFT) { return (MatStructure) (((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (MatStructure) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(MatStructure) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(MatStructure) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MatStructure) 0; case -1: __PYX_VERIFY_RETURN_INT(MatStructure, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(MatStructure, digit, +digits[0]) case -2: if (8 * sizeof(MatStructure) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) { return (MatStructure) (((MatStructure)-1)*(((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; case 2: if (8 * sizeof(MatStructure) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) { return (MatStructure) ((((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; case -3: if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) { return (MatStructure) (((MatStructure)-1)*(((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; case 3: if (8 * sizeof(MatStructure) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) { return (MatStructure) ((((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; case -4: if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 4 * PyLong_SHIFT) { return (MatStructure) (((MatStructure)-1)*(((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; case 4: if (8 * sizeof(MatStructure) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MatStructure) - 1 > 4 * PyLong_SHIFT) { return (MatStructure) ((((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]))); } } break; } #endif if (sizeof(MatStructure) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, long, PyLong_AsLong(x)) } else if (sizeof(MatStructure) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else MatStructure val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (MatStructure) -1; } } else { MatStructure val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (MatStructure) -1; val = __Pyx_PyInt_As_MatStructure(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to MatStructure"); return (MatStructure) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to MatStructure"); return (MatStructure) -1; } /* CIntFromPy */ static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(PyObject *x) { const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PetscBool) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PetscBool, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PetscBool) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PetscBool) 0; case 1: __PYX_VERIFY_RETURN_INT(PetscBool, digit, digits[0]) case 2: if (8 * sizeof(PetscBool) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) >= 2 * PyLong_SHIFT) { return (PetscBool) (((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])); } } break; case 3: if (8 * sizeof(PetscBool) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) >= 3 * PyLong_SHIFT) { return (PetscBool) (((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])); } } break; case 4: if (8 * sizeof(PetscBool) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) >= 4 * PyLong_SHIFT) { return (PetscBool) (((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PetscBool) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PetscBool) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PetscBool) 0; case -1: __PYX_VERIFY_RETURN_INT(PetscBool, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PetscBool, digit, +digits[0]) case -2: if (8 * sizeof(PetscBool) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) { return (PetscBool) (((PetscBool)-1)*(((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; case 2: if (8 * sizeof(PetscBool) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) { return (PetscBool) ((((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; case -3: if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) { return (PetscBool) (((PetscBool)-1)*(((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; case 3: if (8 * sizeof(PetscBool) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) { return (PetscBool) ((((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; case -4: if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 4 * PyLong_SHIFT) { return (PetscBool) (((PetscBool)-1)*(((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; case 4: if (8 * sizeof(PetscBool) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PetscBool) - 1 > 4 * PyLong_SHIFT) { return (PetscBool) ((((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]))); } } break; } #endif if (sizeof(PetscBool) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, long, PyLong_AsLong(x)) } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PetscBool val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PetscBool) -1; } } else { PetscBool val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PetscBool) -1; val = __Pyx_PyInt_As_PetscBool(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PetscBool"); return (PetscBool) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PetscBool"); return (PetscBool) -1; } /* CIntFromPy */ static CYTHON_INLINE STMatMode __Pyx_PyInt_As_STMatMode(PyObject *x) { const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(STMatMode) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(STMatMode, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (STMatMode) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (STMatMode) 0; case 1: __PYX_VERIFY_RETURN_INT(STMatMode, digit, digits[0]) case 2: if (8 * sizeof(STMatMode) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) >= 2 * PyLong_SHIFT) { return (STMatMode) (((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])); } } break; case 3: if (8 * sizeof(STMatMode) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) >= 3 * PyLong_SHIFT) { return (STMatMode) (((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])); } } break; case 4: if (8 * sizeof(STMatMode) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) >= 4 * PyLong_SHIFT) { return (STMatMode) (((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (STMatMode) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(STMatMode) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (STMatMode) 0; case -1: __PYX_VERIFY_RETURN_INT(STMatMode, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(STMatMode, digit, +digits[0]) case -2: if (8 * sizeof(STMatMode) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) { return (STMatMode) (((STMatMode)-1)*(((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; case 2: if (8 * sizeof(STMatMode) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) { return (STMatMode) ((((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; case -3: if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) { return (STMatMode) (((STMatMode)-1)*(((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; case 3: if (8 * sizeof(STMatMode) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) { return (STMatMode) ((((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; case -4: if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 4 * PyLong_SHIFT) { return (STMatMode) (((STMatMode)-1)*(((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; case 4: if (8 * sizeof(STMatMode) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(STMatMode) - 1 > 4 * PyLong_SHIFT) { return (STMatMode) ((((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]))); } } break; } #endif if (sizeof(STMatMode) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, long, PyLong_AsLong(x)) } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else STMatMode val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (STMatMode) -1; } } else { STMatMode val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (STMatMode) -1; val = __Pyx_PyInt_As_STMatMode(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to STMatMode"); return (STMatMode) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to STMatMode"); return (STMatMode) -1; } /* CIntFromPy */ static CYTHON_INLINE BVOrthogType __Pyx_PyInt_As_BVOrthogType(PyObject *x) { const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(BVOrthogType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(BVOrthogType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (BVOrthogType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogType) 0; case 1: __PYX_VERIFY_RETURN_INT(BVOrthogType, digit, digits[0]) case 2: if (8 * sizeof(BVOrthogType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) >= 2 * PyLong_SHIFT) { return (BVOrthogType) (((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])); } } break; case 3: if (8 * sizeof(BVOrthogType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) >= 3 * PyLong_SHIFT) { return (BVOrthogType) (((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])); } } break; case 4: if (8 * sizeof(BVOrthogType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) >= 4 * PyLong_SHIFT) { return (BVOrthogType) (((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (BVOrthogType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(BVOrthogType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogType) 0; case -1: __PYX_VERIFY_RETURN_INT(BVOrthogType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(BVOrthogType, digit, +digits[0]) case -2: if (8 * sizeof(BVOrthogType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogType) (((BVOrthogType)-1)*(((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; case 2: if (8 * sizeof(BVOrthogType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogType) ((((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; case -3: if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogType) (((BVOrthogType)-1)*(((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; case 3: if (8 * sizeof(BVOrthogType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogType) ((((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; case -4: if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogType) (((BVOrthogType)-1)*(((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; case 4: if (8 * sizeof(BVOrthogType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogType) ((((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]))); } } break; } #endif if (sizeof(BVOrthogType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, long, PyLong_AsLong(x)) } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else BVOrthogType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (BVOrthogType) -1; } } else { BVOrthogType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (BVOrthogType) -1; val = __Pyx_PyInt_As_BVOrthogType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to BVOrthogType"); return (BVOrthogType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to BVOrthogType"); return (BVOrthogType) -1; } /* CIntFromPy */ static CYTHON_INLINE BVOrthogRefineType __Pyx_PyInt_As_BVOrthogRefineType(PyObject *x) { const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(BVOrthogRefineType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (BVOrthogRefineType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogRefineType) 0; case 1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, digit, digits[0]) case 2: if (8 * sizeof(BVOrthogRefineType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) >= 2 * PyLong_SHIFT) { return (BVOrthogRefineType) (((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])); } } break; case 3: if (8 * sizeof(BVOrthogRefineType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) >= 3 * PyLong_SHIFT) { return (BVOrthogRefineType) (((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])); } } break; case 4: if (8 * sizeof(BVOrthogRefineType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) >= 4 * PyLong_SHIFT) { return (BVOrthogRefineType) (((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (BVOrthogRefineType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(BVOrthogRefineType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogRefineType) 0; case -1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, digit, +digits[0]) case -2: if (8 * sizeof(BVOrthogRefineType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; case 2: if (8 * sizeof(BVOrthogRefineType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogRefineType) ((((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; case -3: if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; case 3: if (8 * sizeof(BVOrthogRefineType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogRefineType) ((((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; case -4: if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; case 4: if (8 * sizeof(BVOrthogRefineType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogRefineType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogRefineType) ((((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]))); } } break; } #endif if (sizeof(BVOrthogRefineType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, long, PyLong_AsLong(x)) } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else BVOrthogRefineType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (BVOrthogRefineType) -1; } } else { BVOrthogRefineType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (BVOrthogRefineType) -1; val = __Pyx_PyInt_As_BVOrthogRefineType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to BVOrthogRefineType"); return (BVOrthogRefineType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to BVOrthogRefineType"); return (BVOrthogRefineType) -1; } /* CIntFromPy */ static CYTHON_INLINE BVOrthogBlockType __Pyx_PyInt_As_BVOrthogBlockType(PyObject *x) { const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(BVOrthogBlockType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (BVOrthogBlockType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogBlockType) 0; case 1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, digit, digits[0]) case 2: if (8 * sizeof(BVOrthogBlockType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) >= 2 * PyLong_SHIFT) { return (BVOrthogBlockType) (((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])); } } break; case 3: if (8 * sizeof(BVOrthogBlockType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) >= 3 * PyLong_SHIFT) { return (BVOrthogBlockType) (((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])); } } break; case 4: if (8 * sizeof(BVOrthogBlockType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) >= 4 * PyLong_SHIFT) { return (BVOrthogBlockType) (((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (BVOrthogBlockType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(BVOrthogBlockType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (BVOrthogBlockType) 0; case -1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, digit, +digits[0]) case -2: if (8 * sizeof(BVOrthogBlockType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; case 2: if (8 * sizeof(BVOrthogBlockType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) { return (BVOrthogBlockType) ((((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; case -3: if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; case 3: if (8 * sizeof(BVOrthogBlockType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) { return (BVOrthogBlockType) ((((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; case -4: if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; case 4: if (8 * sizeof(BVOrthogBlockType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(BVOrthogBlockType) - 1 > 4 * PyLong_SHIFT) { return (BVOrthogBlockType) ((((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]))); } } break; } #endif if (sizeof(BVOrthogBlockType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, long, PyLong_AsLong(x)) } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else BVOrthogBlockType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (BVOrthogBlockType) -1; } } else { BVOrthogBlockType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (BVOrthogBlockType) -1; val = __Pyx_PyInt_As_BVOrthogBlockType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to BVOrthogBlockType"); return (BVOrthogBlockType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to BVOrthogBlockType"); return (BVOrthogBlockType) -1; } /* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (size_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) case -2: if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -3: if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -4: if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; } #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } /* CIntFromPy */ static CYTHON_INLINE NormType __Pyx_PyInt_As_NormType(PyObject *x) { const NormType neg_one = (NormType) -1, const_zero = (NormType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(NormType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(NormType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (NormType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NormType) 0; case 1: __PYX_VERIFY_RETURN_INT(NormType, digit, digits[0]) case 2: if (8 * sizeof(NormType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) >= 2 * PyLong_SHIFT) { return (NormType) (((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])); } } break; case 3: if (8 * sizeof(NormType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) >= 3 * PyLong_SHIFT) { return (NormType) (((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])); } } break; case 4: if (8 * sizeof(NormType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) >= 4 * PyLong_SHIFT) { return (NormType) (((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (NormType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(NormType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(NormType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NormType) 0; case -1: __PYX_VERIFY_RETURN_INT(NormType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(NormType, digit, +digits[0]) case -2: if (8 * sizeof(NormType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) { return (NormType) (((NormType)-1)*(((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; case 2: if (8 * sizeof(NormType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) { return (NormType) ((((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; case -3: if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) { return (NormType) (((NormType)-1)*(((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; case 3: if (8 * sizeof(NormType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) { return (NormType) ((((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; case -4: if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 4 * PyLong_SHIFT) { return (NormType) (((NormType)-1)*(((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; case 4: if (8 * sizeof(NormType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NormType) - 1 > 4 * PyLong_SHIFT) { return (NormType) ((((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]))); } } break; } #endif if (sizeof(NormType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, long, PyLong_AsLong(x)) } else if (sizeof(NormType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else NormType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (NormType) -1; } } else { NormType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (NormType) -1; val = __Pyx_PyInt_As_NormType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to NormType"); return (NormType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to NormType"); return (NormType) -1; } /* CIntFromPy */ static CYTHON_INLINE DSStateType __Pyx_PyInt_As_DSStateType(PyObject *x) { const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(DSStateType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(DSStateType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (DSStateType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (DSStateType) 0; case 1: __PYX_VERIFY_RETURN_INT(DSStateType, digit, digits[0]) case 2: if (8 * sizeof(DSStateType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) >= 2 * PyLong_SHIFT) { return (DSStateType) (((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])); } } break; case 3: if (8 * sizeof(DSStateType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) >= 3 * PyLong_SHIFT) { return (DSStateType) (((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])); } } break; case 4: if (8 * sizeof(DSStateType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) >= 4 * PyLong_SHIFT) { return (DSStateType) (((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (DSStateType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(DSStateType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (DSStateType) 0; case -1: __PYX_VERIFY_RETURN_INT(DSStateType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(DSStateType, digit, +digits[0]) case -2: if (8 * sizeof(DSStateType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) { return (DSStateType) (((DSStateType)-1)*(((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; case 2: if (8 * sizeof(DSStateType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) { return (DSStateType) ((((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; case -3: if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) { return (DSStateType) (((DSStateType)-1)*(((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; case 3: if (8 * sizeof(DSStateType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) { return (DSStateType) ((((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; case -4: if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 4 * PyLong_SHIFT) { return (DSStateType) (((DSStateType)-1)*(((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; case 4: if (8 * sizeof(DSStateType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSStateType) - 1 > 4 * PyLong_SHIFT) { return (DSStateType) ((((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]))); } } break; } #endif if (sizeof(DSStateType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, long, PyLong_AsLong(x)) } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else DSStateType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (DSStateType) -1; } } else { DSStateType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (DSStateType) -1; val = __Pyx_PyInt_As_DSStateType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to DSStateType"); return (DSStateType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to DSStateType"); return (DSStateType) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSProblemType __Pyx_PyInt_As_EPSProblemType(PyObject *x) { const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSProblemType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSProblemType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSProblemType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSProblemType) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSProblemType, digit, digits[0]) case 2: if (8 * sizeof(EPSProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) >= 2 * PyLong_SHIFT) { return (EPSProblemType) (((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])); } } break; case 3: if (8 * sizeof(EPSProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) >= 3 * PyLong_SHIFT) { return (EPSProblemType) (((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])); } } break; case 4: if (8 * sizeof(EPSProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) >= 4 * PyLong_SHIFT) { return (EPSProblemType) (((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSProblemType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSProblemType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSProblemType) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSProblemType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSProblemType, digit, +digits[0]) case -2: if (8 * sizeof(EPSProblemType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) { return (EPSProblemType) (((EPSProblemType)-1)*(((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; case 2: if (8 * sizeof(EPSProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) { return (EPSProblemType) ((((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; case -3: if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) { return (EPSProblemType) (((EPSProblemType)-1)*(((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; case 3: if (8 * sizeof(EPSProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) { return (EPSProblemType) ((((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; case -4: if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 4 * PyLong_SHIFT) { return (EPSProblemType) (((EPSProblemType)-1)*(((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; case 4: if (8 * sizeof(EPSProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSProblemType) - 1 > 4 * PyLong_SHIFT) { return (EPSProblemType) ((((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]))); } } break; } #endif if (sizeof(EPSProblemType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, long, PyLong_AsLong(x)) } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSProblemType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSProblemType) -1; } } else { EPSProblemType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSProblemType) -1; val = __Pyx_PyInt_As_EPSProblemType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSProblemType"); return (EPSProblemType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSProblemType"); return (EPSProblemType) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSBalance __Pyx_PyInt_As_EPSBalance(PyObject *x) { const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSBalance) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSBalance, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSBalance) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSBalance) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSBalance, digit, digits[0]) case 2: if (8 * sizeof(EPSBalance) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) >= 2 * PyLong_SHIFT) { return (EPSBalance) (((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])); } } break; case 3: if (8 * sizeof(EPSBalance) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) >= 3 * PyLong_SHIFT) { return (EPSBalance) (((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])); } } break; case 4: if (8 * sizeof(EPSBalance) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) >= 4 * PyLong_SHIFT) { return (EPSBalance) (((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSBalance) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSBalance) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSBalance) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSBalance, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSBalance, digit, +digits[0]) case -2: if (8 * sizeof(EPSBalance) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) { return (EPSBalance) (((EPSBalance)-1)*(((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; case 2: if (8 * sizeof(EPSBalance) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) { return (EPSBalance) ((((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; case -3: if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) { return (EPSBalance) (((EPSBalance)-1)*(((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; case 3: if (8 * sizeof(EPSBalance) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) { return (EPSBalance) ((((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; case -4: if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 4 * PyLong_SHIFT) { return (EPSBalance) (((EPSBalance)-1)*(((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; case 4: if (8 * sizeof(EPSBalance) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSBalance) - 1 > 4 * PyLong_SHIFT) { return (EPSBalance) ((((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]))); } } break; } #endif if (sizeof(EPSBalance) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, long, PyLong_AsLong(x)) } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSBalance val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSBalance) -1; } } else { EPSBalance val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSBalance) -1; val = __Pyx_PyInt_As_EPSBalance(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSBalance"); return (EPSBalance) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSBalance"); return (EPSBalance) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSExtraction __Pyx_PyInt_As_EPSExtraction(PyObject *x) { const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSExtraction) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSExtraction, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSExtraction) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSExtraction) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSExtraction, digit, digits[0]) case 2: if (8 * sizeof(EPSExtraction) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) >= 2 * PyLong_SHIFT) { return (EPSExtraction) (((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])); } } break; case 3: if (8 * sizeof(EPSExtraction) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) >= 3 * PyLong_SHIFT) { return (EPSExtraction) (((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])); } } break; case 4: if (8 * sizeof(EPSExtraction) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) >= 4 * PyLong_SHIFT) { return (EPSExtraction) (((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSExtraction) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSExtraction) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSExtraction) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSExtraction, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSExtraction, digit, +digits[0]) case -2: if (8 * sizeof(EPSExtraction) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) { return (EPSExtraction) (((EPSExtraction)-1)*(((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; case 2: if (8 * sizeof(EPSExtraction) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) { return (EPSExtraction) ((((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; case -3: if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) { return (EPSExtraction) (((EPSExtraction)-1)*(((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; case 3: if (8 * sizeof(EPSExtraction) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) { return (EPSExtraction) ((((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; case -4: if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 4 * PyLong_SHIFT) { return (EPSExtraction) (((EPSExtraction)-1)*(((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; case 4: if (8 * sizeof(EPSExtraction) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSExtraction) - 1 > 4 * PyLong_SHIFT) { return (EPSExtraction) ((((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]))); } } break; } #endif if (sizeof(EPSExtraction) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, long, PyLong_AsLong(x)) } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSExtraction val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSExtraction) -1; } } else { EPSExtraction val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSExtraction) -1; val = __Pyx_PyInt_As_EPSExtraction(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSExtraction"); return (EPSExtraction) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSExtraction"); return (EPSExtraction) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSWhich __Pyx_PyInt_As_EPSWhich(PyObject *x) { const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSWhich) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSWhich, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSWhich) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSWhich) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSWhich, digit, digits[0]) case 2: if (8 * sizeof(EPSWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) >= 2 * PyLong_SHIFT) { return (EPSWhich) (((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])); } } break; case 3: if (8 * sizeof(EPSWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) >= 3 * PyLong_SHIFT) { return (EPSWhich) (((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])); } } break; case 4: if (8 * sizeof(EPSWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) >= 4 * PyLong_SHIFT) { return (EPSWhich) (((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSWhich) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSWhich) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSWhich) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSWhich, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSWhich, digit, +digits[0]) case -2: if (8 * sizeof(EPSWhich) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) { return (EPSWhich) (((EPSWhich)-1)*(((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; case 2: if (8 * sizeof(EPSWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) { return (EPSWhich) ((((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; case -3: if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) { return (EPSWhich) (((EPSWhich)-1)*(((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; case 3: if (8 * sizeof(EPSWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) { return (EPSWhich) ((((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; case -4: if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 4 * PyLong_SHIFT) { return (EPSWhich) (((EPSWhich)-1)*(((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; case 4: if (8 * sizeof(EPSWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSWhich) - 1 > 4 * PyLong_SHIFT) { return (EPSWhich) ((((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]))); } } break; } #endif if (sizeof(EPSWhich) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, long, PyLong_AsLong(x)) } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSWhich val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSWhich) -1; } } else { EPSWhich val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSWhich) -1; val = __Pyx_PyInt_As_EPSWhich(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSWhich"); return (EPSWhich) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSWhich"); return (EPSWhich) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSConv __Pyx_PyInt_As_EPSConv(PyObject *x) { const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSConv) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSConv, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSConv) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSConv) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSConv, digit, digits[0]) case 2: if (8 * sizeof(EPSConv) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) >= 2 * PyLong_SHIFT) { return (EPSConv) (((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])); } } break; case 3: if (8 * sizeof(EPSConv) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) >= 3 * PyLong_SHIFT) { return (EPSConv) (((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])); } } break; case 4: if (8 * sizeof(EPSConv) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) >= 4 * PyLong_SHIFT) { return (EPSConv) (((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSConv) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSConv) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSConv) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSConv, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSConv, digit, +digits[0]) case -2: if (8 * sizeof(EPSConv) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) { return (EPSConv) (((EPSConv)-1)*(((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; case 2: if (8 * sizeof(EPSConv) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) { return (EPSConv) ((((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; case -3: if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) { return (EPSConv) (((EPSConv)-1)*(((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; case 3: if (8 * sizeof(EPSConv) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) { return (EPSConv) ((((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; case -4: if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 4 * PyLong_SHIFT) { return (EPSConv) (((EPSConv)-1)*(((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; case 4: if (8 * sizeof(EPSConv) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConv) - 1 > 4 * PyLong_SHIFT) { return (EPSConv) ((((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]))); } } break; } #endif if (sizeof(EPSConv) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, long, PyLong_AsLong(x)) } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSConv val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSConv) -1; } } else { EPSConv val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSConv) -1; val = __Pyx_PyInt_As_EPSConv(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSConv"); return (EPSConv) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSConv"); return (EPSConv) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSErrorType __Pyx_PyInt_As_EPSErrorType(PyObject *x) { const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSErrorType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSErrorType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSErrorType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSErrorType) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSErrorType, digit, digits[0]) case 2: if (8 * sizeof(EPSErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) >= 2 * PyLong_SHIFT) { return (EPSErrorType) (((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])); } } break; case 3: if (8 * sizeof(EPSErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) >= 3 * PyLong_SHIFT) { return (EPSErrorType) (((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])); } } break; case 4: if (8 * sizeof(EPSErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) >= 4 * PyLong_SHIFT) { return (EPSErrorType) (((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSErrorType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSErrorType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSErrorType) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSErrorType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSErrorType, digit, +digits[0]) case -2: if (8 * sizeof(EPSErrorType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) { return (EPSErrorType) (((EPSErrorType)-1)*(((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; case 2: if (8 * sizeof(EPSErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) { return (EPSErrorType) ((((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; case -3: if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) { return (EPSErrorType) (((EPSErrorType)-1)*(((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; case 3: if (8 * sizeof(EPSErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) { return (EPSErrorType) ((((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; case -4: if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 4 * PyLong_SHIFT) { return (EPSErrorType) (((EPSErrorType)-1)*(((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; case 4: if (8 * sizeof(EPSErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSErrorType) - 1 > 4 * PyLong_SHIFT) { return (EPSErrorType) ((((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]))); } } break; } #endif if (sizeof(EPSErrorType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, long, PyLong_AsLong(x)) } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSErrorType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSErrorType) -1; } } else { EPSErrorType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSErrorType) -1; val = __Pyx_PyInt_As_EPSErrorType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSErrorType"); return (EPSErrorType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSErrorType"); return (EPSErrorType) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSPowerShiftType __Pyx_PyInt_As_EPSPowerShiftType(PyObject *x) { const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSPowerShiftType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSPowerShiftType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSPowerShiftType) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, digit, digits[0]) case 2: if (8 * sizeof(EPSPowerShiftType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) >= 2 * PyLong_SHIFT) { return (EPSPowerShiftType) (((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])); } } break; case 3: if (8 * sizeof(EPSPowerShiftType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) >= 3 * PyLong_SHIFT) { return (EPSPowerShiftType) (((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])); } } break; case 4: if (8 * sizeof(EPSPowerShiftType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) >= 4 * PyLong_SHIFT) { return (EPSPowerShiftType) (((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSPowerShiftType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSPowerShiftType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSPowerShiftType) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, digit, +digits[0]) case -2: if (8 * sizeof(EPSPowerShiftType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) { return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; case 2: if (8 * sizeof(EPSPowerShiftType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) { return (EPSPowerShiftType) ((((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; case -3: if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) { return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; case 3: if (8 * sizeof(EPSPowerShiftType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) { return (EPSPowerShiftType) ((((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; case -4: if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 4 * PyLong_SHIFT) { return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; case 4: if (8 * sizeof(EPSPowerShiftType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSPowerShiftType) - 1 > 4 * PyLong_SHIFT) { return (EPSPowerShiftType) ((((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]))); } } break; } #endif if (sizeof(EPSPowerShiftType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, long, PyLong_AsLong(x)) } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSPowerShiftType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSPowerShiftType) -1; } } else { EPSPowerShiftType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSPowerShiftType) -1; val = __Pyx_PyInt_As_EPSPowerShiftType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSPowerShiftType"); return (EPSPowerShiftType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSPowerShiftType"); return (EPSPowerShiftType) -1; } /* CIntFromPy */ static CYTHON_INLINE EPSLanczosReorthogType __Pyx_PyInt_As_EPSLanczosReorthogType(PyObject *x) { const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSLanczosReorthogType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSLanczosReorthogType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSLanczosReorthogType) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, digit, digits[0]) case 2: if (8 * sizeof(EPSLanczosReorthogType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) >= 2 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])); } } break; case 3: if (8 * sizeof(EPSLanczosReorthogType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) >= 3 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])); } } break; case 4: if (8 * sizeof(EPSLanczosReorthogType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) >= 4 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (EPSLanczosReorthogType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSLanczosReorthogType) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, digit, +digits[0]) case -2: if (8 * sizeof(EPSLanczosReorthogType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; case 2: if (8 * sizeof(EPSLanczosReorthogType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) { return (EPSLanczosReorthogType) ((((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; case -3: if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; case 3: if (8 * sizeof(EPSLanczosReorthogType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) { return (EPSLanczosReorthogType) ((((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; case -4: if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 4 * PyLong_SHIFT) { return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; case 4: if (8 * sizeof(EPSLanczosReorthogType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 4 * PyLong_SHIFT) { return (EPSLanczosReorthogType) ((((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]))); } } break; } #endif if (sizeof(EPSLanczosReorthogType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, long, PyLong_AsLong(x)) } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSLanczosReorthogType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (EPSLanczosReorthogType) -1; } } else { EPSLanczosReorthogType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSLanczosReorthogType) -1; val = __Pyx_PyInt_As_EPSLanczosReorthogType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSLanczosReorthogType"); return (EPSLanczosReorthogType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSLanczosReorthogType"); return (EPSLanczosReorthogType) -1; } /* CIntFromPy */ static CYTHON_INLINE SVDWhich __Pyx_PyInt_As_SVDWhich(PyObject *x) { const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SVDWhich) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SVDWhich, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SVDWhich) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SVDWhich) 0; case 1: __PYX_VERIFY_RETURN_INT(SVDWhich, digit, digits[0]) case 2: if (8 * sizeof(SVDWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) >= 2 * PyLong_SHIFT) { return (SVDWhich) (((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])); } } break; case 3: if (8 * sizeof(SVDWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) >= 3 * PyLong_SHIFT) { return (SVDWhich) (((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])); } } break; case 4: if (8 * sizeof(SVDWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) >= 4 * PyLong_SHIFT) { return (SVDWhich) (((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SVDWhich) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SVDWhich) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SVDWhich) 0; case -1: __PYX_VERIFY_RETURN_INT(SVDWhich, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SVDWhich, digit, +digits[0]) case -2: if (8 * sizeof(SVDWhich) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) { return (SVDWhich) (((SVDWhich)-1)*(((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; case 2: if (8 * sizeof(SVDWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) { return (SVDWhich) ((((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; case -3: if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) { return (SVDWhich) (((SVDWhich)-1)*(((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; case 3: if (8 * sizeof(SVDWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) { return (SVDWhich) ((((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; case -4: if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 4 * PyLong_SHIFT) { return (SVDWhich) (((SVDWhich)-1)*(((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; case 4: if (8 * sizeof(SVDWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDWhich) - 1 > 4 * PyLong_SHIFT) { return (SVDWhich) ((((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]))); } } break; } #endif if (sizeof(SVDWhich) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, long, PyLong_AsLong(x)) } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SVDWhich val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SVDWhich) -1; } } else { SVDWhich val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SVDWhich) -1; val = __Pyx_PyInt_As_SVDWhich(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SVDWhich"); return (SVDWhich) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SVDWhich"); return (SVDWhich) -1; } /* CIntFromPy */ static CYTHON_INLINE SVDErrorType __Pyx_PyInt_As_SVDErrorType(PyObject *x) { const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SVDErrorType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SVDErrorType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SVDErrorType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SVDErrorType) 0; case 1: __PYX_VERIFY_RETURN_INT(SVDErrorType, digit, digits[0]) case 2: if (8 * sizeof(SVDErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) >= 2 * PyLong_SHIFT) { return (SVDErrorType) (((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])); } } break; case 3: if (8 * sizeof(SVDErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) >= 3 * PyLong_SHIFT) { return (SVDErrorType) (((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])); } } break; case 4: if (8 * sizeof(SVDErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) >= 4 * PyLong_SHIFT) { return (SVDErrorType) (((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (SVDErrorType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SVDErrorType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SVDErrorType) 0; case -1: __PYX_VERIFY_RETURN_INT(SVDErrorType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SVDErrorType, digit, +digits[0]) case -2: if (8 * sizeof(SVDErrorType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) { return (SVDErrorType) (((SVDErrorType)-1)*(((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; case 2: if (8 * sizeof(SVDErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) { return (SVDErrorType) ((((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; case -3: if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) { return (SVDErrorType) (((SVDErrorType)-1)*(((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; case 3: if (8 * sizeof(SVDErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) { return (SVDErrorType) ((((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; case -4: if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 4 * PyLong_SHIFT) { return (SVDErrorType) (((SVDErrorType)-1)*(((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; case 4: if (8 * sizeof(SVDErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDErrorType) - 1 > 4 * PyLong_SHIFT) { return (SVDErrorType) ((((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]))); } } break; } #endif if (sizeof(SVDErrorType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, long, PyLong_AsLong(x)) } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SVDErrorType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (SVDErrorType) -1; } } else { SVDErrorType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SVDErrorType) -1; val = __Pyx_PyInt_As_SVDErrorType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SVDErrorType"); return (SVDErrorType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SVDErrorType"); return (SVDErrorType) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPBasis __Pyx_PyInt_As_PEPBasis(PyObject *x) { const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPBasis) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPBasis, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPBasis) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPBasis) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPBasis, digit, digits[0]) case 2: if (8 * sizeof(PEPBasis) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) >= 2 * PyLong_SHIFT) { return (PEPBasis) (((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])); } } break; case 3: if (8 * sizeof(PEPBasis) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) >= 3 * PyLong_SHIFT) { return (PEPBasis) (((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])); } } break; case 4: if (8 * sizeof(PEPBasis) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) >= 4 * PyLong_SHIFT) { return (PEPBasis) (((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPBasis) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPBasis) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPBasis) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPBasis, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPBasis, digit, +digits[0]) case -2: if (8 * sizeof(PEPBasis) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) { return (PEPBasis) (((PEPBasis)-1)*(((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; case 2: if (8 * sizeof(PEPBasis) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) { return (PEPBasis) ((((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; case -3: if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) { return (PEPBasis) (((PEPBasis)-1)*(((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; case 3: if (8 * sizeof(PEPBasis) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) { return (PEPBasis) ((((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; case -4: if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 4 * PyLong_SHIFT) { return (PEPBasis) (((PEPBasis)-1)*(((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; case 4: if (8 * sizeof(PEPBasis) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPBasis) - 1 > 4 * PyLong_SHIFT) { return (PEPBasis) ((((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]))); } } break; } #endif if (sizeof(PEPBasis) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, long, PyLong_AsLong(x)) } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPBasis val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPBasis) -1; } } else { PEPBasis val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPBasis) -1; val = __Pyx_PyInt_As_PEPBasis(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPBasis"); return (PEPBasis) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPBasis"); return (PEPBasis) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPProblemType __Pyx_PyInt_As_PEPProblemType(PyObject *x) { const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPProblemType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPProblemType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPProblemType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPProblemType) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPProblemType, digit, digits[0]) case 2: if (8 * sizeof(PEPProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) >= 2 * PyLong_SHIFT) { return (PEPProblemType) (((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])); } } break; case 3: if (8 * sizeof(PEPProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) >= 3 * PyLong_SHIFT) { return (PEPProblemType) (((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])); } } break; case 4: if (8 * sizeof(PEPProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) >= 4 * PyLong_SHIFT) { return (PEPProblemType) (((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPProblemType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPProblemType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPProblemType) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPProblemType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPProblemType, digit, +digits[0]) case -2: if (8 * sizeof(PEPProblemType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) { return (PEPProblemType) (((PEPProblemType)-1)*(((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; case 2: if (8 * sizeof(PEPProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) { return (PEPProblemType) ((((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; case -3: if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) { return (PEPProblemType) (((PEPProblemType)-1)*(((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; case 3: if (8 * sizeof(PEPProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) { return (PEPProblemType) ((((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; case -4: if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 4 * PyLong_SHIFT) { return (PEPProblemType) (((PEPProblemType)-1)*(((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; case 4: if (8 * sizeof(PEPProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPProblemType) - 1 > 4 * PyLong_SHIFT) { return (PEPProblemType) ((((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]))); } } break; } #endif if (sizeof(PEPProblemType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, long, PyLong_AsLong(x)) } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPProblemType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPProblemType) -1; } } else { PEPProblemType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPProblemType) -1; val = __Pyx_PyInt_As_PEPProblemType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPProblemType"); return (PEPProblemType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPProblemType"); return (PEPProblemType) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPWhich __Pyx_PyInt_As_PEPWhich(PyObject *x) { const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPWhich) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPWhich, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPWhich) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPWhich) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPWhich, digit, digits[0]) case 2: if (8 * sizeof(PEPWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) >= 2 * PyLong_SHIFT) { return (PEPWhich) (((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])); } } break; case 3: if (8 * sizeof(PEPWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) >= 3 * PyLong_SHIFT) { return (PEPWhich) (((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])); } } break; case 4: if (8 * sizeof(PEPWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) >= 4 * PyLong_SHIFT) { return (PEPWhich) (((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPWhich) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPWhich) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPWhich) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPWhich, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPWhich, digit, +digits[0]) case -2: if (8 * sizeof(PEPWhich) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) { return (PEPWhich) (((PEPWhich)-1)*(((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; case 2: if (8 * sizeof(PEPWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) { return (PEPWhich) ((((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; case -3: if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) { return (PEPWhich) (((PEPWhich)-1)*(((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; case 3: if (8 * sizeof(PEPWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) { return (PEPWhich) ((((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; case -4: if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 4 * PyLong_SHIFT) { return (PEPWhich) (((PEPWhich)-1)*(((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; case 4: if (8 * sizeof(PEPWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPWhich) - 1 > 4 * PyLong_SHIFT) { return (PEPWhich) ((((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]))); } } break; } #endif if (sizeof(PEPWhich) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, long, PyLong_AsLong(x)) } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPWhich val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPWhich) -1; } } else { PEPWhich val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPWhich) -1; val = __Pyx_PyInt_As_PEPWhich(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPWhich"); return (PEPWhich) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPWhich"); return (PEPWhich) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPConv __Pyx_PyInt_As_PEPConv(PyObject *x) { const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPConv) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPConv, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPConv) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPConv) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPConv, digit, digits[0]) case 2: if (8 * sizeof(PEPConv) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) >= 2 * PyLong_SHIFT) { return (PEPConv) (((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])); } } break; case 3: if (8 * sizeof(PEPConv) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) >= 3 * PyLong_SHIFT) { return (PEPConv) (((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])); } } break; case 4: if (8 * sizeof(PEPConv) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) >= 4 * PyLong_SHIFT) { return (PEPConv) (((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPConv) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPConv) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPConv) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPConv, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPConv, digit, +digits[0]) case -2: if (8 * sizeof(PEPConv) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) { return (PEPConv) (((PEPConv)-1)*(((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; case 2: if (8 * sizeof(PEPConv) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) { return (PEPConv) ((((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; case -3: if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) { return (PEPConv) (((PEPConv)-1)*(((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; case 3: if (8 * sizeof(PEPConv) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) { return (PEPConv) ((((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; case -4: if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 4 * PyLong_SHIFT) { return (PEPConv) (((PEPConv)-1)*(((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; case 4: if (8 * sizeof(PEPConv) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPConv) - 1 > 4 * PyLong_SHIFT) { return (PEPConv) ((((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]))); } } break; } #endif if (sizeof(PEPConv) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, long, PyLong_AsLong(x)) } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPConv val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPConv) -1; } } else { PEPConv val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPConv) -1; val = __Pyx_PyInt_As_PEPConv(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPConv"); return (PEPConv) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPConv"); return (PEPConv) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPRefine __Pyx_PyInt_As_PEPRefine(PyObject *x) { const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPRefine) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPRefine, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPRefine) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPRefine) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPRefine, digit, digits[0]) case 2: if (8 * sizeof(PEPRefine) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) >= 2 * PyLong_SHIFT) { return (PEPRefine) (((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])); } } break; case 3: if (8 * sizeof(PEPRefine) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) >= 3 * PyLong_SHIFT) { return (PEPRefine) (((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])); } } break; case 4: if (8 * sizeof(PEPRefine) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) >= 4 * PyLong_SHIFT) { return (PEPRefine) (((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPRefine) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPRefine) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPRefine) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPRefine, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPRefine, digit, +digits[0]) case -2: if (8 * sizeof(PEPRefine) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) { return (PEPRefine) (((PEPRefine)-1)*(((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; case 2: if (8 * sizeof(PEPRefine) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) { return (PEPRefine) ((((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; case -3: if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) { return (PEPRefine) (((PEPRefine)-1)*(((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; case 3: if (8 * sizeof(PEPRefine) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) { return (PEPRefine) ((((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; case -4: if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 4 * PyLong_SHIFT) { return (PEPRefine) (((PEPRefine)-1)*(((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; case 4: if (8 * sizeof(PEPRefine) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefine) - 1 > 4 * PyLong_SHIFT) { return (PEPRefine) ((((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]))); } } break; } #endif if (sizeof(PEPRefine) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, long, PyLong_AsLong(x)) } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPRefine val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPRefine) -1; } } else { PEPRefine val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPRefine) -1; val = __Pyx_PyInt_As_PEPRefine(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPRefine"); return (PEPRefine) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPRefine"); return (PEPRefine) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPRefineScheme __Pyx_PyInt_As_PEPRefineScheme(PyObject *x) { const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPRefineScheme) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPRefineScheme) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPRefineScheme) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme, digit, digits[0]) case 2: if (8 * sizeof(PEPRefineScheme) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) >= 2 * PyLong_SHIFT) { return (PEPRefineScheme) (((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])); } } break; case 3: if (8 * sizeof(PEPRefineScheme) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) >= 3 * PyLong_SHIFT) { return (PEPRefineScheme) (((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])); } } break; case 4: if (8 * sizeof(PEPRefineScheme) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) >= 4 * PyLong_SHIFT) { return (PEPRefineScheme) (((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPRefineScheme) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPRefineScheme) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPRefineScheme) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme, digit, +digits[0]) case -2: if (8 * sizeof(PEPRefineScheme) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) { return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; case 2: if (8 * sizeof(PEPRefineScheme) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) { return (PEPRefineScheme) ((((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; case -3: if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) { return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; case 3: if (8 * sizeof(PEPRefineScheme) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) { return (PEPRefineScheme) ((((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; case -4: if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 4 * PyLong_SHIFT) { return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; case 4: if (8 * sizeof(PEPRefineScheme) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPRefineScheme) - 1 > 4 * PyLong_SHIFT) { return (PEPRefineScheme) ((((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]))); } } break; } #endif if (sizeof(PEPRefineScheme) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, long, PyLong_AsLong(x)) } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPRefineScheme val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPRefineScheme) -1; } } else { PEPRefineScheme val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPRefineScheme) -1; val = __Pyx_PyInt_As_PEPRefineScheme(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPRefineScheme"); return (PEPRefineScheme) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPRefineScheme"); return (PEPRefineScheme) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPScale __Pyx_PyInt_As_PEPScale(PyObject *x) { const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPScale) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPScale, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPScale) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPScale) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPScale, digit, digits[0]) case 2: if (8 * sizeof(PEPScale) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) >= 2 * PyLong_SHIFT) { return (PEPScale) (((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])); } } break; case 3: if (8 * sizeof(PEPScale) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) >= 3 * PyLong_SHIFT) { return (PEPScale) (((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])); } } break; case 4: if (8 * sizeof(PEPScale) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) >= 4 * PyLong_SHIFT) { return (PEPScale) (((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPScale) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPScale) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPScale) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPScale, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPScale, digit, +digits[0]) case -2: if (8 * sizeof(PEPScale) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) { return (PEPScale) (((PEPScale)-1)*(((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; case 2: if (8 * sizeof(PEPScale) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) { return (PEPScale) ((((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; case -3: if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) { return (PEPScale) (((PEPScale)-1)*(((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; case 3: if (8 * sizeof(PEPScale) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) { return (PEPScale) ((((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; case -4: if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 4 * PyLong_SHIFT) { return (PEPScale) (((PEPScale)-1)*(((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; case 4: if (8 * sizeof(PEPScale) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPScale) - 1 > 4 * PyLong_SHIFT) { return (PEPScale) ((((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]))); } } break; } #endif if (sizeof(PEPScale) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, long, PyLong_AsLong(x)) } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPScale val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPScale) -1; } } else { PEPScale val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPScale) -1; val = __Pyx_PyInt_As_PEPScale(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPScale"); return (PEPScale) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPScale"); return (PEPScale) -1; } /* CIntFromPy */ static CYTHON_INLINE PEPErrorType __Pyx_PyInt_As_PEPErrorType(PyObject *x) { const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PEPErrorType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PEPErrorType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (PEPErrorType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPErrorType) 0; case 1: __PYX_VERIFY_RETURN_INT(PEPErrorType, digit, digits[0]) case 2: if (8 * sizeof(PEPErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) >= 2 * PyLong_SHIFT) { return (PEPErrorType) (((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])); } } break; case 3: if (8 * sizeof(PEPErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) >= 3 * PyLong_SHIFT) { return (PEPErrorType) (((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])); } } break; case 4: if (8 * sizeof(PEPErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) >= 4 * PyLong_SHIFT) { return (PEPErrorType) (((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (PEPErrorType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(PEPErrorType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (PEPErrorType) 0; case -1: __PYX_VERIFY_RETURN_INT(PEPErrorType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(PEPErrorType, digit, +digits[0]) case -2: if (8 * sizeof(PEPErrorType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) { return (PEPErrorType) (((PEPErrorType)-1)*(((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; case 2: if (8 * sizeof(PEPErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) { return (PEPErrorType) ((((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; case -3: if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) { return (PEPErrorType) (((PEPErrorType)-1)*(((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; case 3: if (8 * sizeof(PEPErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) { return (PEPErrorType) ((((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; case -4: if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 4 * PyLong_SHIFT) { return (PEPErrorType) (((PEPErrorType)-1)*(((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; case 4: if (8 * sizeof(PEPErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(PEPErrorType) - 1 > 4 * PyLong_SHIFT) { return (PEPErrorType) ((((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]))); } } break; } #endif if (sizeof(PEPErrorType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, long, PyLong_AsLong(x)) } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PEPErrorType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (PEPErrorType) -1; } } else { PEPErrorType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (PEPErrorType) -1; val = __Pyx_PyInt_As_PEPErrorType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to PEPErrorType"); return (PEPErrorType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PEPErrorType"); return (PEPErrorType) -1; } /* CIntFromPy */ static CYTHON_INLINE NEPWhich __Pyx_PyInt_As_NEPWhich(PyObject *x) { const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(NEPWhich) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(NEPWhich, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (NEPWhich) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NEPWhich) 0; case 1: __PYX_VERIFY_RETURN_INT(NEPWhich, digit, digits[0]) case 2: if (8 * sizeof(NEPWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) >= 2 * PyLong_SHIFT) { return (NEPWhich) (((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])); } } break; case 3: if (8 * sizeof(NEPWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) >= 3 * PyLong_SHIFT) { return (NEPWhich) (((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])); } } break; case 4: if (8 * sizeof(NEPWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) >= 4 * PyLong_SHIFT) { return (NEPWhich) (((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (NEPWhich) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(NEPWhich) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NEPWhich) 0; case -1: __PYX_VERIFY_RETURN_INT(NEPWhich, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(NEPWhich, digit, +digits[0]) case -2: if (8 * sizeof(NEPWhich) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) { return (NEPWhich) (((NEPWhich)-1)*(((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; case 2: if (8 * sizeof(NEPWhich) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) { return (NEPWhich) ((((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; case -3: if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) { return (NEPWhich) (((NEPWhich)-1)*(((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; case 3: if (8 * sizeof(NEPWhich) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) { return (NEPWhich) ((((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; case -4: if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 4 * PyLong_SHIFT) { return (NEPWhich) (((NEPWhich)-1)*(((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; case 4: if (8 * sizeof(NEPWhich) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPWhich) - 1 > 4 * PyLong_SHIFT) { return (NEPWhich) ((((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]))); } } break; } #endif if (sizeof(NEPWhich) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, long, PyLong_AsLong(x)) } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else NEPWhich val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (NEPWhich) -1; } } else { NEPWhich val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (NEPWhich) -1; val = __Pyx_PyInt_As_NEPWhich(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to NEPWhich"); return (NEPWhich) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to NEPWhich"); return (NEPWhich) -1; } /* CIntFromPy */ static CYTHON_INLINE NEPErrorType __Pyx_PyInt_As_NEPErrorType(PyObject *x) { const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(NEPErrorType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(NEPErrorType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (NEPErrorType) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NEPErrorType) 0; case 1: __PYX_VERIFY_RETURN_INT(NEPErrorType, digit, digits[0]) case 2: if (8 * sizeof(NEPErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) >= 2 * PyLong_SHIFT) { return (NEPErrorType) (((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])); } } break; case 3: if (8 * sizeof(NEPErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) >= 3 * PyLong_SHIFT) { return (NEPErrorType) (((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])); } } break; case 4: if (8 * sizeof(NEPErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) >= 4 * PyLong_SHIFT) { return (NEPErrorType) (((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (NEPErrorType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(NEPErrorType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (NEPErrorType) 0; case -1: __PYX_VERIFY_RETURN_INT(NEPErrorType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(NEPErrorType, digit, +digits[0]) case -2: if (8 * sizeof(NEPErrorType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) { return (NEPErrorType) (((NEPErrorType)-1)*(((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; case 2: if (8 * sizeof(NEPErrorType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) { return (NEPErrorType) ((((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; case -3: if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) { return (NEPErrorType) (((NEPErrorType)-1)*(((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; case 3: if (8 * sizeof(NEPErrorType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) { return (NEPErrorType) ((((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; case -4: if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 4 * PyLong_SHIFT) { return (NEPErrorType) (((NEPErrorType)-1)*(((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; case 4: if (8 * sizeof(NEPErrorType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(NEPErrorType) - 1 > 4 * PyLong_SHIFT) { return (NEPErrorType) ((((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]))); } } break; } #endif if (sizeof(NEPErrorType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, long, PyLong_AsLong(x)) } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else NEPErrorType val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (NEPErrorType) -1; } } else { NEPErrorType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (NEPErrorType) -1; val = __Pyx_PyInt_As_NEPErrorType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to NEPErrorType"); return (NEPErrorType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to NEPErrorType"); return (NEPErrorType) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } /* FunctionExport */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); if (!d) { PyErr_Clear(); d = PyDict_New(); if (!d) goto bad; Py_INCREF(d); if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) goto bad; } tmp.fp = f; #if PY_VERSION_HEX >= 0x02070000 cobj = PyCapsule_New(tmp.p, sig, 0); #else cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); #endif if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", module_name, class_name, basicsize, size); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", module_name, class_name, basicsize, size); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif /* FunctionImport */ #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ slepc4py-3.7.0/src/SLEPc.pxd0000644000175000001440000000013612716565573016304 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com include "include/slepc4py/SLEPc.pxd" slepc4py-3.7.0/src/SLEPc.py0000644000175000001440000000035112705464414016126 0ustar dalcinlusers00000000000000ARCH = None from slepc4py.lib import ImportSLEPc from slepc4py.lib import ImportPETSc SLEPc = ImportSLEPc(ARCH) PETSc = ImportPETSc(ARCH) PETSc._initialize() SLEPc._initialize() del SLEPc, PETSc del ImportSLEPc, ImportPETSc del ARCH slepc4py-3.7.0/src/__main__.py0000644000175000001440000000425712705464414016751 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """ Command line access to the SLEPc Options Database. This module provides command line access to SLEPc Options Database. It outputs a listing of the many SLEPc options indicating option names, default values and descriptions. Usage:: $ python -m slepc4py [eps|svd|pep|nep|mfn|st|bv|rg|fn|ds] [] """ def help(args=None): import sys # program name try: prog = sys.argv[0] except Exception: prog = getattr(sys, 'executable', 'python') # arguments if args is None: args = sys.argv[1:] elif isinstance(args, str): args = args.split() else: args = [str(a) for a in args] # initialization import slepc4py slepc4py.init([prog, '-help'] + args) from slepc4py import SLEPc # and finally ... COMM = SLEPc.COMM_SELF if 'eps' in args: eps = SLEPc.EPS().create(comm=COMM) eps.setFromOptions() eps.destroy() del eps if 'svd' in args: svd = SLEPc.SVD().create(comm=COMM) svd.setFromOptions() svd.destroy() del svd if 'pep' in args: pep = SLEPc.PEP().create(comm=COMM) pep.setFromOptions() pep.destroy() del pep if 'nep' in args: nep = SLEPc.NEP().create(comm=COMM) nep.setFromOptions() nep.destroy() del nep if 'mfn' in args: mfn = SLEPc.MFN().create(comm=COMM) mfn.setFromOptions() mfn.destroy() del mfn if 'st' in args: st = SLEPc.ST().create(comm=COMM) st.setFromOptions() st.destroy() del st if 'bv' in args: bv = SLEPc.BV().create(comm=COMM) bv.setFromOptions() bv.destroy() del bv if 'rg' in args: rg = SLEPc.RG().create(comm=COMM) rg.setFromOptions() rg.destroy() del rg if 'fn' in args: fn = SLEPc.FN().create(comm=COMM) fn.setFromOptions() fn.destroy() del fn if 'ds' in args: ds = SLEPc.DS().create(comm=COMM) ds.setFromOptions() ds.destroy() del ds if __name__ == '__main__': help() slepc4py-3.7.0/src/__init__.py0000644000175000001440000000413112720264057016755 0ustar dalcinlusers00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # ----------------------------------------------------------------------------- """ SLEPc for Python ================ This package is an interface to SLEPc_ libraries. SLEPc_ (the Scalable Library for Eigenvalue Problem Computations) is a software library for the solution of large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc_ and can be used for either standard or generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix. .. _SLEPc: http://slepc.upv.es .. _PETSc: http://www.mcs.anl.gov/petsc """ __author__ = 'Lisandro Dalcin' __version__ = '3.7.0' __credits__ = 'SLEPc Team ' # ----------------------------------------------------------------------------- def init(args=None, arch=None): """ Initialize SLEPc. :Parameters: - `args`: command-line arguments, usually the 'sys.argv' list. - `arch`: specific configuration to use. .. note:: This function should be called only once, typically at the very beginning of the bootstrap script of an application. """ import slepc4py.lib SLEPc = slepc4py.lib.ImportSLEPc(arch) PETSc = slepc4py.lib.ImportPETSc(arch) args = slepc4py.lib.getInitArgs(args) PETSc._initialize(args) SLEPc._initialize(args) # ----------------------------------------------------------------------------- def get_include(): """ Return the directory in the package that contains header files. Extension modules that need to compile against slepc4py should use this function to locate the appropriate include directory. Using Python distutils (or perhaps NumPy distutils):: import petscc4py, slepc4py Extension('extension_name', ... include_dirs=[..., petsc4py.get_include(), slepc4py.get_include(),]) """ from os.path import dirname, join return join(dirname(__file__), 'include') # ----------------------------------------------------------------------------- slepc4py-3.7.0/README.rst0000644000175000001440000000142612705464414015552 0ustar dalcinlusers00000000000000================ SLEPc for Python ================ Overview -------- Welcome to SLEPc for Python. This package provides Python bindings for SLEPc_, the * Scalable Library for Eigenvalue Problem Computations*. Dependencies ------------ * Python_ 2.6, 2.7, 3.2 or above. * A recent NumPy_ release. * A matching version of SLEPc_ built with *shared/dynamic libraries*. * A matching version of PETSc_ built with *shared/dynamic libraries*. * A matching version of petsc4py_. * To work with the in-development version, you need to install Cython_. .. _Python: http://www.python.org .. _NumPy: http://www.numpy.org .. _SLEPc: http://slepc.upv.es .. _PETSc: http://www.mcs.anl.gov/petsc/ .. _petsc4py: http://bitbucket.org/petsc/petsc4py .. _Cython: http://www.cython.org slepc4py-3.7.0/setup.cfg0000644000175000001440000000053112720314530015666 0ustar dalcinlusers00000000000000[config] slepc_dir = $SLEPC_DIR petsc_dir = $PETSC_DIR petsc_arch = $PETSC_ARCH [build] debug = 0 [sdist] force_manifest = 1 [nosetests] where = test [bdist_rpm] packager = Lisandro Dalcin group = Libraries/Python doc_files = README.rst CHANGES.rst LICENSE.rst [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 slepc4py-3.7.0/LICENSE.rst0000644000175000001440000000263112716602441015672 0ustar dalcinlusers00000000000000========================= LICENSE: SLEPc for Python ========================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Copyright (c) 2016, Lisandro Dalcin. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. slepc4py-3.7.0/PKG-INFO0000644000175000001440000000616012720314530015146 0ustar dalcinlusers00000000000000Metadata-Version: 1.1 Name: slepc4py Version: 3.7.0 Summary: SLEPc for Python Home-page: https://bitbucket.org/slepc/slepc4py/ Author: Lisandro Dalcin Author-email: dalcinl@gmail.com License: BSD Download-URL: https://bitbucket.org/slepc/slepc4py/downloads/slepc4py-3.7.0.tar.gz Description: SLEPc for Python ================ Python bindings for SLEPc. Install ------- If you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, it highly recommended to install ``mpi4py`` first:: $ pip install mpi4py Ensure you have NumPy installed:: $ pip install numpy and finally:: $ pip install petsc petsc4py slepc slepc4py You can also install the in-development version of slepc4py with:: $ pip install Cython numpy mpi4py $ pip install --no-deps git+https://bitbucket.org/petsc/petsc $ pip install --no-deps git+https://bitbucket.org/petsc/petsc4py $ pip install --no-deps git+https://bitbucket.org/slepc/slepc $ pip install --no-deps git+https://bitbucket.org/slepc/slepc4py or:: $ pip install Cython numpy mpi4py $ pip install --no-deps https://bitbucket.org/petsc/petsc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/petsc/petsc4py/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc4py/get/master.tar.gz Citations --------- If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman and V. Vidal. *SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 Keywords: scientific computing,parallel computing,SLEPc,PETSc,MPI Platform: POSIX Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: POSIX Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research Classifier: Programming Language :: C Classifier: Programming Language :: C++ Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Scientific/Engineering Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Development Status :: 5 - Production/Stable Requires: petsc4py Provides: slepc4py slepc4py-3.7.0/conf/0000755000175000001440000000000012720314530014773 5ustar dalcinlusers00000000000000slepc4py-3.7.0/conf/metadata.py0000644000175000001440000000160612705464414017142 0ustar dalcinlusers00000000000000classifiers = """ License :: OSI Approved :: BSD License Operating System :: POSIX Intended Audience :: Developers Intended Audience :: Science/Research Programming Language :: C Programming Language :: C++ Programming Language :: Cython Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 3 Topic :: Scientific/Engineering Topic :: Software Development :: Libraries :: Python Modules """ keywords = """ scientific computing parallel computing """ metadata = { 'author' : 'Lisandro Dalcin', 'author_email' : 'dalcinl@gmail.com', 'classifiers' : [c for c in classifiers.split('\n') if c], 'keywords' : [k for k in keywords.split('\n') if k], 'license' : 'BSD', 'platforms' : ['POSIX'], 'maintainer' : 'Lisandro Dalcin', 'maintainer_email' : 'dalcinl@gmail.com', } slepc4py-3.7.0/conf/baseconf.py0000644000175000001440000006621012720263300017130 0ustar dalcinlusers00000000000000# -------------------------------------------------------------------- __all__ = ['PetscConfig', 'setup', 'Extension', 'config', 'build', 'build_src', 'build_ext', 'clean', 'test', 'sdist', 'log', ] # -------------------------------------------------------------------- import sys, os try: import setuptools except ImportError: setuptools = None def import_command(cmd): try: from importlib import import_module except ImportError: import_module = lambda n: __import__(n, fromlist=[None]) try: if not setuptools: raise ImportError mod = import_module('setuptools.command.' + cmd) return getattr(mod, cmd) except ImportError: mod = import_module('distutils.command.' + cmd) return getattr(mod, cmd) if setuptools: from setuptools import setup from setuptools import Extension as _Extension from setuptools import Command else: from distutils.core import setup from distutils.core import Extension as _Extension from distutils.core import Command _config = import_command('config') _build = import_command('build') _build_ext = import_command('build_ext') _install = import_command('install') _clean = import_command('clean') _sdist = import_command('sdist') from distutils import sysconfig from distutils import log from distutils.util import split_quoted, execute from distutils.errors import DistutilsError # -------------------------------------------------------------------- def fix_config_vars(names, values): import os, re values = list(values) if sys.platform == 'darwin': if 'ARCHFLAGS' in os.environ: ARCHFLAGS = os.environ['ARCHFLAGS'] for i, flag in enumerate(list(values)): flag, count = re.subn('-arch\s+\w+', ' ', flag) if count and ARCHFLAGS: flag = flag + ' ' + ARCHFLAGS values[i] = flag if 'SDKROOT' in os.environ: SDKROOT = os.environ['SDKROOT'] for i, flag in enumerate(list(values)): flag, count = re.subn('-isysroot [^ \t]*', ' ', flag) if count and SDKROOT: flag = flag + ' ' + '-isysroot ' + SDKROOT values[i] = flag return values def get_config_vars(*names): # Core Python configuration values = sysconfig.get_config_vars(*names) # Do any distutils flags fixup right now values = fix_config_vars(names, values) return values from distutils.unixccompiler import UnixCCompiler rpath_option_orig = UnixCCompiler.runtime_library_dir_option def rpath_option(compiler, dir): option = rpath_option_orig(compiler, dir) if sys.platform[:5] == 'linux': if option.startswith('-R'): option = option.replace('-R', '-Wl,-rpath,', 1) elif option.startswith('-Wl,-R'): option = option.replace('-Wl,-R', '-Wl,-rpath,', 1) return option UnixCCompiler.runtime_library_dir_option = rpath_option # -------------------------------------------------------------------- class PetscConfig: def __init__(self, petsc_dir, petsc_arch): self.configdict = { } if not petsc_dir: raise DistutilsError("PETSc not found") if not os.path.isdir(petsc_dir): raise DistutilsError("invalid PETSC_DIR: %s" % petsc_dir) self.version = self._get_petsc_version(petsc_dir) self.configdict = self._get_petsc_config(petsc_dir, petsc_arch) self.PETSC_DIR = self['PETSC_DIR'] self.PETSC_ARCH = self['PETSC_ARCH'] language_map = {'CONLY':'c', 'CXXONLY':'c++'} self.language = language_map[self['PETSC_LANGUAGE']] def __getitem__(self, item): return self.configdict[item] def configure(self, extension, compiler=None): self.configure_extension(extension) if compiler is not None: self.configure_compiler(compiler) def _get_petsc_version(self, petsc_dir): import re version_re = { 'major' : re.compile(r"#define\s+PETSC_VERSION_MAJOR\s+(\d+)"), 'minor' : re.compile(r"#define\s+PETSC_VERSION_MINOR\s+(\d+)"), 'micro' : re.compile(r"#define\s+PETSC_VERSION_SUBMINOR\s+(\d+)"), 'patch' : re.compile(r"#define\s+PETSC_VERSION_PATCH\s+(\d+)"), 'release': re.compile(r"#define\s+PETSC_VERSION_RELEASE\s+(-*\d+)"), } petscversion_h = os.path.join(petsc_dir, 'include', 'petscversion.h') with open(petscversion_h, 'rt') as f: data = f.read() major = int(version_re['major'].search(data).groups()[0]) minor = int(version_re['minor'].search(data).groups()[0]) micro = int(version_re['micro'].search(data).groups()[0]) release = int(version_re['release'].search(data).groups()[0]) return (major, minor, micro), (release == 1) def _get_petsc_config(self, petsc_dir, petsc_arch): from os.path import join, isdir, exists PETSC_DIR = petsc_dir PETSC_ARCH = petsc_arch # confdir = join('lib', 'petsc', 'conf') if not (PETSC_ARCH and isdir(join(PETSC_DIR, PETSC_ARCH))): petscvars = join(PETSC_DIR, confdir, 'petscvariables') PETSC_ARCH = makefile(open(petscvars, 'rt')).get('PETSC_ARCH') if not (PETSC_ARCH and isdir(join(PETSC_DIR, PETSC_ARCH))): PETSC_ARCH = '' # variables = join(PETSC_DIR, confdir, 'variables') if not exists(variables): variables = join(PETSC_DIR, PETSC_ARCH, confdir, 'variables') petscvariables = join(PETSC_DIR, PETSC_ARCH, confdir, 'petscvariables') # with open(variables) as f: contents = f.read() with open(petscvariables) as f: contents += f.read() # try: from cStringIO import StringIO except ImportError: from io import StringIO confstr = 'PETSC_DIR = %s\n' % PETSC_DIR confstr += 'PETSC_ARCH = %s\n' % PETSC_ARCH confstr += contents confdict = makefile(StringIO(confstr)) return confdict def _configure_ext(self, ext, dct, preppend=False): extdict = ext.__dict__ for key, values in dct.items(): if key in extdict: for value in values: if value not in extdict[key]: if preppend: extdict[key].insert(0, value) else: extdict[key].append(value) def configure_extension(self, extension): # define macros macros = [('PETSC_DIR', self['PETSC_DIR'])] extension.define_macros.extend(macros) # includes and libraries petsc_inc = flaglist(self['PETSC_CC_INCLUDES']) petsc_lib = flaglist( '-L%s %s' % (self['PETSC_LIB_DIR'], self['PETSC_LIB_BASIC'])) petsc_lib['runtime_library_dirs'].append(self['PETSC_LIB_DIR']) # Link in extra libraries on static builds if self['BUILDSHAREDLIB'] != 'yes': petsc_ext_lib = split_quoted(self['PETSC_EXTERNAL_LIB_BASIC']) petsc_lib['extra_link_args'].extend(petsc_ext_lib) self._configure_ext(extension, petsc_inc, preppend=True) self._configure_ext(extension, petsc_lib) def configure_compiler(self, compiler): if compiler.compiler_type != 'unix': return (cc, cxx, cflags, ccshared, ldflags, ldshared, so_ext) = get_config_vars( 'CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDFLAGS', 'LDSHARED', 'SO') cflags = cflags or '' ldflags = ldflags or '' cflags = cflags.replace('-Wstrict-prototypes', '') ld = cc ldshared = ldshared.replace(ld, '', 1).strip() ldshared = [flg for flg in split_quoted(ldshared) if flg not in split_quoted(ldflags)] ldshared = str.join(' ', ldshared) # getenv = os.environ.get def get_flags(cmd): try: return ' '.join(split_quoted(cmd)[1:]) except: return '' # C compiler PCC = self['PCC'] PCC_FLAGS = get_flags(cc) + ' ' + self['PCC_FLAGS'] PCC_FLAGS = PCC_FLAGS.replace('-fvisibility=hidden', '') if sys.version_info[:2] < (2, 5): PCC_FLAGS = PCC_FLAGS.replace('-Wwrite-strings', '') PCC = getenv('PCC', PCC) + ' ' + getenv('PCCFLAGS', PCC_FLAGS) ccshared = getenv('CCSHARED', ccshared) cflags = getenv('CFLAGS', cflags) PCC_SHARED = str.join(' ', (PCC, ccshared, cflags)) # C++ compiler if self.language == 'c++': PCXX = PCC else: try: PCXX = self['CXX'] except KeyError: PCXX = cxx # linker PLD = self['PCC_LINKER'] PLD_FLAGS = get_flags(ld) + ' ' + self['PCC_LINKER_FLAGS'] PLD_FLAGS = PLD_FLAGS.replace('-fvisibility=hidden', '') PLD = getenv('PLD', PLD) + ' ' + getenv('PLDFLAGS', PLD_FLAGS) ldshared = getenv('LDSHARED', ldshared) ldflags = getenv('LDFLAGS', cflags + ' ' + ldflags) PLD_SHARED = str.join(' ', (PLD, ldshared, ldflags)) # compiler.set_executables( compiler = PCC, compiler_cxx = PCXX, linker_exe = PLD, compiler_so = PCC_SHARED, linker_so = PLD_SHARED, ) compiler.shared_lib_extension = so_ext # if sys.platform == 'darwin': for attr in ('preprocessor', 'compiler', 'compiler_cxx', 'compiler_so', 'linker_so', 'linker_exe'): compiler_cmd = getattr(compiler, attr, []) while '-mno-fused-madd' in compiler_cmd: compiler_cmd.remove('-mno-fused-madd') def log_info(self): PETSC_DIR = self['PETSC_DIR'] PETSC_ARCH = self['PETSC_ARCH'] version = ".".join([str(i) for i in self.version[0]]) release = ("development", "release")[self.version[1]] version_info = version + ' ' + release integer_size = '%s-bit' % self['PETSC_INDEX_SIZE'] scalar_type = self['PETSC_SCALAR'] precision = self['PETSC_PRECISION'] language = self['PETSC_LANGUAGE'] compiler = self['PCC'] linker = self['PCC_LINKER'] log.info('PETSC_DIR: %s' % PETSC_DIR ) log.info('PETSC_ARCH: %s' % PETSC_ARCH ) log.info('version: %s' % version_info) log.info('integer-size: %s' % integer_size) log.info('scalar-type: %s' % scalar_type) log.info('precision: %s' % precision) log.info('language: %s' % language) log.info('compiler: %s' % compiler) log.info('linker: %s' % linker) # -------------------------------------------------------------------- class Extension(_Extension): pass # -------------------------------------------------------------------- cmd_petsc_opts = [ ('petsc-dir=', None, "define PETSC_DIR, overriding environmental variables"), ('petsc-arch=', None, "define PETSC_ARCH, overriding environmental variables"), ] class config(_config): Configure = PetscConfig user_options = _config.user_options + cmd_petsc_opts def initialize_options(self): _config.initialize_options(self) self.petsc_dir = None self.petsc_arch = None def get_config_arch(self, arch): return config.Configure(self.petsc_dir, arch) def run(self): _config.run(self) self.petsc_dir = config.get_petsc_dir(self.petsc_dir) if self.petsc_dir is None: return petsc_arch = config.get_petsc_arch(self.petsc_dir, self.petsc_arch) log.info('-' * 70) log.info('PETSC_DIR: %s' % self.petsc_dir) arch_list = petsc_arch if not arch_list : arch_list = [ None ] for arch in arch_list: conf = self.get_config_arch(arch) archname = conf.PETSC_ARCH or conf['PETSC_ARCH'] scalar_type = conf['PETSC_SCALAR'] precision = conf['PETSC_PRECISION'] language = conf['PETSC_LANGUAGE'] compiler = conf['PCC'] linker = conf['PCC_LINKER'] log.info('-'*70) log.info('PETSC_ARCH: %s' % archname) log.info(' * scalar-type: %s' % scalar_type) log.info(' * precision: %s' % precision) log.info(' * language: %s' % language) log.info(' * compiler: %s' % compiler) log.info(' * linker: %s' % linker) log.info('-' * 70) #@staticmethod def get_petsc_dir(petsc_dir): if not petsc_dir: return None petsc_dir = os.path.expandvars(petsc_dir) if not petsc_dir or '$PETSC_DIR' in petsc_dir: try: import petsc petsc_dir = petsc.get_petsc_dir() except ImportError: log.warn("PETSC_DIR not specified") return None petsc_dir = os.path.expanduser(petsc_dir) petsc_dir = os.path.abspath(petsc_dir) return config.chk_petsc_dir(petsc_dir) get_petsc_dir = staticmethod(get_petsc_dir) #@staticmethod def chk_petsc_dir(petsc_dir): if not os.path.isdir(petsc_dir): log.error('invalid PETSC_DIR: %s (ignored)' % petsc_dir) return None return petsc_dir chk_petsc_dir = staticmethod(chk_petsc_dir) #@staticmethod def get_petsc_arch(petsc_dir, petsc_arch): if not petsc_dir: return None petsc_arch = os.path.expandvars(petsc_arch) if (not petsc_arch or '$PETSC_ARCH' in petsc_arch): petsc_arch = '' petsc_conf = os.path.join(petsc_dir, 'lib', 'petsc', 'conf') if os.path.isdir(petsc_conf): petscvariables = os.path.join(petsc_conf, 'petscvariables') if os.path.exists(petscvariables): conf = makefile(open(petscvariables, 'rt')) petsc_arch = conf.get('PETSC_ARCH', '') petsc_arch = petsc_arch.split(os.pathsep) petsc_arch = unique(petsc_arch) petsc_arch = [arch for arch in petsc_arch if arch] return config.chk_petsc_arch(petsc_dir, petsc_arch) get_petsc_arch = staticmethod(get_petsc_arch) #@staticmethod def chk_petsc_arch(petsc_dir, petsc_arch): valid_archs = [] for arch in petsc_arch: arch_path = os.path.join(petsc_dir, arch) if os.path.isdir(arch_path): valid_archs.append(arch) else: log.warn("invalid PETSC_ARCH: %s (ignored)" % arch) return valid_archs chk_petsc_arch = staticmethod(chk_petsc_arch) class build(_build): user_options = _build.user_options + cmd_petsc_opts def initialize_options(self): _build.initialize_options(self) self.petsc_dir = None self.petsc_arch = None def finalize_options(self): _build.finalize_options(self) self.set_undefined_options('config', ('petsc_dir', 'petsc_dir'), ('petsc_arch', 'petsc_arch')) self.petsc_dir = config.get_petsc_dir(self.petsc_dir) self.petsc_arch = config.get_petsc_arch(self.petsc_dir, self.petsc_arch) sub_commands = \ [('build_src', lambda *args: True)] + \ _build.sub_commands class build_src(Command): description = "build C sources from Cython files" user_options = [ ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] boolean_options = ['force'] def initialize_options(self): self.force = False def finalize_options(self): self.set_undefined_options('build', ('force', 'force'), ) def run(self): pass class build_ext(_build_ext): user_options = _build_ext.user_options + cmd_petsc_opts def initialize_options(self): _build_ext.initialize_options(self) self.petsc_dir = None self.petsc_arch = None self._outputs = [] def finalize_options(self): _build_ext.finalize_options(self) self.set_undefined_options('build', ('petsc_dir', 'petsc_dir'), ('petsc_arch', 'petsc_arch')) if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): py_version = sysconfig.get_python_version() bad_pylib_dir = os.path.join(sys.prefix, "lib", "python" + py_version, "config") try: self.library_dirs.remove(bad_pylib_dir) except ValueError: pass pylib_dir = sysconfig.get_config_var("LIBDIR") if pylib_dir not in self.library_dirs: self.library_dirs.append(pylib_dir) if pylib_dir not in self.rpath: self.rpath.append(pylib_dir) if sys.exec_prefix == '/usr': self.library_dirs.remove(pylib_dir) self.rpath.remove(pylib_dir) def _copy_ext(self, ext): from copy import deepcopy extclass = ext.__class__ fullname = self.get_ext_fullname(ext.name) modpath = str.split(fullname, '.') pkgpath = os.path.join('', *modpath[0:-1]) name = modpath[-1] sources = list(ext.sources) newext = extclass(name, sources) newext.__dict__.update(deepcopy(ext.__dict__)) newext.name = name return pkgpath, newext def _build_ext_arch(self, ext, pkgpath, arch): build_temp = self.build_temp build_lib = self.build_lib try: self.build_temp = os.path.join(build_temp, arch) self.build_lib = os.path.join(build_lib, pkgpath, arch) _build_ext.build_extension(self, ext) finally: self.build_temp = build_temp self.build_lib = build_lib def get_config_arch(self, arch): return config.Configure(self.petsc_dir, arch) def build_extension(self, ext): if not isinstance(ext, Extension): return _build_ext.build_extension(self, ext) petsc_arch = self.petsc_arch if not petsc_arch: petsc_arch = [ None ] for arch in petsc_arch: config = self.get_config_arch(arch) ARCH = arch or config['PETSC_ARCH'] if ARCH not in self.PETSC_ARCH_LIST: self.PETSC_ARCH_LIST.append(ARCH) ext.language = config.language config.log_info() pkgpath, newext = self._copy_ext(ext) config.configure(newext, self.compiler) name = self.distribution.get_name() version = self.distribution.get_version() distdir = "%s-%s/" % (name, version) self._build_ext_arch(newext, pkgpath, ARCH) def build_extensions(self, *args, **kargs): self.PETSC_ARCH_LIST = [] _build_ext.build_extensions(self, *args,**kargs) if not self.PETSC_ARCH_LIST: return self.build_configuration(self.PETSC_ARCH_LIST) def build_configuration(self, arch_list): # template, variables = self.get_config_data(arch_list) config_data = template % variables # build_lib = self.build_lib dist_name = self.distribution.get_name() config_file = os.path.join(build_lib, dist_name, 'lib', dist_name.replace('4py', '') + '.cfg') # def write_file(filename, data): with open(filename, 'w') as fh: fh.write(config_data) execute(write_file, (config_file, config_data), msg='writing %s' % config_file, verbose=self.verbose, dry_run=self.dry_run) def get_config_data(self, arch_list): template = """\ PETSC_DIR = %(PETSC_DIR)s PETSC_ARCH = %(PETSC_ARCH)s """ variables = {'PETSC_DIR' : self.petsc_dir, 'PETSC_ARCH' : os.path.pathsep.join(arch_list)} return template, variables def get_outputs(self): self.check_extensions_list(self.extensions) outputs = [] for ext in self.extensions: fullname = self.get_ext_fullname(ext.name) filename = self.get_ext_filename(fullname) if isinstance(ext, Extension): head, tail = os.path.split(filename) for arch in self.petsc_arch: outfile = os.path.join(self.build_lib, head, arch, tail) outputs.append(outfile) else: outfile = os.path.join(self.build_lib, filename) outputs.append(outfile) outputs = list(set(outputs)) return outputs class install(_install): def run(self): _install.run(self) class clean(_clean): def run(self): _clean.run(self) from distutils.dir_util import remove_tree if self.all: # remove the .egg_info directory try: egg_info = self.get_finalized_command('egg_info').egg_info if os.path.exists(egg_info): remove_tree(egg_info, dry_run=self.dry_run) else: log.debug("'%s' does not exist -- can't clean it", egg_info) except DistutilsError: pass class test(Command): description = "run the test suite" user_options = [('args=', None, "options")] def initialize_options(self): self.args = None def finalize_options(self): if self.args: self.args = split_quoted(self.args) else: self.args = [] def run(self): pass class sdist(_sdist): def run(self): build_src = self.get_finalized_command('build_src') build_src.run() _sdist.run(self) # -------------------------------------------------------------------- def append(seq, item): if item not in seq: seq.append(item) def append_dict(conf, dct): for key, values in dct.items(): if key in conf: for value in values: if value not in conf[key]: conf[key].append(value) def unique(seq): res = [] for item in seq: if item not in res: res.append(item) return res def flaglist(flags): conf = { 'define_macros' : [], 'undef_macros' : [], 'include_dirs' : [], 'libraries' : [], 'library_dirs' : [], 'runtime_library_dirs': [], 'extra_compile_args' : [], 'extra_link_args' : [], } if type(flags) is str: flags = flags.split() switch = '-Wl,' newflags = [] linkopts = [] for f in flags: if f.startswith(switch): if len(f) > 4: append(linkopts, f[4:]) else: append(newflags, f) if linkopts: newflags.append(switch + ','.join(linkopts)) flags = newflags append_next_word = None for word in flags: if append_next_word is not None: append(append_next_word, word) append_next_word = None continue switch, value = word[0:2], word[2:] if switch == "-I": append(conf['include_dirs'], value) elif switch == "-D": try: idx = value.index("=") macro = (value[:idx], value[idx+1:]) except ValueError: macro = (value, None) append(conf['define_macros'], macro) elif switch == "-U": append(conf['undef_macros'], value) elif switch == "-l": append(conf['libraries'], value) elif switch == "-L": append(conf['library_dirs'], value) elif switch == "-R": append(conf['runtime_library_dirs'], value) elif word.startswith("-Wl"): linkopts = word.split(',') append_dict(conf, flaglist(linkopts[1:])) elif word == "-rpath": append_next_word = conf['runtime_library_dirs'] elif word == "-Xlinker": append_next_word = conf['extra_link_args'] else: #log.warn("unrecognized flag '%s'" % word) pass return conf # -------------------------------------------------------------------- from distutils.text_file import TextFile # Regexes needed for parsing Makefile-like syntaxes import re as _re _variable_rx = _re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") _findvar1_rx = _re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)") _findvar2_rx = _re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") def makefile(fileobj, dct=None): """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ fp = TextFile(file=fileobj, strip_comments=1, skip_blanks=1, join_lines=1) if dct is None: dct = {} done = {} notdone = {} while 1: line = fp.readline() if line is None: # eof break m = _variable_rx.match(line) if m: n, v = m.group(1, 2) v = str.strip(v) if "$" in v: notdone[n] = v else: try: v = int(v) except ValueError: pass done[n] = v try: del notdone[n] except KeyError: pass fp.close() # do variable interpolation here while notdone: for name in list(notdone.keys()): value = notdone[name] m = _findvar1_rx.search(value) or _findvar2_rx.search(value) if m: n = m.group(1) found = True if n in done: item = str(done[n]) elif n in notdone: # get it on a subsequent round found = False else: done[n] = item = "" if found: after = value[m.end():] value = value[:m.start()] + item + after if "$" in after: notdone[name] = value else: try: value = int(value) except ValueError: done[name] = str.strip(value) else: done[name] = value del notdone[name] else: # bogus variable reference; # just drop it since we can't deal del notdone[name] # save the results in the global dictionary dct.update(done) return dct # -------------------------------------------------------------------- slepc4py-3.7.0/conf/epydocify.py0000755000175000001440000000550512705464414017362 0ustar dalcinlusers00000000000000#!/usr/bin/env python # -------------------------------------------------------------------- from slepc4py import SLEPc # -------------------------------------------------------------------- try: from docutils.nodes import NodeVisitor NodeVisitor.unknown_visit = lambda self, node: None NodeVisitor.unknown_departure = lambda self, node: None except ImportError: pass try: # epydoc 3.0.1 + docutils 0.6 from docutils.nodes import Text from UserString import UserString if not isinstance(Text, UserString): def Text_get_data(s): try: return s._data except AttributeError: return s.astext() def Text_set_data(s, d): s.astext = lambda: d s._data = d Text.data = property(Text_get_data, Text_set_data) except ImportError: pass # -------------------------------------------------------------------- from epydoc.docwriter import dotgraph import re dotgraph._DOT_VERSION_RE = \ re.compile(r'dot (?:- Graphviz )version ([\d\.]+)') try: dotgraph.DotGraph.DEFAULT_HTML_IMAGE_FORMAT dotgraph.DotGraph.DEFAULT_HTML_IMAGE_FORMAT = 'png' except AttributeError: DotGraph_to_html = dotgraph.DotGraph.to_html DotGraph_run_dot = dotgraph.DotGraph._run_dot def to_html(self, image_file, image_url, center=True): if image_file[-4:] == '.gif': image_file = image_file[:-4] + '.png' if image_url[-4:] == '.gif': image_url = image_url[:-4] + '.png' return DotGraph_to_html(self, image_file, image_url) def _run_dot(self, *options): if '-Tgif' in options: opts = list(options) for i, o in enumerate(opts): if o == '-Tgif': opts[i] = '-Tpng' options = type(options)(opts) return DotGraph_run_dot(self, *options) dotgraph.DotGraph.to_html = to_html dotgraph.DotGraph._run_dot = _run_dot # -------------------------------------------------------------------- import re _SIGNATURE_RE = re.compile( # Class name (for builtin methods) r'^\s*((?P\w+)\.)?' + # The function name r'(?P\w+)' + # The parameters r'\(((?P(?:self|cls|mcs)),?)?(?P.*)\)' + # The return value (optional) r'(\s*(->)\s*(?P\S.*?))?'+ # The end marker r'\s*(\n|\s+(--|<=+>)\s+|$|\.\s+|\.\n)') from epydoc import docstringparser as dsp dsp._SIGNATURE_RE = _SIGNATURE_RE # -------------------------------------------------------------------- import sys, os import epydoc.cli def epydocify(): dirname = os.path.dirname(__file__) config = os.path.join(dirname, 'epydoc.cfg') sys.argv.append('--config=' + config) epydoc.cli.cli() if __name__ == '__main__': epydocify() # -------------------------------------------------------------------- slepc4py-3.7.0/conf/cythonize.py0000755000175000001440000000406512705464414017403 0ustar dalcinlusers00000000000000#!/usr/bin/env python import sys, os def cythonize(source, includes=(), destdir_c=None, destdir_h=None, wdir=None): from Cython.Compiler.Main import \ CompilationOptions, default_options, \ compile, \ PyrexError from Cython.Compiler import Options cwd = os.getcwd() try: name, ext = os.path.splitext(source) outputs_c = [name+'.c'] outputs_h = [name+'.h', name+'_api.h'] # change working directory if wdir: os.chdir(wdir) # run Cython on source options = CompilationOptions(default_options) options.output_file = outputs_c[0] options.include_path = list(includes) Options.generate_cleanup_code = 3 any_failures = 0 try: result = compile(source, options) if result.num_errors > 0: any_failures = 1 except (EnvironmentError, PyrexError): e = sys.exc_info()[1] sys.stderr.write(str(e) + '\n') any_failures = 1 if any_failures: for output in outputs_c + outputs_h: try: os.remove(output) except OSError: pass return 1 # move ouputs for destdir, outputs in ( (destdir_c, outputs_c), (destdir_h, outputs_h)): if destdir is None: continue for output in outputs: dest = os.path.join( destdir, os.path.basename(output)) try: os.remove(dest) except OSError: pass os.rename(output, dest) # return 0 # finally: os.chdir(cwd) if __name__ == "__main__": import petsc4py sys.exit( cythonize('slepc4py.SLEPc.pyx', includes=['include', petsc4py.get_include()], destdir_h=os.path.join('include', 'slepc4py'), wdir='src') ) slepc4py-3.7.0/conf/epydoc.cfg0000644000175000001440000001055712716601734016761 0ustar dalcinlusers00000000000000[epydoc] # Epydoc section marker (required by ConfigParser) # The list of objects to document. Objects can be named using # dotted names, module filenames, or package directory names. # Alases for this option include "objects" and "values". modules: slepc4py # The type of output that should be generated. Should be one # of: html, text, latex, dvi, ps, pdf. #output: html # The path to the output directory. May be relative or absolute. #target: docs/html/ # An integer indicating how verbose epydoc should be. The default # value is 0; negative values will supress warnings and errors; # positive values will give more verbose output. verbosity: 0 # A boolean value indicating that Epydoc should show a tracaback # in case of unexpected error. By default don't show tracebacks #debug: 0 # If True, don't try to use colors or cursor control when doing # textual output. The default False assumes a rich text prompt #simple-term: 0 ### Generation options # The default markup language for docstrings, for modules that do # not define __docformat__. Defaults to epytext. docformat: reStructuredText # Whether or not parsing should be used to examine objects. parse: yes # Whether or not introspection should be used to examine objects. introspect: yes # Don't examine in any way the modules whose dotted name match this # regular expression pattern. exclude: slepc4py.__main__ # Don't perform introspection on the modules whose dotted name match this # regular expression pattern. #exclude-introspect # Don't perform parsing on the modules whose dotted name match this # regular expression pattern. #exclude-parse: # The format for showing inheritance objects. # It should be one of: 'grouped', 'listed', 'included'. inheritance: listed # Whether or not to inclue private variables. (Even if included, # private variables will be hidden by default.) private: yes # Whether or not to list each module's imports. imports: no # Whether or not to include syntax highlighted source code in # the output (HTML only). sourcecode: no # Whether or not to include a a page with Epydoc log, containing # effective option at the time of generation and the reported logs. include-log: no ### Output options # The documented project's name. name: SLEPc for Python # The documented project's URL. url: https://bitbucket.org/slepc/slepc4py # The CSS stylesheet for HTML output. Can be the name of a builtin # stylesheet, or the name of a file. css: white # HTML code for the project link in the navigation bar. If left # unspecified, the project link will be generated based on the # project's name and URL. #link: My Cool Project # The "top" page for the documentation. Can be a URL, the name # of a module or class, or one of the special names "trees.html", # "indices.html", or "help.html" #top: os.path # An alternative help file. The named file should contain the # body of an HTML file; navigation bars will be added to it. #help: my_helpfile.html # Whether or not to include a frames-based table of contents. frames: yes # Whether each class should be listed in its own section when # generating LaTeX or PDF output. separate-classes: no ### API linking options # Define a new API document. A new interpreted text role # will be created #external-api: epydoc # Use the records in this file to resolve objects in the API named NAME. #external-api-file: epydoc:api-objects.txt # Use this URL prefix to configure the string returned for external API. #external-api-root: epydoc:http://epydoc.sourceforge.net/api ### Graph options # The list of graph types that should be automatically included # in the output. Graphs are generated using the Graphviz "dot" # executable. Graph types include: "classtree", "callgraph", # "umlclasstree". Use "all" to include all graph types graph: classtree # The path to the Graphviz "dot" executable, used to generate # graphs. #dotpath: /usr/local/bin/dot # The name of one or more pstat files (generated by the profile # or hotshot module). These are used to generate call graphs. #pstat: profile.out # Specify the font used to generate Graphviz graphs. # (e.g., helvetica or times). graph-font: Helvetica # Specify the font size used to generate Graphviz graphs. graph-font-size: 10 ### Return value options # The condition upon which Epydoc should exit with a non-zero # exit status. Possible values are error, warning, docstring_warning #fail-on: error slepc4py-3.7.0/conf/slepcconf.py0000644000175000001440000001323612705464414017340 0ustar dalcinlusers00000000000000# -------------------------------------------------------------------- __all__ = ['setup', 'Extension', 'config', 'build', 'build_src', 'build_ext', 'install', 'clean', 'test', 'sdist', ] # -------------------------------------------------------------------- import sys, os from conf.baseconf import PetscConfig from conf.baseconf import setup, Extension, log from conf.baseconf import config as _config from conf.baseconf import build as _build from conf.baseconf import build_src as _build_src from conf.baseconf import build_ext as _build_ext from conf.baseconf import install as _install from conf.baseconf import clean as _clean from conf.baseconf import test as _test from conf.baseconf import sdist as _sdist from distutils.errors import DistutilsError # -------------------------------------------------------------------- class SlepcConfig(PetscConfig): def __init__(self, slepc_dir, petsc_dir, petsc_arch): PetscConfig.__init__(self, petsc_dir, petsc_arch) if not slepc_dir: raise DistutilsError("SLEPc not found") if not os.path.isdir(slepc_dir): raise DistutilsError("invalid SLEPC_DIR") self.configdict['SLEPC_DIR'] = slepc_dir self.SLEPC_DIR = self['SLEPC_DIR'] def configure_extension(self, extension): PetscConfig.configure_extension(self, extension) SLEPC_DIR = self.SLEPC_DIR PETSC_ARCH = self.PETSC_ARCH # define macros macros = [('SLEPC_DIR', SLEPC_DIR)] extension.define_macros.extend(macros) # includes and libraries SLEPC_INCLUDE = [ os.path.join(SLEPC_DIR, PETSC_ARCH, 'include'), os.path.join(SLEPC_DIR, 'include'), ] SLEPC_LIB_DIR = [ os.path.join(SLEPC_DIR, PETSC_ARCH, 'lib'), os.path.join(SLEPC_DIR, 'lib'), ] slepc_cfg = { } slepc_cfg['include_dirs'] = SLEPC_INCLUDE slepc_cfg['library_dirs'] = SLEPC_LIB_DIR slepc_cfg['libraries'] = ['slepc'] slepc_cfg['runtime_library_dirs'] = slepc_cfg['library_dirs'] self._configure_ext(extension, slepc_cfg, preppend=True) if self['BUILDSHAREDLIB'] == 'no': from petsc4py.lib import ImportPETSc PETSc = ImportPETSc(PETSC_ARCH) extension.extra_objects.append(PETSc.__file__) # extra configuration cflags = [] extension.extra_compile_args.extend(cflags) lflags = [] extension.extra_link_args.extend(lflags) def log_info(self): if not self.SLEPC_DIR: return log.info('SLEPC_DIR: %s' % self.SLEPC_DIR) PetscConfig.log_info(self) # -------------------------------------------------------------------- cmd_slepc_opts = [ ('slepc-dir=', None, "define SLEPC_DIR, overriding environmental variable.") ] class config(_config): Configure = SlepcConfig user_options = _config.user_options + cmd_slepc_opts def initialize_options(self): _config.initialize_options(self) self.slepc_dir = None def get_config_arch(self, arch): return config.Configure(self.slepc_dir, self.petsc_dir, arch) def run(self): self.slepc_dir = config.get_slepc_dir(self.slepc_dir) if self.slepc_dir is None: return log.info('-' * 70) log.info('SLEPC_DIR: %s' % self.slepc_dir) _config.run(self) #@staticmethod def get_slepc_dir(slepc_dir): if not slepc_dir: return None slepc_dir = os.path.expandvars(slepc_dir) if not slepc_dir or '$SLEPC_DIR' in slepc_dir: try: import slepc slepc_dir = slepc.get_slepc_dir() except ImportError: log.warn("SLEPC_DIR not specified") return None slepc_dir = os.path.expanduser(slepc_dir) slepc_dir = os.path.abspath(slepc_dir) if not os.path.isdir(slepc_dir): log.warn('invalid SLEPC_DIR: %s' % slepc_dir) return None return slepc_dir get_slepc_dir = staticmethod(get_slepc_dir) class build(_build): user_options = _build.user_options + cmd_slepc_opts def initialize_options(self): _build.initialize_options(self) self.slepc_dir = None def finalize_options(self): _build.finalize_options(self) self.set_undefined_options('config', ('slepc_dir', 'slepc_dir'),) self.slepc_dir = config.get_slepc_dir(self.slepc_dir) class build_src(_build_src): pass class build_ext(_build_ext): user_options = _build_ext.user_options + cmd_slepc_opts def initialize_options(self): _build_ext.initialize_options(self) self.slepc_dir = None def finalize_options(self): _build_ext.finalize_options(self) self.set_undefined_options('build', ('slepc_dir', 'slepc_dir')) def get_config_arch(self, arch): return config.Configure(self.slepc_dir, self.petsc_dir, arch) def get_config_data(self, arch_list): template = """\ SLEPC_DIR = %(SLEPC_DIR)s PETSC_DIR = %(PETSC_DIR)s PETSC_ARCH = %(PETSC_ARCH)s """ variables = {'SLEPC_DIR' : self.slepc_dir, 'PETSC_DIR' : self.petsc_dir, 'PETSC_ARCH' : os.path.pathsep.join(arch_list)} return template, variables class install(_install): pass class clean(_clean): pass class test(_test): pass class sdist(_sdist): pass # -------------------------------------------------------------------- slepc4py-3.7.0/conf/__init__.py0000644000175000001440000000000012705464414017104 0ustar dalcinlusers00000000000000slepc4py-3.7.0/DESCRIPTION.rst0000644000175000001440000000325312705464414016400 0ustar dalcinlusers00000000000000SLEPc for Python ================ Python bindings for SLEPc. Install ------- If you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, it highly recommended to install ``mpi4py`` first:: $ pip install mpi4py Ensure you have NumPy installed:: $ pip install numpy and finally:: $ pip install petsc petsc4py slepc slepc4py You can also install the in-development version of slepc4py with:: $ pip install Cython numpy mpi4py $ pip install --no-deps git+https://bitbucket.org/petsc/petsc $ pip install --no-deps git+https://bitbucket.org/petsc/petsc4py $ pip install --no-deps git+https://bitbucket.org/slepc/slepc $ pip install --no-deps git+https://bitbucket.org/slepc/slepc4py or:: $ pip install Cython numpy mpi4py $ pip install --no-deps https://bitbucket.org/petsc/petsc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/petsc/petsc4py/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc/get/master.tar.gz $ pip install --no-deps https://bitbucket.org/slepc/slepc4py/get/master.tar.gz Citations --------- If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * V. Hernandez, J.E. Roman and V. Vidal. *SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems*, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. http://dx.doi.org/10.1145/1089014.1089019 slepc4py-3.7.0/demo/0000755000175000001440000000000012720314530014772 5ustar dalcinlusers00000000000000slepc4py-3.7.0/demo/ex6.py0000644000175000001440000000425412705464414016065 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc Print = PETSc.Sys.Print def build_matrix(m): """ Markov model of a random walk on a triangular grid """ N = m*(m+1)/2 Print("Markov y=exp(t*A)*e_1, N=%d (m=%d)"% (N, m)) A = PETSc.Mat().create() A.setSizes([N, N]) A.setFromOptions( ) A.setUp() Istart, Iend = A.getOwnershipRange() ix = 0 cst = 0.5/(m-1) for i in range(1,m+1): jmax = m-i+1 for j in range(1,jmax+1): ix = ix + 1 if ix-1Iend: continue # compute only owned rows if j!=jmax: pd = cst*(i+j-1) # north if i==1: A[ix-1,ix] = 2*pd else: A[ix-1,ix] = pd # east if j==1: A[ix-1,ix+jmax-1] = 2*pd else: A[ix-1,ix+jmax-1] = pd # south pu = 0.5 - cst*(i+j-3) if j>1: A[ix-1,ix-2] = pu # west if i>1: A[ix-1,ix-jmax-2] = pu A.assemble() return A def solve_exp(t, A, b, x): # Setup the solver M = SLEPc.MFN().create() M.setOperator(A) f = M.getFN() f.setType(SLEPc.FN.Type.EXP) f.setScale(t) M.setTolerances(1e-7) M.setFromOptions() # Solve the problem M.solve(b,x) its = M.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = M.getType() Print("Solution method: %s" % sol_type) ncv = M.getDimensions() Print("") Print("Subspace dimension: %i" % ncv) tol, maxit = M.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) Print("Computed vector at time t=%.4g has norm %g" % (t.real, x.norm())) Print("") if __name__ == '__main__': opts = PETSc.Options() m = opts.getInt('m', 15) A = build_matrix(m) # transition probability matrix x, b = A.getVecs() x.set(0) b.set(0) b[0] = 1 b.assemble() t = 2 solve_exp(t, A, b, x) # compute x=exp(t*A)*b A = None b = x = None slepc4py-3.7.0/demo/ex2.py0000644000175000001440000000477512705464414016071 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc Print = PETSc.Sys.Print def construct_operator(m, n): """ Standard symmetric eigenproblem corresponding to the Laplacian operator in 2 dimensions. """ # Create matrix for 2D Laplacian operator A = PETSc.Mat().create() A.setSizes([m*n, m*n]) A.setFromOptions( ) A.setUp() # Fill matrix hx = 1.0/(m-1) # x grid spacing hy = 1.0/(n-1) # y grid spacing diagv = 2.0*hy/hx + 2.0*hx/hy offdx = -1.0*hy/hx offdy = -1.0*hx/hy Istart, Iend = A.getOwnershipRange() for I in xrange(Istart, Iend) : A[I,I] = diagv i = I//n # map row number to j = I - i*n # grid coordinates if i> 0 : J = I-n; A[I,J] = offdx if i< m-1: J = I+n; A[I,J] = offdx if j> 0 : J = I-1; A[I,J] = offdy if j< n-1: J = I+1; A[I,J] = offdy A.assemble() return A def solve_eigensystem(A, problem_type=SLEPc.EPS.ProblemType.HEP): # Create the results vectors xr, tmp = A.getVecs() xi, tmp = A.getVecs() # Setup the eigensolver E = SLEPc.EPS().create() E.setOperators(A,None) E.setDimensions(3,PETSc.DECIDE) E.setProblemType( problem_type ) E.setFromOptions() # Solve the eigensystem E.solve() Print("") its = E.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = E.getType() Print("Solution method: %s" % sol_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %i" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) nconv = E.getConverged() Print("Number of converged eigenpairs: %d" % nconv) if nconv > 0: Print("") Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, xr, xi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print("") def main(): opts = PETSc.Options() N = opts.getInt('N', 32) m = opts.getInt('m', N) n = opts.getInt('n', m) Print("Symmetric Eigenproblem (sparse matrix), " "N=%d (%dx%d grid)" % (m*n, m, n)) A = construct_operator(m,n) solve_eigensystem(A) if __name__ == '__main__': main() slepc4py-3.7.0/demo/ex8.py0000644000175000001440000000603712716553521016070 0ustar dalcinlusers00000000000000# ------------------------------------------------------------------------ # Solve parabolic partial differential equation with time delay tau # # u_t = u_xx + a*u(t) + b*u(t-tau) # u(0,t) = u(pi,t) = 0 # # with a = 20 and b(x) = -4.1+x*(1-exp(x-pi)). # # Discretization leads to a DDE of dimension n # # -u' = A*u(t) + B*u(t-tau) # # which results in the nonlinear eigenproblem # # (-lambda*I + A + exp(-tau*lambda)*B)*u = 0 # ------------------------------------------------------------------------ import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc from numpy import exp from math import pi Print = PETSc.Sys.Print opts = PETSc.Options() n = opts.getInt('n', 128) tau = opts.getReal('tau', 0.001) a = 20 h = pi/(n+1) # Setup the solver nep = SLEPc.NEP().create() # Create problem matrices # Identity matrix Id = PETSc.Mat().create() Id.setSizes([n, n]) Id.setFromOptions() Id.setUp() Id.assemble() Id.shift(1.0) Id.setOption(PETSc.Mat.Option.HERMITIAN, True) # A = 1/h^2*tridiag(1,-2,1) + a*I A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() vd = -2.0/(h*h)+a vo = 1.0/(h*h) if rstart == 0: A[0, :2] = [vd, vo] rstart += 1 if rend == n: A[n-1, -2:] = [vo, vd] rend -= 1 for i in range(rstart, rend): A[i, i-1:i+2] = [vo, vd, vo] A.assemble() # B = diag(b(xi)) B = PETSc.Mat().create() B.setSizes([n, n]) B.setFromOptions() B.setUp() rstart, rend = B.getOwnershipRange() for i in range(rstart, rend): xi = (i+1)*h B[i, i] = -4.1+xi*(1.0-exp(xi-pi)); B.assemble() B.setOption(PETSc.Mat.Option.HERMITIAN, True) # Functions: f1=-lambda, f2=1.0, f3=exp(-tau*lambda) f1 = SLEPc.FN().create() f1.setType(SLEPc.FN.Type.RATIONAL) f1.setRationalNumerator([-1, 0]) f2 = SLEPc.FN().create() f2.setType(SLEPc.FN.Type.RATIONAL) f2.setRationalNumerator([1]) f3 = SLEPc.FN().create() f3.setType(SLEPc.FN.Type.EXP) f3.setScale(-tau) # Set the split operator. Note that A is passed first so that # SUBSET_NONZERO_PATTERN can be used nep.setSplitOperator([A, Id, B], [f2, f1, f3], PETSc.Mat.Structure.SUBSET) # Customize options nep.setTolerances(tol=1e-9) nep.setDimensions(1) nep.setFromOptions() # Solve the problem nep.solve() its = nep.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = nep.getType() Print("Solution method: %s" % sol_type) nev, ncv, mpd = nep.getDimensions() Print("") Print("Subspace dimension: %i" % ncv) tol, maxit = nep.getTolerances() Print("Stopping condition: tol=%.4g" % tol) Print("") nconv = nep.getConverged() Print( "Number of converged eigenpairs %d" % nconv ) if nconv > 0: x, z = Id.getVecs() x.set(1.0) Print() Print(" k ||T(k)x||") Print("----------------- ------------------") for i in range(nconv): k = nep.getEigenpair(i, x) res = nep.computeError(i) if k.imag != 0.0: Print( " %9f%+9f j %12g" % (k.real, k.imag, res) ) else: Print( " %12f %12g" % (k.real, res) ) Print() slepc4py-3.7.0/demo/ex7.py0000644000175000001440000001032112716614325016056 0ustar dalcinlusers00000000000000# ------------------------------------------------------------------------ # Solve 1-D PDE # -u'' = lambda*u # on [0,1] subject to # u(0)=0, u'(1)=u(1)*lambda*kappa/(kappa-lambda) # ------------------------------------------------------------------------ import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc from numpy import sqrt, sin Print = PETSc.Sys.Print class MyPDE(object): def __init__(self, kappa, h): self.kappa = kappa self.h = h def formFunction(self, nep, mu, F, B): n, m = F.getSize() Istart, Iend = F.getOwnershipRange() i1 = Istart if Istart==0: i1 = i1 + 1 i2 = Iend if Iend==n: i2 = i2 - 1 h = self.h c = self.kappa/(mu-self.kappa) d = n # Interior grid points for i in range(i1,i2): val = -d-mu*h/6.0 F[i,i-1] = val F[i,i] = 2.0*(d-mu*h/3.0) F[i,i+1] = val # Boundary points if Istart==0: F[0,0] = 2.0*(d-mu*h/3.0) F[0,1] = -d-mu*h/6.0 if Iend==n: F[n-1,n-2] = -d-mu*h/6.0 F[n-1,n-1] = d-mu*h/3.0+mu*c F.assemble() if B != F: B.assemble() return PETSc.Mat.Structure.SAME_NONZERO_PATTERN def formJacobian(self, nep, mu, F): n, m = J.getSize() Istart, Iend = J.getOwnershipRange() i1 = Istart if Istart==0: i1 = i1 + 1 i2 = Iend if Iend==n: i2 = i2 - 1 h = self.h c = self.kappa/(mu-self.kappa) # Interior grid points for i in range(i1,i2): J[i,i-1] = -h/6.0 J[i,i] = -2.0*h/3.0 J[i,i+1] = -h/6.0 # Boundary points if Istart==0: J[0,0] = -2.0*h/3.0 J[0,1] = -h/6.0 if Iend==n: J[n-1,n-2] = -h/6.0 J[n-1,n-1] = -h/3.0-c*c J.assemble() return PETSc.Mat.Structure.SAME_NONZERO_PATTERN def checkSolution(self, mu, y): nu = sqrt(mu) u = y.duplicate() n = u.getSize() Istart, Iend = J.getOwnershipRange() h = self.h for i in range(Istart,Iend): x = (i+1)*h u[i] = sin(nu*x); u.assemble() u.normalize() u.axpy(-1.0,y) return u.norm() def FixSign(x): # Force the eigenfunction to be real and positive, since # some eigensolvers may return the eigenvector multiplied # by a complex number of modulus one. comm = x.getComm() rank = comm.getRank() n = 1 if rank == 0 else 0 aux = PETSc.Vec().createMPI((n, PETSc.DECIDE), comm=comm) if rank == 0: aux[0] = x[0] aux.assemble() x0 = aux.sum() sign = x0/abs(x0) x.scale(sign) opts = PETSc.Options() n = opts.getInt('n', 128) kappa = opts.getReal('kappa', 1.0) pde = MyPDE(kappa, 1.0/n) # Setup the solver nep = SLEPc.NEP().create() F = PETSc.Mat().create() F.setSizes([n, n]) F.setType('aij') F.setPreallocationNNZ(3) F.setUp() nep.setFunction(pde.formFunction, F) J = PETSc.Mat().create() J.setSizes([n, n]) J.setType('aij') J.setPreallocationNNZ(3) J.setUp() nep.setJacobian(pde.formJacobian, J) nep.setTolerances(tol=1e-9) nep.setDimensions(1) nep.setFromOptions() # Solve the problem x, z = F.getVecs() x.set(1.0) nep.setInitialSpace(x) nep.solve() its = nep.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = nep.getType() Print("Solution method: %s" % sol_type) nev, ncv, mpd = nep.getDimensions() Print("") Print("Subspace dimension: %i" % ncv) tol, maxit = nep.getTolerances() Print("Stopping condition: tol=%.4g" % tol) Print("") nconv = nep.getConverged() Print( "Number of converged eigenpairs %d" % nconv ) if nconv > 0: Print() Print(" k ||T(k)x|| error ") Print("----------------- ------------------ ------------------") for i in range(nconv): k = nep.getEigenpair(i, x) FixSign(x) res = nep.computeError(i) error = pde.checkSolution(k.real, x) if k.imag != 0.0: Print( " %9f%+9f j %12g %12g" % (k.real, k.imag, res, error) ) else: Print( " %12f %12g %12g" % (k.real, res, error) ) Print() slepc4py-3.7.0/demo/makefile0000644000175000001440000000145112720263215016476 0ustar dalcinlusers00000000000000PYTHON=python .PHONY:test test: run .PHONY:run run: run_ex1 run_ex2 run_ex3 run_ex4 run_ex5 run_ex6 run_ex7 run_ex8 run_ex9 run_ex10 run_ex11 .PHONY:run_ex1 run_ex1: ${PYTHON} ex1.py ${SLEPC_OPTIONS} .PHONY:run_ex2 run_ex2: ${PYTHON} ex2.py ${SLEPC_OPTIONS} .PHONY:run_ex3 run_ex3: ${PYTHON} ex3.py ${SLEPC_OPTIONS} .PHONY:run_ex4 run_ex4: ${PYTHON} ex4.py ${SLEPC_OPTIONS} .PHONY:run_ex5 run_ex5: ${PYTHON} ex5.py ${SLEPC_OPTIONS} .PHONY:run_ex6 run_ex6: ${PYTHON} ex6.py ${SLEPC_OPTIONS} .PHONY:run_ex7 run_ex7: ${PYTHON} ex7.py ${SLEPC_OPTIONS} .PHONY:run_ex8 run_ex8: ${PYTHON} ex8.py ${SLEPC_OPTIONS} .PHONY:run_ex9 run_ex9: ${PYTHON} ex9.py ${SLEPC_OPTIONS} .PHONY:run_ex10 run_ex10: ${PYTHON} ex10.py ${SLEPC_OPTIONS} .PHONY:run_ex11 run_ex11: ${PYTHON} ex11.py ${SLEPC_OPTIONS} slepc4py-3.7.0/demo/ex4.py0000644000175000001440000000273312705464414016063 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc opts = PETSc.Options() n = opts.getInt('n', 30) mu = opts.getScalar('mu', 1e-6) PETSc.Sys.Print( "Lauchli singular value decomposition, (%d x %d) mu=%g\n" % (n+1,n,mu) ) A = PETSc.Mat(); A.create() A.setSizes([n+1, n]) A.setFromOptions( ) A.setUp() rstart, rend = A.getOwnershipRange() for i in xrange(rstart, rend): if i==0: for j in range(n): A[0,j] = 1.0 else: A[i,i-1] = mu A.assemble() S = SLEPc.SVD(); S.create() S.setOperator(A) S.setType(S.Type.TRLANCZOS) S.setFromOptions() S.solve() Print = PETSc.Sys.Print Print( "******************************" ) Print( "*** SLEPc Solution Results ***" ) Print( "******************************\n" ) svd_type = S.getType() Print( "Solution method: %s" % svd_type ) its = S.getIterationNumber() Print( "Number of iterations of the method: %d" % its ) nsv, ncv, mpd = S.getDimensions() Print( "Number of requested singular values: %d" % nsv ) tol, maxit = S.getTolerances() Print( "Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit) ) nconv = S.getConverged() Print( "Number of converged approximate singular triplets %d" % nconv ) if nconv > 0: v, u = A.getVecs() Print() Print(" sigma residual norm ") Print("------------- ---------------") for i in range(nconv): sigma = S.getSingularTriplet(i, u, v) error = S.computeError(i) Print( " %6f %12g" % (sigma, error) ) Print() slepc4py-3.7.0/demo/ex10.py0000644000175000001440000002115512716553525016143 0ustar dalcinlusers00000000000000""" This example program solves the Laplace problem using the Proper Orthogonal Decomposition (POD) reduced-order modeling technique. For a full description of the technique the reader is referred to the papers: [1] K. Kunisch and S. Volkwein. Galerkin proper orthogonal decomposition methods for a general equation in fluid dynamics. SIAM Journal on Numerical Analusis, 40(2):492-515, 2003 [2] S. Volkwein, Optimal control of a phase-field model using the proper orthogonal decomposition, Z. Angew. Math. Mech., 81(2001):83-97 The method is split into an offline (computationally intensive) and an online (computationally cheap) phase. This has many applications including real-time simulation, uncertainty quantification and inverse problems, where similar models must be evaluated quickly and many times. Offline phase: 1. A set of solution snapshots of the 1D Laplace problem in the full problem space are are constructed and assembled into the columns of a dense matrix S. 2. A standard eigenvalue decomposition is performed on the matrix S.T*S. 3. The eigenvectors and eigenvalues are projected back to the original eigenvalue problem S. 4. The leading eigenvectors then form the POD basis. Online phase: 1. The operator corresponding to the discrete Laplacian is projected onto the POD basis. 2. The operator corresponding to the right-hand side is projected onto the POD basis. 3. The reduced (dense) problem expressed in the POD basis is solved. 4. The reduced solution is projected back to the full problem space. Authors: Elisa Schenone Jack S. Hale """ import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc import numpy import random import math def construct_operator(m): """ Standard symmetric eigenproblem corresponding to the Laplacian operator in 1 dimension with homogeneous Dirichlet boundary conditions. """ # Create matrix for 1D Laplacian operator A = PETSc.Mat().create(PETSc.COMM_SELF) A.setSizes([m, m]) A.setFromOptions() A.setUp() # Fill matrix hx = 1.0/(m-1) # x grid spacing diagv = 2.0/hx offdx = -1.0/hx Istart, Iend = A.getOwnershipRange() for i in xrange(Istart, Iend): if i != 0 and i != (m - 1): A[i, i] = diagv if i > 1: A[i, i - 1] = offdx if i < m - 2: A[i, i + 1] = offdx else: A[i, i] = 1. A.assemble() return A def set_problem_rhs(m): """ Set bell-shape function as the solution of the Laplacian problem in 1 dimension with homogeneous Dirichlet boundary conditions and compute the associated discrete RHS. """ # Create 1D mass matrix operator M = PETSc.Mat().create(PETSc.COMM_SELF) M.setSizes([m, m]) M.setFromOptions() M.setUp() # Fill matrix hx = 1.0/(m-1) # x grid spacing diagv = hx/3 offdx = hx/6 Istart, Iend = M.getOwnershipRange() for i in xrange(Istart, Iend): if i != 0 and i != (m - 1): M[i, i] = 2*diagv else: M[i, i] = diagv if i > 1: M[i, i - 1] = offdx if i < m - 2: M[i, i + 1] = offdx M.assemble() x_0 = 0.3 x_f = 0.7 mu = x_0 + (x_f - x_0)*random.random() sigma = 0.1**2 uex, f = M.getVecs() for j in xrange(Istart, Iend): value = 2/sigma * math.exp(-(hx*j - mu)**2/sigma) * (1 - 2/sigma * (hx*j - mu)**2 ) f.setValue(j, value) value = math.exp(-(hx*j - mu)**2/sigma) uex.setValue(j, value) f.assemble() uex.assemble() RHS = f.duplicate() M.mult(f, RHS) RHS.setValue(0, 0.) RHS.setValue(m-1, 0.) RHS.assemble() return RHS, uex def solve_laplace_problem(A, RHS): """ Solve 1D Laplace problem with FEM. """ u, b = A.getVecs() r, c = A.getOrdering("natural") A.factorILU(r, c) A.solve(RHS, u) A.setUnfactored() return u def solve_laplace_problem_pod(A, RHS, u): """ Solve 1D Laplace problem with POD (dense matrix). """ ksp = PETSc.KSP().create(PETSc.COMM_SELF) ksp.setOperators(A) ksp.setType('preonly') pc = ksp.getPC() pc.setType('none') ksp.setFromOptions() ksp.solve(RHS, u) return u def construct_snapshot_matrix(A, N, m): """ Set N solution of the 1D Laplace problem as columns of a matrix (snapshot matrix). Note: For simplicity we do not perform a linear solve, but use some analytical solution: z(x) = exp(-(x - mu)**2 / sigma) """ snapshots = PETSc.Mat().create(PETSc.COMM_SELF) snapshots.setSizes([m, N]) snapshots.setType('seqdense') snapshots.setUp() Istart, Iend = snapshots.getOwnershipRange() hx = 1.0/(m - 1) x_0 = 0.3 x_f = 0.7 sigma = 0.1**2 for i in range(N): mu = x_0 + (x_f - x_0)*random.random() for j in xrange(Istart, Iend): value = math.exp(-(hx*j - mu)**2/sigma) snapshots.setValue(j, i, value) snapshots.assemble() return snapshots def solve_eigenproblem(snapshots, N): """ Solve the eigenvalue problem: the eigenvectors of this problem form the POD basis. """ print('Solving POD basis eigenproblem using eigensolver...') Es = SLEPc.EPS() Es.create(PETSc.COMM_SELF) Es.setDimensions(N) Es.setProblemType(SLEPc.EPS.ProblemType.NHEP) Es.setTolerances(1.0e-8, 500); Es.setKrylovSchurRestart(0.6) Es.setWhichEigenpairs(SLEPc.EPS.Which.LARGEST_REAL) Es.setOperators(snapshots) Es.setFromOptions() Es.solve() print('Solved POD basis eigenproblem.') return Es def project_STS_eigenvectors_to_S_eigenvectors(bvEs, S): sizes = S.getSizes()[0] N = bvEs.getActiveColumns()[1] bv = SLEPc.BV().create(PETSc.COMM_SELF) bv.setSizes(sizes, N) bv.setActiveColumns(0, N) bv.setFromOptions() tmpvec3, tmpvec2 = S.getVecs() for i in range(N): tmpvec = bvEs.getColumn(i) S.mult(tmpvec, tmpvec2) bv.insertVec(i, tmpvec2) bvEs.restoreColumn(i, tmpvec) return bv def project_reduced_to_full_space(alpha, bv): uu = bv.getColumn(0) uPOD = uu.duplicate() bv.restoreColumn(0,uu) scatter, Wr = PETSc.Scatter.toAll(alpha) scatter.begin(alpha, Wr, PETSc.InsertMode.INSERT, PETSc.ScatterMode.FORWARD) scatter.end(alpha, Wr, PETSc.InsertMode.INSERT, PETSc.ScatterMode.FORWARD) PODcoeff = Wr.getArray(readonly=1) bv.multVec(1., 0., uPOD, PODcoeff) return uPOD def main(): problem_dim = 200 num_snapshots = 30 num_pod_basis_functions = 8 assert(num_pod_basis_functions <= num_snapshots) A = construct_operator(problem_dim) S = construct_snapshot_matrix(A, num_snapshots, problem_dim) # Instead of solving the SVD of S, we solve the standard # eigenvalue problem on S.T*S STS = S.transposeMatMult(S) Es = solve_eigenproblem(STS, num_pod_basis_functions) nconv = Es.getConverged() print('Number of converged eigenvalues: %i' % nconv) Es.view() # get the EPS solution in a BV object bvEs = Es.getBV() bvEs.setActiveColumns(0, num_pod_basis_functions) # set the bv POD basis bv = project_STS_eigenvectors_to_S_eigenvectors(bvEs, S) # rescale the eigenvectors for i in range(num_pod_basis_functions): ll = Es.getEigenvalue(i) print('Eigenvalue '+str(i)+': '+str(ll.real)) bv.scaleColumn(i,1.0/math.sqrt(ll.real)) print('--------------------------------') # Verify that the active columns of bv form an orthonormal subspace, i.e. that X^H*X = Id print('Check that bv.dot(bv) is close to the identity matrix') XtX = bv.dot(bv) XtX.view() XtX_array = XtX.getDenseArray() n,m = XtX_array.shape assert numpy.allclose(XtX_array, numpy.eye(n, m)) print('--------------------------------') print('Solve the problem with POD') # Project the linear operator A Ared = bv.matProject(A,bv) # Set the RHS and the exact solution RHS, uex = set_problem_rhs(problem_dim) # Project the RHS on the POD basis RHSred = bv.dotVec(RHS) # Solve the problem with POD alpha, rr = Ared.getVecs() alpha = solve_laplace_problem_pod(Ared,RHSred,alpha) # Project the POD solution back to the FE space uPOD = project_reduced_to_full_space(alpha, bv) # Compute the L2 and Linf norm of the error error = uex.copy() error.axpy(-1,uPOD) errorL2 = math.sqrt(error.dot(error)) print('The L2-norm of the error is: '+str(errorL2)) print("NORMAL END") if __name__ == '__main__': main() slepc4py-3.7.0/demo/ex9.py0000644000175000001440000000642412705464414016071 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc Print = PETSc.Sys.Print def Laplacian2D(m, n): """ Builds discretized Laplacian operator in 2 dimensions. """ # Create matrix for 2D Laplacian operator A = PETSc.Mat().create() A.setSizes([m*n, m*n]) A.setFromOptions( ) A.setUp() # Fill matrix hx = 1.0/(m-1) # x grid spacing hy = 1.0/(n-1) # y grid spacing diagv = 2.0*hy/hx + 2.0*hx/hy offdx = -1.0*hy/hx offdy = -1.0*hx/hy Istart, Iend = A.getOwnershipRange() for I in xrange(Istart, Iend): A[I,I] = diagv i = I//n # map row number to j = I - i*n # grid coordinates if i> 0 : J = I-n; A[I,J] = offdx if i< m-1: J = I+n; A[I,J] = offdx if j> 0 : J = I-1; A[I,J] = offdy if j< n-1: J = I+1; A[I,J] = offdy A.assemble() return A def QuasiDiagonal(N): """ Builds matrix diag(2)+[4 -1; -1 -1] """ # Create matrix B = PETSc.Mat().create() B.setSizes([N, N]) B.setFromOptions( ) B.setUp() # Fill matrix Istart, Iend = B.getOwnershipRange() for I in xrange(Istart, Iend): B[I,I] = 2.0 if Istart==0: B[0,0] = 6.0 B[0,1] = -1.0 B[1,0] = -1.0 B[1,1] = 1.0 B.assemble() return B def solve_eigensystem(A, B, problem_type=SLEPc.EPS.ProblemType.GHEP): # Create the results vectors xr, tmp = A.getVecs() xi, tmp = A.getVecs() pc = PETSc.PC().create() # pc.setType(pc.Type.HYPRE) pc.setType(pc.Type.BJACOBI) ksp = PETSc.KSP().create() ksp.setType(ksp.Type.PREONLY) ksp.setPC( pc ) F = SLEPc.ST().create() F.setType(F.Type.PRECOND) F.setKSP( ksp ) F.setShift(0) # Setup the eigensolver E = SLEPc.EPS().create() E.setST(F) E.setOperators(A,B) E.setType(E.Type.LOBPCG) E.setDimensions(10,PETSc.DECIDE) E.setWhichEigenpairs(E.Which.SMALLEST_REAL) E.setProblemType( problem_type ) E.setFromOptions() # Solve the eigensystem E.solve() Print("") its = E.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = E.getType() Print("Solution method: %s" % sol_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %i" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) nconv = E.getConverged() Print("Number of converged eigenpairs: %d" % nconv) if nconv > 0: Print("") Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, xr, xi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print("") def main(): opts = PETSc.Options() N = opts.getInt('N', 10) m = opts.getInt('m', N) n = opts.getInt('n', m) Print("Symmetric-definite Eigenproblem, " "N=%d (%dx%d grid)" % (m*n, m, n)) A = Laplacian2D(m,n) B = QuasiDiagonal(m*n) solve_eigensystem(A,B) if __name__ == '__main__': main() slepc4py-3.7.0/demo/ex1.py0000644000175000001440000000314112705464414016052 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc import numpy opts = PETSc.Options() n = opts.getInt('n', 30) A = PETSc.Mat(); A.create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0: A[0, :2] = [2, -1] rstart += 1 # last row if rend == n: A[n-1, -2:] = [-1, 2] rend -= 1 # other rows for i in range(rstart, rend): A[i, i-1:i+2] = [-1, 2, -1] A.assemble() E = SLEPc.EPS(); E.create() E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions() E.solve() Print = PETSc.Sys.Print Print() Print("******************************") Print("*** SLEPc Solution Results ***") Print("******************************") Print() its = E.getIterationNumber() Print( "Number of iterations of the method: %d" % its ) eps_type = E.getType() Print( "Solution method: %s" % eps_type ) nev, ncv, mpd = E.getDimensions() Print( "Number of requested eigenvalues: %d" % nev ) tol, maxit = E.getTolerances() Print( "Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit) ) nconv = E.getConverged() Print( "Number of converged eigenpairs %d" % nconv ) if nconv > 0: # Create the results vectors vr, wr = A.getVecs() vi, wi = A.getVecs() # Print() Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, vr, vi) error = E.computeError(i) if k.imag != 0.0: Print( " %9f%+9f j %12g" % (k.real, k.imag, error) ) else: Print( " %12f %12g" % (k.real, error) ) Print() slepc4py-3.7.0/demo/ex5.py0000644000175000001440000000514712705464414016066 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc Print = PETSc.Sys.Print def construct_operators(m,n): """ Standard symmetric eigenproblem corresponding to the Laplacian operator in 2 dimensions. """ Print("Quadratic Eigenproblem, N=%d (%dx%d grid)"% (m*n, m, n)) # K is the 2-D Laplacian K = PETSc.Mat().create() K.setSizes([n*m, n*m]) K.setFromOptions( ) K.setUp() Istart, Iend = K.getOwnershipRange() for I in range(Istart,Iend): v = -1.0; i = I/n; j = I-i*n; if i>0: J=I-n; K[I,J] = v if i0: J=I-1; K[I,J] = v if j 0: Print("") Print(" k ||(k^2M+Ck+K)x||/||kx|| ") Print("-------------------- -------------------------") for i in range(nconv): k = Q.getEigenpair(i, xr, xi) error = Q.computeError(i) if k.imag != 0.0: Print("%9f%+9f j %12g" % (k.real, k.imag, error)) else: Print("%12f %12g" % (k.real, error)) Print("") if __name__ == '__main__': opts = PETSc.Options() m = opts.getInt('m', 32) n = opts.getInt('n', m) M, C, K = construct_operators(m,n) solve_eigensystem(M, C, K) M = C = K = None slepc4py-3.7.0/demo/ex3.py0000644000175000001440000000547212716553525016071 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc import numpy as np Print = PETSc.Sys.Print def laplace2d(U, x, f): U[:,:] = 0 U[1:-1, 1:-1] = x # Grid spacing m, n = x.shape hx = 1.0/(m-1) # x grid spacing hy = 1.0/(n-1) # y grid spacing # Setup 5-points stencil u = U[1:-1, 1:-1] # center uN = U[1:-1, :-2] # north uS = U[1:-1, 2: ] # south uW = U[ :-2, 1:-1] # west uE = U[2:, 1:-1] # east # Apply Laplacian f[:,:] = \ (2*u - uE - uW) * (hy/hx) \ + (2*u - uN - uS) * (hx/hy) \ class Laplacian2D(object): def __init__(self, m, n): self.m, self.n = m, n scalar = PETSc.ScalarType self.U = np.zeros([m+2, n+2], dtype=scalar) def mult(self, A, x, y): m, n = self.m, self.n xx = x.getArray(readonly=1).reshape(m,n) yy = y.getArray(readonly=0).reshape(m,n) laplace2d(self.U, xx, yy) def construct_operator(m, n): """ Standard symmetric eigenproblem corresponding to the Laplacian operator in 2 dimensions. Uses *shell* matrix. """ # Create shell matrix context = Laplacian2D(m,n) A = PETSc.Mat().createPython([m*n,m*n], context) A.setUp() return A def solve_eigensystem(A, problem_type=SLEPc.EPS.ProblemType.HEP): # Create the results vectors xr, tmp = A.getVecs() xi, tmp = A.getVecs() # Setup the eigensolver E = SLEPc.EPS().create() E.setOperators(A,None) E.setDimensions(3,PETSc.DECIDE) E.setProblemType( problem_type ) E.setFromOptions() # Solve the eigensystem E.solve() Print("") its = E.getIterationNumber() Print("Number of iterations of the method: %i" % its) sol_type = E.getType() Print("Solution method: %s" % sol_type) nev, ncv, mpd = E.getDimensions() Print("Number of requested eigenvalues: %i" % nev) tol, maxit = E.getTolerances() Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit)) nconv = E.getConverged() Print("Number of converged eigenpairs: %d" % nconv) if nconv > 0: Print("") Print(" k ||Ax-kx||/||kx|| ") Print("----------------- ------------------") for i in range(nconv): k = E.getEigenpair(i, xr, xi) error = E.computeError(i) if k.imag != 0.0: Print(" %9f%+9f j %12g" % (k.real, k.imag, error)) else: Print(" %12f %12g" % (k.real, error)) Print("") def main(): opts = PETSc.Options() N = opts.getInt('N', 32) m = opts.getInt('m', N) n = opts.getInt('n', m) Print("Symmetric Eigenproblem (matrix-free), " "N=%d (%dx%d grid)" % (m*n, m, n)) A = construct_operator(m,n) solve_eigensystem(A) if __name__ == '__main__': main() slepc4py-3.7.0/demo/ex11.py0000644000175000001440000000324212720263215016126 0ustar dalcinlusers00000000000000import sys, slepc4py slepc4py.init(sys.argv) from petsc4py import PETSc from slepc4py import SLEPc Print = PETSc.Sys.Print def construct_operator(m, n): """ Standard symmetric eigenproblem corresponding to the Laplacian operator in 2 dimensions. """ # Create matrix for 2D Laplacian operator A = PETSc.Mat().create() A.setSizes([m*n, m*n]) A.setFromOptions( ) A.setUp() # Fill matrix hx = 1.0/(m-1) # x grid spacing hy = 1.0/(n-1) # y grid spacing diagv = 2.0*hy/hx + 2.0*hx/hy offdx = -1.0*hy/hx offdy = -1.0*hx/hy Istart, Iend = A.getOwnershipRange() for I in xrange(Istart, Iend) : A[I,I] = diagv i = I//n # map row number to j = I - i*n # grid coordinates if i> 0 : J = I-n; A[I,J] = offdx if i< m-1: J = I+n; A[I,J] = offdx if j> 0 : J = I-1; A[I,J] = offdy if j< n-1: J = I+1; A[I,J] = offdy A.assemble() return A def main(): opts = PETSc.Options() n = opts.getInt('n', 32) m = opts.getInt('m', 32) Print("2-D Laplacian Eigenproblem solved with contour integral, " "N=%d (%dx%d grid)\n" % (m*n, m, n)) A = construct_operator(m,n) # Solver object E = SLEPc.EPS().create() E.setOperators(A) E.setType(SLEPc.EPS.Type.CISS) # Define region of interest R = E.getRG() R.setType(SLEPc.RG.Type.ELLIPSE) R.setEllipseParameters(0.0,0.2,0.1) E.setFromOptions() # Compute solution E.solve() # Print solution vw = PETSc.Viewer.STDOUT() vw.pushFormat(PETSc.Viewer.Format.ASCII_INFO_DETAIL) E.errorView(viewer=vw) vw.popFormat() if __name__ == '__main__': main() slepc4py-3.7.0/MANIFEST.in0000644000175000001440000000065412705464414015623 0ustar dalcinlusers00000000000000include setup*.py *.cfg *.rst recursive-include demo [M,m]akefile* *.py recursive-include conf *.py *.cfg recursive-include src *.py *.pyx *.px[di] *.h *.c *.i *.cfg recursive-include test *.py recursive-include * [M,m]akefile include docs/*.html include docs/*.pdf include docs/*.info include docs/*.[137] include docs/*.rst recursive-include docs/usrman * recursive-include docs/apiref * recursive-include docs/source *