slepc4py-3.15.1/0000755000175100017510000000000014054125756014155 5ustar jromanjroman00000000000000slepc4py-3.15.1/PKG-INFO0000644000175100017510000000451314054125756015255 0ustar jromanjroman00000000000000Metadata-Version: 1.2 Name: slepc4py Version: 3.15.1 Summary: SLEPc for Python Home-page: https://gitlab.com/slepc/slepc Author: Lisandro Dalcin Author-email: dalcinl@gmail.com Maintainer: Lisandro Dalcin Maintainer-email: dalcinl@gmail.com License: BSD Download-URL: https://pypi.io/packages/source/s/slepc4py/slepc4py-3.15.1.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 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. https://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. https://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.15.1/README.rst0000644000175100017510000000177314054125637015652 0ustar jromanjroman00000000000000================ 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.7, 3.3 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: https://www.python.org .. _NumPy: https://www.numpy.org .. _SLEPc: https://slepc.upv.es .. _PETSc: https://www.mcs.anl.gov/petsc/ .. _petsc4py: https://gitlab.com/petsc/petsc4py .. _Cython: https://cython.org Documentation ------------- * https://slepc4py.readthedocs.org/, This does not contain the epydoc-generated API reference. * https://slepc.upv.es/slepc4py-current/docs/, This is for the last release, not the in-development version. slepc4py-3.15.1/docs/0000755000175100017510000000000014054125756015105 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/LICENSE.html0000644000175100017510000002272014054125727017056 0ustar jromanjroman00000000000000 LICENSE: SLEPc for Python

LICENSE: SLEPc for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Copyright (c) 2021, 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:

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.15.1/docs/slepc4py.info0000644000175100017510000006646414054125755017544 0ustar jromanjroman00000000000000This is slepc4py.info, produced by makeinfo version 6.5 from slepc4py.texi. SLEPc for Python 3.15.1, May 28, 2021 Lisandro Dalcin Copyright © 2021, Lisandro Dalcin INFO-DIR-SECTION Miscellaneous START-INFO-DIR-ENTRY * slepc4py: (slepc4py.info). SLEPc for Python. END-INFO-DIR-ENTRY Generated by Sphinx 1.6.7.  File: slepc4py.info, Node: Top, Next: Contents, Up: (dir) SLEPc for Python **************** SLEPc for Python 3.15.1, May 28, 2021 Lisandro Dalcin Copyright © 2021, Lisandro Dalcin Authors: Lisandro Dalcin, Jose E. Roman Contact: , Web Site: ‘https://gitlab.com/slepc/slepc’ Date: May 28, 2021 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) https://gitlab.com/slepc/slepc (2) https://www.python.org (3) https://slepc.upv.es (4) https://slepc.upv.es (5) https://slepc.upv.es (6) https://www.mcs.anl.gov/petsc/ (7) https://gitlab.com/slepc/slepc (8) https://gitlab.com/petsc/petsc  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, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.15 D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2021. (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. For general nonlinear eigenvalue problems, the following methods can be used: * Solve a polynomial eigenproblem obtained via polynomial interpolation. * Rational interpolation and linearization (NLEIGS). * Newton-type methods such as SLP or RII. 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. The user provides the parameter-dependent matrix T via the split form or by means of callback functions. 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 subspace All the above settings can also be changed 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 50% of basis vectors kept after restart using the locking variant 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) block orthogonalization method: GS doing matmult as a single matrix-matrix product 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) https://www.mpi-forum.org (2) Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option ‘--with-mpi=0’). (3) https://www.mpich.org (4) https://www.open-mpi.org (5) https://www.mcs.anl.gov/petsc/ (6) https://slepc.upv.es (7) https://www.numpy.org (8) https://gitlab.com/petsc/petsc  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 Python Package Index. You can use ‘curl’ or ‘wget’ to get a release tarball. * Using ‘curl’: $ curl -LO https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.tar.gz * Using ‘wget’: $ wget https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.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: Top335 Ref: index doc541 Ref: 0541 Ref: Top-Footnote-11750 Ref: Top-Footnote-21789 Ref: Top-Footnote-31820 Ref: Top-Footnote-41849 Ref: Top-Footnote-51878 Ref: Top-Footnote-61907 Ref: Top-Footnote-71946 Ref: Top-Footnote-81985 Node: Contents2024 Ref: index slepc-for-python2100 Ref: 12100 Ref: index contents2100 Ref: 22100 Node: Overview2190 Ref: overview overview2262 Ref: 32262 Ref: overview doc2262 Ref: 42262 Ref: Overview-Footnote-13433 Ref: Overview-Footnote-23633 Node: Features3828 Ref: overview features3902 Ref: 53902 Node: Components6754 Ref: overview components6828 Ref: 66828 Node: Tutorial9797 Ref: tutorial doc9890 Ref: 79890 Ref: tutorial tutorial9890 Ref: 89890 Node: Commented source of a simple example10170 Ref: tutorial commented-source-of-a-simple-example10291 Ref: 910291 Node: Example of command-line usage15025 Ref: tutorial example-of-command-line-usage15146 Ref: a15146 Node: Installation18401 Ref: install installation18495 Ref: b18495 Ref: install doc18495 Ref: c18495 Node: Using pip or easy_install18590 Ref: install using-pip-or-easy-install18690 Ref: d18690 Node: Using distutils19498 Ref: install using-distutils19598 Ref: e19598 Node: Requirements19718 Ref: install requirements19804 Ref: f19804 Ref: Requirements-Footnote-120267 Ref: Requirements-Footnote-220301 Ref: Requirements-Footnote-320427 Ref: Requirements-Footnote-420457 Ref: Requirements-Footnote-520490 Ref: Requirements-Footnote-620529 Ref: Requirements-Footnote-720558 Ref: Requirements-Footnote-820588 Node: Downloading20627 Ref: install downloading20730 Ref: 1020730 Node: Building21140 Ref: install building21241 Ref: 1121241 Node: Installing22791 Ref: install installing22872 Ref: 1222872 Node: Citations23451 Ref: citing citations23528 Ref: 1323528 Ref: citing doc23528 Ref: 1423528 Node: Index24173  End Tag Table  Local Variables: coding: utf-8 End: slepc4py-3.15.1/docs/apiref/0000755000175100017510000000000014054125756016353 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.ST.Type-class.html0000644000175100017510000002417214054125747024267 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_statetype.png0000644000175100017510000000250714054125745025176 0ustar jromanjroman00000000000000PNG  IHDR]$d>bKGDIDAThkLSgǟB ;(t(tP Aܪk,8jD ɂY(@aP:e8VddܬR-ÉMSNZ6.}zs}'{[__ tt0_NB|A1J$P(NrvV24D%BlKK&X:/`lʲBqI,s%?MMz7Ac/KFQw$'_.xθL{On*4"b Q>`ggB[u]vvaTjjn* D1@V0;jh~i R'>x/* 7?zDa2ޏ74l'bb\ꪾydP8D"ju,aI =,LRjnޘѱ O 9uIG]DM/|dx69hlZ}RD6'OK,-M++P(JBVVSV6.Yzu7oj/",.J#mV/ s('O攕Efd..! 򸱷-8f0$RR\\KKssr =sٳd8+PffEqv :BLhsM(Lmwo Q|6  L&#J5.մ1Sqo?<zDD@&hkm1|:GoN޾2/?7 :/컒 *]æ *|At]-X<AIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.ErrorType-class.html0000644000175100017510000002172714054125746025377 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.BV.OrthogType-class.html0000644000175100017510000002104314054125745025423 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.ST.MatMode-class.html0000644000175100017510000002176314054125747024677 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_mattype.png0000644000175100017510000000224714054125745024640 0ustar jromanjroman00000000000000PNG  IHDRT$+WbKGD\IDAThc?HL퀁8P@.FcȈ[)4/]z% [JKWލ&8G* j~~h^99w?&}Ν[d8#|9ŅŅE lqaaffC6 󡮮^Vfsg˖>X=x uuݸ68$#c|ƉLyz.E͛wҥ)Sgfb vqDC!R׬T^.%*(-Gb̴60`ea˶mKʚ,ݶaƍS**duTT: v?N/,B]]SrލYYX>wmee dbb rv^wڞ'gT MEEH+pdx|~OY[ w`ano[۟~]x3Cܢ**l e=QQa``𡔘iӔee>~2@~#Qf::r~Of?O754_ӬYi!g]<9ˋ!ӳl„O^w;'gҲex =pv޽2\-77\;(HYV6#+KAZROi O_99!x{fdxeg[YU%'300TIHX$$v~F=d0#u{u5S 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]
  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__ = 'PEPWhich'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.MFN-class.html0000644000175100017510000013135614054125746023443 0ustar jromanjroman00000000000000 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, viewFromOptions

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.15.1/docs/apiref/slepc4py-module.html0000644000175100017510000002761614054125744022300 0ustar jromanjroman00000000000000 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.15.1

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.15.1/docs/apiref/slepc4py.SLEPc.DS-class.html0000644000175100017510000014355314054125745023332 0ustar jromanjroman00000000000000 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.
 
getMat(self, matname)
Returns the requested matrix as a sequential dense Mat object.
 
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, trim=False)
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, viewFromOptions

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).

getMat(self, matname)

 

Returns the requested matrix as a sequential dense Mat object.

Parameters

matname: DS.MatType enumerate
The requested matrix.

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)*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, trim=False)

 

Truncates the system represented in the DS object.

Parameters

n: integer
The new size.
trim: boolean
A flag to indicate if the factorization must be trimmed.

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.15.1/docs/apiref/class_hierarchy_for_svd.png0000644000175100017510000000626314054125747023755 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD hIDATx}LTW-%td RJ* ( MBu"bJmW)&Ju~֠Z6+PV$+*.Y38W_r9s{}r""0&"ƺƞ mmmzX˜L0F2 o=[||aDLۏ/*`״Lt8Lt8Lt8Lt8\\\rJܾ}>7SSSRt̘1سg]{oo/v܉ 8;;#$$jfFsconn[ۘ͛pssj---J#6hoo?+W@ ))>\RGjj*pI8w҆UsOO͛*䠺vBaa!#//祈Տ#MPXuj5͟?BZL{]@f1]\\RUwZZVkW*C04M^}3mHIIZh4ddd@&aHII <==Μ9888`̙(((hZdeeHNNFWW^?ŵذaR#]f'N(ZR)|Hʹzj 1fn S`` I$P[[Ps1Pgg'_z<<7sfNjΦ 'N :M… )77W8j;BdggGw1;΁igjJN8a"LFDυ)teѲeˆ2w<[kjj} xyyP(@ DEERpQܿo///aM555طoprr 00C֖SN-´iӬ5âvZGEEѣG0\*Aoo/rrrzjp3wRTzӬY͍n*>2u-1}YR[FF%%%REdv$ >j5ݻ|?~|yflmmǸ{Ĝi&kbuVYYyaxWG0~:qFd.G`_PTTD6sX?DCDCDCDCDu~oftɋodضm-}1u[$2백\.ǚ5kƺiphphphphphphphphphphphphphphphphphphphphphphphph茻`xWTQQ1*D 6m zxyDg-͝?[7e [Em-vX1&mhMKǺ 6 <`áeáeáRBIh(|_{ {> }j5SӢM-_OrMPݻ9;R?U 8h-),ri.E{G=_s>VGF mGw/]g:zzFuLbơÇ[~~pJ88OP]S)//77:oNߏSbAI8"~%:>օ o,_鄶SHM 8_VfݢcZ F똺t)RRB}VEFkߺocՀ9OGs[ۈq9B^R"舸ŋ%©R,?'phyI /?_rdl et8UZ5, @ڊSZOC;Nv^kZ4PT(ܸ?FDX#.7n/G )6Vo_{;;al_WԨH&u jˋ/ph`nʘ (Zt_IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.ErrorType-class.html0000644000175100017510000002171714054125746025403 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.PEP.Conv-class.html0000644000175100017510000002212114054125747024341 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.PEP.Basis-class.html0000644000175100017510000002242214054125747024501 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.EPS.Which-class.html0000644000175100017510000003030214054125746024500 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.EPS.ProblemType-class.html0000644000175100017510000002432614054125746025711 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_conv_2.png0000644000175100017510000000146214054125747024343 0ustar jromanjroman00000000000000PNG  IHDR@$nbKGDIDATXc?PLJ s$|;bd-KO^DK=Utqi thC> z`xm\M7IT={,LL|04̘aob2TT|Mr]򣢐E3256B|Iupuw/{""llgb``,,,h#GO_>{ZCQYSVBio婥KOر!+w?gNoqqݴi>~\+w;feEw߿+vX^(-ҔdVTVx8?OO|~x5;v$33H#')"r=d3׮EG۷U+)QQffa~|`?' ~!,ٺ?\,>}DZL jFEzzٳgӁƚ*d<>w.Kon9sҲe ,y=zn͔)1޸qSI乞L]߿a [ZcgRY)%&f喑am]VWoބ|F$kЌz`z`z` qt~`)yUIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_refinetype.png0000644000175100017510000000224414054125745025324 0ustar jromanjroman00000000000000PNG  IHDRd$obKGDYIDAThc?( 0  ,h`X9A єE`ӣS8~ғ/ުn8iջw fCh`F@N`1}r;wk)e``1Iܹ֭F8x`)-Rf``[eeW׭åǏ/m_ERIv;8ػӧqq6y'X ]bo>|>OVBA=/$89|<7SPfrqA2E]. .. ِ`޽F66ͳfҎ޼ΔFnބa 1Gǜ~d,@f`}yS7mZ;Dg[_мy/]2 4gΝ-.6ǏXrC%uu7Ne]Ǐw̛Gxcici)h斜TTȈ먨t>~9Y<<~~ ?}"I+ ˡgm)*R5iYm,lެ,+ް# @x! W)ˋ)QQffڙݫ55p)U99CSQk!UIΩp)1ӦA//޼ c$nnQZJJ62pۏ騨000zPJLTcq =h@\Hׯ!ӳl„O^w;'gҲe$Fv[Cÿ5͚>~|ڵɓ(wP!dyx~VIHX$$vdI!9ӗ/ANN1ޮ^VVUɔ  ChԡfʔϞ-ikp>~ : ~tކ )AAq˗MLL|<<4pۃEWW!F0X$"`igN1 Mf`d0L볈)0X$"sPlIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_scale.png0000644000175100017510000000172014054125747024241 0ustar jromanjroman00000000000000PNG  IHDRA$YbKGDIDATXc?L*Q?  [HV;{8 B xKROoUw7]D2X{R4ᐖF089~{ J\j~~ӧ$>~h`@X 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_MAXIT = 3
  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.15.1/docs/apiref/slepc4py.SLEPc.ST-class.html0000644000175100017510000015226014054125747023347 0ustar jromanjroman00000000000000 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.
 
getMatrices(self)
Gets the matrices associated with the eigenvalue problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all ST options in the database.
 
getPreconditionerMat(self)
Gets the matrix previously set by setPreconditionerMat().
 
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.
 
setMatrices(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.
 
setPreconditionerMat(self, Mat P=None)
Sets the matrix to be used to build the preconditioner.
 
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, viewFromOptions

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.

getMatrices(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

getPreconditionerMat(self)

 

Gets the matrix previously set by setPreconditionerMat().

Returns

P: Mat
The matrix that will be used in constructing the preconditioner.

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).

setMatrices(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

setPreconditionerMat(self, Mat P=None)

 

Sets the matrix to be used to build the preconditioner.

Parameters

P: Mat, optional
The matrix that will be used in constructing the preconditioner.

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.15.1/docs/apiref/slepc4py.SLEPc.SVD-class.html0000644000175100017510000026473214054125747023465 0ustar jromanjroman00000000000000 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
  ProblemType
SVD problem type
  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.
 
getOperators(self)
Gets the matrices associated with the singular value problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all SVD options in the database.
 
getProblemType(self)
Gets the problem type from the SVD object.
 
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.
 
isGeneralized(self)
Tells whether the SVD object corresponds to a generalized singular value problem.
 
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.
 
setInitialSpaces(self, spaceright=None, spaceleft=None)
Sets the initial spaces 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, Mat B=None)
Sets the matrices associated with the singular value problem.
 
setOperators(self, Mat A, Mat B=None)
Sets the matrices associated with the singular value problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all SVD options in the database.
 
setProblemType(self, problem_type)
Specifies the type of the singular value problem.
 
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, viewFromOptions

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.

getOperators(self)

 

Gets the matrices associated with the singular value problem.

Returns

A: Mat
The matrix associated with the singular value problem.
B: Mat
The second matrix in the case of GSVD.

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

getProblemType(self)

 

Gets the problem type from the SVD object.

Returns

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

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).

isGeneralized(self)

 

Tells whether the SVD object corresponds to a generalized singular value problem.

Returns

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

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().

setInitialSpaces(self, spaceright=None, spaceleft=None)

 

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

Parameters

spaceright: sequence of Vec
The right initial space.
spaceleft: sequence of Vec
The left 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, Mat B=None)

 

Sets the matrices associated with the singular value problem.

Parameters

A: Mat
The matrix associated with the singular value problem.
B: Mat, optional
The second matrix in the case of GSVD; if not provided, a usual SVD is assumed.

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

 

Sets the matrices associated with the singular value problem.

Parameters

A: Mat

The matrix associated with the singular value problem.

B: Mat, optional

The second matrix in the case of GSVD; if not provided, a usual SVD is assumed.

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

setProblemType(self, problem_type)

 

Specifies the type of the singular value problem.

Parameters

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

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.15.1/docs/apiref/class_hierarchy_for_fn.png0000644000175100017510000000534614054125746023564 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATx}LTW- H $CZJmLFtUnXRJc KfMqcbkѺM5&"XV ô3<.qDy9\$P ă HhrrqM466! \y']l͈-''5tҎ rss=5PV(GB+#ʑЎS@@7=guuu^ikkb={tR 11.&\ z-b…HOOGEEKQ]]]~}_[h{DDDnM755?3.^ݎnqF㦦&p:'99hmmɓ'q |'a2&TڊJ\|{Emm-2331<< Wm?''}I_iG|HNNFdd$`v%%%0 xQTT_?8 ::ZkԩSHIIApp0qQ@YYbccB;ձgXbܵxWs- ,X+Ws+aaa8p}k֬?`|c1ѣGQZZ9s:$$&Ic8v۷jp^ͧ}FVj筶K.qѢE$Z._\Ɓ޻w]]]ܼy3=鍛&FgG}ě7ojoxQQQZ-ׯl_DݻWȘͧ|}Yh۝XlI211ڱFѭ# bUU- AfRRO:{u644$oܸAׯzp0::.\ Inذ˷͛uֱ[ћ޸y2<<˗/ IXs6773""8sҥZFTo>5cC;44z*In#| _z%.ZټxFGG_j+fYێ;XTT۷os艛9#3c~ͧfܚvlw!&&N}}}hnnv!XV>| ^~edee111ښP^^hiiAqq1BCC 0())\|gի裏j8&dxx[lAGGLou,<)((} 7oSll[{zuMk'z]n;;;D$ynڴݼvWZ۷kw=jePP9[nAAAdYYF#y5^[nX<,js8\x1x!v<~&mz檰III/i6yIfddp$9X}]&%%񩧞ٳgi6d>sNdee9wV\ה/jjjLjk_jk.FEE1<<nʕ+U[[˸8Ο?<}4L&,Y°0nٲwXFCBBVkmzn))) f||Kps90@(GB+#ʑ5+HME^V>XWOreK$t0,=^6_ijNBDx8?mQ^ii^FִSo/8e>2Hh'bma9sph>onΜc,&- ֬>N0;ӧYKB; g `^@Å sYP&˃iCc[.Gyi < 4kN232]dM;Ac}GKُ?rPJ+#ʑ Hhr$B9Z Pܧu7 WZx']x,/YHhr3.C[IENDB`slepc4py-3.15.1/docs/apiref/epydoc.css0000644000175100017510000003722714054125744020360 0ustar jromanjroman00000000000000 /* 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.15.1/docs/apiref/class_hierarchy_for_mfn.png0000644000175100017510000000566014054125746023740 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD eIDATx{Lg, H,XA@OXzCzAh=H#54ݺ ֢1T4ҍ%zۦ.![RR\jRLlp.L3y{:1TZ9Z9Xw]6aC!::r'l=`(mδ䦂ov5    Xl>>>ؼy3~G67(((pئFļy鉐|v]]]8p"##1c ,[ YYY0FF766mB?ש}655{& QRR^$&&mc͛MXXRRRPYYgݻqEN,YFUU:|Ġ}hjiG[CCS_K.%6448~駟=RmFm>>>WZZʠa՝իWl6[7 ѣGֆۿ`{vg/-_~%dz{{N3g"99+/_P:<"""ɓٌ IIIhooXtk{wo*mF#OׯzSLQ,֦[jܹ`ps1ɓ'WW˥Djj2p),X~~~ؽ{7L&tTLYzVTTp… Ifee`0\h}ϾNN:lmme^^h4yFDDbjj.\^d89fboo/I2??jvvvܺu+-[f6oʨɍ7O>{O<{ڵkWjY~=2$$R?j.giZ>.\H akkrzf twwgNNF#Achh(ϟ?uϝ;G{.u:oݺx@vBk6̀~$M61;;[uԩSn:655͛=}}}bVV###ӧOùC-//y*,,yqϩz: mww$I;;vYǒ:b (g]OOk۳gN6ͪp#iF#O>msANG\W=˗^z4p\j騮_}}۷ DCCmmm(//nL&?~믿X#00Pj>|PQQxyy 둖_+Wܹs5ׇ۷bLL ~7p8$&&"33.AWWuVe<CkDS<3uJ0==$p˖-ljj7b ޽[d;O8ݝ]]]Ƞ^gmm-oܸ+WrΝv끝f3gϞM;v̢Gnj6ڼYKJJbhh(+ٳIsa]GʵkˬsƗ_~٢XymƮ^˃<ח)))ʗn۷aRR;;;hzyy)}388ӦMcXX/\@TΙ3ܾ};>|h{U$~mzzz*c}VZoo/AΟ?iii\ثh4rÇd2YRTT ח{U^s`j.{k=ڧ`jKKKcbbUM jU}ډ---éSƻVMM m+#6c ڵ8***dXf7oDLL v N7(\wW"!!ArA\(**/%4GB+4GB+4GB+4GB+4G>?b }6HΑ}>G "لV8 m۶.e‘kZ9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9.X?Uz43ѢIX`BQ\͙t_x1e [yM vx1.&mhΞ ƻ 1 ry 4GB+4GB+4GB;.y6&'%2J[x6467+mc҂۷ Qutʦm3G+Wez$ōJi)fr]bbI xM[_~9߮x9|e랈$a B{Uq^Chp0& DgWo<2Jl^Ʀd}})8ǥKc5 CB;HS\]5&F91gmmWtoh@_lܻL0QHh ~LqAåKۦUl%*= bx+33>#gN_~ mͦ&bb[bD'?\^zb[s@?tN.r######3i_ hiL3D||NԤ{><# {`N_a,!+IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.DS.MatType-class.html0000644000175100017510000003006214054125745024702 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_eps.png0000644000175100017510000000576714054125745023756 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATxmLTW?ZFJ)J}֢XmbRAv%Դ*Y)KF)6J-ڴjv(5AmZD]R@3̽88y~Msp d `l8L8Z&ZZZpeO˜ F;6 OőQr RSSeyO˄áe2php8CpbժU_ <b>uuu0LԩSR]voĵbΝG@@Νl6@ccTGv9VGmz=믿… ZHOO|Uz=8􉉉AVVjkkq 477СC8s t:݈jٳQ[[B\r999(//GRRv#Q\\XkVO;ڌF[bМ9sFy޽K}(?00jjj.]D#[ŋf9L&}-)))iJ嫯BLL BBB ZͅF /LHLLI:uiӦѣ͆|DDD $$r#;;srm[l{'5L8q"^:䱏?^jSj[hn߾ `hs1ѣGqZRAIs ǎM6l6p(`uɭcqNpd2 TSSC3f̠|""*((sSBBرC&LbjkkR&D}QCCӼyHI{ijd6vv% "JDD8NTWWG===Mzj;wlCiޜzjRhŊ~jii\ I]˗/ShhToA{i\s+B[__p3fQTTI?Z@חd2 vSNI}o޼I'O$"fh4t͇ \m6o%"+WRaa8ߋ&L%KPSSbҼɱt*((xǏ :::: muu5See%M:UW*`u=ڮ]F~~~DD粀jZv ?[(99.\ A,X@EEEjgXY͛)33LJܹ8΁ 8}ɍd2]hhF|cŴ|Gq)`u=u{~A[h=|.ٌÇ޽{xwl2tuu!<<\@]] AVVj}dm/QYY bʔ)Xv-ړt.䤧O>qKۋB^Zjs)pz,)vɒ%d4(//>#z_N ,M6IMDDf|}}ȑ#JEEEKOZpBڰal=(fhҤIJeee9x uuuɞW r(͛ sΑ`'NмyhDD ߿O_MNڶmR`` eddPOOYV?>K*//H񡘘:}4=hɤViڵ![\hj#"ڸq#T*鶕y>VznCiޜYVˣ8iӦQnn.Y,!ͅ\&oNqqq4qD{lvONuV9Si=KnbC4Jm*P^A)?OX,hmmEii);rZ׮]x{{{{o̞=ׯkd č7 6@x.Jo.0ͅ*v)/&- C˄áeQO;د_0Er4l۶-}ذȽ-Kh{xyyk֬t)2php8L8Z&- C˄áe2php8L8Z&- C˄áe2php8L8Z&- C˄áe2ጹ"V]]=h=;VEzު(55.Θ u8k5:K1Yt`&- gLi+>^1zUWp ;aaٌKJPu<1e$7~=|}|Fo0FCCDHY~ۭ8ЄfS.}x{0 .\Р h]Wm2N}>ݺ/GG#HƢً=1$!qhGqjxe( tvwK}%$sODa0Ͳ\^4`sA"0 pWnK23//~p{a*B7b}&x{c/xaԖ8k~?(;s}pd%'^0Ϟ4f}zpE.]30s&>\۷C;D=xv;hthOJLCUT.wTXr%ҲoL%\u ++C.š#>pO(v%%ع? *ǡs(}Ə7bƍ(kL=- C˄áe2php8L8c>X5l g]i5 RSS=]ۼ꫞.s&-s<]c_(Ui0IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_refinesche_2.png0000644000175100017510000000266514054125747025517 0ustar jromanjroman00000000000000PNG  IHDRw$#bKGDjIDATxkLWASq c] N"&\p_ø8N Cb'W Vŀ pe8d&^YaPKΗs?y}9oVߏ9֫@d0BX2r0Vx\DΜ1f\O7733G$!!Q˲0"JTepdL&z{peȽT{{Ihx/0;Ӄؒþ>KT*ǫEjQNv/ÎAѣ4WU`;a)fv.[[*+ G_XSRݱزl?q"r;;vv8;: 445>Nz= v66[gvN_?ϮŅmmVٛl7sG[Y1fhRCߏ?!.==#"w|}geJEeM ˱bjZ[ jO^g`>>DmDGW׀y|e˰"m>JT*:c?w.;8RUӢE̞ͦ\tbvʭ661c }v<ȵ7jxuáC:{֨~Yu5狊JH`s^;:(MO秆Gp]a*kj\a!57p@\]m-?RƖ|ą idǓñӧR^XBCyz"d/Zqq8ANJ Srf:;ϙ:Wa#jzsYVSr$ʀʪ(:~mk0ɉΔ1kAHƏR-Ĕć#J\HdR)/YbrbUN#}}$de%%>-o7o8[kk'`5jԀzc=%+jWWRZP@=srpQ*qQ*up@"X/%O3nX.eުU';8Pgttuq$ͷ]4z=+6nUmtC_ ** c[[kE>5~T2:cTIPbB4~y&[ZjVc2@’%[Z!!+"Ijc# MMĥjV\Ko Fܩr9624YQQx\ixd24ܺIhp &Iݝk1&,XQQLS(LRsk-!~~BoOCBB(//I|ANȈ \#+`Dsh0F~'41e"baǝ;C+#.;Wp\#+`Ds?IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.SVD.Type-class.html0000644000175100017510000003023114054125750024360 0ustar jromanjroman00000000000000 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.

Wrappers to external SVD solvers (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]
  CROSS = 'cross'
  CYCLIC = 'cyclic'
  ELEMENTAL = 'elemental'
  LANCZOS = 'lanczos'
  LAPACK = 'lapack'
  PRIMME = 'primme'
  RANDOMIZED = 'randomized'
  SCALAPACK = 'scalapack'
  TRLANCZOS = 'trlanczos'
  __qualname__ = 'SVDType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.FN.Type-class.html0000644000175100017510000002447014054125746024244 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.EPS.PowerShiftType-class.html0000644000175100017510000002167214054125746026404 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc._p_mem-class.html0000644000175100017510000002074614054125750024252 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.BV.Type-class.html0000644000175100017510000002230014054125745024235 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.EPS.Conv-class.html0000644000175100017510000002211114054125746024342 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.PEP-class.html0000644000175100017510000037116014054125747023447 0ustar jromanjroman00000000000000 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.
 
getInterval(self)
Gets the computational interval for spectrum slicing.
 
getIterationNumber(self)
Gets the current iteration number.
 
getJDFix(self)
Gets threshold for changing the target in the correction equation.
 
getJDRestart(self)
Gets the restart parameter used in the Jacobi-Davidson method.
 
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.
 
getLinearLinearization(self)
Returns the coefficients that define the linearization of a quadratic eigenproblem.
 
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.
 
getSTOARDetectZeros(self)
Gets the flag that enforces zero detection in spectrum slicing.
 
getSTOARDimensions(self)
Gets the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.
 
getSTOARLocking(self)
Gets the locking flag used in the STOAR method.
 
getScale(self, Vec Dl=None, Vec Dr=None)
Gets the strategy used for scaling the polynomial eigenproblem.
 
getTOARLocking(self)
Gets the locking flag used in the TOAR method.
 
getTOARRestart(self)
Gets the restart parameter used in the TOAR method.
 
getTarget(self)
Gets the value of the target.
 
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.
 
setInterval(self, inta, intb)
Defines the computational interval for spectrum slicing.
 
setJDFix(self, fix)
Sets the threshold for changing the target in the correction equation.
 
setJDRestart(self, keep)
Sets the restart parameter for the Jacobi-Davidson method, in particular the proportion of basis vectors that must be kept after restart.
 
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.
 
setLinearLinearization(self, alpha=1.0, beta=0.0)
Set the coefficients that define the linearization of a quadratic eigenproblem.
 
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.
 
setSTOARDetectZeros(self, detect)
Sets a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation.
 
setSTOARDimensions(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.
 
setSTOARLocking(self, lock)
Choose between locking and non-locking variants of the STOAR method.
 
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.
 
setTOARLocking(self, lock)
Choose between locking and non-locking variants of the TOAR method.
 
setTOARRestart(self, keep)
Sets the restart parameter for the TOAR method, in particular the proportion of basis vectors that must be kept after restart.
 
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 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, viewFromOptions

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.

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.

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.

getJDFix(self)

 

Gets threshold for changing the target in the correction equation.

Returns

fix: float
The threshold for changing the target.

getJDRestart(self)

 

Gets the restart parameter used in the Jacobi-Davidson method.

Returns

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

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

getLinearLinearization(self)

 

Returns the coefficients that define the linearization of a quadratic eigenproblem.

Returns

alpha: float
first parameter of the linearization.
beta: float
second parameter of the linearization.

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.

getSTOARDetectZeros(self)

 

Gets the flag that enforces zero detection in spectrum slicing.

Returns

detect: bool
The zero detection flag.

getSTOARDimensions(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.

getSTOARLocking(self)

 

Gets the locking flag used in the STOAR method.

Returns

lock: bool
The locking flag.

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).

getTOARLocking(self)

 

Gets the locking flag used in the TOAR method.

Returns

lock: bool
The locking flag.

getTOARRestart(self)

 

Gets the restart parameter used in the TOAR method.

Returns

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

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 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

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 quadratic eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with PEP.Which.ALL, see setWhichEigenpairs().

setJDFix(self, fix)

 

Sets the threshold for changing the target in the correction equation.

Parameters

fix: float
Threshold for changing the target.

Notes

The target in the correction equation is fixed at the first iterations. When the norm of the residual vector is lower than the fix value, the target is set to the corresponding eigenvalue.

setJDRestart(self, keep)

 

Sets the restart parameter for the Jacobi-Davidson 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.

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 .

setLinearLinearization(self, alpha=1.0, beta=0.0)

 

Set the coefficients that define the linearization of a quadratic eigenproblem.

Parameters

alpha: float
first parameter of the linearization.
beta: float
second parameter of the linearization.

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.

setSTOARDetectZeros(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. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS.

setSTOARDimensions(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.

setSTOARLocking(self, lock)

 

Choose between locking and non-locking variants of the STOAR 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).

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).

setTOARLocking(self, lock)

 

Choose between locking and non-locking variants of the TOAR 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).

setTOARRestart(self, keep)

 

Sets the restart parameter for the TOAR 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.

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 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.15.1/docs/apiref/class_hierarchy_for_errortype_3.png0000644000175100017510000000220314054125747025424 0ustar jromanjroman00000000000000PNG  IHDRY$mbKGD8IDAThc?(``````h "00H?h XjX0d-z'/_t MKXX ޽xi)hAѰ@Ѱ@,Ah`)rΈrL V髩m,```8h4b^OZA Բ@fX S _}c``$jw?f40͛.|%NAݽ_Ȋ_y)߹-,.ܼ Ѹa 1Gǜ~100zYww!;_~2h.սpaWa:2;˗.>uc:T B]]7?(UN^|ĉ[&OuxǼy = zE;~R)z̰ 㱴DFp077nNN8mŎuTTl݊X:{aٶm>>p"YY3۶100߸qJEJgAIŝ͛eeJi(*_}_e쓗/1c&& gu{ꩩ9yrFM \JUNTT gg^^R=EfX3-.,|SMEEOHa* Bܢ**l e=QQa``𡔘i 1˗oސr2_}(fafwwxջwkL&"[Cÿ5͚A>~|ڵɓ<=&L{sr&-[FLqqh"ZS*+LXY*xAElpӦ ''doo׌/߾ExxT%'300TTLh/?{B<:5S 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.15.1/docs/apiref/slepc4py.SLEPc.BV-class.html0000644000175100017510000023722714054125745023335 0ustar jromanjroman00000000000000 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.
 
createMat(self)
Creates a new Mat object of dense type and copies the contents of 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.
 
resize(self, m, copy=True)
Change the number of columns.
 
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.
 
setRandomNormal(self)
Set the active columns of BV to random numbers (with normal distribution).
 
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, viewFromOptions

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.

createMat(self)

 

Creates a new Mat object of dense type and copies the contents of the BV object.

Returns

mat: the new matrix.

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, optional
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.

resize(self, m, copy=True)

 

Change the number of columns.

Parameters

m - the new number of columns. copy - a flag indicating whether current values should be kept.

Notes

Internal storage is reallocated. If copy is True, then the contents are copied to the leading part of the new space.

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 or None
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.

setRandomNormal(self)

 

Set the active columns of BV to random numbers (with normal distribution).

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.15.1/docs/apiref/class_hierarchy_for_convergedr_2.png0000644000175100017510000000364114054125746025534 0ustar jromanjroman00000000000000PNG  IHDR$;/.bKGDVIDATh{PSWO(@vve]`x `KI5A6D`4V(ĩҖuGF^ Bf&&~q/oιwN.JT @x)LPaZ~C}}d>Ǔ=</NãE) A <{  >=}mq ^pW[+gpx @yz>ON?0`^2950?:6zWW"ejlL}?sΎ8&ASzժ\tcpn2 ocSHNN.]j{ _}䥦ݻj7CBEE9ӳߋ_i::}cPȜ\nw 0P8bH`N.;wS(ljrcKjT*9uunYx{7n{WX%FFЩf[ -YP)$իlX,JLj|/׮lݺ%/ofvǮwIPP(yƍ,gGGwi_Z귖gen)"0!޸AU/svrI$6B-68ŋ4Z0lcek_ZԫUV__HE:R|} 22TE56֜L6' ~mn>@4pOde젻ڸHW4-039iýu΁eo -}ۛ~̄X> 1bFDVJʟ7mMJ"tzȧѬL6{yhCVZ>޽mۮbݥZkp{o̳`zz|V;}J$&P(kҌq3{䖕974\`Mp8Ʈ+(v{tz=%Vjib @}}}LL $lOחbORY%%׮5tQ>yl|bb9IXg6f>a۷C,(`aA|O hy  ,]߀ڂ ?P4|O 85IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_extraction.png0000644000175100017510000000220714054125746025332 0ustar jromanjroman00000000000000PNG  IHDR\$ʣbKGD5~}y WDQD2ETPP\X{y` ߞGij)qs3a pcFO+xzpa}z\/g``_Ìb|a``4b/_DdKh`n^Yw4bn^ݻ%mm\'/f``xg\o…]22eef::wli|ӄ%Kݻm}g|ulL ˗.>uc:χܹs9uӦ ߑ}D rݐPSmmz tTT~syY .H9wk++300,hj.wŎWm*KOg`` Kil|??#3Plެ,+)Ó8c3qPTd```eayyN{!3X˷o,#[R ,x'/_NY¢sXXXs|Ѣ))1ϞAoj3!,>p>y"-&a3Q'3P^[d{O| \oL?YY?}:ob'Orε{ri 3s{^GǃgϮ޽[3eJ7y~df˸84.L[剉,Ӫ3ZZl-$]\>;^-77\299#+ю_MWa!.TVwuFEFyyU&'L<d uuA&`4P@F  ,`4P@SFJ8`7qt} &M)Xh`cڼאIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP-class.html0000644000175100017510000022610514054125746023442 0ustar jromanjroman00000000000000 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.
 
getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)
Gets the i-th left eigenvector as computed by solve().
 
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.
 
getTwoSided(self)
Returns the flag indicating whether a two-sided variant of the algorithm is being used 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.
 
setTwoSided(self, twosided)
Sets the solver to use a two-sided variant so that left eigenvectors are also computed.
 
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, viewFromOptions

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.

getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)

 

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

Parameters

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

Notes

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

Left eigenvectors are available only if the twosided flag was set with setTwoSided().

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.

getTwoSided(self)

 

Returns the flag indicating whether a two-sided variant of the algorithm is being used or not.

Returns

twosided: bool
Whether the two-sided variant is to be used 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.

setTwoSided(self, twosided)

 

Sets the solver to use a two-sided variant so that left eigenvectors are also computed.

Parameters

twosided: bool
Whether the two-sided variant is to be used 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.15.1/docs/apiref/class_hierarchy_for_type_3.png0000644000175100017510000000147414054125746024362 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.PEP.Type-class.html0000644000175100017510000002432714054125747024367 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.PEP.Refine-class.html0000644000175100017510000002165114054125747024653 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_blocktype.png0000644000175100017510000000276214054125745025153 0ustar jromanjroman00000000000000PNG  IHDR_$bKGDIDATh{LSW?P.>.L|,. $9 T!N#>baf:IRkuGQ5Hc2MIPb]ijp6ZD,^#sM{alA 2"/$Vb넦RZ[+|r:>21AAn).cb|Ф3k=x@Emm=NmW_ie)&͆h4,hٴ][䳰0n T3~ ۷5t\*`@h.ejbot MjD"_>ύold޺ubEz: ֖ٹ3wZ76>w̘A/ԲDa f3=F^~pIPiXxlӡ߸q$X=#θf3f(!IeR:)t MVp``v~ݽj64 vB?*23g,>|ȥRr4KնmlY{q̿y ͤhUy[ *ԙLS0< a7nz^RRڥӓ؈  /LNv2hA@]O p۫W}.ҊwrLsCL.%Pi4*(Q]_oZ^={j~ZrvkRMQBƆ/;u/aL@'N`+)VR¿/[NNm Ͻ{054Pe4nr|}|$fDE$5znTT1KdRIV˟7oRZYIZp3ɍ2h#~FE|]J@bZ\.-eV11Mʌ FJ++Q&$Ct1sOO> $o<<p]cSKåu&S9yuIJ# N'_C<"/ 2fGIENDB`slepc4py-3.15.1/docs/apiref/api-objects.txt0000644000175100017510000017627014054125750021323 0ustar jromanjroman00000000000000slepc4py.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.__warningregistry__ slepc4py.SLEPc-module.html#__warningregistry__ 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 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.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.setRandomNormal slepc4py.SLEPc.BV-class.html#setRandomNormal 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.createMat slepc4py.SLEPc.BV-class.html#createMat 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.resize slepc4py.SLEPc.BV-class.html#resize 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.getMat slepc4py.SLEPc.DS-class.html#getMat 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.NHEPTS slepc4py.SLEPc.DS.Type-class.html#NHEPTS 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.setStoppingTest slepc4py.SLEPc.EPS-class.html#setStoppingTest slepc4py.SLEPc.EPS.setMonitor slepc4py.SLEPc.EPS-class.html#setMonitor 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.setTwoSided slepc4py.SLEPc.EPS-class.html#setTwoSided 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.getLeftEigenvector slepc4py.SLEPc.EPS-class.html#getLeftEigenvector 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.getMonitor slepc4py.SLEPc.EPS-class.html#getMonitor 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.getTwoSided slepc4py.SLEPc.EPS-class.html#getTwoSided 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.EVSL slepc4py.SLEPc.EPS.Type-class.html#EVSL slepc4py.SLEPc.EPS.Type.SUBSPACE slepc4py.SLEPc.EPS.Type-class.html#SUBSPACE slepc4py.SLEPc.EPS.Type.ELPA slepc4py.SLEPc.EPS.Type-class.html#ELPA 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.SCALAPACK slepc4py.SLEPc.EPS.Type-class.html#SCALAPACK 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.ELEMENTAL slepc4py.SLEPc.EPS.Type-class.html#ELEMENTAL slepc4py.SLEPc.EPS.Type.LYAPII slepc4py.SLEPc.EPS.Type-class.html#LYAPII 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.setCombineChildren slepc4py.SLEPc.FN-class.html#setCombineChildren 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.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.setTwoSided slepc4py.SLEPc.NEP-class.html#setTwoSided slepc4py.SLEPc.NEP.setUp slepc4py.SLEPc.NEP-class.html#setUp slepc4py.SLEPc.NEP.getOptionsPrefix slepc4py.SLEPc.NEP-class.html#getOptionsPrefix slepc4py.SLEPc.NEP.errorView slepc4py.SLEPc.NEP-class.html#errorView 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.getLeftEigenvector slepc4py.SLEPc.NEP-class.html#getLeftEigenvector 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.getTwoSided slepc4py.SLEPc.NEP-class.html#getTwoSided 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.setSTOARDimensions slepc4py.SLEPc.PEP-class.html#setSTOARDimensions slepc4py.SLEPc.PEP.computeError slepc4py.SLEPc.PEP-class.html#computeError slepc4py.SLEPc.PEP.errorView slepc4py.SLEPc.PEP-class.html#errorView slepc4py.SLEPc.PEP.getLinearLinearization slepc4py.SLEPc.PEP-class.html#getLinearLinearization 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.getInterval slepc4py.SLEPc.PEP-class.html#getInterval slepc4py.SLEPc.PEP.setOptionsPrefix slepc4py.SLEPc.PEP-class.html#setOptionsPrefix slepc4py.SLEPc.PEP.getSTOARDetectZeros slepc4py.SLEPc.PEP-class.html#getSTOARDetectZeros slepc4py.SLEPc.PEP.getDimensions slepc4py.SLEPc.PEP-class.html#getDimensions slepc4py.SLEPc.PEP.setFromOptions slepc4py.SLEPc.PEP-class.html#setFromOptions slepc4py.SLEPc.PEP.setSTOARDetectZeros slepc4py.SLEPc.PEP-class.html#setSTOARDetectZeros 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.setLinearExplicitMatrix slepc4py.SLEPc.PEP-class.html#setLinearExplicitMatrix slepc4py.SLEPc.PEP.ConvergedReason slepc4py.SLEPc.PEP.ConvergedReason-class.html slepc4py.SLEPc.PEP.Which slepc4py.SLEPc.PEP.Which-class.html slepc4py.SLEPc.PEP.getTOARLocking slepc4py.SLEPc.PEP-class.html#getTOARLocking slepc4py.SLEPc.PEP.Type slepc4py.SLEPc.PEP.Type-class.html slepc4py.SLEPc.PEP.getLinearExplicitMatrix slepc4py.SLEPc.PEP-class.html#getLinearExplicitMatrix slepc4py.SLEPc.PEP.setLinearLinearization slepc4py.SLEPc.PEP-class.html#setLinearLinearization slepc4py.SLEPc.PEP.setSTOARLocking slepc4py.SLEPc.PEP-class.html#setSTOARLocking slepc4py.SLEPc.PEP.getLinearEPS slepc4py.SLEPc.PEP-class.html#getLinearEPS slepc4py.SLEPc.PEP.getJDRestart slepc4py.SLEPc.PEP-class.html#getJDRestart 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.getJDFix slepc4py.SLEPc.PEP-class.html#getJDFix slepc4py.SLEPc.PEP.setTOARLocking slepc4py.SLEPc.PEP-class.html#setTOARLocking slepc4py.SLEPc.PEP.RefineScheme slepc4py.SLEPc.PEP.RefineScheme-class.html slepc4py.SLEPc.PEP.Conv slepc4py.SLEPc.PEP.Conv-class.html 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.getSTOARDimensions slepc4py.SLEPc.PEP-class.html#getSTOARDimensions slepc4py.SLEPc.PEP.setTOARRestart slepc4py.SLEPc.PEP-class.html#setTOARRestart 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.getTarget slepc4py.SLEPc.PEP-class.html#getTarget slepc4py.SLEPc.PEP.getTOARRestart slepc4py.SLEPc.PEP-class.html#getTOARRestart slepc4py.SLEPc.PEP.getSTOARLocking slepc4py.SLEPc.PEP-class.html#getSTOARLocking 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.setInterval slepc4py.SLEPc.PEP-class.html#setInterval slepc4py.SLEPc.PEP.setTarget slepc4py.SLEPc.PEP-class.html#setTarget slepc4py.SLEPc.PEP.getType slepc4py.SLEPc.PEP-class.html#getType slepc4py.SLEPc.PEP.setJDFix slepc4py.SLEPc.PEP-class.html#setJDFix slepc4py.SLEPc.PEP.setJDRestart slepc4py.SLEPc.PEP-class.html#setJDRestart slepc4py.SLEPc.PEP.getTrackAll slepc4py.SLEPc.PEP-class.html#getTrackAll slepc4py.SLEPc.PEP.reset slepc4py.SLEPc.PEP-class.html#reset slepc4py.SLEPc.PEP.getBasis slepc4py.SLEPc.PEP-class.html#getBasis slepc4py.SLEPc.PEP.ErrorType slepc4py.SLEPc.PEP.ErrorType-class.html slepc4py.SLEPc.PEP.setConvergenceTest slepc4py.SLEPc.PEP-class.html#setConvergenceTest 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.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.ALL slepc4py.SLEPc.PEP.Which-class.html#ALL 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.setShift slepc4py.SLEPc.ST-class.html#setShift slepc4py.SLEPc.ST.Type slepc4py.SLEPc.ST.Type-class.html slepc4py.SLEPc.ST.setType slepc4py.SLEPc.ST-class.html#setType 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.destroy slepc4py.SLEPc.ST-class.html#destroy slepc4py.SLEPc.ST.getMatrices slepc4py.SLEPc.ST-class.html#getMatrices slepc4py.SLEPc.ST.setMatrices slepc4py.SLEPc.ST-class.html#setMatrices slepc4py.SLEPc.ST.getKSP slepc4py.SLEPc.ST-class.html#getKSP slepc4py.SLEPc.ST.setOptionsPrefix slepc4py.SLEPc.ST-class.html#setOptionsPrefix slepc4py.SLEPc.ST.getPreconditionerMat slepc4py.SLEPc.ST-class.html#getPreconditionerMat 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.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.setMatMode slepc4py.SLEPc.ST-class.html#setMatMode slepc4py.SLEPc.ST.shift slepc4py.SLEPc.ST-class.html#shift slepc4py.SLEPc.ST.getShift slepc4py.SLEPc.ST-class.html#getShift slepc4py.SLEPc.ST.setPreconditionerMat slepc4py.SLEPc.ST-class.html#setPreconditionerMat 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.setInitialSpaces slepc4py.SLEPc.SVD-class.html#setInitialSpaces 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.appendOptionsPrefix slepc4py.SLEPc.SVD-class.html#appendOptionsPrefix slepc4py.SLEPc.SVD.setOperators slepc4py.SLEPc.SVD-class.html#setOperators slepc4py.SLEPc.SVD.cancelMonitor slepc4py.SLEPc.SVD-class.html#cancelMonitor slepc4py.SLEPc.SVD.getConvergedReason slepc4py.SLEPc.SVD-class.html#getConvergedReason slepc4py.SLEPc.SVD.setOptionsPrefix slepc4py.SLEPc.SVD-class.html#setOptionsPrefix slepc4py.SLEPc.SVD.ProblemType slepc4py.SLEPc.SVD.ProblemType-class.html slepc4py.SLEPc.SVD.setFromOptions slepc4py.SLEPc.SVD-class.html#setFromOptions slepc4py.SLEPc.SVD.isGeneralized slepc4py.SLEPc.SVD-class.html#isGeneralized 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.errorView slepc4py.SLEPc.SVD-class.html#errorView 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.getOperators slepc4py.SLEPc.SVD-class.html#getOperators 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.getProblemType slepc4py.SLEPc.SVD-class.html#getProblemType 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.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.setProblemType slepc4py.SLEPc.SVD-class.html#setProblemType slepc4py.SLEPc.SVD.getTolerances slepc4py.SLEPc.SVD-class.html#getTolerances slepc4py.SLEPc.SVD.getDimensions slepc4py.SLEPc.SVD-class.html#getDimensions 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.CONVERGED_USER slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_USER slepc4py.SLEPc.SVD.ConvergedReason.CONVERGED_TOL slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_TOL slepc4py.SLEPc.SVD.ConvergedReason.ITERATING slepc4py.SLEPc.SVD.ConvergedReason-class.html#ITERATING 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.__qualname__ slepc4py.SLEPc.SVD.ConvergedReason-class.html#__qualname__ slepc4py.SLEPc.SVD.ConvergedReason.CONVERGED_MAXIT slepc4py.SLEPc.SVD.ConvergedReason-class.html#CONVERGED_MAXIT 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.ProblemType slepc4py.SLEPc.SVD.ProblemType-class.html slepc4py.SLEPc.SVD.ProblemType.STANDARD slepc4py.SLEPc.SVD.ProblemType-class.html#STANDARD slepc4py.SLEPc.SVD.ProblemType.__qualname__ slepc4py.SLEPc.SVD.ProblemType-class.html#__qualname__ slepc4py.SLEPc.SVD.ProblemType.GENERALIZED slepc4py.SLEPc.SVD.ProblemType-class.html#GENERALIZED slepc4py.SLEPc.SVD.Type slepc4py.SLEPc.SVD.Type-class.html slepc4py.SLEPc.SVD.Type.CROSS slepc4py.SLEPc.SVD.Type-class.html#CROSS slepc4py.SLEPc.SVD.Type.SCALAPACK slepc4py.SLEPc.SVD.Type-class.html#SCALAPACK slepc4py.SLEPc.SVD.Type.LAPACK slepc4py.SLEPc.SVD.Type-class.html#LAPACK 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.Type.ELEMENTAL slepc4py.SLEPc.SVD.Type-class.html#ELEMENTAL slepc4py.SLEPc.SVD.Type.RANDOMIZED slepc4py.SLEPc.SVD.Type-class.html#RANDOMIZED slepc4py.SLEPc.SVD.Type.PRIMME slepc4py.SLEPc.SVD.Type-class.html#PRIMME slepc4py.SLEPc.SVD.Type.CYCLIC slepc4py.SLEPc.SVD.Type-class.html#CYCLIC slepc4py.SLEPc.SVD.Type.__qualname__ slepc4py.SLEPc.SVD.Type-class.html#__qualname__ 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.15.1/docs/apiref/class-tree.html0000644000175100017510000003456014054125744021310 0ustar jromanjroman00000000000000 Class Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Class Hierarchy

slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type.png0000644000175100017510000000147414054125745024137 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.PEP.ConvergedReason-class.html0000644000175100017510000002475614054125747026540 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/redirect.html0000644000175100017510000000543014054125750021036 0ustar jromanjroman00000000000000Epydoc 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.15.1/docs/apiref/class_hierarchy_for_errortype.png0000644000175100017510000000220314054125746025201 0ustar jromanjroman00000000000000PNG  IHDRY$mbKGD8IDAThc?(``````h "00H?h XjX0d-z'/_t MKXX ޽xi)hAѰ@Ѱ@,Ah`)rΈrL V髩m,```8h4b^OZA Բ@fX S _}c``$jw?f40͛.|%NAݽ_Ȋ_y)߹-,.ܼ Ѹa 1Gǜ~100zYww!;_~2h.սpaWa:2;˗.>uc:T B]]7?(UN^|ĉ[&OuxǼy = zE;~R)z̰ 㱴DFp077nNN8mŎuTTl݊X:{aٶm>>p"YY3۶100߸qJEJgAIŝ͛eeJi(*_}_e쓗/1c&& gu{ꩩ9yrFM \JUNTT gg^^R=EfX3-.,|SMEEOHa* Bܢ**l e=QQa``𡔘i 1˗oސr2_}(fafwwxջwkL&"[Cÿ5͚A>~|ڵɓ<=&L{sr&-[FLqqh"ZS*+LXY*xAElpӦ ''doo׌/߾ExxT%'300TTLh/?{B<:5SyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.SVD.ErrorType-class.html0000644000175100017510000002113614054125747025404 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_which_3.png0000644000175100017510000000153414054125747024501 0ustar jromanjroman00000000000000PNG  IHDRE$PG`bKGDIDATX]HZqϵQYF)]1J aoS(CEL>zDT,X`=cdU2EEC V.h9Or~zϽq c>I?%At:js%4UB/ ɠd\( KK^OTAT;oi&nW(p`bv*t\HdX]D$ڱkwvD$CK%n:]Zn*73 HIfefbAڜ  qO[ee K\öa6Kbz֜Z7|t#*"HP zP>AY$(J1VުFF~7>/j{{ڨ%gSԃydj bfz#dޗJ!~//TTLw$"H *bܔVW ^cP>d+ 9@$ߝΊ꺒ǫH"˫^joe@F#Djs:k%1Eg  ҂^Qѧ Ha7$C$!+L6}4A.ﶄ%'A0!IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type_6.png0000644000175100017510000000147414054125746024365 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.Extraction-class.html0000644000175100017510000002530114054125746025561 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/toc-slepc4py.lib-module.html0000644000175100017510000000245614054125744023623 0ustar jromanjroman00000000000000 lib

Module lib


Functions

ImportSLEPc
getPathArchSLEPc

Variables

__package__

[hide private] slepc4py-3.15.1/docs/apiref/toc-slepc4py-module.html0000644000175100017510000000256114054125744023053 0ustar jromanjroman00000000000000 slepc4py

Module slepc4py


Functions

get_include
init

Variables

__credits__
__package__

[hide private] slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type_5.png0000644000175100017510000000147414054125746024364 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.ConvergedReason-class.html0000644000175100017510000002335414054125746026526 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.BV.RefineType-class.html0000644000175100017510000002175014054125745025376 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.MFN.ConvergedReason-class.html0000644000175100017510000002270514054125746026523 0ustar jromanjroman00000000000000 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 = 2
  CONVERGED_TOL = 1
  DIVERGED_BREAKDOWN = -2
  DIVERGED_ITS = -1
  ITERATING = 0
  __qualname__ = 'MFNConvergedReason'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/class_hierarchy_for_convergedr_3.png0000644000175100017510000000364114054125746025535 0ustar jromanjroman00000000000000PNG  IHDR$;/.bKGDVIDATh{PSWO(@vve]`x `KI5A6D`4V(ĩҖuGF^ Bf&&~q/oιwN.JT @x)LPaZ~C}}d>Ǔ=</NãE) A <{  >=}mq ^pW[+gpx @yz>ON?0`^2950?:6zWW"ejlL}?sΎ8&ASzժ\tcpn2 ocSHNN.]j{ _}䥦ݻj7CBEE9ӳߋ_i::}cPȜ\nw 0P8bH`N.;wS(ljrcKjT*9uunYx{7n{WX%FFЩf[ -YP)$իlX,JLj|/׮lݺ%/ofvǮwIPP(yƍ,gGGwi_Z귖gen)"0!޸AU/svrI$6B-68ŋ4Z0lcek_ZԫUV__HE:R|} 22TE56֜L6' ~mn>@4pOde젻ڸHW4-039iýu΁eo -}ۛ~̄X> 1bFDVJʟ7mMJ"tzȧѬL6{yhCVZ>޽mۮbݥZkp{o̳`zz|V;}J$&P(kҌq3{䖕974\`Mp8Ʈ+(v{tz=%Vjib @}}}LL $lOחbORY%%׮5tQ>yl|bb9IXg6f>a۷C,(`aA|O hy  ,]߀ڂ ?P4|O 85IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_problemtyp_3.png0000644000175100017510000000256514054125750025573 0ustar jromanjroman00000000000000PNG  IHDRm$ #bKGD*IDATh{LSWL CZɘ+<4ER*m%%Wd L3F\4Zxca13  h8C ]I's$+m X%>#AxZ1J%nNwNX\eQM$4vwAr_#1>5>R\cGD2:>n!ZzA紂E3R(X&Iٱܟ/^$Tx==0''6R>zs']fk:8~f*Cjg/FC{oK^q)HϝCB!-<<0;k>K1Ø;we/*ZZ>ݷσ+p76o+*QuX.O;y <@ [o,2Rh>N ~ffXɔɶq8n֡TQ]]aVO,it_+*:oݒ֢5MM]Uuu*FMj` P5B!H0RY}R ^<`pP˻T355Ե+},!98%$SSWrqu(JL͛OW;;ͧmnrrt:͖K$*KBNNvvt<ϧRgohhk;a38bq}[2u---L梩Y,=}he0Pdjt:hÆzn8XĄgD~^`O.h/("⇞M~>?OY,jcHݞJjY,hi4G8l6 ~e>֋F묬DФ^?JGF&|Ƞ/ow=@p̙cc c>{vHc^QQߔhcⲆhh?UUeB\@Rt4!u EmMLLO_D3233¾NI13$%%A6YhkO]cbљcԥ?P(篚=plRA:RB%s6vw'HT*Qp_͍h5MMi" ʭZ JLb^P\j ;lyz7QnծGCH @H \gT F?(VCOA<rHoMx3|-VIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_balance.png0000644000175100017510000000171214054125745024536 0ustar jromanjroman00000000000000PNG  IHDRP$*-bKGDIDAThc?HLzQwadd(w S#;!@F\RON:8~ғ/xROoUw7]D[VZzn4G=<9f40#a{>R|cF \He@f _޽5}O:;,,41@TPP\XABD/?!Bfff燰ۧen.1yr4Xe k!`cx:{6DY…>ׂ_z{WO|Νk崷=Y6aOݻ睓3i22\Nf0tTTVww322 F U&'Gyzzde]싽{1 LNGV߽ll`:%bD~w;ǐPWa[`zx,E# aF=<C`MmIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_lanczosreo.png0000644000175100017510000000416314054125746025334 0ustar jromanjroman00000000000000PNG  IHDR$gbKGD(IDATxyTSWoBBdQQd V3L1Q(; -KalQD ZbPGR" [ӂ0e4@#R3Tv$<{NNA3}{pkp^xU<*I@ ~+;p^dBVhlo RUW7#lνp^aa{wV%xU<*bM`Z%7e Xhھ}yiEq -5`Rmd`x>6YjGxEuum~V^17&::// O֬h!!T -vBryBYAFƠyK"l/-5qs45}.uXI`D?{zꘙNIL姒߲ZX}dt05I}V+%O37چ](*+jޝSTi DR'WjjtPH]s'Ǜo ,VYM:{{ ++T]3+W1/-/vs>\110/Ek>6UTlruZXpy<(BY`?J=÷1wC##FIIYZڅ#GN\4($DIIO?KMݐj\--?qw\kT?#C \O>>yrl|v"L='.]vpæYYUӫꢄBLq\VV|Hȣ7=>~'/_H02oߎrGG8zӃD=so6讏A|wo}SE gjkgjk++~8̣,fb*҂O[D7KJ6o6~Ǝxua~eLgCC}h""cc9:F%&>nnnhmxh1M̳AA~ \Ju+8:ZypPpCrOGQEF3ٰ #yD 9qq"3fjk_ xUQDd?JLurRY61Օ~떿1o?Zo.o݊Vps{E_U<*l J @?%~!sU٪dxU<*@IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_errortype_4.png0000644000175100017510000000220314054125747025425 0ustar jromanjroman00000000000000PNG  IHDRY$mbKGD8IDAThc?(``````h "00H?h XjX0d-z'/_t MKXX ޽xi)hAѰ@Ѱ@,Ah`)rΈrL V髩m,```8h4b^OZA Բ@fX S _}c``$jw?f40͛.|%NAݽ_Ȋ_y)߹-,.ܼ Ѹa 1Gǜ~100zYww!;_~2h.սpaWa:2;˗.>uc:T B]]7?(UN^|ĉ[&OuxǼy = zE;~R)z̰ 㱴DFp077nNN8mŎuTTl݊X:{aٶm>>p"YY3۶100߸qJEJgAIŝ͛eeJi(*_}_e쓗/1c&& gu{ꩩ9yrFM \JUNTT gg^^R=EfX3-.,|SMEEOHa* Bܢ**l e=QQa``𡔘i 1˗oސr2_}(fafwwxջwkL&"[Cÿ5͚A>~|ڵɓ<=&L{sr&-[FLqqh"ZS*+LXY*xAElpӦ ''doo׌/߾ExxT%'300TTLh/?{B<:5SdǏ Ȱ+ 3/Zb{>ӧy$iHJ"jL\" 300Ht瓤]=/<133??~>P.ssy˗C7߯indVԴ)K'?|_}aɱ ~ /+3ѹeK{~~^gO~^V`۶Ԥo?~ GH@fZ 300p_^FVBCQZǏBBLLLNssdgY"pg.pɓ剉ii ,,?Ϸ~=܇G?u劼GV֙kG~NvϞz߁11-ZY Q?.jiyo_[F/_߿˷o?}Z7m߿>d֗޽(2e\ĤQ-77\299#+޽sjLIilT]ى9 >:ۭa V `~` ?`_1v0H/ 8+0ufAIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_conv.png0000644000175100017510000000146214054125746024121 0ustar jromanjroman00000000000000PNG  IHDR@$nbKGDIDATXc?PLJ s$|;bd-KO^DK=Utqi thC> z`xm\M7IT={,LL|04̘aob2TT|Mr]򣢐E3256B|Iupuw/{""llgb``,,,h#GO_>{ZCQYSVBio婥KOر!+w?gNoqqݴi>~\+w;feEw߿+vX^(-ҔdVTVx8?OO|~x5;v$33H#')"r=d3׮EG۷U+)QQffa~|`?' ~!,ٺ?\,>}DZL jFEzzٳgӁƚ*d<>w.Kon9sҲe ,y=zn͔)1޸qSI乞L]߿a [ZcgRY)%&f喑am]VWoބ|F$kЌz`z`z` qt~`)yUIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.MFN.Type-class.html0000644000175100017510000002144614054125746024361 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_st.png0000644000175100017510000000557314054125747023612 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD 0IDATx{LTg-rU'QB8,FZVT]1V ƎRlS)Iݺ?(5Ui\bm EMʀ҆ ugu"$Ι3߼=s8$!LvB<* P Pwܺu .]F-B8jHNNI;dmLliiiÙv\T޶n:eM+TGB+TGB+TGB+TGB;L>>>6[pp0֬Y1n`0SWWɄl̜9ᅬׇݻw#11SL PPP hnnVjty-7n@HHGliiFyl\UU/p, ӝc5kUUU`sL|| twwԑ۷cʱ& 'Oƕ+W'*}Ftuu).]7oX<ȑ#Ä S^1=zfBhh(m vyj>lG>ŏz555={6ILKKc[[wyI&,--/M&?&$$ \p!zӧOSl6ۜvEN6$YVV9s'ձ===lnnڵk`o^UUu:j*߿nRX<K.1<<\^`SS{2''GИOwuyL644ش1{ldll,;::Ν;GNБn& 2..NR~:O5fC߯쫯g@@I2 a5ӎܸq#MT^pAi/^EEEml700~mfff~~~lkks'n4 qcǎ9?jI g"""W_9}/C~Owu5퐦&?"##0P]]~f|_o`ʕFdd:ݻPSS,!((鐛֭['NK,3<5#288 6fJJ ݻn™t|W PXXk*)**ʡ=Wu}Gz]|9F#kkk˼<{W^y---z*/^m۶)!IfloogQQ|t:644ի\d l8Yj2,,󬬬dSSO#Owup=Aii)¬,KM?wp3##X,LNNfPPVYYx>}YzӧOF x8 Hr֭ T.[9kcWjs5n, 򘐐077 guL&ڵ 8-Chg`0W_v)㎬iHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhi=M{BuuGu6m+t3PYI;۸e(Ç]Ƙ"3#, Vv YՑ Ց Ց5(f|PRsىaaK/!g&PYײ]Jy9tOAB; Y8o҂텅ow7}k-Co#ו0UV&˃Q87x%.4,MJ?o!lTM`PM&Nf%O/ӣ[gzOB; G p5L_3327o5IhGaܹ`> KpDZCeK$#Ce%H"gM`@$#488 99h4m,Z{sЎPP` 6^wֆc׾}H_krvكJJ{~[[RS.m\Ў gVٺh+OOBu$Bu$Bu$Bu$Bu$Bu$Bu:s2r#g?vCZ% r//:<#ߘU!H4IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.BV.BlockType-class.html0000644000175100017510000002102214054125745025210 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/toc-everything.html0000644000175100017510000002274214054125744022214 0ustar jromanjroman00000000000000 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.ProblemType
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.SLEPc.__warningregistry__
slepc4py.__credits__
slepc4py.__package__
slepc4py.lib.__package__

[hide private] slepc4py-3.15.1/docs/apiref/class_hierarchy_for_which_2.png0000644000175100017510000000153414054125746024477 0ustar jromanjroman00000000000000PNG  IHDRE$PG`bKGDIDATX]HZqϵQYF)]1J aoS(CEL>zDT,X`=cdU2EEC V.h9Or~zϽq c>I?%At:js%4UB/ ɠd\( KK^OTAT;oi&nW(p`bv*t\HdX]D$ڱkwvD$CK%n:]Zn*73 HIfefbAڜ  qO[ee K\öa6Kbz֜Z7|t#*"HP zP>AY$(J1VުFF~7>/j{{ڨ%gSԃydj bfz#dޗJ!~//TTLw$"H *bܔVW ^cP>d+ 9@$ߝΊ꺒ǫH"˫^joe@F#Djs:k%1Eg  ҂^Qѧ Ha7$C$!+L6}4A.ﶄ%'A0!IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_rg.png0000644000175100017510000000572014054125747023566 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATx{LTgVn#7)]CmZmbSQCc4 -K$6v,ل6JX1MmfP1a# @?,g88yIoΜy=s8sƇ$!<_Z:Z:_sy!t:$''6Nyy9"˸XRSS#J#9 m͚5NeN+TGB+TGB+TGB+TGB;J>>>6KHHVZ_~:(//qL&ر111h4Ν;v}}}ؾ};0e,\ZVFW{B?CztmmmFGGnܸ3gb --: ZJ]]] 6$$$ ++ uuu8z(^{?`p^̟?uuu(**… 2`pp())yX:O;ZZZ<<\`cl+:ڴ={QQQnm0sjڴL&FGGsϞ= {n?55y>i9qL , rss0m4dff~3<Pu1$&&"00gVBhh(mSǎ;`Q[oaӦMʺ& 'OF}}WSKi{gq<<3TTT`ɒ%5k-X~=mSRRp/IKKî]WV)**a{~z )vHl2qqq#I|Ƌ/rܲe۷o$f3xc~~>z=xE.Y7ovZL\fZp~6ٳgnfGG쥧3>>_~%F#=E1;;$u0>>K.W_}EȪ*&$$W^e68컫.12::ZYYYʟ~n۶ azz:{{{iX̠ e[eee?xqwOg Μ9\~=oݺguUIh4i+gqvsZ\=¼<&&&200gfnn.F4Lfbb"'O̹s粠f٦JRVs6]Hu9ЎG-77iii"u v, >ގR:t[___/WFlʔ)D-7Rm?>6n܈.]BJJ 6o Nr>Xn|sAx7*++mS^Bu$Bu$Bu$Bu$Bu\B<,mHn:l۶>8,Chgk׮v) Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց Ց ՙ0*ӞTSS3&DKNNoyӄ,/WQQ\}"P ?=SxgoRMc#v$5/2(@VVids[ GNw9;u<1'kV,ۆ=9Һz~t>ӧPY3nvunLXi|||?D́O7Kiݤ AwAҥŒ`_8TX)Z7ff@Ʉ½{r%ܝ\iocbl~~G?E6Z7~jijP.UU)X, d{X"QFM-_|׃諭+`P6u*O&QiZQ#CB6))ؽoǿaHzHشi1קKù>Ç;IffzȬ0L HIfgcyFF7h @gHQC{}EŘ6ȑVVVVVVV]ɓHiL#//ŝ#:Z:Z~Ӆ[IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.PEP.ProblemType-class.html0000644000175100017510000002174414054125747025710 0ustar jromanjroman00000000000000 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 = 4
  HERMITIAN = 2
  __qualname__ = 'PEPProblemType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.LanczosReorthogType-class.html0000644000175100017510000002406214054125746027431 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_bv.png0000644000175100017510000000564614054125745023572 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD [IDATx{LTW/Z E" Ԣ&*bMmZ N%Ebm4KK"ڦVcn@dE%!0-3ry0:^$7;w9߹.pq#I"\]KB+TGB+T17n]QVñl2PUUEHlՙv\Ti&eM+TGB+TGB+TGB+TGB;Innnf?֯_k׮=fUUUinnNݻ`x{{#::{k;#x̝;(..htvv*5{gg_\+W ((ȩmvuu p]]z{{q-={cccζyׯW>cbccF=zׯ_ǧ~?ZvJ5cҥhllDII .\={iii0LllZswAp &$$;::8[޼y844d{ߟ fΝ;Lj)խjrJF:|`4QTT#''fu޽ mΝxWcu:|||4Ϟ=[飳O>oŊz*ɍDFaa!f2jooohZeQQQƎ;/ͧlX~ϴ -bQQIfKK ,Y·~7<<9s氬,//;u:?Cű---LJJVU{Ij4zΝ;@$+**xbfΝ;ƍh޸YF7_x~Gqb`__ϟ?ϐT~`tt4٣k|Lͧ}uZh[ZZXhI2::c~-5UGRt:wl2'N(Ƕ$ׯ3<Q]lhGGG}/^IjlvmȌ ={Vi'''T9 =k{7˾>zxxn?'Ntg:GZ1<<㱰%44gΜXYYW^}q/{騮GnM;] 뭞?:: ^x饗A)k:hnnƾ} ˃/|}}mӦM8v|r̟?Y1%& [nEkk4p,lou`dd%%%ظqr"""ڳ7[״Xxgڔvtt,,,$I{ܰax%&''sǎܹCCRzzzrddEEEh4liiK|rn߾f=̬pppf`]]{{{6{f)''111ΣG2))v"{eCCCU7߰Ǐgll,׭[gVKzz8}V}7겜z˃rFFF2((yyyʗQ3$$0Ƹl2*mUTT022ɓ'I޽jOϏ[nezl^m$o[le[{m{q466Bˋ .dAA äV:vb\\}||xb۷zެFEE1((o۴75דC(Lm~Hdް}ڙ`0娬tu9/]\Ms_wF-N稶,] {[JOHKKrnؼyp\1/%TGB+TGB+TGB+TGB+TuZG~!Òi꒗96oތ|[bHV憪*deeGִBu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu$Bu~saztww?v}OcmdeeY"Q%%B.WUa~zKTXWU=g 4N}= 8 IIXm-V.Y@W<#Hhhxq-k֠iL&e߱ZlpEy3vtz=tz=GFp5bڵRSի|6`Z ӠwKs}|p`^׮XӧbŪ 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.
 
setCombineChildren(self, comb, FN f1, FN f2)
Sets the two child functions that constitute this combined function, and the way they must be combined.
 
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, viewFromOptions

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

setCombineChildren(self, comb, FN f1, FN f2)

 

Sets the two child functions that constitute this combined function, and the way they must be combined.

Parameters

comb: FN.CombineType enumerate
How to combine the functions (addition, multiplication, division, composition).
f1: FN
First function.
f2: FN
Second function.

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.15.1/docs/apiref/class_hierarchy_for_refine.png0000644000175100017510000000150714054125746024424 0ustar jromanjroman00000000000000PNG  IHDRG$'bKGDIDATh_HSQ?/;.sAcɅڃT LE%F2_*L{P)[P4A! ,C&*r?zԝSr|qlGo~WprH9"|e67pʕ# &XG`Zޡ}ArrpEh ')G#@91:Zލ8|>NN ς"N?EtuQsy<<|/_DSMZնUzj*Nӑm0pM&&pͅ;A@Ljk"vKbB 6b {yJ[hodq3d&gaiMݴ\t8O\=5:JۧObpWݴ74bfjrΔ5КLd0q?&ܭgQrZJJ N ,EC{;eV+ozzc&gfKILQ~fz:1dB599OMi)uu ~yfeFi4۶򞪤lwaEەic\XxYXD:($k|[;8]^Ϲ*?u4_k֖…CTn6q: vR)G#@ r}|pRfe-r eȿCR)G_icұIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.Refine-class.html0000644000175100017510000002164114054125746024647 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/toc.html0000644000175100017510000000312114054125744020020 0ustar jromanjroman00000000000000 Table of Contents

Table of Contents


Everything

Modules

slepc4py
slepc4py.SLEPc
slepc4py.lib

[hide private] slepc4py-3.15.1/docs/apiref/class_hierarchy_for_refinesche.png0000644000175100017510000000266514054125746025275 0ustar jromanjroman00000000000000PNG  IHDRw$#bKGDjIDATxkLWASq c] N"&\p_ø8N Cb'W Vŀ pe8d&^YaPKΗs?y}9oVߏ9֫@d0BX2r0Vx\DΜ1f\O7733G$!!Q˲0"JTepdL&z{peȽT{{Ihx/0;Ӄؒþ>KT*ǫEjQNv/ÎAѣ4WU`;a)fv.[[*+ G_XSRݱزl?q"r;;vv8;: 445>Nz= v66[gvN_?ϮŅmmVٛl7sG[Y1fhRCߏ?!.==#"w|}geJEeM ˱bjZ[ jO^g`>>DmDGW׀y|e˰"m>JT*:c?w.;8RUӢE̞ͦ\tbvʭ661c }v<ȵ7jxuáC:{֨~Yu5狊JH`s^;:(MO秆Gp]a*kj\a!57p@\]m-?RƖ|ą idǓñӧR^XBCyz"d/Zqq8ANJ Srf:;ϙ:Wa#jzsYVSr$ʀʪ(:~mk0ɉΔ1kAHƏR-Ĕć#J\HdR)/YbrbUN#}}$de%%>-o7o8[kk'`5jԀzc=%+jWWRZP@=srpQ*qQ*up@"X/%O3nX.eުU';8Pgttuq$ͷ]4z=+6nUmtC_ ** c[[kE>5~T2:cTIPbB4~y&[ZjVc2@’%[Z!!+"Ijc# MMĥjV\Ko Fܩr9624YQQx\ixd24ܺIhp &Iݝk1&,XQQLS(LRsk-!~~BoOCBB(//I|ANȈ \#+`Dsh0F~'41e"baǝ;C+#.;Wp\#+`Ds?IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_convergedr_5.png0000644000175100017510000000364114054125747025540 0ustar jromanjroman00000000000000PNG  IHDR$;/.bKGDVIDATh{PSWO(@vve]`x `KI5A6D`4V(ĩҖuGF^ Bf&&~q/oιwN.JT @x)LPaZ~C}}d>Ǔ=</NãE) A <{  >=}mq ^pW[+gpx @yz>ON?0`^2950?:6zWW"ejlL}?sΎ8&ASzժ\tcpn2 ocSHNN.]j{ _}䥦ݻj7CBEE9ӳߋ_i::}cPȜ\nw 0P8bH`N.;wS(ljrcKjT*9uunYx{7n{WX%FFЩf[ -YP)$իlX,JLj|/׮lݺ%/ofvǮwIPP(yƍ,gGGwi_Z귖gen)"0!޸AU/svrI$6B-68ŋ4Z0lcek_ZԫUV__HE:R|} 22TE56֜L6' ~mn>@4pOde젻ڸHW4-039iýu΁eo -}ۛ~̄X> 1bFDVJʟ7mMJ"tzȧѬL6{yhCVZ>޽mۮbݥZkp{o̳`zz|V;}J$&P(kҌq3{䖕974\`Mp8Ʈ+(v{tz=%Vjib @}}}LL $lOחbORY%%׮5tQ>yl|bb9IXg6f>a۷C,(`aA|O hy  ,]߀ڂ ?P4|O 85IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type_8.png0000644000175100017510000000147414054125747024370 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.Type-class.html0000644000175100017510000002533414054125746024363 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.EPS-class.html0000644000175100017510000051563714054125745023461 0ustar jromanjroman00000000000000 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.
 
getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)
Gets the i-th left eigenvector as computed by solve().
 
getMonitor(self)
Gets the list of monitor functions.
 
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.
 
getTwoSided(self)
Returns the flag indicating whether a two-sided variant of the algorithm is being used 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.
 
setMonitor(self, monitor, args=None, kargs=None)
Appends a monitor function to the list of monitors.
 
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.
 
setStoppingTest(self, stopping, args=None, kargs=None)
Sets a function to decide when to stop the outer iteration of 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.
 
setTwoSided(self, twosided)
Sets the solver to use a two-sided variant so that left eigenvectors are also computed.
 
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, viewFromOptions

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.

getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)

 

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

Parameters

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

Notes

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

Left eigenvectors are available only if the twosided flag was set with setTwoSided().

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.

getTwoSided(self)

 

Returns the flag indicating whether a two-sided variant of the algorithm is being used or not.

Returns

twosided: bool
Whether the two-sided variant is to be used 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.

setTwoSided(self, twosided)

 

Sets the solver to use a two-sided variant so that left eigenvectors are also computed.

Parameters

twosided: bool
Whether the two-sided variant is to be used 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 structure flag is passed to the PETSc.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.15.1/docs/apiref/class_hierarchy_for_which.png0000644000175100017510000000153414054125746024256 0ustar jromanjroman00000000000000PNG  IHDRE$PG`bKGDIDATX]HZqϵQYF)]1J aoS(CEL>zDT,X`=cdU2EEC V.h9Or~zϽq c>I?%At:js%4UB/ ɠd\( KK^OTAT;oi&nW(p`bv*t\HdX]D$ڱkwvD$CK%n:]Zn*73 HIfefbAڜ  qO[ee K\öa6Kbz֜Z7|t#*"HP zP>AY$(J1VުFF~7>/j{{ڨ%gSԃydj bfz#dޗJ!~//TTLw$"H *bܔVW ^cP>d+ 9@$ߝΊ꺒ǫH"˫^joe@F#Djs:k%1Eg  ҂^Qѧ Ha7$C$!+L6}4A.ﶄ%'A0!IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.RefineScheme-class.html0000644000175100017510000002176614054125746026004 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/crarr.png0000644000175100017510000000052414054125744020170 0ustar jromanjroman00000000000000PNG  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.15.1/docs/apiref/slepc4py.SLEPc.PEP.RefineScheme-class.html0000644000175100017510000002177614054125747026010 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/help.html0000644000175100017510000002603514054125744020174 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/identifier-index.html0000644000175100017510000054642514054125744022505 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.SLEPc.SVD.Which-class.html0000644000175100017510000002103214054125750024500 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_which_4.png0000644000175100017510000000153414054125750024474 0ustar jromanjroman00000000000000PNG  IHDRE$PG`bKGDIDATX]HZqϵQYF)]1J aoS(CEL>zDT,X`=cdU2EEC V.h9Or~zϽq c>I?%At:js%4UB/ ɠd\( KK^OTAT;oi&nW(p`bv*t\HdX]D$ڱkwvD$CK%n:]Zn*73 HIfefbAڜ  qO[ee K\öa6Kbz֜Z7|t#*"HP zP>AY$(J1VުFF~7>/j{{ڨ%gSԃydj bfz#dޗJ!~//TTLw$"H *bܔVW ^cP>d+ 9@$ߝΊ꺒ǫH"˫^joe@F#Djs:k%1Eg  ҂^Qѧ Ha7$C$!+L6}4A.ﶄ%'A0!IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.NEP.Which-class.html0000644000175100017510000002526714054125746024511 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/epydoc.js0000644000175100017510000002452514054125744020201 0ustar jromanjroman00000000000000function 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.15.1/docs/apiref/slepc4py.SLEPc.PEP.ErrorType-class.html0000644000175100017510000002172714054125747025402 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_sys.png0000644000175100017510000000152714054125750023767 0ustar jromanjroman00000000000000PNG  IHDR8$SnbKGD IDATXc?PLbC X99 qqK==;_K4A,[M'aawF2Q?Pjr O']d& gk{{e%$߻Tw2 'D7ߑo!" `kd4|Tw ǡV|#kkd`vΔF߹-,.ܼa~ݐNsse%[ϡ+:;ܽ+枙ٽpǏ!⡮dd տ~^V`۶Ԥo?~ɡf::.=xz-b``60`ea9t,òmb}|^nDsá~Xs cbϟrҤ߿3119;ۻǏ{Nd``>2+W=<<\F^Ӈd?p7K˿Abnn[Cÿ5͚wpXuw|J200kl 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'
  NHEPTS = 'nhepts'
  PEP = 'pep'
  SVD = 'svd'
  __qualname__ = 'DSType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type_4.png0000644000175100017510000000147414054125746024363 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_ds.png0000644000175100017510000000575014054125745023565 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATxmLTW?Z-8aKEiIe+4FSfq6i-Ƃu@clZ&"3"R% 0ufryCKnܹy9ŋ d `aqhp8L8ŋ=Q cJ%.\hhZoOĖfQr8 je2php8L81fܺu1#7jDEEA&!&&~!] كL:Gaa!, UU[[[޸q ­mA.?EWW~W\pfN`͚5Z9&..YYYhhh'ގCh4y``IIIhhh@QQ j> ͕uGM׻uL&͛7^w[Ü{@wuy+H6jjj(""b\uk4Zt)Y,"##n {m?--u i9sqqqFff&L&l6#//J/233 99*uI3gDyy9bFFFly\ێ;yfX\ti}]1.V6l@KKܻwF gG9\%DQQ֮]+\5!)v멡bbb(??>z7\B-۷KODDF|}}髯N*..&___RTLW\ŋӖ-['WY,6mÇm9x 9mT[[K]]]qAtYtt Z`egg=p,{.+BΝ#NGGoM-+W?ءsz򠬬"##IPPVVfhhvE!!!H400@f.\HR[I>>>GN"4 \. 6POOzUmDD۶m#L&]r֎Ǯ^jfϧx3gR^^L1: eggS||<ٳi߾}d4mjYfB;wJ9MW9Z]z,yhDc-//SEbQpZO3LDYY=rX/_x{{{?ĦN[z$%%aӦMXl-LW^EJJ lRr$^;K*++~zO.TUUb2php8L8Z&iGcKZZ>K^|[$X~=vxKP!=jn:O5- C˄áe2php8L8Z&- C˄áe2php8L8Z&- C˄áe2php8L8Z&-37uttH~O4R)g3[*n]VQYY2<L8`m܈9s<]S4OЎ@[oq) 'ى}eHaGQׇp˃ Pbڋ/"L$Tߏp//9dN%6Ar9$&⋜|\lZ7۪VLMX(=~Ҿ%y'{*ph,z vtHUXՙw~݃Cfȑ}VA{G{phLގӧ=wDė^6y7C+YUKV+6E9&%9fOTK^dXзcy9nܹo aXwc֌|:q0WpN·ߖs1_h^{ax+5뉒 qKtIw6ݶW5- C˄áe2php8L8|vL˄̟iJ%j_~%x3//&^0phpP"{^ե_IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_matmode.png0000644000175100017510000000230014054125747024573 0ustar jromanjroman00000000000000PNG  IHDRW$~bKGDuIDAThYLTWahlTRikĚdTb!0,ŸQBm4`V Mj&SP$FTXB#ꠔeuboXRWZr&73_9sQ9 rpi{Qʈ"WN%.0]E2<[ _UՊYc鰜<)K*A5, 2ȕEH"W%m?>6Q ֶL]k[sJl>줱yJ[w_)qG.]H$;wUUƍsʟn.$5XI($Jv]tol;᜽r{x+$in..hH+(`xdÁwM??|ml6ІbyyO3$/Sw`c70t6y{󨼜dbl.1/v/]{۵b*)9įeeٳb/J]Q.PD$䪝$$De_ϊeg^_JK9 5WݱqJntF521n)) }*"KJs _ǔ^^䧤PQW'Ib^\K+*fLלi؞o\^&I]{WcۼZv~֭nZS܃Q *A@@6$a?~ujt8O:;jsHѤPVU۵bnLDN񸣃--D|YTP5[`ҥ;| >ص5Z-1'&FN7c0,<\]0&C'ȉ'ilJLѣb^߾}ߏVˉTI\PT*HUg0X,C(reD+#\Qʈ"WF22o]S^e_m۟{&beAFf\ҡ\Qʈ"WF$6IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_orthogtype.png0000644000175100017510000000311614054125745025355 0ustar jromanjroman00000000000000PNG  IHDRe$cQbKGDIDATh{LSWO[>*P`EԦ)сSPR6)B (YEL-Z&"efTRML)]9pс!@|f\vԯ͜*+NNJ߱#);{1ta]tt DeХr!w>/XUT.)8XT$nmepk6je2C}}r#"̶xz>}V|o{kk2Ď-rJKL~A+H*9]St: ckgg8{{ko"JQ(Ξ(x ُU##[̇OYY1hmۦJzVPRWtٳw\o ;7V 44͟z0h~ _Nx.?}Z  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.15.1/docs/apiref/class_hierarchy_for_combinetyp.png0000644000175100017510000000274714054125746025334 0ustar jromanjroman00000000000000PNG  IHDRq$1_BbKGDIDAThmLSWO]avDFE+4"*)QR(raXcВ9lT$v,jjHāb)A"j@.݇_?Oӛ{[h8 |b{hƇ2Q(}=.#%288xLD Vk!Ztqpq4llTD"~{Lg?Nʚxx].&u:n8:J>s]9{[yyHB<+zyx77ܢ z{o߸ѡ)+X p__?__ d˱c߅ΆԞGb$=ݡ)nn/$?? X~eCf\ϗ7dgX6[?08 򚚯VgrJJfTXh*R^_O#FDrr^ }~^z_cOq1PT 6{ )H_e8]*M}cūWiޅk]#" jY[8iߋݽsTsc$J@l %.ϲBS^}Z.fdBq03s>{Ȫ."sJ咒"8mjI&Skb9>*etxژI&́]G\((hPdÙ( V{PŋGmND®k=V<D4 e{sJEeABg)$R&hTmy?sqiyP^W>6upVMP^ΡptSvt?hmw'}}C(:L:B2`;l61wƌz{-9Eiɉy^ =RK˱ΣRU\ ,V\n}=4Fsqv5H콇a@K#NF wMQ1j4O(-xҥU*R !HV $-kdiӵ[֋jν{?Z^'- f,YY63/]ں`x?>|_oGGmH:<6]hY%)>>7+*PtH|X&";v y|))v]&ĤE3?$%u85uz@@XR#9Fn2`xK8(>?&-3%ѲV!wT<>/u:Z\QyE"B'?08x_UUr'i˝;<ƕ+Y&ӓfgaXM' _j!OX>$8g=x؃g=VQjvqbz?`? ߞS3yITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_problemtyp.png0000644000175100017510000000256514054125746025356 0ustar jromanjroman00000000000000PNG  IHDRm$ #bKGD*IDATh{LSWL CZɘ+<4ER*m%%Wd L3F\4Zxca13  h8C ]I's$+m X%>#AxZ1J%nNwNX\eQM$4vwAr_#1>5>R\cGD2:>n!ZzA紂E3R(X&Iٱܟ/^$Tx==0''6R>zs']fk:8~f*Cjg/FC{oK^q)HϝCB!-<<0;k>K1Ø;we/*ZZ>ݷσ+p76o+*QuX.O;y <@ [o,2Rh>N ~ffXɔɶq8n֡TQ]]aVO,it_+*:oݒ֢5MM]Uuu*FMj` P5B!H0RY}R ^<`pP˻T355Ե+},!98%$SSWrqu(JL͛OW;;ͧmnrrt:͖K$*KBNNvvt<ϧRgohhk;a38bq}[2u---L梩Y,=}he0Pdjt:hÆzn8XĄgD~^`O.h/("⇞M~>?OY,jcHݞJjY,hi4G8l6 ~e>֋F묬DФ^?JGF&|Ƞ/ow=@p̙cc c>{vHc^QQߔhcⲆhh?UUeB\@Rt4!u EmMLLO_D3233¾NI13$%%A6YhkO]cbљcԥ?P(篚=plRA:RB%s6vw'HT*Qp_͍h5MMi" ʭZ JLb^P\j ;lyz7QnծGCH @H \gT F?(VCOA<rHoMx3|-VIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_type_7.png0000644000175100017510000000147414054125747024367 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.PEP.Extract-class.html0000644000175100017510000002263414054125747025057 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_refine_2.png0000644000175100017510000000150714054125747024646 0ustar jromanjroman00000000000000PNG  IHDRG$'bKGDIDATh_HSQ?/;.sAcɅڃT LE%F2_*L{P)[P4A! ,C&*r?zԝSr|qlGo~WprH9"|e67pʕ# &XG`Zޡ}ArrpEh ')G#@91:Zލ8|>NN ς"N?EtuQsy<<|/_DSMZնUzj*Nӑm0pM&&pͅ;A@Ljk"vKbB 6b {yJ[hodq3d&gaiMݴ\t8O\=5:JۧObpWݴ74bfjrΔ5КLd0q?&ܭgQrZJJ N ,EC{;eV+ozzc&gfKILQ~fz:1dB599OMi)uu ~yfeFi4۶򞪤lwaEەic\XxYXD:($k|[;8]^Ϲ*?u4_k֖…CTn6q: vR)G#@ r}|pRfe-r eȿCR)G_icұIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_convergedr.png0000644000175100017510000000364114054125746025313 0ustar jromanjroman00000000000000PNG  IHDR$;/.bKGDVIDATh{PSWO(@vve]`x `KI5A6D`4V(ĩҖuGF^ Bf&&~q/oιwN.JT @x)LPaZ~C}}d>Ǔ=</NãE) A <{  >=}mq ^pW[+gpx @yz>ON?0`^2950?:6zWW"ejlL}?sΎ8&ASzժ\tcpn2 ocSHNN.]j{ _}䥦ݻj7CBEE9ӳߋ_i::}cPȜ\nw 0P8bH`N.;wS(ljrcKjT*9uunYx{7n{WX%FFЩf[ -YP)$իlX,JLj|/׮lݺ%/ofvǮwIPP(yƍ,gGGwi_Z귖gen)"0!޸AU/svrI$6B-68ŋ4Z0lcek_ZԫUV__HE:R|} 22TE56֜L6' ~mn>@4pOde젻ڸHW4-039iýu΁eo -}ۛ~̄X> 1bFDVJʟ7mMJ"tzȧѬL6{yhCVZ>޽mۮbݥZkp{o̳`zz|V;}J$&P(kҌq3{䖕974\`Mp8Ʈ+(v{tz=%Vjib @}}}LL $lOחbORY%%׮5tQ>yl|bb9IXg6f>a۷C,(`aA|O hy  ,]߀ڂ ?P4|O 85IENDB`slepc4py-3.15.1/docs/apiref/toc-slepc4py.SLEPc-module.html0000644000175100017510000000634714054125744023766 0ustar jromanjroman00000000000000 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__
__warningregistry__

[hide private] slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.Sys-class.html0000644000175100017510000002345614054125750023575 0ustar jromanjroman00000000000000 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, 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.15.1/docs/apiref/slepc4py.SLEPc.RG-class.html0000644000175100017510000010301714054125747023325 0ustar jromanjroman00000000000000 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, viewFromOptions

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.15.1/docs/apiref/class_hierarchy_for_pep.png0000644000175100017510000000532314054125747023741 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATxL'ʯ `7(c<*EIretVv2,dk?1g1SkZs Dn"[TJ߯|spx>|x~އ7#$!B!fKB+#y.^Zb2~ @93N "؊t˞V(GB+#ʑ Hhvbǎ L?g.l6cժU@zz:>9>>>C!''EMM \.Oh}}}s~@ Zh~,appΟ?Ӊb6رC dff 8}4_O>9,˜júuىZ\t hllDAA&''g죾~^k6Oz{{8ׯ')zw1b4XvttpSRRTb͛rl6رc_ OsP>SZKdff"!!p8ӉJL&<#(--ş7Ξ=l#-- 'O\.TWW#%% ())Ȉ[X~ߵx׵6 |c_t6@aO?_s1ɓ'QUU%Kܗ:""Ec8uV^߿vh=}ե^iE۷ojeGG׬YjdMM y vww'eX__A6440446~!nnذEsl6n]|vt$e8NGGGǝ;w277Wa4oh6^xGba۷u?E&&&jz=0rqŊLLL9vGFFt5mmm:SII 322W_jܰayal~I|T^$6eIhg \ uG(Ǐ{o?˜vccGqqXu+Fm6<f>cKMz Y,J; 66$;wpQfe!6:ګY#Ihg#AxZ1J%nNwNX\eQM$4vwAr_#1>5>R\cGD2:>n!ZzA紂E3R(X&Iٱܟ/^$Tx==0''6R>zs']fk:8~f*Cjg/FC{oK^q)HϝCB!-<<0;k>K1Ø;we/*ZZ>ݷσ+p76o+*QuX.O;y <@ [o,2Rh>N ~ffXɔɶq8n֡TQ]]aVO,it_+*:oݒ֢5MM]Uuu*FMj` P5B!H0RY}R ^<`pP˻T355Ե+},!98%$SSWrqu(JL͛OW;;ͧmnrrt:͖K$*KBNNvvt<ϧRgohhk;a38bq}[2u---L梩Y,=}he0Pdjt:hÆzn8XĄgD~^`O.h/("⇞M~>?OY,jcHݞJjY,hi4G8l6 ~e>֋F묬DФ^?JGF&|Ƞ/ow=@p̙cc c>{vHc^QQߔhcⲆhh?UUeB\@Rt4!u EmMLLO_D3233¾NI13$%%A6YhkO]cbљcԥ?P(篚=plRA:RB%s6vw'HT*Qp_͍h5MMi" ʭZ JLb^P\j ;lyz7QnծGCH @H \gT F?(VCOA<rHoMx3|-VIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.SVD.ProblemType-class.html0000644000175100017510000002117414054125750025707 0ustar jromanjroman00000000000000 slepc4py.SLEPc.SVD.ProblemType
Package slepc4py :: Module SLEPc :: Class SVD :: Class ProblemType
[hide private]
[frames] | no frames]

Class ProblemType


SVD 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]
  GENERALIZED = 2
  STANDARD = 1
  __qualname__ = 'SVDProblemType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.Balance-class.html0000644000175100017510000002247414054125745024775 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_convergedr_4.png0000644000175100017510000000364114054125747025537 0ustar jromanjroman00000000000000PNG  IHDR$;/.bKGDVIDATh{PSWO(@vve]`x `KI5A6D`4V(ĩҖuGF^ Bf&&~q/oιwN.JT @x)LPaZ~C}}d>Ǔ=</NãE) A <{  >=}mq ^pW[+gpx @yz>ON?0`^2950?:6zWW"ejlL}?sΎ8&ASzժ\tcpn2 ocSHNN.]j{ _}䥦ݻj7CBEE9ӳߋ_i::}cPȜ\nw 0P8bH`N.;wS(ljrcKjT*9uunYx{7n{WX%FFЩf[ -YP)$իlX,JLj|/׮lݺ%/ofvǮwIPP(yƍ,gGGwi_Z귖gen)"0!޸AU/svrI$6B-68ŋ4Z0lcek_ZԫUV__HE:R|} 22TE56֜L6' ~mn>@4pOde젻ڸHW4-039iýu΁eo -}ۛ~̄X> 1bFDVJʟ7mMJ"tzȧѬL6{yhCVZ>޽mۮbݥZkp{o̳`zz|V;}J$&P(kҌq3{䖕974\`Mp8Ʈ+(v{tz=%Vjib @}}}LL $lOחbORY%%׮5tQ>yl|bb9IXg6f>a۷C,(`aA|O hy  ,]߀ڂ ?P4|O 85IENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.Type-class.html0000644000175100017510000004462014054125746024367 0ustar jromanjroman00000000000000 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.
  • LYAPII: Lyapunov inverse iteration.
  • LAPACK: Wrappers to dense eigensolvers in Lapack.

Wrappers to external 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'
  ELEMENTAL = 'elemental'
  ELPA = 'elpa'
  EVSL = 'evsl'
  FEAST = 'feast'
  GD = 'gd'
  JD = 'jd'
  KRYLOVSCHUR = 'krylovschur'
  LANCZOS = 'lanczos'
  LAPACK = 'lapack'
  LOBPCG = 'lobpcg'
  LYAPII = 'lyapii'
  POWER = 'power'
  PRIMME = 'primme'
  RQCG = 'rqcg'
  SCALAPACK = 'scalapack'
  SUBSPACE = 'subspace'
  TRLAN = 'trlan'
  __qualname__ = 'EPSType'
Properties [hide private]

Inherited from object: __class__

slepc4py-3.15.1/docs/apiref/module-tree.html0000644000175100017510000001111614054125744021460 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_powershift.png0000644000175100017510000000341614054125746025347 0ustar jromanjroman00000000000000PNG  IHDR}$+cMbKGDIDAThmLSgO!/U[2JBe(|!lC?n, U.E1Q]Eq]uv8YD@ m]Ȱ"7K?{Os{[j)k/)؀V#P N|(6>R^T: eCètY^ޔHz)8USLM 6c;6;@_D.weJJۓ o` M"+L_bwaɄ*iltS\NVWG_45=Kx1Չ,)Z{v8V$?rdRzzښs =}鉉SP^VU7zڵ_+H@xN>3HH3gݗ}} BeKP@L.y -II3fhX,TOOX,tw#^6B"QHYD" 1Drrt|Nd]é|~j~ih )-FCPPj~>X,#o̐J|kaaBxhx Zۡo~)e2ΝCVVp>nx-[6*~9923o`%$D{:2Kފ!/Y"MCCcj~Zo`o`cX $P,0~--=?S\,r*_P@{h=z]YRrHА!"%ݺ1~XilBRݻJ*~+++]XӃ9v n֎D,WP-pac|TAyy?Tfy;qql[h(mF㉜1O??-;/kgFs8u͈\?= z) 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.15.1/docs/apiref/slepc4py.SLEPc-module.html0000644000175100017510000004413514054125744023200 0ustar jromanjroman00000000000000 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>
  COMM_SELF = <petsc4py.PETSc.Comm object>
  COMM_WORLD = <petsc4py.PETSc.Comm object>
  DECIDE = -1
  DEFAULT = -2
  DETERMINE = -1
  __arch__ = 'arch-gnu-c-opt'
  __package__ = 'slepc4py'
  __pyx_capi__ = {'PySlepcBV_Get': <capsule object "BV (PyObject...
  __warningregistry__ = {('numpy.ndarray size changed, may indic...
Variables Details [hide private]

__pyx_capi__

Value:
{'PySlepcBV_Get': <capsule object "BV (PyObject *)" at 0x7ff16fba3e10>\
,
 'PySlepcBV_New': <capsule object "PyObject *(BV)" at 0x7ff16fba3de0>,
 'PySlepcDS_Get': <capsule object "DS (PyObject *)" at 0x7ff16fba3e70>\
,
 'PySlepcDS_New': <capsule object "PyObject *(DS)" at 0x7ff16fba3e40>,
 'PySlepcEPS_Get': <capsule object "EPS (PyObject *)" at 0x7ff16fba3f9\
0>,
...

__warningregistry__

Value:
{('numpy.ndarray size changed, may indicate binary incompatibility. Ex\
pected 16 from C header, got 80 from PyObject',
  <type 'exceptions.RuntimeWarning'>,
  6): True}

slepc4py-3.15.1/docs/apiref/class_hierarchy_for_errortype_2.png0000644000175100017510000000220314054125746025422 0ustar jromanjroman00000000000000PNG  IHDRY$mbKGD8IDAThc?(``````h "00H?h XjX0d-z'/_t MKXX ޽xi)hAѰ@Ѱ@,Ah`)rΈrL V髩m,```8h4b^OZA Բ@fX S _}c``$jw?f40͛.|%NAݽ_Ȋ_y)߹-,.ܼ Ѹa 1Gǜ~100zYww!;_~2h.սpaWa:2;˗.>uc:T B]]7?(UN^|ĉ[&OuxǼy = zE;~R)z̰ 㱴DFp077nNN8mŎuTTl݊X:{aٶm>>p"YY3۶100߸qJEJgAIŝ͛eeJi(*_}_e쓗/1c&& gu{ꩩ9yrFM \JUNTT gg^^R=EfX3-.,|SMEEOHa* Bܢ**l e=QQa``𡔘i 1˗oސr2_}(fafwwxջwkL&"[Cÿ5͚A>~|ڵɓ<=&L{sr&-[FLqqh"ZS*+LXY*xAElpӦ ''doo׌/߾ExxT%'300TTLh/?{B<:5S SLEPc for Python slepc4py-3.15.1/docs/apiref/class_hierarchy_for_extract.png0000644000175100017510000000174414054125747024632 0ustar jromanjroman00000000000000PNG  IHDRK$ebKGDIDAThHg?@qLs*v(], .9[zu`8[!h6q,+&Xe?WEc*9q|><&M4$sq/RR4y(t5~9udRd/d-sݺ}v^1e(%%%l\ ŢY}mmӅ~{U;v0kT)0Yo$%,DsdĨ25YQ\/֦M?4_ǔϏ7n:{z+ ւN::;s,}01y0Y:u8 py1>/ɗfgc b0Lݮ.33u_OH-[8}Ԝlfpo`pgf `poΞQXȁ9[f;kk6:͔7ܡdTP5=59M{U۶IY7u*]7?XfI|ÔoH]SYiiűi3K/`]flN Bb6sYr%K)Is8v-&>)1*>tIJLv>ବKPUL*^M0g4d2lJuPl<A@@@@@@-J\Z= z*"13K~YHYHYghTIENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for_nep.png0000644000175100017510000000555114054125746023741 0ustar jromanjroman00000000000000PNG  IHDR[dGbKGD IDATx}LTW-W NX С-bX#& H-MZjk)Hc lM%_5McƘ&aM:@[2 .̽〣Dμ眇 ?21QZ9Z98}Q.t:233OICC!}q:G.W1rSAZ^^y ͑ ͑ ͑ ͑zǪUO?@CC60L())Dر###}xx TUUf5km> ?Hݍ6}}}_pYXV+q>`ժU ph"ør >S|(..TCCCHOOGKK qYYYmwV^_kw[ggWbpѢEN;Fߟx 6jfsΝc\\ܤ...ehΛL&s^_ g?77W>_iǾ|HNNFTT aXVeeetx衇PXX~ O< &&ױcǐ@,Xl6TTT ..QQQ(((C%%%XhǵxmM&qE>sL%,, | |I<ߏr̘AAA(..18p ͛a68n]]Jk}GS<+gQNNF#pBVTT$˞o744Yf}}}?M&wTvtt/fqqc?N^OpsW۹sAJgJJ8CCCy&ffdd(q>͙`^gPP}Y~~o``xuϟ?h{-+Wh7|D56j.o_iv>.\HLLLd__SNQ׻ dppd"y+ȣLJJcm/_̣G$\BN˗/Bhjl3gH=U ^5kWXn6yS2:: .iiiI\8wڦ&FFF*Scc#ϟo؜Ўϵ100$貀aaaoaFDD0''gϞѡK,aMM6vX,m˖-,,,9{lsI1J7L^z555 0+**K.qҥܸqb=Pf8gFGGsϞ=޽@>Cmޜ0))_~%F#>ŋs$y۹pƍLJJSO=œ'Oh4ѣLNN?PKvv<}.cW[Owu9񌌌dQQKmhCCCZdHHzsLNNI޺U\\̹s2,,ׯgb=JU$_uo[)wV;͙jeyy9SSS ţPd2qLMMepp0SRRXYYIPˡCHnݺT[Owu)'zhGVVV{T6y {7Vi:łWu96+;Xhh(6mZ]mHOOǫ˗4CVV6nNrwkllĺu'ύ¡Cwy ͑ ͑ ͑ ͑ QO/Wrss]ι"yǺum6G Qz,Khwk׮u)SiHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhHhL߹T黩<-33^vEkll?}:Мi=#xs_1iMmm۾}.'mh͙ubd{ 4GB+4GB+4gi'/- k׿:A //۩QkXq11^|jz񫯰zJqΰw/ I\WG/-ſbSC򰥲1UE}ݹMtDc>4nLx08ثuOEЛ/xiN=sƭel^{*zhسs'N75_'N3͊RatbKU2RRz1%`t:eVlʌ 6z_416GqڻNa *|E=s}'@sۇ'm:L[[>u9Ӓ\i'[\Yrvw$\k|e08|eHh=QɞVhVhVhVhVhVhVhδO{)?i _r3SAicY^Bd{ 4GB+4Bx`n2IENDB`slepc4py-3.15.1/docs/apiref/class_hierarchy_for__p_mem.png0000644000175100017510000000142214054125750024377 0ustar jromanjroman00000000000000PNG  IHDRS$ybKGDIDAThOHa_zJ8C CN AĿK %aT qtڦe@yKH/]: ):)M7Z?`=~? BHD0yoB))yEpzZGV@ dk4s- \ر2sFs- OXgĒ6șʔ׼<2"e DO:VTaIENDB`slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.PEP.Scale-class.html0000644000175100017510000002233114054125747024466 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/class_hierarchy_for_type_2.png0000644000175100017510000000147414054125745024360 0ustar jromanjroman00000000000000PNG  IHDR=$٥bKGDIDATXc?L2 #v j*Sjx` Ɉ[)/_&ݖzz$ݻ t2n,?XsgDy9UԨ$wpxw/O- la*; /  _}c``TKy)߹-,.ܼycFk9:洷߿SȺ 崷{q100lyITTR@ \'#4ZV 'voD^]M-+Pmǎ`K<~R%+IFǫ 0cC5GM_תZ:IENDB`slepc4py-3.15.1/docs/apiref/frames.html0000644000175100017510000000111514054125744020511 0ustar jromanjroman00000000000000 SLEPc for Python slepc4py-3.15.1/docs/apiref/slepc4py.SLEPc.EPS.ConvergedReason-class.html0000644000175100017510000002474614054125746026541 0ustar jromanjroman00000000000000 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.15.1/docs/apiref/slepc4py.lib-module.html0000644000175100017510000001747014054125744023042 0ustar jromanjroman00000000000000 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.15.1/docs/source/0000755000175100017510000000000014054125756016405 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/source/tutorial.rst0000644000175100017510000001752314054125637021010 0ustar jromanjroman00000000000000Tutorial ======== 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 subspace All the above settings can also be changed 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 50% of basis vectors kept after restart using the locking variant 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) block orthogonalization method: GS doing matmult as a single matrix-matrix product 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.15.1/docs/source/Makefile0000644000175100017510000000114114054125637020040 0ustar jromanjroman00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx SPHINXPROJ = petsc4py SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) slepc4py-3.15.1/docs/source/abstract.txt0000644000175100017510000000122314054125637020745 0ustar jromanjroman00000000000000.. 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.15.1/docs/source/manual.rst0000644000175100017510000000020014054125637020402 0ustar jromanjroman00000000000000================ SLEPc for Python ================ .. include:: abstract.txt .. include:: toctree.txt .. include:: links.txt slepc4py-3.15.1/docs/source/overview.rst0000644000175100017510000001631214054125637021006 0ustar jromanjroman00000000000000Overview ======== *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, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.15 D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2021. .. [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. For general nonlinear eigenvalue problems, the following methods can be used: * Solve a polynomial eigenproblem obtained via polynomial interpolation. * Rational interpolation and linearization (NLEIGS). * Newton-type methods such as SLP or RII. 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. The user provides the parameter-dependent matrix T via the split form or by means of callback functions. :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.15.1/docs/source/conf.py0000644000175100017510000001430714054125637017707 0ustar jromanjroman00000000000000# -*- coding: utf-8 -*- # # SLEPc for Python documentation build configuration file, created by # sphinx-quickstart on Sun Oct 1 15:52:05 2017. # # 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. # 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. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) def get_version(): import sys, os, re here = os.path.dirname(__file__) pardir = [os.path.pardir] * 2 topdir = os.path.join(here, *pardir) srcdir = os.path.join(topdir, 'src') with open(os.path.join(srcdir, '__init__.py')) as f: m = re.search(r"__version__\s*=\s*'(.*)'", f.read()) return m.groups()[0] pkg_version = get_version() # -- 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(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The main toctree document. main_doc = 'index' # General information about the project. project = u'SLEPc for Python' copyright = u'2021, Lisandro Dalcin' author = u'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 = pkg_version[:3] # The full version, including alpha/beta/rc tags. release = pkg_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = 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 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 = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars # html_sidebars = { # '**': [ # 'about.html', # 'navigation.html', # 'relations.html', # needs 'show_related': True theme option to display # 'searchbox.html', # 'donate.html', # ] # } # 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' # -- Options for HTMLHelp output ------------------------------------------ # 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' : '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('manual', 'slepc4py.tex', project, author, 'howto'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (main_doc, 'slepc4py', project, [author], 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 = [ (main_doc, 'slepc4py', project, author, 'slepc4py', project+u'.', 'Miscellaneous'), ] # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. epub_title = project epub_author = author epub_publisher = author epub_copyright = copyright # 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 list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] slepc4py-3.15.1/docs/source/contents.rst0000644000175100017510000000000014054125637020760 0ustar jromanjroman00000000000000slepc4py-3.15.1/docs/source/make.bat0000644000175100017510000000144614054125637020015 0ustar jromanjroman00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=python -msphinx ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=petsc4py if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The Sphinx module was not found. Make sure you have Sphinx installed, echo.then set the SPHINXBUILD environment variable to point to the full echo.path of the 'sphinx-build' executable. Alternatively you may add the echo.Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd slepc4py-3.15.1/docs/source/index.rst0000644000175100017510000000047414054125637020251 0ustar jromanjroman00000000000000================ SLEPc for Python ================ :Authors: Lisandro Dalcin, Jose E. Roman :Contact: dalcinl@gmail.com, jroman@dsic.upv.es :Web Site: https://gitlab.com/slepc/slepc :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. include:: links.txt slepc4py-3.15.1/docs/source/toctree.txt0000644000175100017510000000016514054125637020613 0ustar jromanjroman00000000000000.. toctree:: :maxdepth: 2 overview tutorial install citing .. Local Variables: .. mode: rst .. End: slepc4py-3.15.1/docs/source/citing.rst0000644000175100017510000000113014054125637020405 0ustar jromanjroman00000000000000Citations ========= 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.15.1/docs/source/install.rst0000644000175100017510000000770114054125637020610 0ustar jromanjroman00000000000000Installation ============ 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 Python Package Index. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -LO https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.tar.gz * Using :program:`wget`:: $ wget https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.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.15.1/docs/source/links.txt0000644000175100017510000000076014054125637020267 0ustar jromanjroman00000000000000.. _MPI: https://www.mpi-forum.org .. _MPICH: https://www.mpich.org .. _Open MPI: https://www.open-mpi.org .. _PETSc: https://www.mcs.anl.gov/petsc/ .. _SLEPc: https://slepc.upv.es .. _Python: https://www.python.org .. _NumPy: https://www.numpy.org .. _mpi4py: https://github.com/mpi4py/mpi4py .. _petsc4py: https://gitlab.com/petsc/petsc .. _slepc4py: https://gitlab.com/slepc/slepc .. Local Variables: .. mode: rst .. End: slepc4py-3.15.1/docs/index.rst0000644000175100017510000000335614054125637016753 0ustar jromanjroman00000000000000================ 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: https://www.sphinx-doc.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://gitlab.com/slepc/slepc + Source Releases: https://gitlab.com/slepc/slepc/-/tags/ + Issue Tracker: https://gitlab.com/slepc/slepc/issues/ + Git Repository: https://gitlab.com/slepc/slepc.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.15.1/docs/usrman/0000755000175100017510000000000014054125756016412 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/usrman/install.html0000644000175100017510000003240614054125732020745 0ustar jromanjroman00000000000000 Installation — SLEPc for Python 3.15.1 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 Python Package Index. You can use curl or wget to get a release tarball.

  • Using curl:

    $ curl -LO https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.tar.gz
    
  • Using wget:

    $ wget https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.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
slepc4py-3.15.1/docs/usrman/search.html0000644000175100017510000000665314054125732020551 0ustar jromanjroman00000000000000 Search — SLEPc for Python 3.15.1 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.15.1/docs/usrman/_sources/0000755000175100017510000000000014054125756020234 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/usrman/_sources/citing.rst.txt0000644000175100017510000000113014054125637023052 0ustar jromanjroman00000000000000Citations ========= 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.15.1/docs/usrman/_sources/contents.rst.txt0000644000175100017510000000000014054125637023425 0ustar jromanjroman00000000000000slepc4py-3.15.1/docs/usrman/_sources/index.rst.txt0000644000175100017510000000047414054125637022716 0ustar jromanjroman00000000000000================ SLEPc for Python ================ :Authors: Lisandro Dalcin, Jose E. Roman :Contact: dalcinl@gmail.com, jroman@dsic.upv.es :Web Site: https://gitlab.com/slepc/slepc :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. include:: links.txt slepc4py-3.15.1/docs/usrman/_sources/overview.rst.txt0000644000175100017510000001631214054125637023453 0ustar jromanjroman00000000000000Overview ======== *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, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.15 D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2021. .. [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. For general nonlinear eigenvalue problems, the following methods can be used: * Solve a polynomial eigenproblem obtained via polynomial interpolation. * Rational interpolation and linearization (NLEIGS). * Newton-type methods such as SLP or RII. 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. The user provides the parameter-dependent matrix T via the split form or by means of callback functions. :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.15.1/docs/usrman/_sources/tutorial.rst.txt0000644000175100017510000001752314054125637023455 0ustar jromanjroman00000000000000Tutorial ======== 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 subspace All the above settings can also be changed 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 50% of basis vectors kept after restart using the locking variant 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) block orthogonalization method: GS doing matmult as a single matrix-matrix product 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.15.1/docs/usrman/_sources/install.rst.txt0000644000175100017510000000770114054125637023255 0ustar jromanjroman00000000000000Installation ============ 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 Python Package Index. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -LO https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.tar.gz * Using :program:`wget`:: $ wget https://pypi.io/packages/source/s/slepc4py/slepc4py-X.Y.Z.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.15.1/docs/usrman/_sources/manual.rst.txt0000644000175100017510000000020014054125637023047 0ustar jromanjroman00000000000000================ SLEPc for Python ================ .. include:: abstract.txt .. include:: toctree.txt .. include:: links.txt slepc4py-3.15.1/docs/usrman/overview.html0000644000175100017510000003111414054125732021140 0ustar jromanjroman00000000000000 Overview — SLEPc for Python 3.15.1 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, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.15 D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2021.
[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.

For general nonlinear eigenvalue problems, the following methods can be used:

  • Solve a polynomial eigenproblem obtained via polynomial interpolation.
  • Rational interpolation and linearization (NLEIGS).
  • Newton-type methods such as SLP or RII.

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. The user provides the parameter-dependent matrix T via the split form or by means of callback functions.
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.15.1/docs/usrman/_static/0000755000175100017510000000000014054125756020040 5ustar jromanjroman00000000000000slepc4py-3.15.1/docs/usrman/_static/minus.png0000644000175100017510000000013213232117076021666 0ustar jromanjroman00000000000000PNG  IHDR (!IDATxc8 g>@;(!&]f2nNIENDB`slepc4py-3.15.1/docs/usrman/_static/classic.css0000644000175100017510000001006214054125732022164 0ustar jromanjroman00000000000000/* * classic.css_t * ~~~~~~~~~~~~~ * * Sphinx stylesheet -- classic theme. * * :copyright: Copyright 2007-2018 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, div.body blockquote { 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; } code { background-color: #ecf0f3; padding: 0 1px 0 1px; font-size: 0.95em; } th { background-color: #ede; } .warning code { background: #efc2c2; } .note code { 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; } div.code-block-caption { color: #efefef; background-color: #1c4e63; }slepc4py-3.15.1/docs/usrman/_static/basic.css0000644000175100017510000002430114054125732021625 0ustar jromanjroman00000000000000/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2018 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%; word-wrap: break-word; overflow-wrap : break-word; } 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; } 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%; margin-left: auto; margin-right: auto; } 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 ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } 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; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- general body styles --------------------------------------------------- */ div.body p, div.body dd, div.body li, div.body blockquote { -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } 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, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .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.align-center { margin-left: auto; margin-right: auto; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } 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.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; } /* -- figures --------------------------------------------------------------- */ div.figure { margin: 0.5em; padding: 0.5em; } div.figure p.caption { padding: 0.3em; } div.figure p.caption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ table.field-list td, table.field-list th { border: 0 !important; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .field-name { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } /* -- 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, span.highlighted { background-color: #fbe54e; } rect.highlighted { fill: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .optional { font-size: 1.3em; } .sig-paren { font-size: larger; } .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 */ } span.pre { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; } 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; } div.code-block-caption { padding: 2px 5px; font-size: small; } div.code-block-caption code { background-color: transparent; } div.code-block-caption + div > div.highlight > pre { margin-top: 0; } div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.code-block-caption span.caption-text { } div.literal-block-wrapper { padding: 1em 1em 0; } div.literal-block-wrapper div.highlight { margin: 0; } code.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } code.descclassname { background-color: transparent; } code.xref, a code { background-color: transparent; font-weight: bold; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 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; } span.eqno a.headerlink { position: relative; left: 0px; z-index: 1; } div.math:hover a.headerlink { visibility: visible; } /* -- 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.15.1/docs/usrman/_static/comment-close.png0000644000175100017510000000147513232117076023313 0ustar jromanjroman00000000000000PNG  IHDRaIDATxm8$km۶m۶m۶m۶AMfp:O'e$Qq aO[B3U9Og+ł-81dw=7q1CKa~ ʏ lϕ]O4l!A@@wny^xa*;1uSWݦO<*7g>b~yޞ mN\(t:+tU&>9Z}Ok=wԈ=ehjo OSd̳m#(2ڮ&!Q&= 0 && !jQuery(node.parentNode).hasClass(className)) { var span; var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); if (isInSVG) { span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); } else { 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); if (isInSVG) { var bbox = span.getBBox(); var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute('class', className); var parentOfText = node.parentNode.parentNode; addItems.push({ "parent": node.parentNode, "target": rect}); } } } else if (!jQuery(node).is("button, select, textarea")) { jQuery.each(node.childNodes, function() { highlight(this, addItems); }); } } var addItems = []; var result = this.each(function() { highlight(this, addItems); }); for (var i = 0; i < addItems.length; ++i) { jQuery(addItems[i].parent).before(addItems[i].target); } return result; }; /* * backward compatibility for jQuery.browser * This will be supported until firefox bug is fixed. */ if (!jQuery.browser) { jQuery.uaMatch = function(ua) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; return { browser: match[ 1 ] || "", version: match[ 2 ] || "0" }; }; jQuery.browser = {}; jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; } /** * 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 * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 */ 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); }, initOnKeyListeners: function() { $(document).keyup(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box or textarea if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); if (prevHref) { window.location.href = prevHref; return false; } case 39: // right var nextHref = $('link[rel="next"]').prop('href'); if (nextHref) { window.location.href = nextHref; return false; } } } }); } }; // quick alias for translations _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); });slepc4py-3.15.1/docs/usrman/_static/comment.png0000644000175100017510000000120113232117076022173 0ustar jromanjroman00000000000000PNG  IHDRaHIDATx_VTVܰQǵFT7m]$|~\>&nMK<+W 7zɫ ?w!8_O ާ4& MS'/қ=rּ`V0!?t'$#'P`iawP?Dãqف.`Ž lZ%9A {EҺ !;e`fT]P]ZCDX2e)ןryOZs߂Ј {1<*Bx `(B42|k@=PAȚe; HͭU`B@(IϚR F"a(. |R*wZB/bZ fMQ+d!!065.9Eq+@3ىVSËd8;&KpHh0f;hY,]|Lcne!fKcJFiySOhמ%ws vaJ{ڣ;/S3 ?qcC\qHxsemk2n 0) { var start = document.cookie.indexOf('sortBy='); if (start != -1) { start = start + 7; var end = document.cookie.indexOf(";", start); if (end == -1) { end = document.cookie.length; by = unescape(document.cookie.substring(start, end)); } } } setComparator(); } /** * Show a comment div. */ function show(id) { $('#ao' + id).hide(); $('#ah' + id).show(); var context = $.extend({id: id}, opts); var popup = $(renderTemplate(popupTemplate, context)).hide(); popup.find('textarea[name="proposal"]').hide(); popup.find('a.by' + by).addClass('sel'); var form = popup.find('#cf' + id); form.submit(function(event) { event.preventDefault(); addComment(form); }); $('#s' + id).after(popup); popup.slideDown('fast', function() { getComments(id); }); } /** * Hide a comment div. */ function hide(id) { $('#ah' + id).hide(); $('#ao' + id).show(); var div = $('#sc' + id); div.slideUp('fast', function() { div.remove(); }); } /** * Perform an ajax request to get comments for a node * and insert the comments into the comments tree. */ function getComments(id) { $.ajax({ type: 'GET', url: opts.getCommentsURL, data: {node: id}, success: function(data, textStatus, request) { var ul = $('#cl' + id); var speed = 100; $('#cf' + id) .find('textarea[name="proposal"]') .data('source', data.source); if (data.comments.length === 0) { ul.html('
  • No comments yet.
  • '); ul.data('empty', true); } else { // If there are comments, sort them and put them in the list. var comments = sortComments(data.comments); speed = data.comments.length * 100; appendComments(comments, ul); ul.data('empty', false); } $('#cn' + id).slideUp(speed + 200); ul.slideDown(speed); }, error: function(request, textStatus, error) { showError('Oops, there was a problem retrieving the comments.'); }, dataType: 'json' }); } /** * Add a comment via ajax and insert the comment into the comment tree. */ function addComment(form) { var node_id = form.find('input[name="node"]').val(); var parent_id = form.find('input[name="parent"]').val(); var text = form.find('textarea[name="comment"]').val(); var proposal = form.find('textarea[name="proposal"]').val(); if (text == '') { showError('Please enter a comment.'); return; } // Disable the form that is being submitted. form.find('textarea,input').attr('disabled', 'disabled'); // Send the comment to the server. $.ajax({ type: "POST", url: opts.addCommentURL, dataType: 'json', data: { node: node_id, parent: parent_id, text: text, proposal: proposal }, success: function(data, textStatus, error) { // Reset the form. if (node_id) { hideProposeChange(node_id); } form.find('textarea') .val('') .add(form.find('input')) .removeAttr('disabled'); var ul = $('#cl' + (node_id || parent_id)); if (ul.data('empty')) { $(ul).empty(); ul.data('empty', false); } insertComment(data.comment); var ao = $('#ao' + node_id); ao.find('img').attr({'src': opts.commentBrightImage}); if (node_id) { // if this was a "root" comment, remove the commenting box // (the user can get it back by reopening the comment popup) $('#ca' + node_id).slideUp(); } }, error: function(request, textStatus, error) { form.find('textarea,input').removeAttr('disabled'); showError('Oops, there was a problem adding the comment.'); } }); } /** * Recursively append comments to the main comment list and children * lists, creating the comment tree. */ function appendComments(comments, ul) { $.each(comments, function() { var div = createCommentDiv(this); ul.append($(document.createElement('li')).html(div)); appendComments(this.children, div.find('ul.comment-children')); // To avoid stagnating data, don't store the comments children in data. this.children = null; div.data('comment', this); }); } /** * After adding a new comment, it must be inserted in the correct * location in the comment tree. */ function insertComment(comment) { var div = createCommentDiv(comment); // To avoid stagnating data, don't store the comments children in data. comment.children = null; div.data('comment', comment); var ul = $('#cl' + (comment.node || comment.parent)); var siblings = getChildren(ul); var li = $(document.createElement('li')); li.hide(); // Determine where in the parents children list to insert this comment. for(i=0; i < siblings.length; i++) { if (comp(comment, siblings[i]) <= 0) { $('#cd' + siblings[i].id) .parent() .before(li.html(div)); li.slideDown('fast'); return; } } // If we get here, this comment rates lower than all the others, // or it is the only comment in the list. ul.append(li.html(div)); li.slideDown('fast'); } function acceptComment(id) { $.ajax({ type: 'POST', url: opts.acceptCommentURL, data: {id: id}, success: function(data, textStatus, request) { $('#cm' + id).fadeOut('fast'); $('#cd' + id).removeClass('moderate'); }, error: function(request, textStatus, error) { showError('Oops, there was a problem accepting the comment.'); } }); } function deleteComment(id) { $.ajax({ type: 'POST', url: opts.deleteCommentURL, data: {id: id}, success: function(data, textStatus, request) { var div = $('#cd' + id); if (data == 'delete') { // Moderator mode: remove the comment and all children immediately div.slideUp('fast', function() { div.remove(); }); return; } // User mode: only mark the comment as deleted div .find('span.user-id:first') .text('[deleted]').end() .find('div.comment-text:first') .text('[deleted]').end() .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id + ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id) .remove(); var comment = div.data('comment'); comment.username = '[deleted]'; comment.text = '[deleted]'; div.data('comment', comment); }, error: function(request, textStatus, error) { showError('Oops, there was a problem deleting the comment.'); } }); } function showProposal(id) { $('#sp' + id).hide(); $('#hp' + id).show(); $('#pr' + id).slideDown('fast'); } function hideProposal(id) { $('#hp' + id).hide(); $('#sp' + id).show(); $('#pr' + id).slideUp('fast'); } function showProposeChange(id) { $('#pc' + id).hide(); $('#hc' + id).show(); var textarea = $('#pt' + id); textarea.val(textarea.data('source')); $.fn.autogrow.resize(textarea[0]); textarea.slideDown('fast'); } function hideProposeChange(id) { $('#hc' + id).hide(); $('#pc' + id).show(); var textarea = $('#pt' + id); textarea.val('').removeAttr('disabled'); textarea.slideUp('fast'); } function toggleCommentMarkupBox(id) { $('#mb' + id).toggle(); } /** Handle when the user clicks on a sort by link. */ function handleReSort(link) { var classes = link.attr('class').split(/\s+/); for (var i=0; iThank you! Your comment will show up ' + 'once it is has been approved by a moderator.'); } // 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.15.1/docs/usrman/_static/down.png0000644000175100017510000000031213232117076021502 0ustar jromanjroman00000000000000PNG  IHDR7IDATxP@ @Iߗ`&"z6xK@kbϢxs]M :/+gPd2GeÐ~߸J_c S_ S%exdU](UH>&;4i$n3> ycdIENDB`slepc4py-3.15.1/docs/usrman/_static/file.png0000644000175100017510000000043613232117076021461 0ustar jromanjroman00000000000000PNG  IHDRaIDATxR){l ۶f=@ :3~箄rX$AX-D ~ lj(P%8<<9:: PO&$ l~X&EW^4wQ}^ͣ i0/H/@F)Dzq+j[SU5h/oY G&Lfs|{3%U+S`AFIENDB`slepc4py-3.15.1/docs/usrman/_static/default.css0000644000175100017510000000003413227146175022172 0ustar jromanjroman00000000000000@import url("classic.css"); slepc4py-3.15.1/docs/usrman/_static/sidebar.js0000644000175100017510000001130314054125732021777 0ustar jromanjroman00000000000000/* * 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-2018 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; kQn~3sD{oS+ٻ؀=nnW?XumAHI%pHscYoo_{Z)48sڳۗ8YüYsj34s^#ǒtˋqkZܜwݿߵ>!8pVn{շ=n$p\^;=;wPIENDB`slepc4py-3.15.1/docs/usrman/_static/jquery.js0000644000175100017510000101337213152644511021715 0ustar jromanjroman00000000000000/*! * jQuery JavaScript Library v3.2.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2017-09-03T00:14Z */ ( function( global, factory ) { "use strict"; if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common // enough that all such attempts are guarded in a try block. var arr = []; var document = window.document; var getProto = Object.getPrototypeOf; var slice = arr.slice; var concat = arr.concat; var push = arr.push; var indexOf = arr.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var fnToString = hasOwn.toString; var ObjectFunctionString = fnToString.call( Object ); var support = {}; function DOMEval( code, doc ) { doc = doc || document; var script = doc.createElement( "script" ); script.text = code; doc.head.appendChild( script ).parentNode.removeChild( script ); } /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module var version = "3.2.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { // Return all the elements in a clean array if ( num == null ) { return slice.call( this ); } // Return just the one element from the set return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: arr.sort, splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // Skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { target = {}; } // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && Array.isArray( src ) ? src : []; } else { clone = src && jQuery.isPlainObject( src ) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, isFunction: function( obj ) { return jQuery.type( obj ) === "function"; }, isWindow: function( obj ) { return obj != null && obj === obj.window; }, isNumeric: function( obj ) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = jQuery.type( obj ); return ( type === "number" || type === "string" ) && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }, isPlainObject: function( obj ) { var proto, Ctor; // Detect obvious negatives // Use toString instead of jQuery.type to catch host objects if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } proto = getProto( obj ); // Objects with no prototype (e.g., `Object.create( null )`) are plain if ( !proto ) { return true; } // Objects with prototype are plain iff they were constructed by a global Object function Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { /* eslint-disable no-unused-vars */ // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { return false; } return true; }, type: function( obj ) { if ( obj == null ) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; }, // Evaluates a script in a global context globalEval: function( code ) { DOMEval( code ); }, // Convert dashed to camelCase; used by the css and data modules // Support: IE <=9 - 11, Edge 12 - 13 // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // Support: Android <=4.0 only trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; for ( ; j < len; j++ ) { first[ i++ ] = second[ j ]; } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: Date.now, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; } // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-08-08 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { if ( list[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, // CSS string/identifier serialization // https://drafts.csswg.org/cssom/#common-serializing-idioms rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function( ch, asCodePoint ) { if ( asCodePoint ) { // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER if ( ch === "\0" ) { return "\uFFFD"; } // Control characters and (dependent upon position) numbers get escaped as code points return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped return "\\" + ch; }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }, disabledAncestor = addCombinator( function( elem ) { return elem.disabled === true && ("form" in elem || "label" in elem); }, { dir: "parentNode", next: "legend" } ); // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !compilerCache[ selector + " " ] && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { if ( nodeType !== 1 ) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if ( context.nodeName.toLowerCase() !== "object" ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { nid = nid.replace( rcssescape, fcssescape ); } else { context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { groups[i] = "#" + nid + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { var el = document.createElement("fieldset"); try { return !!fn( el ); } catch (e) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ function createDisabledPseudo( disabled ) { // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable return function( elem ) { // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled if ( "form" in elem ) { // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset // https://html.spec.whatwg.org/multipage/forms.html#category-listed // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. if ( elem.parentNode && elem.disabled === false ) { // Option elements defer to a parent optgroup if present if ( "label" in elem ) { if ( "label" in elem.parentNode ) { return elem.parentNode.disabled === disabled; } else { return elem.disabled === disabled; } } // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && disabledAncestor( elem ) === disabled; } return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. } else if ( "label" in elem ) { return elem.disabled === disabled; } // Remaining elements are neither :enabled nor :disabled return false; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ( preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { subWindow.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( subWindow.attachEvent ) { subWindow.attachEvent( "onunload", unloadHandler ); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function( el ) { el.className = "i"; return !el.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( el ) { el.appendChild( document.createComment("") ); return !el.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; }); // ID filter and find if ( support.getById ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); if ( elem ) { // Verify the id attribute node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; while ( (elem = elems[i++]) ) { node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } } } return []; } }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); // DocumentFragment nodes don't have gEBTN } else if ( support.qsa ) { return context.querySelectorAll( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // https://bugs.jquery.com/ticket/12359 docElem.appendChild( el ).innerHTML = "" + ""; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !el.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function( el ) { el.innerHTML = "" + ""; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( el.querySelectorAll(":enabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos el.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { return (sel + "").replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": createDisabledPseudo( false ), "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } return false; }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( el ) { el.innerHTML = ""; return el.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( el ) { el.innerHTML = ""; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( el ) { return el.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; // Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; jQuery.escapeSelector = Sizzle.escape; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }; var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Simple selector that can be filtered directly, removing non-Elements if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } // Complex selector, compare the two sets, removing non-Elements qualifier = jQuery.filter( qualifier, elements ); return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; } ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } if ( elems.length === 1 && elem.nodeType === 1 ) { return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; } return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret, len = this.length, self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } ret = this.pushStack( [] ); for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) // Shortcut simple #id case for speed rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Method init() accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[ 0 ] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); if ( elem ) { // Inject the element directly into the jQuery object this[ 0 ] = elem; this.length = 1; } return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery( selectors ); // Positional selectors never match, since there's no _selection_ context if ( !rneedsContext.test( selectors ) ) { for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( targets ? targets.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { if ( nodeName( elem, "iframe" ) ) { return elem.contentDocument; } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only // Treat the template element as a regular one in browsers that // don't support it. if ( nodeName( elem, "template" ) ) { elem = elem.content || elem; } return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; } ); var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( jQuery.isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = queue = []; if ( !memory && !firing ) { list = memory = ""; } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; function Identity( v ) { return v; } function Thrower( ex ) { throw ex; } function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables } else { // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: // * false: [ value ].slice( 0 ) => resolve( value ) // * true: [ value ].slice( 1 ) => resolve() resolve.apply( undefined, [ value ].slice( noValue ) ); } // For Promises/A+, convert exceptions into rejections // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in // Deferred#then to conditionally suppress rejection. } catch ( value ) { // Support: Android 4.0 only // Strict mode functions invoked without .call/.apply get global-object context reject.apply( undefined, [ value ] ); } } jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, callbacks, // ... .then handlers, argument index, [final state] [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ), 2 ], [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 0, "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, "catch": function( fn ) { return promise.then( null, fn ); }, // Keep pipe for back-compat pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, then: function( onFulfilled, onRejected, onProgress ) { var maxDepth = 0; function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); // Support: Promises/A+ section 2.3.1 // https://promisesaplus.com/#point-48 if ( returned === deferred.promise() ) { throw new TypeError( "Thenable self-resolution" ); } // Support: Promises/A+ sections 2.3.3.1, 3.5 // https://promisesaplus.com/#point-54 // https://promisesaplus.com/#point-75 // Retrieve `then` only once then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability ( typeof returned === "object" || typeof returned === "function" ) && returned.then; // Handle a returned thenable if ( jQuery.isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ) ); // Normal processors (resolve) also hook into progress } else { // ...and disregard older resolution values maxDepth++; then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ), resolve( maxDepth, deferred, Identity, deferred.notifyWith ) ); } // Handle all other returned values } else { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Identity ) { that = undefined; args = [ returned ]; } // Process the value(s) // Default process is resolve ( special || deferred.resolveWith )( that, args ); } }, // Only normal processors (resolve) catch and reject exceptions process = special ? mightThrow : function() { try { mightThrow(); } catch ( e ) { if ( jQuery.Deferred.exceptionHook ) { jQuery.Deferred.exceptionHook( e, process.stackTrace ); } // Support: Promises/A+ section 2.3.3.3.4.1 // https://promisesaplus.com/#point-61 // Ignore post-resolution exceptions if ( depth + 1 >= maxDepth ) { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Thrower ) { that = undefined; args = [ e ]; } deferred.rejectWith( that, args ); } } }; // Support: Promises/A+ section 2.3.3.3.1 // https://promisesaplus.com/#point-57 // Re-resolve promises immediately to dodge false rejection from // subsequent errors if ( depth ) { process(); } else { // Call an optional hook to record the stack, in case of exception // since it's otherwise lost when execution goes async if ( jQuery.Deferred.getStackHook ) { process.stackTrace = jQuery.Deferred.getStackHook(); } window.setTimeout( process ); } }; } return jQuery.Deferred( function( newDefer ) { // progress_handlers.add( ... ) tuples[ 0 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith ) ); // fulfilled_handlers.add( ... ) tuples[ 1 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onFulfilled ) ? onFulfilled : Identity ) ); // rejected_handlers.add( ... ) tuples[ 2 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onRejected ) ? onRejected : Thrower ) ); } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 5 ]; // promise.progress = list.add // promise.done = list.add // promise.fail = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = "resolved" (i.e., fulfilled) // state = "rejected" state = stateString; }, // rejected_callbacks.disable // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, // progress_callbacks.lock tuples[ 0 ][ 2 ].lock ); } // progress_handlers.fire // fulfilled_handlers.fire // rejected_handlers.fire list.add( tuple[ 3 ].fire ); // deferred.notify = function() { deferred.notifyWith(...) } // deferred.resolve = function() { deferred.resolveWith(...) } // deferred.reject = function() { deferred.rejectWith(...) } deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; // deferred.notifyWith = list.fireWith // deferred.resolveWith = list.fireWith // deferred.rejectWith = list.fireWith deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( singleValue ) { var // count of uncompleted subordinates remaining = arguments.length, // count of unprocessed arguments i = remaining, // subordinate fulfillment data resolveContexts = Array( i ), resolveValues = slice.call( arguments ), // the master Deferred master = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { master.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( master.state() === "pending" || jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return master.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); } return master.promise(); } } ); // These usually indicate a programmer mistake during development, // warn about them ASAP rather than swallowing them by default. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; jQuery.readyException = function( error ) { window.setTimeout( function() { throw error; } ); }; // The deferred used on DOM ready var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback // registration. .catch( function( error ) { jQuery.readyException( error ); } ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); } } ); jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); } // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE <=9 - 10 only // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } } if ( chainable ) { return elems; } // Gets if ( bulk ) { return fn.call( elems ); } return len ? fn( elems[ 0 ], key ) : emptyGet; }; var acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { cache: function( owner ) { // Check if the owner object already has a cache var value = owner[ this.expando ]; // If not, create one if ( !value ) { value = {}; // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return an empty object. if ( acceptData( owner ) ) { // If it is a node unlikely to be stringify-ed or looped over // use plain assignment if ( owner.nodeType ) { owner[ this.expando ] = value; // Otherwise secure it in a non-enumerable property // configurable must be true to allow the property to be // deleted when data is removed } else { Object.defineProperty( owner, this.expando, { value: value, configurable: true } ); } } } return value; }, set: function( owner, data, value ) { var prop, cache = this.cache( owner ); // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { cache[ jQuery.camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { cache[ jQuery.camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { return key === undefined ? this.cache( owner ) : // Always use camelCase key (gh-2257) owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; }, access: function( owner, key, value ) { // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ( ( key && typeof key === "string" ) && value === undefined ) ) { return this.get( owner, key ); } // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, cache = owner[ this.expando ]; if ( cache === undefined ) { return; } if ( key !== undefined ) { // Support array or space separated string of keys if ( Array.isArray( key ) ) { // If key is an array of keys... // We always set camelCase keys, so remove that. key = key.map( jQuery.camelCase ); } else { key = jQuery.camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace key = key in cache ? [ key ] : ( key.match( rnothtmlwhite ) || [] ); } i = key.length; while ( i-- ) { delete cache[ key[ i ] ]; } } // Remove the expando if there's no more data if ( key === undefined || jQuery.isEmptyObject( cache ) ) { // Support: Chrome <=35 - 45 // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) if ( owner.nodeType ) { owner[ this.expando ] = undefined; } else { delete owner[ this.expando ]; } } }, hasData: function( owner ) { var cache = owner[ this.expando ]; return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; var dataPriv = new Data(); var dataUser = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.parse( data ); } return data; } function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = getData( data ); } catch ( e ) {} // Make sure we set the data so it isn't changed later dataUser.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend( { hasData: function( elem ) { return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { dataPriv.remove( elem, name ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = dataUser.get( elem ); if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } dataPriv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { dataUser.set( this, key ); } ); } return access( this, function( value ) { var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // The key will always be camelCased in Data data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each( function() { // We always store the camelCased key dataUser.set( this, key, value ); } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each( function() { dataUser.remove( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || Array.isArray( data ) ) { queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { dataPriv.remove( elem, [ type + "queue", key ] ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; // Inline style trumps all return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. jQuery.contains( elem.ownerDocument, elem ) && jQuery.css( elem, "display" ) === "none"; }; var swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale = 1, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Make sure we update the tween properties later on valueParts = valueParts || []; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; do { // If previous iteration zeroed out, double until we get *something*. // Use string for doubling so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply initialInUnit = initialInUnit / scale; jQuery.style( elem, prop, initialInUnit + unit ); // Update scale, tolerating zero or NaN from tween.cur() // Break the loop if scale is unchanged or perfect, or if we've just had enough. } while ( scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations ); } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } var defaultDisplayMap = {}; function getDefaultDisplay( elem ) { var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[ nodeName ]; if ( display ) { return display; } temp = doc.body.appendChild( doc.createElement( nodeName ) ); display = jQuery.css( temp, "display" ); temp.parentNode.removeChild( temp ); if ( display === "none" ) { display = "block"; } defaultDisplayMap[ nodeName ] = display; return display; } function showHide( elements, show ) { var display, elem, values = [], index = 0, length = elements.length; // Determine new display value for elements that need to change for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } display = elem.style.display; if ( show ) { // Since we force visibility upon cascade-hidden elements, an immediate (and slow) // check is required in this first loop unless we have a nonempty display value (either // inline or about-to-be-restored) if ( display === "none" ) { values[ index ] = dataPriv.get( elem, "display" ) || null; if ( !values[ index ] ) { elem.style.display = ""; } } if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { values[ index ] = getDefaultDisplay( elem ); } } else { if ( display !== "none" ) { values[ index ] = "none"; // Remember what we're overwriting dataPriv.set( elem, "display", display ); } } } // Set the display of the elements in a second loop to avoid constant reflow for ( index = 0; index < length; index++ ) { if ( values[ index ] != null ) { elements[ index ].style.display = values[ index ]; } } return elements; } jQuery.fn.extend( { show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHiddenWithinTree( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); var rscriptType = ( /^$|\/(?:java|ecma)script/i ); // We have to close these tags to support XHTML (#13200) var wrapMap = { // Support: IE <=9 only option: [ 1, "" ], // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting or other required elements. thead: [ 1, "", "
        " ], col: [ 2, "", "
        " ], tr: [ 2, "", "
        " ], td: [ 3, "", "
        " ], _default: [ 0, "", "" ] }; // Support: IE <=9 only wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); } else { ret = []; } if ( tag === undefined || tag && nodeName( context, tag ) ) { return jQuery.merge( [ context ], ret ); } return ret; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } } var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; } ( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; } )(); var documentElement = document.documentElement; var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE <=9 only // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Ensure that invalid selectors throw exceptions at attach time // Evaluate against documentElement in case elem is a non-element node (e.g., document) if ( selector ) { jQuery.find.matchesSelector( documentElement, selector ); } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { dataPriv.remove( elem, "handle events" ); } }, dispatch: function( nativeEvent ) { // Make a writable jQuery.Event from the native event object var event = jQuery.event.fix( nativeEvent ); var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; for ( i = 1; i < arguments.length; i++ ) { args[ i ] = arguments[ i ]; } event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers if ( delegateCount && // Support: IE <=9 // Black-hole SVG instance trees (trac-13180) cur.nodeType && // Support: Firefox <=42 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { matchedHandlers = []; matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matchedSelectors[ sel ] === undefined ) { matchedSelectors[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matchedSelectors[ sel ] ) { matchedHandlers.push( handleObj ); } } if ( matchedHandlers.length ) { handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers cur = this; if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, addProp: function( name, hook ) { Object.defineProperty( jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: jQuery.isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { return this.originalEvent[ name ]; } }, set: function( value ) { Object.defineProperty( this, name, { enumerable: true, configurable: true, writable: true, value: value } ); } } ); }, fix: function( originalEvent ) { return originalEvent[ jQuery.expando ] ? originalEvent : new jQuery.Event( originalEvent ); }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { this.focus(); return false; } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } } }; jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; // Create target properties // Support: Safari <=6 - 7 only // Target should not be a text node (#504, #13143) this.target = ( src.target && src.target.nodeType === 3 ) ? src.target.parentNode : src.target; this.currentTarget = src.currentTarget; this.relatedTarget = src.relatedTarget; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && !this.isSimulated ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Includes all common event props including KeyEvent and MouseEvent specific props jQuery.each( { altKey: true, bubbles: true, cancelable: true, changedTouches: true, ctrlKey: true, detail: true, eventPhase: true, metaKey: true, pageX: true, pageY: true, shiftKey: true, view: true, "char": true, charCode: true, key: true, keyCode: true, button: true, buttons: true, clientX: true, clientY: true, offsetX: true, offsetY: true, pointerId: true, pointerType: true, screenX: true, screenY: true, targetTouches: true, toElement: true, touches: true, which: function( event ) { var button = event.button; // Add which for key events if ( event.which == null && rkeyEvent.test( event.type ) ) { return event.charCode != null ? event.charCode : event.keyCode; } // Add which for click: 1 === left; 2 === middle; 3 === right if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { if ( button & 1 ) { return 1; } if ( button & 2 ) { return 3; } if ( button & 4 ) { return 2; } return 0; } return event.which; } }, jQuery.event.addProp ); // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); } } ); var /* eslint-disable max-len */ // See https://github.com/eslint/eslint/issues/3229 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, /* eslint-enable */ // Support: IE <=10 - 11, Edge 12 - 13 // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( ">tbody", elem )[ 0 ] || elem; } return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[ 1 ]; } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.access( src ); pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { delete pdataCur.handle; pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( dataUser.hasData( src ) ) { udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); dataUser.set( dest, udataCur ); } } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( isFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); } } } } } } return collection; } function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html.replace( rxhtmlTag, "<$1>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, cleanData: function( elems ) { var data, elem, type, special = jQuery.event.special, i = 0; for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { if ( acceptData( elem ) ) { if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataUser.expando ] = undefined; } } } } } ); jQuery.fn.extend( { detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } } ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, i = 0; for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: Android <=4.0 only, PhantomJS 1 only // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var rmargin = ( /^margin/ ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; ( function() { // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } div.style.cssText = "box-sizing:border-box;" + "position:relative;display:block;" + "margin:auto;border:1px;padding:1px;" + "top:1%;width:50%"; div.innerHTML = ""; documentElement.appendChild( container ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = divStyle.marginLeft === "2px"; boxSizingReliableVal = divStyle.width === "4px"; // Support: Android 4.0 - 4.3 only // Some styles come back with percentage values, even though they shouldn't div.style.marginRight = "50%"; pixelMarginRightVal = divStyle.marginRight === "4px"; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11 only // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + "padding:0;margin-top:1px;position:absolute"; container.appendChild( div ); jQuery.extend( support, { pixelPosition: function() { computeStyleTests(); return pixelPositionVal; }, boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, pixelMarginRight: function() { computeStyleTests(); return pixelMarginRightVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; } } ); } )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is needed for: // .css('filter') (IE 9 only, #12537) // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Android Browser returns percentage for some values, // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret !== undefined ? // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return ( this.get = hookFn ).apply( this, arguments ); } }; } var // Swappable if display is none or starts with table // except "table", "table-cell", or "table-caption" // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rcustomProp = /^--/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style; // Return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } // Return a property mapped along what jQuery.cssProps suggests or to // a vendor prefixed property. function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; } function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i, val = 0; // If we already have the right measurement, avoid augmentation if ( extra === ( isBorderBox ? "border" : "content" ) ) { i = 4; // Otherwise initialize for horizontal or vertical properties } else { i = name === "width" ? 1 : 0; } for ( ; i < 4; i += 2 ) { // Both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // At this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { // At this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // At this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with computed style var valueIsBorderBox, styles = getStyles( elem ), val = curCSS( elem, name, styles ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test( val ) ) { return val; } // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); // Fall back to offsetWidth/Height when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) if ( val === "auto" ) { val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; } // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; // Use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { "float": "cssFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; // Make sure that we're working with the right name. We don't // want to query the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !( "set" in hooks ) || ( value = hooks.set( elem, value, extra ) ) !== undefined ) { if ( isCustomProp ) { style.setProperty( name, value ); } else { style[ name ] = value; } } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = jQuery.camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't // want to modify the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); jQuery.each( [ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); } ) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var matches, styles = extra && getStyles( elem ), subtract = extra && augmentWidthOrHeight( elem, name, extra, jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ); // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { elem.style[ name ] = value; value = jQuery.css( elem, name ); } return setPositiveNumber( elem, value, subtract ); } }; } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // Assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } } // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = jQuery.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxshow" ); // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // Ensure the complete handler is called before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // Pretend to be hidden if this is a "show" and // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } // Bail out if this is a no-op like .hide().hide() propTween = !jQuery.isEmptyObject( props ); if ( !propTween && jQuery.isEmptyObject( orig ) ) { return; } // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { // Support: IE <=9 - 11, Edge 12 - 13 // Record all 3 overflow attributes because IE does not infer the shorthand // from identically-valued overflowX and overflowY opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade restoreDisplay = dataShow && dataShow.display; if ( restoreDisplay == null ) { restoreDisplay = dataPriv.get( elem, "display" ); } display = jQuery.css( elem, "display" ); if ( display === "none" ) { if ( restoreDisplay ) { display = restoreDisplay; } else { // Get nonempty value(s) by temporarily forcing visibility showHide( [ elem ], true ); restoreDisplay = elem.style.display || restoreDisplay; display = jQuery.css( elem, "display" ); showHide( [ elem ] ); } } // Animate inline elements as inline-block if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { if ( jQuery.css( elem, "float" ) === "none" ) { // Restore the original display value at the end of pure show/hide animations if ( !propTween ) { anim.done( function() { style.display = restoreDisplay; } ); if ( restoreDisplay == null ) { display = style.display; restoreDisplay = display === "none" ? "" : display; } } style.display = "inline-block"; } } } if ( opts.overflow ) { style.overflow = "hidden"; anim.always( function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; } ); } // Implement show/hide animations propTween = false; for ( prop in orig ) { // General show/hide setup for this element animation if ( !propTween ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" if ( toggle ) { dataShow.hidden = !hidden; } // Show elements before animating them if ( hidden ) { showHide( [ elem ], true ); } /* eslint-disable no-loop-func */ anim.done( function() { /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); } dataPriv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); } // Per-property setup propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = propTween.start; if ( hidden ) { propTween.end = propTween.start; propTween.start = 0; } } } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // Not quite $.extend, this won't overwrite existing keys. // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); // If there's more to do, yield if ( percent < 1 && length ) { return remaining; } // If this was an empty animation, synthesize a final progress notification if ( !length ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); } // Resolve the animation and report its conclusion deferred.resolveWith( elem, [ animation ] ); return false; }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( jQuery.isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = jQuery.proxy( result.stop, result ); } return result; } } jQuery.map( props, createTween, animation ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } // Attach callbacks from options animation .progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); return animation; } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; // Go to the end state if fx are off if ( jQuery.fx.off ) { opt.duration = 0; } else { if ( typeof opt.duration !== "number" ) { if ( opt.duration in jQuery.fx.speeds ) { opt.duration = jQuery.fx.speeds[ opt.duration ]; } else { opt.duration = jQuery.fx.speeds._default; } } } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // Start the next in the queue if the last step wasn't forced. // Timers currently will call their complete callbacks, which // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // Enable finishing flag on private data data.finish = true; // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // Turn off finishing flag delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, i = 0, timers = jQuery.timers; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); jQuery.fx.start(); }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( inProgress ) { return; } inProgress = true; schedule(); }; jQuery.fx.stop = function() { inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; } )(); var boolHook, attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { hooks = jQuery.attrHooks[ name.toLowerCase() ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, i = 0, // Attribute names can contain non-HTML whitespace characters // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 attrNames = value && value.match( rnothtmlwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { elem.removeAttribute( name ); } } } } ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { elem.setAttribute( name, name ); } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { var ret, handle, lowercaseName = name.toLowerCase(); if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ lowercaseName ]; attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? lowercaseName : null; attrHandle[ lowercaseName ] = handle; } return ret; }; } ); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { // Support: IE <=9 - 11 only // elem.tabIndex doesn't always return the // correct value when it hasn't been explicitly set // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); if ( tabindex ) { return parseInt( tabindex, 10 ); } if ( rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ) { return 0; } return -1; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // Support: IE <=11 only // Accessing the selectedIndex property // forces the browser to respect setting selected // on the option // The getter ensures a default option is selected // when in an optgroup // eslint rule "no-unused-expressions" is disabled for this code // since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; }, set: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // Strip and collapse whitespace according to HTML spec // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); } function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } if ( typeof value === "string" && value ) { classes = value.match( rnothtmlwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } if ( typeof value === "string" && value ) { classes = value.match( rnothtmlwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value; if ( typeof stateVal === "boolean" && type === "string" ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( jQuery.isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( type === "string" ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = value.match( rnothtmlwhite ) || []; while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // Store className if set dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? "" : dataPriv.get( this, "__className__" ) || "" ); } } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { return true; } } return false; } } ); var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { var hooks, ret, isFunction, elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && ( ret = hooks.get( elem, "value" ) ) !== undefined ) { return ret; } ret = elem.value; // Handle most common string cases if ( typeof ret === "string" ) { return ret.replace( rreturn, "" ); } // Handle cases where value is null/undef or number return ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } } ); } } ); jQuery.extend( { valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; if ( index < 0 ) { i = max; } else { i = one ? index : 0; } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // Support: IE <=9 only // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && ( !option.parentNode.disabled || !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; /* eslint-disable no-cond-assign */ if ( option.selected = jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { optionSet = true; } /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } } } ); // Radios and checkboxes getter/setter jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } } ); // Return jQuery for attributes-only inclusion var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && acceptData( elem ) ) { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true } ); jQuery.event.trigger( e, null, elem ); } } ); jQuery.fn.extend( { trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); support.focusin = "onfocusin" in window; // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); dataPriv.remove( doc, fix ); } else { dataPriv.access( doc, fix, attaches ); } } }; } ); } var location = window.location; var nonce = jQuery.now(); var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml; if ( !data || typeof data !== "string" ) { return null; } // Support: IE 9 - 11 only // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) { xml = undefined; } if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = jQuery.isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }; // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ) .filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) .map( function( i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { return null; } if ( Array.isArray( val ) ) { return jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ); } return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: location.href, type: "GET", isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Url cleanup var urlAnchor, // Request state (becomes false upon send and true upon completion) completed, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // uncached part of the url uncached, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { if ( completed == null ) { name = requestHeadersNames[ name.toLowerCase() ] = requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( completed == null ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( completed ) { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } else { // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ); // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || location.href ) + "" ) .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); // Support: IE <=8 - 11, Edge 12 - 13 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { urlAnchor.href = s.url; // Support: IE <=8 - 11 only // Anchor's host property isn't correctly set when s.url is relative urlAnchor.href = urlAnchor.href; s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; } catch ( e ) { // If there is an error parsing the URL, assume it is crossDomain, // it can be rejected by the transport if it is invalid s.crossDomain = true; } } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on // Remove hash to simplify url manipulation cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); // If data is available, append data to url if ( s.data ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) } else if ( s.data && s.processData && ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { // Abort if not done already and return return jqXHR.abort(); } // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds completeDeferred.add( s.complete ); jqXHR.done( s.success ); jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( completed ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { completed = false; transport.send( requestHeaders, done ); } catch ( e ) { // Rethrow post-completion exceptions if ( completed ) { throw e; } // Propagate others as results done( -1, e ); } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, "throws": true } ); }; jQuery.fn.extend( { wrapAll: function( html ) { var wrap; if ( this[ 0 ] ) { if ( jQuery.isFunction( html ) ) { html = html.call( this[ 0 ] ); } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { elem = elem.firstElementChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); } ); }, unwrap: function( selector ) { this.parent( selector ).not( "body" ).each( function() { jQuery( this ).replaceWith( this.childNodes ); } ); return this; } } ); jQuery.expr.pseudos.hidden = function( elem ) { return !jQuery.expr.pseudos.visible( elem ); }; jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; jQuery.ajaxSettings.xhr = function() { try { return new window.XMLHttpRequest(); } catch ( e ) {} }; var xhrSuccessStatus = { // File protocol always yields status code 0, assume 200 0: 200, // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport( function( options ) { var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, xhr = options.xhr(); xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } // Callback callback = function( type ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { // Support: IE <=9 only // On a manual native abort, IE9 throws // errors on any property access that is not readyState if ( typeof xhr.status !== "number" ) { complete( 0, "error" ); } else { complete( // File: protocol always yields status 0; see #8605, #14207 xhr.status, xhr.statusText ); } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, // Support: IE <=9 only // IE9 has no XHR2 but throws on binary (trac-11426) // For XHR2 non-text, let the caller handle it (gh-2498) ( xhr.responseType || "text" ) !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } } }; }; // Listen to events xhr.onload = callback(); errorCallback = xhr.onerror = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort // to handle uncaught aborts if ( xhr.onabort !== undefined ) { xhr.onabort = errorCallback; } else { xhr.onreadystatechange = function() { // Check readyState before timeout as it changes if ( xhr.readyState === 4 ) { // Allow onerror to be called first, // but that will not handle a native abort // Also, save errorCallback to a variable // as xhr.onerror cannot be accessed window.setTimeout( function() { if ( callback ) { errorCallback(); } } ); } }; } // Create the abort callback callback = callback( "abort" ); try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; } } }, abort: function() { if ( callback ) { callback(); } } }; } } ); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; } } ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, callback; return { send: function( _, complete ) { script = jQuery( "

        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.

        slepc4py-3.15.1/docs/usrman/contents.html0000644000175100017510000000610314054125732021127 0ustar jromanjroman00000000000000 <no title> — SLEPc for Python 3.15.1 documentation
        slepc4py-3.15.1/docs/usrman/citing.html0000644000175100017510000001000214054125732020540 0ustar jromanjroman00000000000000 Citations — SLEPc for Python 3.15.1 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.

        slepc4py-3.15.1/docs/usrman/tutorial.html0000644000175100017510000005524414054125732021147 0ustar jromanjroman00000000000000 Tutorial — SLEPc for Python 3.15.1 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 subspace
        

        All the above settings can also be changed 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
            50% of basis vectors kept after restart
            using the locking variant
          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)
          block orthogonalization method: GS
          doing matmult as a single matrix-matrix product
        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.15.1/docs/usrman/index.html0000644000175100017510000001572214054125732020410 0ustar jromanjroman00000000000000 SLEPc for Python — SLEPc for Python 3.15.1 documentation

        SLEPc for Python

        Authors:Lisandro Dalcin, Jose E. Roman
        Contact:dalcinl@gmail.com, jroman@dsic.upv.es
        Web Site:https://gitlab.com/slepc/slepc
        Date:May 28, 2021

        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.

        slepc4py-3.15.1/docs/usrman/objects.inv0000644000175100017510000000050314054125732020551 0ustar jromanjroman00000000000000# Sphinx inventory version 2 # Project: SLEPc for Python # Version: 3.1 # The remainder of this file is compressed using zlib. xuM 0F9E.Vč zm fZtyͧ-[g6b%u ˆ['w[B/4!/ĢAlVԀ ܤg_-eΌq_iyNV#7ٳrʑaEWɟ̏ʏq߉L s~$$ Index — SLEPc for Python 3.15.1 documentation slepc4py-3.15.1/docs/usrman/searchindex.js0000644000175100017510000001543614054125732021250 0ustar jromanjroman00000000000000Search.setIndex({docnames:["citing","contents","index","install","manual","overview","tutorial"],envversion:52,filenames:["citing.rst","contents.rst","index.rst","install.rst","manual.rst","overview.rst","tutorial.rst"],objects:{},objnames:{},objtypes:{},terms:{"12f":6,"12g":6,"34269e":6,"41957e":6,"74118e":6,"76012e":6,"case":[5,6],"class":5,"default":6,"export":3,"final":3,"function":[2,4,5],"import":6,"public":0,"try":6,"while":5,EPS:[5,6],For:[5,6],One:[5,6],Sys:6,The:[3,5,6],These:5,Use:5,Using:[2,4],_steqr:6,abil:5,about:6,abov:6,academ:0,acces:6,access:[5,6],acknowledg:0,acm:[0,5],action:5,addition:5,address:5,advanc:[0,6],advwatr:0,after:[3,5,6],algorithm:5,all:[3,5,6],allow:[5,6],alpha:5,alreadi:3,also:[2,4,5,6],altern:[3,5],analog:5,ani:[3,6],apart:6,appear:5,appli:3,appropri:[3,6],approxim:5,arch:3,archflag:3,argument:6,argv:6,arithmet:5,arnoldi:5,assembl:6,assum:3,author:2,automat:6,auxiliari:5,avail:[3,5,6],basi:[5,6],basic:[2,4,5,6],been:[0,5,6],behaviour:5,being:6,belong:5,below:3,bidiagon:5,binari:3,bit:3,block:6,both:6,build:6,built:3,call:[5,6],callback:5,campo:5,can:[2,3,4,5,6],cfg:3,chang:6,cheap:5,cheaper:5,citat:[2,4],cite:0,classic:6,closest:[5,6],code:6,coeffici:5,collect:5,column:6,com:2,command:[2,4,5],comment:[2,4],common:5,companion:[2,4],complet:5,complex:[5,6],compon:[2,4],comput:[0,2,4,5,6],computacion:5,computeerror:6,concept:5,condit:6,config:3,configur:3,conjug:5,consid:5,contact:2,contour:5,conveni:5,converg:[5,6],correct:6,correspond:6,cosimo:0,could:6,cours:5,cover:5,creat:6,cross:[3,5],curl:3,current:[5,6],cyclic:5,dalcin:[0,2,5],dalcinl:2,data:[5,6],date:2,davidson:5,decomposit:5,defin:[5,6],definit:5,demo:6,dens:5,depend:[3,5,6],deprec:3,describ:[2,4],detail:6,develop:3,diagon:6,differ:[5,6],dimens:[5,6],direct:5,distribut:[0,3,6],distutil:[2,4],document:[2,4,6],doi:0,doing:6,done:6,dsic:[2,5],dure:5,each:6,easy_instal:[2,4],edit:3,effici:5,eigenpair:6,eigenproblem:[5,6],eigensolv:[5,6],eigenvalu:[0,2,4,5,6],eigenvector:[2,4,6],either:[3,5],element:6,els:6,emploi:3,encapsul:5,end:5,enhanc:5,environ:3,eps:6,eps_harmon:6,eps_nev:6,eps_smallest_magnitud:6,eps_target:6,eps_tol:6,eps_typ:6,eps_view:6,equal:6,equat:[2,4],error:6,eta:6,even:5,ex1:6,exampl:[2,3,4],execut:6,explicitli:5,exponenti:5,extract:[5,6],facil:6,fact:0,fail:6,featur:[2,4],few:5,file:3,fill:6,find:6,fine:5,finish:6,first:[5,6],five:5,flexibl:[0,5],follow:[3,5,6],form:5,fragment:6,from:[5,6],full:6,gain:6,gener:[5,6],get:[3,6],getconverg:6,getdimens:6,geteigenpair:6,getint:6,getiterationnumb:6,getownershiprang:6,gettoler:6,gettyp:6,getvec:6,gitlab:2,given:5,global:6,gmail:2,gradient:5,gram:6,gyroscop:5,hard:3,harder:5,harmon:[5,6],has:[5,6],have:[3,6],hep:6,here:6,hermitian:[5,6],hernandez:[0,5],high:5,highli:3,hood:5,how:[5,6],howev:6,http:[0,2,3],illustr:6,imag:6,imaginari:6,implement:[3,5],implicit:[5,6],implicitli:5,includ:[5,6],inde:6,index:3,indic:[3,5,6],inform:[3,6],informatico:5,init:6,initi:6,inlin:6,insert:6,instal:[2,4],instanc:[5,6],integ:6,integr:5,intel:3,intend:[5,6],interest:5,interior:[5,6],intern:[5,6],interpol:5,interpret:3,invers:5,invert:[5,6],iter:[5,6],its:[2,3,4,5,6],jacobi:5,jose:[2,5],jroman:2,just:3,kbx:5,keep:6,kept:6,kler:0,krylov:5,krylovschur:6,lambda:5,lanczo:5,larg:[2,4,5],largest:[5,6],last:6,lead:0,least:6,length:6,leopard:3,lib:3,librari:[2,3,4,6],like:3,line:[2,4,5],linear:[2,4,5],linux2:3,lisandro:2,local:3,locat:[3,5],lock:6,log:3,mac:3,macosx_deployment_target:3,magnitud:[5,6],mai:[2,3,6],main:6,make:6,mani:[5,6],manual:5,map:5,mat:6,match:3,math:5,mathemat:[0,5],matmult:6,matric:[2,4,5,6],matrix:[2,4,5,6],maximum:[5,6],maxit:6,mean:[5,6],mechan:5,memori:5,method:[5,6],methodolog:5,mfn:5,mfnsolv:5,minim:5,mirror:5,modifi:3,modul:6,more:6,most:5,mpd:6,mpi4pi:3,mpi:[3,6],mpich1:3,mpich:3,must:[2,4,6],nconv:6,ncv:6,necessari:[5,6],need:[3,6],nep:5,neutral:5,nev:6,newton:5,next:[3,6],nleig:5,non:[3,5,6],nonlinear:5,normal:6,note:6,now:6,number:[5,6],numer:5,numpi:[3,5,6],object:[5,6],obtain:5,off:6,often:6,onc:[5,6],one:6,ones:5,open:3,oper:[5,6],opt:[3,6],option:[3,6],order:[3,5,6],org:0,orthogon:[5,6],other:[5,6],out:6,output:6,overrid:3,overview:[2,4],packag:[2,3,4,5],pair:[2,4,5],parallel:[0,2,3,4,5],paramet:[5,6],part:[5,6],partial:5,particular:6,particularli:5,pass:6,path:3,paz:0,pep:5,perhap:3,petsc4pi:[2,3,4,6],petsc:[2,3,4,5,6],petsc_arch:3,petsc_dir:3,pip:[2,4],plane:5,pleas:0,point:6,politecnica:5,polynomi:5,port:[2,4],portion:6,posit:[5,6],possibl:[5,6],potenti:6,precis:6,prefix:[3,6],previou:3,print:6,prior:6,privat:3,privileg:3,problem:[0,2,4,5,6],problemtyp:6,process:6,processor:3,product:[5,6],program:6,project:[0,6],properli:3,provid:[3,5,6],pypi:3,python:[0,3,5,6],quotient:5,rang:6,ration:5,rayleigh:5,reader:6,readi:[3,6],real:[5,6],recommend:3,rectangular:[2,4,5],refer:6,refin:6,region:5,rel:6,releas:3,relev:6,reli:[2,4],remark:5,rend:6,repres:6,represent:[2,4,5],request:6,requir:[5,6],resourc:0,rest:5,restart:[5,6],result:6,retriev:6,revis:5,rii:5,roman:[0,2,5],romero:5,root:3,row:6,rqi:5,rstart:6,run:[3,5,6],scalabl:[0,5],scale:[2,4],schmidt:6,schur:5,script:6,sdk:3,sdkroot:3,section:[3,6],see:6,select:6,set:[3,5,6],setenv:3,setfromopt:6,setoper:6,setproblemtyp:6,setsiz:6,setup:[3,6],sever:5,share:3,shell:3,shift:[5,6],should:[3,6],signific:0,similar:6,simpl:[2,4,5],sinc:6,singl:[5,6],singular:[2,4,5],sinvert:6,sistema:5,site:[2,3],size:5,slepc4pi:[2,3,4,5,6],slepc:[0,3,5,6],slepc_dir:3,slp:5,small:5,smallest:[5,6],snow:3,softw:5,softwar:[0,2,3,4],solut:[0,2,4,5,6],solv:[5,6],solver:[5,6],some:[3,5,6],sourc:[2,3,4],space:5,span:5,spars:[2,4,5],special:5,specifi:[5,6],spectral:[5,6],spectrum:[5,6],split:5,st_:6,st_type:6,standard:[3,5],step:3,stop:6,storag:5,store:6,straightforward:6,structur:5,subset:5,subspac:[5,6],sudo:3,support:5,sure:6,svd:5,svec:6,symmetr:[5,6],sys:6,system:[2,3,4,5],tar:3,tarbal:3,target:5,techniqu:5,test:6,than:6,thi:[2,3,4,5,6],thick:5,thing:6,those:[5,6],thu:[2,4],time:[5,6],toar:5,togeth:[2,4],tol:6,toler:6,toma:5,tool:5,toolkit:[0,5],tran:5,transact:0,transform:[5,6],tri:5,tridiagon:6,tune:5,tutori:[2,4],two:6,type:[3,5,6],under:5,univers:3,universitat:5,unless:3,unpack:3,upv:2,usag:[2,4],use:[3,5,6],used:[2,4,5,6],useful:6,user:[3,5,6],uses:5,using:[0,3,5,6],usr:3,usual:5,valencia:5,valu:[2,3,4,5,6],variabl:3,variant:[5,6],vector:[2,4,5,6],version:3,via:5,vicent:5,vidal:[0,5],view:6,wai:[5,6],want:[3,5,6],water:0,web:2,well:[5,6],wget:3,what:3,when:5,where:[3,5],whether:5,which:[5,6],wire:3,within:6,without:[3,5],work:3,would:6,x86_64:3,you:[3,6],your:3,zero:6,zxf:3},titles:["Citations","<no title>","SLEPc for Python","Installation","SLEPc for Python","Overview","Tutorial"],titleterms:{"abstract":[2,4],Using:3,build:3,citat:0,command:6,comment:6,compon:5,content:2,distutil:3,download:3,easy_instal:3,exampl:6,featur:5,instal:3,line:6,overview:5,pip:3,python:[2,4],requir:3,simpl:6,slepc:[2,4],sourc:6,tutori:6,usag:6}})slepc4py-3.15.1/docs/slepc4py.10000644000175100017510000005613614054125754016743 0ustar jromanjroman00000000000000.\" Man page generated from reStructuredText. . .TH "SLEPC4PY" "1" "May 28, 2021" "3.1" "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://gitlab.com/slepc/slepc\fP .TP .B Date May 28, 2021 .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, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC\-II/24/02 \- Revision 3.15 D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2021. .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’A\fP or the cyclic matrix \fI[0 A; A’ 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 For general nonlinear eigenvalue problems, the following methods can be used: .INDENT 0.0 .IP \(bu 2 Solve a polynomial eigenproblem obtained via polynomial interpolation. .IP \(bu 2 Rational interpolation and linearization (NLEIGS). .IP \(bu 2 Newton\-type methods such as SLP or RII. .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. The user provides the parameter\-dependent matrix T via the split form or by means of callback functions. .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 subspace .ft P .fi .UNINDENT .UNINDENT .sp All the above settings can also be changed 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 50% of basis vectors kept after restart using the locking variant 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) block orthogonalization method: GS doing matmult as a single matrix\-matrix product 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 Python Package Index. 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 \-LO https://pypi.io/packages/source/s/slepc4py/slepc4py\-X.Y.Z.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://pypi.io/packages/source/s/slepc4py/slepc4py\-X.Y.Z.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\fP\fB/lib/python\fP\fIX\fP\fB\&.\fP\fIX\fP\fB/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 2021, Lisandro Dalcin .\" Generated by docutils manpage writer. . slepc4py-3.15.1/docs/slepc4py.pdf0000644000175100017510000046235514054125753017357 0ustar jromanjroman00000000000000%PDF-1.4 % 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 2 0 obj << /S /GoTo /D (section.1) >> endobj 5 0 obj (\376\377\000O\000v\000e\000r\000v\000i\000e\000w) endobj 6 0 obj << /S /GoTo /D (subsection.1.1) >> endobj 9 0 obj (\376\377\000F\000e\000a\000t\000u\000r\000e\000s) endobj 10 0 obj << /S /GoTo /D (subsection.1.2) >> endobj 13 0 obj (\376\377\000C\000o\000m\000p\000o\000n\000e\000n\000t\000s) endobj 14 0 obj << /S /GoTo /D (section.2) >> endobj 17 0 obj (\376\377\000T\000u\000t\000o\000r\000i\000a\000l) endobj 18 0 obj << /S /GoTo /D (subsection.2.1) >> endobj 21 0 obj (\376\377\000C\000o\000m\000m\000e\000n\000t\000e\000d\000\040\000s\000o\000u\000r\000c\000e\000\040\000o\000f\000\040\000a\000\040\000s\000i\000m\000p\000l\000e\000\040\000e\000x\000a\000m\000p\000l\000e) endobj 22 0 obj << /S /GoTo /D (subsection.2.2) >> endobj 25 0 obj (\376\377\000E\000x\000a\000m\000p\000l\000e\000\040\000o\000f\000\040\000c\000o\000m\000m\000a\000n\000d\000-\000l\000i\000n\000e\000\040\000u\000s\000a\000g\000e) endobj 26 0 obj << /S /GoTo /D (section.3) >> endobj 29 0 obj (\376\377\000I\000n\000s\000t\000a\000l\000l\000a\000t\000i\000o\000n) endobj 30 0 obj << /S /GoTo /D (subsection.3.1) >> endobj 33 0 obj (\376\377\000U\000s\000i\000n\000g\000\040\000p\000i\000p\000\040\000o\000r\000\040\000e\000a\000s\000y\000\137\000i\000n\000s\000t\000a\000l\000l) endobj 34 0 obj << /S /GoTo /D (subsection.3.2) >> endobj 37 0 obj (\376\377\000U\000s\000i\000n\000g\000\040\000d\000i\000s\000t\000u\000t\000i\000l\000s) endobj 38 0 obj << /S /GoTo /D (section.4) >> endobj 41 0 obj (\376\377\000C\000i\000t\000a\000t\000i\000o\000n\000s) endobj 42 0 obj << /S /GoTo /D (section*.6) >> endobj 45 0 obj (\376\377\000I\000n\000d\000e\000x) endobj 46 0 obj << /S /GoTo /D [47 0 R /Fit] >> endobj 48 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 49 0 obj << /Length 770 /Filter /FlateDecode >> stream xmUn0E"y$U6ɢ5h)8",c\Ws/.7?3oz(yѧ2zvAwG݌=yzVmMמMW\=j_I*Cn_f &1y+Sw$F5? S4!1!r3Ҵ>Za?ɻ=ñK}:j=w(]UU#5dkuѥy e*x12+Sx,099)5tJN'{fS 2R̼  KV iXBRs>^ .KCc2c4&Wo"q8^zl p5u%=cK(q/?xQcc/s/G|-mƯP/S8+8 4fRSYZ"?.01шŕ[KPKS60e;U}Z8~Sg; _gvi;Kc g̭oZ ' L^ ^$K{)p/EX{)^ (½ߎ> stream xmVMo8WhCj~H\HrhSbd IJ!ۇռâ؃޼!9_?7?UepPgww͡pcӷx6׏;[Rd񟇧}z eq<÷LUJM롯{Ni~l1>_\}~8ȳ&qq;RUl, g^Cs=~k*[4^͖OmTI:/nY㵞1Ls*J`#l neܢ8Wi+xA= pMn?SbZbh`-؁6+ҖtΘ 7 XB[M98h򯠛& jwJ7ɿq/1n^i 1z1MN F_ HĒ?K|M,愆f[ eR SxK¿ec QR+ey h_8khG_=soSs9S[<9^r%Z:k`N<'{>[AkZ&# 9%F-܂ϩ=WC'}k_KRV³ᯌQV $!6n/xzjgu endstream endobj 51 0 obj << /Length 1026 /Filter /FlateDecode >> stream xmKo0 ޡ@wbKE=îv;pCL2bzn>|ܘnxv%p[)OM5ף/ߝ\qh%-p< ~۷k'}r6?F<.oƓOVn<k~I1=9;[ˡy6Rw2)]~C2Dww<_ws1vn<ďqǝ{r?x),9|?\LR`йiߺq߿.I㻦\}𥹢9/85dNrf=KʳXxΈ9&^zz_/e%^I%Юskfy*x7`?J#+ ruAι.Ț낼 \duA\r \WyUb^卼:oy#yuȫF^7꼑Wl8/a9/Qr^8⼐Wyޅlf`;%[mp$[MyX[R+IL6`Yː 9HKvvI6)+Kk ㇹ7+/Qe\G$@if<`F[fĩW诉70O*Ƴx"ÜE)=+b~sN~v?SȆG?r#W?r#7?p>Sfcʥ~dFbw4ψ}}kfGl-?r\q# ?zSf fWKfUM}k5sBoh:0Ν4}{CUNzVcC6&9&jQ,^ktfj)B5&^SkP{MkMC"^+C*^kP{BEքkm V:^LZ"R[=nj lp\u[#CWCi8,ߙ~4?s endstream endobj 74 0 obj << /Length 1468 /Filter /FlateDecode >> stream xYKs6WḦ́(A$ND=DA6.dDJDur." `.:G$4#->~F幈ܪ]D*W\D!IQDL"Zm߮˄,.)nzi`dD9PQBA@{hO" "" L8DBF cgVUoZGʻ8E嬓MMKi_6}Sy30LsÜ5g4$3LL2objӸTՃ1]"13|o ߛ0UUK/ vP)aOOQ +'UYި#;p=~FG; GMm:UU+}ͣ-/qheڗjY|b_ÚCl"PBy U%PcSz'Jπ9'Gg^bLBh8sOgyʦ4]ߕyȾ>A;_@\N eٹe^ U0}So#q-cjچJۆb!uy6jsaB ?8rHRkӵNjh nJkMS _mZED+ 6 wnJJ =-C(䯗ngMяcoRNuRt.-$f΁354|fmT#{Uk7uw<ԫ[HȫUn+aRdNL@k]/oǪYWz'U:?\zZC]b՜6}$TlHx7G+@aVXhl`wkB0ĸU󁫕4~ګ/^ 9m -k7y u=,p30F\^$~Uwñ:ݻՇaHV,붯 둪*{?dƿ f'޾ ^l`@ Gw785Ž℩ni07'={2nz;AoBh[Ѐw͵łwewΌ^壬kê̷B9:g]"sW (%j\H b'"Zmiz endstream endobj 47 0 obj << /Type /Page /Contents 74 0 R /Resources 73 0 R /MediaBox [0 0 612 792] /Parent 83 0 R /Annots [ 52 0 R 53 0 R 54 0 R 55 0 R 56 0 R 57 0 R 58 0 R 59 0 R 60 0 R 61 0 R 62 0 R 63 0 R 64 0 R 65 0 R 66 0 R 67 0 R 68 0 R 69 0 R 70 0 R ] >> endobj 52 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [71.004 496.437 128.687 505.413] /A << /S /GoTo /D (section.1) >> >> endobj 53 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 484.501 144.607 493.348] /A << /S /GoTo /D (subsection.1.1) >> >> endobj 54 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 470.489 161.225 481.393] /A << /S /GoTo /D (subsection.1.2) >> >> endobj 55 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [71.004 450.608 122.45 459.585] /A << /S /GoTo /D (section.2) >> >> endobj 56 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 436.616 270.912 447.52] /A << /S /GoTo /D (subsection.2.1) >> >> endobj 57 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 424.661 242.28 435.565] /A << /S /GoTo /D (subsection.2.2) >> >> endobj 58 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [71.004 404.78 136.657 413.756] /A << /S /GoTo /D (section.3) >> >> endobj 59 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 390.788 213.538 401.801] /A << /S /GoTo /D (subsection.3.1) >> >> endobj 60 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [85.948 378.833 170.918 389.846] /A << /S /GoTo /D (subsection.3.2) >> >> endobj 61 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [71.004 358.952 126.684 367.928] /A << /S /GoTo /D (section.4) >> >> endobj 62 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [71.004 337.034 97.355 346.011] /A << /S /GoTo /D (section*.6) >> >> endobj 63 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [177.932 239.067 215.241 249.971] /Subtype/Link/A<> >> endobj 64 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [225.144 239.067 255.371 249.971] /Subtype/Link/A<> >> endobj 65 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [299.315 239.067 328.984 249.971] /Subtype/Link/A<> >> endobj 66 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [76.384 221.134 106.052 232.038] /Subtype/Link/A<> >> endobj 67 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [76.384 179.291 106.052 190.195] /Subtype/Link/A<> >> endobj 68 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [143.7 179.291 173.368 190.195] /Subtype/Link/A<> >> endobj 69 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [225.851 167.336 263.161 178.24] /Subtype/Link/A<> >> endobj 70 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [432.185 167.336 469.495 178.24] /Subtype/Link/A<> >> endobj 75 0 obj << /D [47 0 R /XYZ 71 757.862 null] >> endobj 76 0 obj << /D [47 0 R /XYZ 72 720 null] >> endobj 81 0 obj << /D [47 0 R /XYZ 72 320.217 null] >> endobj 3 0 obj << /D [47 0 R /XYZ 72 143.958 null] >> endobj 73 0 obj << /Font << /F56 77 0 R /F57 78 0 R /F60 79 0 R /F61 80 0 R /F62 82 0 R >> /ProcSet [ /PDF /Text ] >> endobj 86 0 obj << /Length 2432 /Filter /FlateDecode >> stream xYIw8W6{&Ȟq2J'ir&) .j._?@-HdP _@b-b;!WoCjnк^Ysf)q7S뫽pq~B\F"܇_? ޡЍ^$ECsCP{xn3`?]?CˇhyQlʶ9lZB6/Sh*XJtO+kY.MxȡԍJb۵Yݸ3B{ .E}!9nfR@!ekTxв3_4-x)r -LtKH[\u:'ʳ ;e;[UV$`6=4Pm6!zSr u(h pOkpB7HU񕲑> 3%:pȺ˕gaRZܩQ V釴VZVʄ1bQ ȶ˪@KKMTʴuTDl}7tfz^A(\oj'jpLdEo$׌S҂2A`{! -LFQY MT@m&k ELX0ފ#[.jZ060,Q]dz-N8SKߦőKvfٳ@hc3C/4AF9/3v HZ`6}VZ/|oMGv*VrUVCB&MVyyL )K6##uI#TlC;3Aj^6նo2E )axz#WDQ&. @0Lx0(dq:@ی] =^̇y]-5Nb6Ē<#r~kfWro7ZętT=07ll[ٗyϊףAݯGG}c+2yk%չ(j&:dHoScY8yVxF 2ɻwi'ՍpG4~ijK8+ly$.$AZ),tBµWxxUn=2g]T`W:}7vrsV |gKʶꌫiWG%4L5L}`9j'lA==⑿NiKO *F;wۛ:PP8=A$R$# FPuJ4[=H)|y=ͽw[PWo1鈊TOe9(~aZ|w)롚=aNkg4ݴ=ZvϙgW{3EVTNL.CErcHw*Ղ2LԧiU.{蘞Y4ᏻe*!z ޟ(X _H+e;bnᓺmGm(( uє1jx Ǘ˻djbMV;P79M8}K7έN䉗XT~ZIqob@/ȺU\EKcyɭ_9E8E.|S|9 7<(.^_f_UWcz"M|D쬮4Ls^"pZm۩Z_esf8wWE;wǢ8ÚKb)6+(eRi}E`Dɮktju# pʡNJps/_fT~ɳ2\_2p셍6't >dN/3yߟdWG%lTE{Og" w; !8ȏ]2Tɏja2 -ʳsaثh@Y>Y+^L=_jv<\ YGnZV{T'!Μnf(2MfnSB endstream endobj 85 0 obj << /Type /Page /Contents 86 0 R /Resources 84 0 R /MediaBox [0 0 612 792] /Parent 83 0 R /Annots [ 71 0 R 72 0 R ] >> endobj 71 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [98.68 706.884 104.657 719.377] /A << /S /GoTo /D (Hfootnote.1) >> >> endobj 72 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [105.155 706.884 111.133 719.377] /A << /S /GoTo /D (Hfootnote.2) >> >> endobj 87 0 obj << /D [85 0 R /XYZ 71 757.862 null] >> endobj 7 0 obj << /D [85 0 R /XYZ 72 592.324 null] >> endobj 88 0 obj << /D [85 0 R /XYZ 72 108.681 null] >> endobj 89 0 obj << /D [85 0 R /XYZ 72 89.512 null] >> endobj 84 0 obj << /Font << /F61 80 0 R /F56 77 0 R /F62 82 0 R >> /ProcSet [ /PDF /Text ] >> endobj 92 0 obj << /Length 2875 /Filter /FlateDecode >> stream xڝYI6WHU8\DJUT$s(  V~ f휰=l}o"X.o4\lmie:0xzEQů$Em*nЊњÅel;&,5҂+(SWS8V)JU̖La9Zt[unN궽iq;*Hú0{}#c|3pB?Q ŏ50r$e[9{~C?/e ר+719pq*P,rF,L 0w gCa4Mݰ B_emp .FMƶK~cc8غpCԧKz4dN!Q9 7M Tz5}+AۡceAd=U#0Cc&`mؽ(#xeֻ/pߘ& eVaG&\!.&1SU\[K"RWVɼVf8N"wX0m >L2>)ūdF m ji]6cĝC+/hX]p8-Zj"Үr;Ԫ'M64Z`ȌتRAЕBg{WL^Ols\gۄøNw {բLoCxd$k0o%O׺ĬLt;gW(! YNhtkh4Yoxk .SqU)ta/Ҡ ! 7\ \xJYӚrC0Zƺ "T bQP,^;ꡣ [bV:>CgMj֥Zv) On:8]š*PYч!&7! ` j$lD`JI% *AJVH<\h@Pת. %8y.A: 08bQ((RgY<X ƨheVt*w:Bǥ?0:Ȇwr#t8~a#/Yw!1ek`$7g#5f7>.QVU=cnD8 0zIFy6ɿ9Wǭ$'IZQdQ94lcLWpT=6F@ ,GG=&EW" j_ r,EDT_#~7~N%%eSϜ`hfd[v9JNd2&pK27$CI/ɼ'q(v272ȯ)B "D5u!&Suw{oZKdO?ݪ`3Yą.cߠXdjGk00MY0Do ex?!"a0 ӣ/ ]SRl*Ą5ޢy׵}lGoNjRpy9;K:P+;+$\NR ٘f$/(@g|KRWnwH(#gaI?O2l'0`>Wd\m/?<Dn-/}P9(OKX_5~ 2ɰwܜ^W4p;q6~aXH`Z->"tH1m(Uy\7F%Im>.1}VȽ DifJ03A;,}L endstream endobj 91 0 obj << /Type /Page /Contents 92 0 R /Resources 90 0 R /MediaBox [0 0 612 792] /Parent 83 0 R >> endobj 93 0 obj << /D [91 0 R /XYZ 71 757.862 null] >> endobj 11 0 obj << /D [91 0 R /XYZ 72 538.526 null] >> endobj 90 0 obj << /Font << /F61 80 0 R /F62 82 0 R /F56 77 0 R /F60 79 0 R >> /ProcSet [ /PDF /Text ] >> endobj 96 0 obj << /Length 2472 /Filter /FlateDecode >> stream xZYs8~ϯ`վPwfj7=ON( Eq<~ERcsTj,4ssM~}:bNꥑەF^b'c~.;O"X+x 0{50tjJY5r"MK ʪ+VUe澈{Ј寝-#Q=r9mkî2lڬe/ (9^t|n?ylҌ4UUkz)Pjzj-m]- i{z#=(i[l^oq{_n='+8 URԷjrWvX )\@!B/SKo>Bع2GUdq*44eV Oh4夔b%i4zy^ 4FMk<@0&BάZpKjQgQV 6px 53 T;{Yf b,U֌i_)2%'Xu!q2 @ƫz\1s44@bs7DJw k}fhb5xVEA5 n:)f7A)TQfy&mkUcJ,ʶÞZ[ !(pկ8Nzs'>NAACJ{I:tV{{"ǂD xA'Q>< 6@B, <t0BͼB6di?tD ^GK29qd>N}< 0Lbzh kƁR_-K:OVbRcjcK}a~ұgn?csc>LrXMi10gXq1hI G%0r'AƵa0Qޛ(1{dk ֲ0 `KM Da~S`"iv[Tԏnorz%6ql 94!:Pe֢_Xvc=EqJKìj0 I$BƮVu9dMzXf` M>2929?.zlm&?5 i7T8pz Z q\(y61ԤT"W-lVax0g% b@S2N^ä 3ۙ Yk+Q^2P|&jm^ڐ1`+s҂DC%bDƵ00. q@ypq 7[7+Gm,/%,]lљ/)HxcwGS8tM킕/<ڏwP)**%]ai&.J{0I9{4DжYݪ+O2n#NK2+IگB06z0+QP~m% 9/)jnjg7GiсC>?̧ f0c%bE^} {; ئ@ٓ=3;+/fPҾ 9{_S6j ֜ࢗsܛ{k9L@0AJb)XS'|& vz8;0'jSg0đ_V_hYuN69>[cUoa"L\ Β2OP}jXߏ[l`P qjw !XNnܶ"^{ X4i;1ƾco/…=n~jˋ.mT~S_ 8=FvJ>?뎀 endstream endobj 95 0 obj << /Type /Page /Contents 96 0 R /Resources 94 0 R /MediaBox [0 0 612 792] /Parent 83 0 R >> endobj 97 0 obj << /D [95 0 R /XYZ 71 757.862 null] >> endobj 15 0 obj << /D [95 0 R /XYZ 72 680.916 null] >> endobj 19 0 obj << /D [95 0 R /XYZ 72 602.141 null] >> endobj 94 0 obj << /Font << /F60 79 0 R /F61 80 0 R /F56 77 0 R /F78 98 0 R /F79 99 0 R /F81 100 0 R >> /ProcSet [ /PDF /Text ] >> endobj 103 0 obj << /Length 2473 /Filter /FlateDecode >> stream xZms۸_Nfޙ7sֹMƞ_CK_t$ehʍL%$b̻+=o}ٗ?2;!9gcEa8HI{!Hxn^kO'/B#n oc~ʻsĔ˥w5$dlV+]׺o. Đ#H|.@;-0o7 N8Ab;MUpG-̒>(9sKCh浪Vﰄ_YM;ҝ. w"B?NEb^eD&ld0VZrivC4S pF/? 8ƫ/hOmd8|ԏ#>VL8y!jӦu1eb?Wo?㴒ػ7#0̽ -@I$ FڌxOPx j:^#BBPt.JODfMy0CYcZ^Rci)ϊ,OÇ"̛]Fk6 Ʈo8 ẃ!DC@D O7!ˈmIuv˹bfi1l]W%*6 qnZ/_zO$ESG\D]m} B`˖,1Q39A` %@vgkmXvmZ2[|t $ 4+_@HכesۀR?B$%i`Z5 7n4d!pdn۬Eib9[T ;]h+Ѷ'miPfLMsVB&#&U uj [.͢*֛66Jb5 yn5īt.PA@ິ`n=aF&i (5+7s6) ӀSbAh-hQKb_ UkP vA!]}Cy=i)u7%q mi3b /"-cV7'X` WSg6290.pI{MٔcTsB@/ƒ@!Q #|Z EsBt``PF?JR*G]vU`g&v9`6r{p$ Z!X>F T`%o+DHϺPAۊ`pfۉ?;wùZeOf /} $U0R4i{cAT6gUG=r%uvp"c}GI@cj G(XQUD~GbRˈIt kroXm0+d5'P^`Á"x^ *ʖ3B5D`JtX74I|QAn;' %/Yl/̈́)/zV+!%)|Р,bPE[s1#*s7PzFűfcASs! ٚ[|6Ds9~ފьMr]=2o"axL}>ߞ&eɋKrF-YVYi-Ӎ] -Mfv^ Q׷,n,vU?~H4&(ޥ(<[5R}]K> endobj 104 0 obj << /D [102 0 R /XYZ 71 757.862 null] >> endobj 101 0 obj << /Font << /F81 100 0 R /F79 99 0 R /F78 98 0 R /F61 80 0 R >> /ProcSet [ /PDF /Text ] >> endobj 107 0 obj << /Length 1981 /Filter /FlateDecode >> stream xko6 ]k%)wH Ee[ȒȏɒlgG_1bQpf8O&Y8|s v `9AL(c IW="F<(_w > 2Dbaoy0v"pnNȝ s3s>|Qz,B1"-E'_fv>NJ (5doqk 0|RD'Oș2 RGV/'f(4Ҏ%ySۗLR"ؒިo{uލ$6GPqXg OԧYpd#ʊ9u}^bb/Y4Μu?L<=)|1V.;XO ~PEQh^,36zf ~buђSI{4DMת2aיDq<"܀q-dQ%|ѬÛ쐁KJ!-WպW#%,4:>ߝ%EJ*N8mDCv^'_,<#0z4'#ц5s18>}~m 'WjzC?NޗE2$c wcԚ2zDD]geW?v2oJby@[l9V{Z۝~fNӇwj+ */bCw1/7u\}+1䧵9M i jgf 4e) 1뭒y(})Sj1`Jwu_-xSx,j{÷@Ӭoԥ3hqOp(xb/|q?'4 &4aK; `,:yaĎy'q8P q,YYEl)E {akcXN%Y6~.9DM%3 7&D]|5bc]K;h&i[Ovi[grnNBW]mʪޓ 5ŭR@4yUMufX(Ks6̓F~-unM ',X9E-Pe{Qq `,=((*P8FP]4/X5?Cifm;VX-kvDj֞v3ڽS|7UTg[9O73h0Blr6}Gm/f{Z1sR1Xpohʬ3e1!,PQ˵J[rPJ J;lM&>UJe aiXv> endobj 108 0 obj << /D [106 0 R /XYZ 71 757.862 null] >> endobj 23 0 obj << /D [106 0 R /XYZ 72 519.961 null] >> endobj 105 0 obj << /Font << /F79 99 0 R /F78 98 0 R /F81 100 0 R /F56 77 0 R /F61 80 0 R >> /ProcSet [ /PDF /Text ] >> endobj 111 0 obj << /Length 1864 /Filter /FlateDecode >> stream xڵXmo6_`3G]a[[&0tEHUod'ޯyeG)8CD{yx{#u o_fg> / ϒ+c0L%~u[}~O` eYK|/!ˢػ.wE{MmBUͷN`'V?쵺]|2X?ve}vdkr7&gI`Ȣ̚o?vv׍ڠvruo=tQzP;vw7Vk*+MqN~s zSlJ UeScg3>-n.Wn} ݮEKm`KRp4YîPs׻-w< B[ySz&uf~b33Z;](TߋDi 9uxxtfh(0UP+)MW@P4C._.a{ќJ=k|!}s4i6es#KVUoAoMSR+mm r#/e}juo+] 0٩&k WGX:j:[axu5ghF PJnUIRz[aLjˇ+ =W[[SIsaKF^WmsM;4ht|0.^֖yKd ֞8~ŸwW+Y (+`GQ07bxs6$dI t#cˀ1Ѡ Yjfc,C9$릳SyS*>h]pZ-hA }%Ҝ8{<\-W&i &@ y;z)>8mx[!~]$,LC758bG|.>_G6(6f#/-Dd)+ YNvKl ho Fz8n1tJ[UMV1~\Nk#{QMl|#~wJmܿ#?”BP'I@o%IVhxYQv>3nXx$a 77깡ч, ~MR#)ߛ8/9n~ <0.BH)9L@p~ޟ|KbO,ceڏ詇*է.[ExAQґ ,ZMciB2?a~.ZZbjg?Bhc0@@ɐ`[&F#iEfv&~n€z_6[ۅJ-@0s8 ^>gLS- U_/HY9%5M6MHa ?+BŒwU@#1Zϔ6jҽs`{ %Z5DܢHd|2nS_`ZĜIxʣ/ ] ًe8,q tB endstream endobj 110 0 obj << /Type /Page /Contents 111 0 R /Resources 109 0 R /MediaBox [0 0 612 792] /Parent 113 0 R >> endobj 112 0 obj << /D [110 0 R /XYZ 71 757.862 null] >> endobj 27 0 obj << /D [110 0 R /XYZ 72 250.296 null] >> endobj 31 0 obj << /D [110 0 R /XYZ 72 211.142 null] >> endobj 109 0 obj << /Font << /F78 98 0 R /F61 80 0 R /F56 77 0 R /F79 99 0 R >> /ProcSet [ /PDF /Text ] >> endobj 124 0 obj << /Length 2245 /Filter /FlateDecode >> stream xYOܸ_0#c;T[^vi+ۭ0$d =vI@ؽWԹqmq+?1љ?a3G2Dl #8LSN;ׯ3Bc||3Hp.;>$ʹ;'IUIVQϮUq1z]n >Cέ^FԹA; RxsHy$0"!|A|_x B)4zQ "\Y6XzzDiG5E4t}$62:oIvc&Ύ./fvk673;g\O&U\q6@9)lgY}$**+4SǼD_Ҟ'4J>9uyFLN2hfTR-3tR"*ƸQ1o=r+YzvgnQPLV`:7ߨ(ʼֱ0JMWQ8Ѯwn0=Jh z^浾9=>39tR"彐R" Nڌ[/z_G@eP}{ n{Ӷ#dDlI͋h,=xj6ӾkZmuϠxM $x -G0`h-zh/,e4^&IF,hӢ=MT‡l=f;E7Ko?ƮąJp=F~o4h(xg3H@X\$2&16"Ie wbM3=7qJKckYw+z䞜~.@bVW~S#D~'`#rnUnbvshB|]olx?ƨ){@  x p/-o;o;x?] vshXP ~90G6|pEqɅ$ʖ?a5TnUoɶ@/bRİ}@-2}-Nq8P~ц&eۥx GXLj$_W@= N Oٔ)JI< :il~&)6rЁ$~h]򇼎_O]} 7 |?ڠS&ؽxY.CƩ|%%9zuR"iۼ_e .J2]&hm60Ư~hd-/ FC~=<:;9˃wGc}\B- Q]1Jv  URu v>9xw1v%jRS|xLN6ElK{~۠~MQ5<]XU-@*66-We[ge^U. 4/ànͶu1gy/c7R'mXGM&_qse2'Hk|Iߚ:L}v`Bo}f%~2tfT/Sf ~ՊMq9wFphiKoWu lnatEI֗x-]i"yCǔ{V+_`ͪ endstream endobj 123 0 obj << /Type /Page /Contents 124 0 R /Resources 122 0 R /MediaBox [0 0 612 792] /Parent 113 0 R /Annots [ 114 0 R 115 0 R 116 0 R 117 0 R 118 0 R 119 0 R 120 0 R 121 0 R ] >> endobj 114 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [115.407 503.544 135.113 516.037] /Subtype/Link/A<> >> endobj 115 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [198.156 503.544 204.133 516.037] /A << /S /GoTo /D (Hfootnote.3) >> >> endobj 116 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [227.316 503.544 260.86 516.037] /Subtype/Link/A<> >> endobj 117 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [272.148 503.544 315.923 516.037] /Subtype/Link/A<> >> endobj 118 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [187.626 485.611 217.294 496.515] /Subtype/Link/A<> >> endobj 119 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [187.626 467.678 217.294 478.582] /Subtype/Link/A<> >> endobj 120 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [95.91 449.745 128.349 460.649] /Subtype/Link/A<> >> endobj 121 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [95.91 431.813 133.22 442.717] /Subtype/Link/A<> >> endobj 125 0 obj << /D [123 0 R /XYZ 71 757.862 null] >> endobj 35 0 obj << /D [123 0 R /XYZ 72 594.88 null] >> endobj 126 0 obj << /D [123 0 R /XYZ 72 564.337 null] >> endobj 127 0 obj << /D [123 0 R /XYZ 72 418.872 null] >> endobj 128 0 obj << /D [123 0 R /XYZ 72 263.572 null] >> endobj 129 0 obj << /D [123 0 R /XYZ 72 85.817 null] >> endobj 122 0 obj << /Font << /F78 98 0 R /F61 80 0 R /F79 99 0 R /F56 77 0 R /F62 82 0 R /F60 79 0 R >> /ProcSet [ /PDF /Text ] >> endobj 134 0 obj << /Length 2416 /Filter /FlateDecode >> stream xY[s~ϯ<0b@8&K%$`rO䜗S\>zz|gg~Ŀzg?1ўSGEħ sk(N txHB):s~Ic=!l |A"Y|p5[~w|/O޾鯳ϳק#54=hG2܉qgGh^=~}qɕ g%FY_9zwRB盞y ar'Q߃ A Ő?cn0!tYUxUNFƔ52%5:xLr7+'wo*5IU~}XqW%v27o`eiv[g^Ϋk,tQ%rVs<;]$ff\Zg xF_J}Z)Il7/U 4?𥨷M"%]š1pJ=AD ?fuE5`UO`~Ah!#7^.|sNF6##U>^@TÍAqDJo> $Vd4a*Xee:3;cN{OhoBk.c4/6. cھIӴv}yo2dBa$pF3-&q4]5=6EL.:#,y-Zz4`DfP*}h@RYf;.ڬ.{Iw%gd /[Ӳ3lķ)yWKc uBi:{k5 ;YQើmS| ŧ1@n6D bB¹= #HQtۮIsfD?p>xGYXa`:X2mUG Vكo)a1OhۣQӒڮ{:nB^؋b z+D\_%ߏ45݊~i޴unF{AN[B:IP„OTA(<  bl..+!M 3.f{{mgv;mɐf /^PUq\as{hP ڇ3 U1-ԻWlPZrxiY0N̫zjitbHHYX{3x+zK֌-k'+{ǻ,1kEҠv 66fk],-GWi52pMj.Ug׽McLܵE>,2'ξ ~o5jDnUƓG.fɩTc4"[g꯱e$9 ` 炨(z Nho jo <HD(c54̏ WF@fXZ5sirJlѿw2 4x2wNMuwj8/Dxh׎a5VǢ,"Bu6hߎHE~9]|x$ d74E99ڟZQ`{&o3Qf84o 5K+,vݢavs}q?``: W 3q'قl=Qr:0,#Ǹ#A@ xՇmo{!)Y"b[#xR}#g ?Q~p'yi^c@t~MXа~ۗY[jQxqAcYW_d=?)a,Z`1$N \]!X9m2&Z "K[暏K{YܺLG.ERoGe /"QtLP&RW/8];vn!&ɅcjX6 UݗIWN(Šӯ=2}R]/WF av/ 9Qǩ250ҴM9O9`oXj) H"_PLctMD@,3;g@*^tޒ 7BD}_Hޘ8YCN|1/9ȃ , ?YiG-w&v伺Kk :k( 4. &T0p& j~uGmnCΪJpflְ8Y~Л `Vzi @ars+t76ҭciƸ3 Vqĉ!=ݫ b?M9:xqmmrIJģLΗ/crTHM> endobj 130 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [239.84 140.615 442.19 151.519] /Subtype/Link/A<> >> endobj 131 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [436.499 110.727 540.996 121.631] /Subtype/Link/A<> >> endobj 137 0 obj << /Type /Annot /Border[0 0 0]/H/I/C[0 1 1] /Rect [95.91 100.71 170.132 109.676] /Subtype/Link/A<> >> endobj 135 0 obj << /D [133 0 R /XYZ 71 757.862 null] >> endobj 136 0 obj << /D [133 0 R /XYZ 72 426.909 null] >> endobj 39 0 obj << /D [133 0 R /XYZ 72 238.494 null] >> endobj 43 0 obj << /D [133 0 R /XYZ 72 101.706 null] >> endobj 132 0 obj << /Font << /F78 98 0 R /F61 80 0 R /F79 99 0 R /F56 77 0 R /F62 82 0 R /F81 100 0 R >> /ProcSet [ /PDF /Text ] >> endobj 158 0 obj << /Length 416 /Filter /FlateDecode >> stream xVN0}W-vm>" M !0~ c jKsmOS @LW@ W>b0[v95N*0A|8{8(͉C0`1z]آ*VCM%Jf%T"&Z!\.U%OPdj "T|C٨nHL#-JNh8 ނcqgxha:R5WJ4c3[хO(/QȓȤ-0_Yʴr޶{v<¦%O3J؍|+4)envp&{.d}soC}k0KA |Op7q:]  7,ehB!#!u._[xV* kI endstream endobj 157 0 obj << /Type /Page /Contents 158 0 R /Resources 156 0 R /MediaBox [0 0 612 792] /Parent 113 0 R /Annots [ 138 0 R 139 0 R 140 0 R 141 0 R 142 0 R 143 0 R 144 0 R 145 0 R 146 0 R 147 0 R 148 0 R 149 0 R 150 0 R 151 0 R 152 0 R 153 0 R 154 0 R 155 0 R ] >> endobj 138 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [134.814 649.747 141.788 659.934] /A << /S /GoTo /D (page.8) >> >> endobj 139 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [154.739 601.084 161.713 611.271] /A << /S /GoTo /D (page.8) >> >> endobj 140 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [252.741 589.129 259.715 599.316] /A << /S /GoTo /D (page.8) >> >> endobj 141 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [158.465 577.174 165.439 587.361] /A << /S /GoTo /D (page.8) >> >> endobj 142 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [168.428 577.174 175.402 587.361] /A << /S /GoTo /D (page.9) >> >> endobj 143 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [147.945 565.219 154.919 575.406] /A << /S /GoTo /D (page.8) >> >> endobj 144 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [157.907 565.219 164.881 575.406] /A << /S /GoTo /D (page.9) >> >> endobj 145 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [141.42 553.264 148.393 563.45] /A << /S /GoTo /D (page.8) >> >> endobj 146 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [147.945 541.309 154.919 551.495] /A << /S /GoTo /D (page.8) >> >> endobj 147 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [151.262 529.353 158.236 539.54] /A << /S /GoTo /D (page.9) >> >> endobj 148 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [232.816 492.646 239.79 502.832] /A << /S /GoTo /D (page.8) >> >> endobj 149 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [138.54 455.938 145.514 466.125] /A << /S /GoTo /D (page.8) >> >> endobj 150 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [148.503 455.938 155.477 466.125] /A << /S /GoTo /D (page.9) >> >> endobj 151 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [128.02 443.983 134.993 454.17] /A << /S /GoTo /D (page.8) >> >> endobj 152 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [137.982 443.983 144.956 454.17] /A << /S /GoTo /D (page.9) >> >> endobj 153 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [121.494 406.243 128.468 416.43] /A << /S /GoTo /D (page.8) >> >> endobj 154 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [128.02 394.288 134.993 404.475] /A << /S /GoTo /D (page.8) >> >> endobj 155 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] /Rect [131.337 382.333 138.311 392.52] /A << /S /GoTo /D (page.9) >> >> endobj 159 0 obj << /D [157 0 R /XYZ 71 757.862 null] >> endobj 156 0 obj << /Font << /F56 77 0 R /F89 160 0 R /F61 80 0 R >> /ProcSet [ /PDF /Text ] >> endobj 162 0 obj [667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667] endobj 163 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 164 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 165 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 166 0 obj [500 167 333 556 278 333 333 0 333 675 0 556 389 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 214 250 333 420 500 500 833 778 333 333 333 500 675 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 675 675 675 500 920 611 611 667 722 611 611 722 722 333 444 667 556 833 667 722 611 722 611 500 556 722 611 833 611 556 556 389 278 389 422 500 333 500 500 444 500 444 278 500 500 278 278 444 278 722 500 500 500 500 389 389 278 500 444 667 444 444] endobj 167 0 obj [556 556 167 333 611 278 333 333 0 333 564 0 611 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 180 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 0 0 0 333 500 444 1000 500 500 333 1000 556 333 889 0 0 0 0 0 0 444 444 350] endobj 168 0 obj [333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 930 722 667 722 722 667 611 778 778 389 500 778 667 944 722 778 611 778 722 556 667 722 722 1000 722 722 667 333 278 333 581 500 333 500 556 444 556 444 333 500 556 278 333 556 278 833 556 500 556 556 444 389 333 556 500 722 500 500] endobj 169 0 obj [278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 278 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556] endobj 170 0 obj [278 333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 278 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556 333 611 556 778 556 556] endobj 171 0 obj << /Length1 1606 /Length2 8249 /Length3 0 /Length 9068 /Filter /FlateDecode >> stream xڭteT[5wwנ!HpnqCw; wfY_3gUaz) ZNpN^.1&U)uXLL0%uR`@ xEEEPg/`{e/ϟFNBl/~PgG }P mk FUSP;am7+\k( B@?r=aɺ,` v8aWק`t?@n?п9àOO'0m+8OU y O (OKŞ`pK+e ^OahBlŀX@`W''?Wֽ_e`ͅTmq(NP/~ggXHXN^[ * `ߩ E7qOh%7MKǧ<0P:Z:B&f?- d$N ҆kKsa'k[@d$_Uue:C /)Dya A<O-|Ll. X`OzuןO=@9(P<.-3^C;0`ŋ<uQA@?-|U:a\wM5.R| /Zٷ>DϨ@1ZyeVF38f `p/ ar>k#h@ )?x{}ep{='Iܒ/yyvQz.솷%]wx)K wa,Ո.uSoG6:GOZWYF䨖7WKA$DU]28;|t펮Qrep7cРaU녔BJ~@S' wǢ \fd:5H-d.%asbPb٦Pw_a솧K-Лe!dgՠ-tdZ_h?pYGp}Z2g0I.L>//{e>pѣg<7"2v{E:N"4VE8otL4KÝMjDF~وyeGRX*4S41~*ʟQƻ'gi ħH91&}j .9bGmEх]^.ЛeψrTE{qIx%\xiaw"&qLD,l^حim `K%A{%γ[Yw^?kJ7CD 2(}o0 {.!fS@<nD6$UXP Gl .,7(cbDL?,!o&iJb40я`6 .`DHӷlMuR,-"aiԷf㠍 vnHJf ]oJ~DJ~jY~K*NlqՄw3oO@`,L"xwPIhFLxFhyHn5AIwls@t-@{1tۭ|v-W`V6C)~eGA-y0)Xs*5=vM\SQS;ÒD Ux%UD-[t r}`=yg*2 :^҉NIYL[\!{Dsr^"Zsŭ\Ͽ)^̏#)"q荇V]YzwWvr}Qcz'(#=툣NtȒ6hr);!#$Eyc;h>5e6wF/foOj_SתIke/cڅsK`Irpdf8キ]n/#BʠM$u3 e5{ L[{DLP_\Wo7>W$xKO_h;`M4F,)2eaE1bcݜ- AXI:8&\Y$F.m@,%Oޝ:Ga e>!PÁCL3fŵxU%+7A]xF}YAMWs0n_̼GqdEtOHL){z@*8룕|Ib?~!]dW|sU!SuĚ{eU[h$P. rVLXYrZkÑ ie,4Ӟŷ~+]x]Zusb!_fB嗒-67k.M O!uMQ{n -ѡVY{ْ;y[ rPBW~{?>Oj);aK4Y/H{IѳaAb'mΧHfz:hFqLbZwyg>=[кKmt)uHߛlʺ Jp87: |<.kx}+yЦ?QUk|̽UB:d&^ XŊl]'r+ 8jq._Мהg;T tл}\wMssQ(_봈 yYEif4!5<7˦e%'U:p.2dF*/,UԤ_9PP)w7r/>J#<̤=k=bb<6*Ϻ(irdXӿV OQ#E!G%I{HIڃk=LMX1p%r@uxL}DQ9LVN>#7hP8;81UW 玲Gc\@@MW+# _coJp qfҎRXv#=+B/Tr%(&"!96vH#+ #:= O/iklO||+({rћĊyOۛr]r88o>}P`>6,4hfRGW“Q?WȵflcBHPHY_űې{fo="R_# 엙a5{(^9;IH3ϥ)rhq RjEۜ>-N}$JŠ9U%wXԃk7¦ɯ$$ZE7*`R?t\`#S`{-%+ۦR/TQOv5u37kƺHaPg ̔ ;ox$  *[(*x[;'ݍ>`ʶY#ʖ6 Q A 1|u:r!yVbM6+XMEXsv/Y߯ŭM Ei`d:DVl?:DQ}?D7? -*sI*ziIf[EQIH_Q'K !L\C~}iHU~*JV>k{[{!eB][X-KhxIbl^rPC8S(euCwj_6?D|.#^Wk/WYZ,UcR AY >m/ͥ{#şԖՆ 4 (׵=F>6Ͳt 8>(:t!>)]a9,(g)뿓n x6Y EJ byJהuOބY;zUл1 Eg'5smD:zҳUgqy+vś  S 𲘍5XBc,It@cݯr G{y.L:x|~/Eq`8-:՟2E}A('S{P*|$ETqeSRsXW2g Am6 #SY6:kc=[!sJgip[YLgrT#o_uT} ={5)27,ǰ;ĮzRzn+Lݱo5WEz)Ec]$mn!҄- aZ b:3J-s`qh[NA}O2W_Vדȃxl)tƮBAM$<0+äh"|!yU苳>>% A{LgG/UUgc+nR k: -f &~ ƴf G6YGiNÍS_]ՠ p tjYo;P=G΅zd sD5R`#0SuTۻ|cpdUg+;kAXJ&\x/v8?v<61ti%KPLxmW;.v ޶@RٞSQ_N:/yݲ*ߊ)B] $ b& #=1{%S2&+#d ZGK`zwq5_1F)嘁Tr/Qas%URcQ؜jX>RGP PԿ i8 \[ αS ӒcQݛJqOۿa& M'@aFNF=TȜaB@N4'w%9uHS(*#~hx:G F57.=s<"/Vq,@x%-<ŽxF*q p/J0Ab\ :TxˏL*.8rB/: &GO j9]`Ac\$=^YZX#^Lkdy!aPَ=V'B;iV4!jW$Kw{nUJJ!(P׻@ϐϣ> Bڒ^KIǬڊV"yHS)T`l{x֧WUx. nBfFk48gzfNMu@}m1_eK_s2ct\b&{Վ{2դw5}3d2`-o{w+V}Y"(3R0T@*(S`Ft55@#*o)vCb<48.Hy^y3òӇW'*SRU+0=)]V+2D-K_wsQe3V /feq3Ƚ@^Aꁍܔ4 ٬]AĶ*F$@=Ap=4#!:wY ,nٵĝu1L0w.ebrQmjҗ\NIpQ{ٌNbRׇ)f|8>]{| ~й6UyC8-L/k_"yC;GG氫,wQ]0b#mm)T).i4&Trve?YM8Kܷ;<=% MX E񅔟9#]@sw1)ۜCVJEFPLu3rlש±fBV}/+JB? r~vO2Oȡ:Pxm% O7 f6#.75\L*(`ѿUg$RǚMtllo͡KT?:+ddjȠJ7:ysYqa"i1I}ڎDDOjhxM}l#~ߤG 1yRKSV[$Ig~H1!L>eA¸@IEe}vC/|#!iK$""D afmnG,FZ:ݺǶ/Zz|6Ǝ߇qoiUmVS/LUrwd4KiH챑Ӝav_+FfՋ Xv UQYnR2|Q*Ai%$ljL%SyD$fNdiL,Պ3qWe4cF6'Mn<,Gm z&d]Y@ƌ0{4xaK`ʼ2c⮺ܓ~uXQjw)Q'C&Lk"̶ VtOM Hӗ8,Dy3ojڌސ$IRq"1 JpșقƁ#uizФg 1*4sHzzJ}:ٗ(q`>U $1 X,;4 O1Cí3Ԃrl6c-'+k+ǴR]̭t|uY/$gh8&zƞ䐜6Ewg_%F]`~k_̭+}jKMI*a&8gKQ3"pe#> -eu28 GX͐^JmUQ{CBXY_ΪÌxkv?PmSٯ# (R+/1{"D:ge6VumrfoKXa׆I<@Q=ACC}~VZ[aqH;Dkr8q"Sz5|ݒP/w50b'.s%vv5(^%{.0Ot-/Wp݄*'[t+\"^_~Ms SӞνy.yM :cK7J|s'zVy4ԳD Bӵs{19p܇ w5iV\$ז|H h"@mdrixYt6…䯙0.4#JF.F]/=78ew@r#b u8,*ǰ\,lWVHC]ϋ˿JʄK|GCߦ ez^bu5XCΑ%'/j248rxn*Hp0^tWm-LA2ve5>meY(15fHZc "s_ }"M7vNԇ{YE<;W endstream endobj 172 0 obj << /Type /FontDescriptor /FontName /ISOGAG+NimbusMonL-Bold /Flags 4 /FontBBox [-43 -278 681 871] /Ascent 623 /CapHeight 552 /Descent -126 /ItalicAngle 0 /StemV 101 /XHeight 439 /CharSet (/a/c/d/e/f/four/g/i/l/m/n/o/p/r/s/t/u/underscore/v/w/x/y) /FontFile 171 0 R >> endobj 173 0 obj << /Length1 1612 /Length2 17701 /Length3 0 /Length 18541 /Filter /FlateDecode >> stream xڬcx_&fgǶmcvcc۶m۶m;餓Ι3kZwUw&'VT63J:330-l+͜p@C' ;[1C' @hXXpQ;{w 3s'5--Z NG 3[/.@k;{_*@ 0D%TjI-ldma 0:v/v&K`p[t3l,~X8 m`akllvSwaL 7Ŀy::`g7 dhap90p6t/ſh8;Zؚ':/?:[mhm7fp vg f/ C;[kw QoJ }"7H"oWCz+{1ֆpC kÆ7i'ÿ5+ӿn@E 'csNˮfktU_331?g hk__5U+;_QwRuK-sx=, Nn%31ϕ53gVT mM26vvpN߂cA݀pkvƼ,S3Ҝjs'Ŵ{KT z|SCw+ >jy>ܗbYS$IQ(:8iJ.4"=ov ~p0M*)@Nw:ܼPa=#`v4_P$lj{`{ߟXgJqg5-Sv|Tҥ;4;hʳw,;et8ԡ10|c~yQ-v%H^(0+o+qW_ K  ݩoE- X*^<_.v^еx^;eF?X jE7Zn3yHDɞkDM#t%D>$?Fߗ,w@tv+.d3-Tk5z>O 'x7(חRuý ]4x?A3anubu Y2"BW|u=XfylQ`w,6AT/OG6(wd8$GG7SeEЈe3SD;^M}̻?BBjS]3u>Fm;Yʳ$` nmd|V91 `3>d+fx@ePn<'W;yEh A^)pUh7`Im R!)4q =/6:%ryr3 8I;~+w|z͙3;A3Fܨy҉p(蘰-^vŝPIhLreE? 4 YϝcVREHPҧ6FU$}Ff$,3-`G⩳mpmɉe:LF6ulbD1X E~2ZpDٵhgtn,NNs`wXl6)\X`& @,5D 4#^z6Nc-Mi/B!GA/Ijq^cG%e.}U*9+d1f(vZ7{7 _BdIͦ=5T]x4ÉH̒zmA(-#}lkvdU8p}`b5Q[<_`$m,ܘ}Wxi,S$ؿ. !f3wËc+? uLZ)j6 1z v^bLl6:@ca3%sX(T ٫Y1#7>C-yV5R=)]Nde vf%P]c8r›Zv1A$YCaOzӳbE(D9%^{]-`v$:g+\oѾ;ב4NxGy-˶-X=uY8*Ųɠ4!Hе1h݋%SR05ɀE` $/uj)%!d [z!>er4.gmAa5usn- tcGү{LqլZ41Sx()VG~# Ɇ5(1xn7d-W-NؚI>(SH!,!*p|Isƪ\2|P>DÆPx\! ք=B" C;xE6b*'̜߃`G{Wbk0G[nSǪ!deY7+aVp.<\%NgVޏY :`( k:3Yǿ[2*E,+&݌K@AޔΤr80?RH*/ k64&"8I0tOTPjvkr'2ss!0\WpTى^h)A.qj@luQeZ,tW+w^~ &!'69^N.͗~p!O4f%գr5h^h􃖗AfHcpepyZ`v_^d'G [nǔul`_4!b5PlzzrKln]Ji0A-JFb=\JP{0Kq?J9[{%Е1@tIEBahY M!W׃ Ch,ʪղDWw5 a:`h2!FI$zjcHa?J) Dfc@a|'迄%ΞڇgH?Bͦ*@\bxo˿V&RCQM "D.ʼK6qU,j3}Y^ ㅭl1Q(c'%~:)gr d9_F\Ar#]_^L퐑* 2VtlMeg;gf(gc! .oaЗ VVG cɍž,WW[&g9b~.\ybC6yOWiSie¥i%hu#!t_Uف"/4&B%O0/:V1zJԥBS^X-w|XwDªLf F@MʗT3h-foY#/z2TRV 9W~ 6lJds9 eЮ.ǍrzU? ?]fWU̴QYˋB@RdHu] ]K0WM)NNj&&,: ,mO-}YI$Bs [Bķ_4z#V7x]Njo> /Ǥ~1sVCwqFSMۄ}pϞh)uvH\xYHL {׳1MxOAji1-uA3r&w\":T< `D,Ĕ|4 (eHF#xvk{$ʢ&uL~/_t,<0yF›5Ft~kD!_voD@2@s)ΗƷNOiA bؿ͂uIorjA;sܮIOY_|cgvguz,G9G8rkG!&F R\4;GbV|`3 ܜj"%1T>gm0(K{GjwŦ-a8$\bNrA8dj;o![3.d DFT 4LcmG ;T``?X "鮤8.4 ] ?9K0wS5 .Ψ,Th؛6.`)- )ɋjUOz8/)!| 8纯ls[+ӄEhR#yKAR84bWǑDED߬lj6أn&xv>7.o(_>cKhFv7yO6q #5ON3fnn_w+;AsF)JP  +_,`6p9ڳ;lMӖfDf_k}Ca zH!ҏ?Y󒯆\|[kOB[~+u|Ȃ%Rj r>J6-=A3p֋bw>F 4ΛGԥ:u]r@RTaHr8g 64vD*~)J/(Z"X)*2KMV<#m.HEf#ݷ;hPv`;ƙ1c[hc=b"AsGj2(F>*_nbjԧp 0~O8()|HK7#\d7^:3@)2봏,`X^rxD uY{Ϝbg ڶfLO>*r+(Dxiku׆n c&y^E.5UU qf-riw|m.!/`lkff ) |vZijٌ+b06^g qJO,[Sxj\kEyP&Ǒ &: D9հ sMR^UKHTœ .g::n[CGiqm#s*xǤ(NJ1:,9$w|Drb dooGmU`<Ψ.<'>R\ Bԕ[#'t_ٓvqSLo&dR@Vd? ^Ɵew.NޓծfQ#wQ C1,WG]sj[IIi}a7~t<-%Յ j2:rCp>s-&R$% }ʘt+[ >U"?k|yQѝUfВ'[{isvW&zˬ5L}2к\ ={WnxAx 9wnl3|/gAs-M彁_Ë UdxGhl Zj`6/ƴro3M!ş&1kwG|i? ]Bz v;ajUupf9tAѭl9(kպ*mL~p_3s33}F2 l_E@ffMTEcP`W>BDfP/W4Vǝ!(:Fu>i},M@Jrj@N334D:zcp2`zr@|֜[?C$[| ikl PQ/A0(at2?֡qm:§4E<5% Z?}d^i o^̉\#"_NoI=kd(26X;wؚXdLhN;D'+& Nb b)γ6 tM;:H$0ax,0i-ϗbY/c`]"lfʴӰ~C}z>8ĻTٷbW|R5?U߼E,6FhlY{Kd @cع5r7Ơf7 ?Q?Y f6o4Wp$F1#x'/R&B:ܶ&CVbeJ'~! ]ވ z8lZ=4`.ճ |uCqEC 5V-WP(#lm2OP"m0)Bg% CE{@/mX ~ؿ ?2oPnHw$$ ǽ3S$HJJA>!2'~72:;CŽyZh -fuy' ~/% 1s?ݒzfG> 6;F!0/biBcDm1LH7kZoDQqhTpƎx8΃iД *i0VeZL!7nD g“JJQ$.̸1 b鵵iGx }J$r{%mGUp86Bbۦ}jq:"T~2YāQ=횤3P}#4Z{% (.ʳ0r:4jX'aֻpAW2d דp,+?OU@ǸM١e6O2/_e`"<8D,J$C5tT4?:ѹ< M+N{~^r5-&;P $P#M=D I8P 2R¬eKS=l}zx/c⠟eSr[6·&Јx@X|;qVMWΜnBdHa_E{(ԎkP>}P )+;wHA(PW5@5s#Q Lb]5 Xo)\*]Gf%[;]*VԪZ3f͐iV_槂pvDcĉ,rQ{oLPD-xB̥F\*|;w5'95|8%geUxaN ̢Z̓xJ5aM\,>R}|J j}[]Ѽ5N9N4 tζdnF? 9WaK82;:9lp|A`~-Ĉꖟ!vK;Z'{l)R|B$I5}7R$9ړ6*TB ٬ЪL+X::`JI89%^H7 ʯ"$k!.{iL)MYvha8go]7hg}FdIg$`d]b]eÞ߫EfU+3e^tCag&}ZKQ-;?.^O @ ̼kMYg ={k!64 ?AB=m=$X+&-A/,u3ikA%v$G=0FfWkdN"*81Y:ܓy,õ~Ta CY%!h^x*:̧z~g]\{'m{bs|Em ( U07 Ix M}.ǘxUr k~V*aݿD+t+GkZtq$շ {W=ʨ376Ȩ(,xH֋0H2O *Ӆ^w| a@bH+Şqkh1xP)pgD}]DorrۣR/jQDżHUy5Yʲ&C 2>70+p\>d?vfN7mP7%ȂG @HbS0*(ӽ7_`?&@ʀGα{k\?fX4`t00EOdU9؂k;5!+ E7c '{O:׾q8iMcq-wrV^bMdJUfY?ϜJ\&1 [fnMgƦxTgŷ),'o/هmu-y&ұD!m{;;5EV'0..qz9tȄi!|Hc,AM/mnHxQQka\TG)yyQ?VRӆ;Xbo콆L=ye$vMSHNjVupUe&E}lՙ>29~zS cYmZ{rb_NO|'w}4xmzdةݜUV$"fm"^Ӫpr:Ї  }vx,)|Ylw $ DDλv"stlb{mh [W=Ԗd5de٢q%*)\=yv-2ϫ-v6CMo #?RݬpM}^B|{W36GLv,|++<$Z͍YjOMH"$ ௱5+|cܥc6P>+zkQ>ݐ7ĕ]t^sIƯ9=ة . GR_&[N86s/r$!afC;^bH(}&f甛i4{ڊ[, *x$؟ݷ3jŠtxٳF\}K|`u 9KQ'2C+3STJT꼙f=Mig 3!r]5F5O=c @yW`%h,EɡάJohP2iO ;06޳oŊ`N~?8( qc-DfFH:$톎O#PٔWmO >|{_fV/Nzԟ&1#,IJ`1e9+90WJ.0dpvQ_<4ߴ5Di RF%BC+TY\W(eeI1?Q4A~)ū1 |C!P8_kdƱtBm_?%EO|zbcVA5Ji(FqyaIR 3&psSAW",ʽϨl/Ѯ~R)" $?Z0O߮CqSG2!0ߧ0b~7d2j` XKÛi 0BNVL#Tٓ/[0[fjgEu*A)+ky(K,'` _ r͙`-8nӕ ^O\e*Xėb*#.;VK;x]<274CwZFC-i"맢-5z\uTG&ڿ{H@9Ԅ8cg'r euݺD U~|48"}(j^–t菻oX5}v(S~g\ (?o_;[ Z5/Њ݀޳xBjFZ/̜6CbyAҬBסnC G)_qعr"JI\*h&c@?kn (o0EIٛ n|tǨ/,$6ESQ(qG]Oc 7tg!nf ~IIM8{*RkwHQL%_Ϙd{烾m0` *(4B (&$exB_@Nq$#D-k:Gɋ6Y憽FR Tee~Z_="şE7,0z<5%1o qPNDpnl8g몐^6w`]on2gh&=gU7?WnifNWu[F4o̍"L~M}Fa7tb kdqrGw^9f&T;RdވV7jw5*9c!W變ANY/ZGIqrIoqEb~< Em]9m' doTs$NVKG3V@szd ,c9Yi#&'Ujʒ1wE~[8`MM)cԸxnޠ**e3y3n%esTVIJxB}I N yLP3"W. {U 9aO&" ƱO3׋NVyҗ*0ī"` IRi-U51SoG\#ڟR  bgu!Rpƻ%*|1UEG)~ zFXva8oS1namy3B$ WXi\Y)e>O)kWOlX^Ѿ1+ƞsPG",m^b;I3Rl%Z\M ˅5H,vxҒL>I+Y^/ѱo5&c9z.<#!x6ឧS{MK[Bj4:4C?N GrkT[z7i~3Qn9ڞχo+ReP2 ٯM`07Jww}ݯ?W4wdr7.(AḣjCqe{EK؄䋊N"d[~jvsŠ5IЬ)"^P EB&.РԎ훔 t^q\9W/=GiR0<=6]y-U + opv+ok3eU_bn˭b6=nq*XwMCJv^9-pIJ1|Cfgtq8~|}+jRawqsv 7oFg┹߂4D5Z} cwDd(q!2s<ͪDddxN7JRYوpTwް5թXV{IpG@88*~MVW\amSH- k+װArPdK).LZ3r"$?:٥ۊsSIkl+p$Rz@(X6z~Tqq=-~ ²+޹ݯךS%oƦq0nʝ[(ndVCc4X6<&i"f\ f#eX߻,}沶o̜͗Y (&Ebuo ҟ VK &.[ߪ;<6'@`C;b^~Ns9$3 Pnl@E#߰n4gy$ \BZLrM>1m0+]sOʌU͔ NFNfxTI^i"\* ؘ55{R kiWJ^KθxMFK ǀdz16bW,(NcKi'AJ݇f#vcD^BJ'6#Ko8lQ/O`U`e8mrG9,O')&Cد^+ ]I,є񁮖i ':I5] fkYMkw 2Yn} [L=@=vLToSl>1ͷ E?m 1Le̱ͽOQ$i'WL!RڲF^tB3EvCc _>.CZnN$=vRf9:tSi)TؓR[q\8ZEvf3Q.Ub _/B=/ FDyzEAVi1/?#T*x{wdOHp#HQE$P멒DU\ObI./Tع,>RM>Cz CYoGd8 &/wePմ$_4Y@fǩrUꝗ{iLk8ec7w#Jq~d5q]Nc!yϷOz -|0%7j1p6gvAynR_鬽4hWM$M]ͷ~A{kȏ. %&ʨD>}-bs֠N燅od.[I,լ-NI[ǀ\C0c?+,Q33GbJX净ĕO_"/eQ 洷E+aeKl LNle̎a%,+,hλQF)=̩d#% %$YkcLv),%zbEk]eI 9fKnGxݫv,1l1On/Ez+%Ó 6DF bA!H%]t>BE>Ibn pv3 -hp WOψÈ"Trw}f8k&96Dyf29la,)~<ҭ;K֫8><[/rwz+-C.#C(?%sAuM{Ԓwo;Xt| `l_9Op_K3!6q .TC4MDׇ݊nmcWbgٔ ;| s0U@{10MdN\s%uw_JV*Wٛ8P-69뢎iJʃ<$,Ǥc=YDԾ>޲d pL$-5bM+ф -Y>) P90εg; O1`o/9G,ʅJʸ) #\/mSǰpKLdT$ U) r$`vl!B3޹#'2檾E5,ej^;AdPLrT})J왧^F<06ùYeY~4r&BV8sa =J!SޥUeǮ[|X&}B x_$L*fX"o>N3 mUiƀ:u!m>W>࿙ AX ꛿u\v0Pa|YȝzC>/M8 @nO~Zy'_ӿ7Nۏ(ǙkNJ\ˑ 3Ꭵ 9T,K/1V]AU)> ݡI e5H4%5FE/U`Hփ_*7 cjwoX .x|A{q"~ֆ%43l{D9}f]өg='GZ{ɛ9']ؠxѬq7@oU. - n\-0.FG߱B$zۼtJNf ^m9ə:d?sgrrr[A*lأNkAO Y{,3zȽ_Wdyt`dGBF\ &j^sIJՠ< ehhpFV&3O:k=;=ȝ>D_=W=)vVw  6vzv"J’ꍻTS^S' )R֣}#}3׼3]3}kO<3'ӄF]no~ϕ-Np)A%!YqU rٽюQ \RZ|{hq(v{p((+{xl1Fteۊk))X˽Jlп,9py{#o|9>gDWLHx_Tq5d\X\b6i$Enw2b_]96P xHo;#[}M+UgЙWv 4BdjpG tw Siw~ -t.x=}-ZJ^z¶5 rUJJnMAAEDv% 2 ^GUGUhk9GRS~cOAnz_F'V=]l7Mz;QgYS5~='".,܁F՚ZT|3عb<',ny>|mjw"p ~#B_;] 5~mYJ٢!;%w1Lh:[>]:]fLK˧1etk7X[@Vx endstream endobj 174 0 obj << /Type /FontDescriptor /FontName /WESPMR+NimbusMonL-Regu /Flags 4 /FontBBox [-12 -237 650 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle 0 /StemV 41 /XHeight 426 /CharSet (/A/B/C/D/E/F/G/H/I/K/L/M/N/O/P/Q/R/S/T/U/V/X/Y/Z/a/asterisk/b/bar/bracketleft/bracketright/c/colon/comma/d/dollar/e/eight/equal/exclam/f/five/four/g/grave/greater/h/hyphen/i/j/k/l/m/n/nine/o/one/p/parenleft/parenright/percent/period/plus/q/quotedbl/quotesingle/r/s/semicolon/seven/six/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 173 0 R >> endobj 175 0 obj << /Length1 1630 /Length2 8284 /Length3 0 /Length 9118 /Filter /FlateDecode >> 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> endobj 177 0 obj << /Length1 1608 /Length2 9416 /Length3 0 /Length 10236 /Filter /FlateDecode >> stream xڭweT\ђ5 @t.! w|$ofެͯuOU]j9^jrU fq H qafga(\5%f ȍFM-) HHv~~~4j$ leRסgddO?=/;Vˋ`@7j@klH+d  hPu5 3` uc0B,Jsfyw s69Ꮛ r;;+' .Pbnj% uvq6w;^J5Ong|)C. ?@ % / Wg0 N +OwY'Utp78]Av,h/9]^r[!hEb n>7@ (`DcUTfo"E;2vv@xaJ?w y DqՋl,l0e U5hңv- hfvniZm!X+yfVVUco./PZzy9̜l/? {`R4_`!P?sX]^{_J!<@hsPs T)Nv`:͂Uur,cO͞ ;vI\_J7+4;ůRt"Ogyشw6Fԍ~#r:tKug%u= vMM5m3ĮmbƬhTjA _!ye;s@f|(y]5z'Ž8Q0Zyߌсik,NcP S `˰]C|Č-<&A hROM̍$+F"fug').?^TN$nVZU脿[ sOogL3cIeALf%mkغ#$g.M=\m%$<gR 1b+3nS$S9SVNB[.?P'Vj@| &k)T!{ !?-<{Q\7!ﻯ$j*R7_FE [H k9U O LI2S5qKGNAdzF\iZ1%_=3K8ߺ쁜3Hu]ZR'jY%=m%y]L3!̭+De]ɧ ۷<<#yw %&X]d Őqe~v@U\L u$ ^>*tLR0LLߓ"U; F Z.Է顺Y@I[JqN|*Zn,vsq-O >s:ͲzK+|D֐RP24GTF&iG i)y2ǵ*$=.jo"$KA&:4wB &ѺCT9k%葅X5l鎭|U}!8wm](m3xVAUyi;Q߬HG8:ti9<}2Ҙ׺E[ W`fLJqId5 V|Y{!BC?&+ta~>? -ȼqLIxԷJS̽?  ӸG3}c-uui~JoxJM7\agp8b]!kkt_<~uK2R7qwԥHDU8F#ϰ/\P Z-H^G[zbl~9=sע^Q^ z]90Nξ`eʾ R?ֱDVsyFj󻺧gT jYӽrtmgVV@@މ{rh5_ผ`Ve~`0!RB?:F8*Gx8 6,rR)5,Zxz+jLm kBT2ѬsOwQwۮ&l82Ö:mg NiejXe}.qZۑ!a{+YNd j_J^#u*XŽ[Ӈxqo$ 1 $d|<0S~̇H"y*=F2ֈޤs>9\ oʈ M dۃ~Yy4e/V s85b">^Dy$hSHɼVk#XW Ac7V{̜Q烩S8|@x-R:GtH7:DM%>ߣ`F08 h(>8^kI Y S:Jet5TtÒY5{?(HͿ'&9ܮkF}"Jp#K@JS ܬCuKuFlM#P*ŏϿfaku Hr#zo @dQ&Ϻd\څeӲߐe2"BrIu'c<51eM3NTR_c8ROj=O>O %q I(#55.Ldnۓ6̀f{aWb>+LbOF刺#~>x‰is)Ƌ $"mUi|A3 N 'p.pJԼi<:vK6.Jc$&VrGStMM7H٨4u!J%&ZQFayeOA{ECO̅"20,4f xK?xH, ]ᡐ;6˄H9a q)#֩j]dT:}`V).1%w`A׼1RngL-A,9j f4:0?XmQ;ow2R?֨o:/C3Ĭ>J(XRst#zG,:shIVk7٦*tqAI: srgq#IGk#b-SZ9qsp) q %N,i)Ւ54OO &f'挓dgߪ#|V*?pe LYθ8VjyuSx]k/.;m[xA8~Z bT{[tأ;U/-q[?=EHMac^"p>%,~6"d C Zd&'٪#'I@7zɨ<;7ߧ%tIL;O']NO+Մz<|@57!ŗ;qun3F!b)3c4Y)BUGYhSp{?/]Tb$94`w͹Z!5od>ª(E­>^{;,x]YO@glo45cdj>.mV ԓ>tfxI5&qB%\!E1 `'Qi.Q}V{,'mPм`&D:>T,'xsM `XCO7_ ʏY]r{6ȗLaaw/jL܊dDXT jӜK9&o<;[# v%yjf)[qka|Ļ=KF)co1cɘ(8xEG@&c! ߱2< I` $ KLq!Cg_;~4AcA'K_,I0YH v޽`qWf-s#GpkBdWF ib^D's`|6eF>f-ۮxeԕ zoHBg`ag _nf&P'j-P[Uo,y)>X 4K ԍƀXH:g,EyJ%,n%/ƿ>SLܙ"}*Q8+$AX9UZEh4P&isPsCF1$@Z~Ѓ;WJ}Et;57`VNxS۟™#X/| YqB (Xw"}wZ=J'>rzFRT%O 6+igY4=LP3I[T@G2N9ó |߈YWM7w"c2s~EzȚ]m*ՠxm{|֓ΠS,[Wjt RFR$Ndx I}TcswAQ|{wp7d/I Ռ**Ǐ?V y!oy&XhJPNsQ1̒>]@%flh-׮rzp6JK"̡Wk&aak,-*Ϳ0>rb$ Z I!{x]VV5*! !^|F|s0l4U)f{$B ŮmWrP$ΚtOuUkePp;ep:!nU$4 ߮ch 4>=sӔMzBjvf7> ? o[ cΠD ʡch^`guRȼ~f(z8Ext+OXd?I~;W^PoqE&'O=nn#WlVuHEN+b?<,7ySU 0+|/O nX8Z?#`:-L^ђ6öįߚ ~Kζ@CIUhD] c!P iXH2SscLuf,跷0g^!Vff2yInT+FHܢ lLMo *ץקՉꕤ>[m;X՜[qTpClch6op{Ѓ?Nwv]n a  Aft@73:ISSg BJW8*4 !;l7C&i0U(ˆpd_uܽ˰rBtػjUmL ruhzsQu1i ;E]CĔ%L3dmHgQ7(GtVwFE,!ԅ*CxJ-ۺcdݪb׵)G&!is^`$ȝ9t&8rkˇR57oٳX"ɂ_un}H X?y>E"+7cp5(YeUd7r+w%9c1gx,Ec|Q5g0bT4 )=VQT‰Q@#BYURvF1#|Ră)[+ysvt"۩ 6*CmSrvw [#a-@Kّ=ab v\" LlOO0j*iuy|MK1k @*n70sSm9-MKIYq"]>ΐzuß0(Ķĵ=şUegwgNѨ<1c,c fdY,o4DO{i*zI>:>_]mh -]8'0'5 w{c6⚭t-`Bi/, W)-珑!E hNmT╭2CAprb]쯈=ٳSy86iJKR+/19<U%v0LeoZֈ7苟N=h=~}j[ |/a<IOVnCԉnNl Y[薁k[ EQw2=;ؚ8E#4Vle{dacCP08Zm$+aTB6e p|y$nTċۿ%kv<ѥCمd&zVC@,-TnO,3aꤪp?257j/=R$ECo6_c(o/9V7.DFmɧRn PHys*ZDok[7WE Rͷ*lHCkL2HQ޴|vm,L1]+hBɱҗ|JD-z)fpi#(q1uӯm-M+ΪRT̑s0yC#7%Gap֢`DT<#=QmSa%$$~^2i,“  BP-٤;zOo< pEpH[ k4cvW?N}E;Fj oЍ koQFYB1@e LM,%W ~ F֠XToGr6&Yh08|tqx (>$zڱcG ³ŧRM ,9'2_UQmڷkuC%xJ؛ \&FԐ049aJo`I &Q=]M_МxK_dA yKjnf3!OރV>5s)!ojac&\sȌqy}oV$Rv>Ѷhv>Cblq_OKzk^ƚ1#q w3d/:p[MhA)>=* ˟x>V_)R㍏`t#UB._U3J(IU1(k:ŧyB=i2ج(ق,jvž'[^!;uܕ "Eroۅ ;G2MnqG汩߽4v^ti&yL ïI+wEF>K/\L\I'G =DuQO_.gX~̯RŘI&(!7EIEě#o<0j' GQI-Tex69J-R< i8]xh%?\fB$NA]ڟ"z*妮^%Տ${O+:H&ן J;lo]v6c4x )"t[@ 4f@ -':n:Gԃ&g4WX !nA(Fz ( 8 xhP0 /CD!oф$_`*AMLy$k&iD;KcKǠ(9Cnb/Oqd[n&U#)!?W}6hmdwG0794]6s;>{3$q^ɌߞG4N 9"<Õ?3EH^%R|xWqx=2k}v5򽱛 rgZU_kk!*U Y~h.KtbC, ;Ƌn{[%P:cxPQdvcJ8 frȫeAWد]+~+$"GY^?7;K O1~TWW[ŔYz^9alA?sn*/3k:d@ƛE"rľ)}ckye[笈n X endstream endobj 178 0 obj << /Type /FontDescriptor /FontName /ENPVXQ+NimbusSanL-Bold /Flags 4 /FontBBox [-173 -307 1003 949] /Ascent 722 /CapHeight 722 /Descent -217 /ItalicAngle 0 /StemV 141 /XHeight 532 /CharSet (/B/C/D/E/F/I/L/M/O/P/R/S/T/U/a/c/comma/d/e/eight/f/four/g/h/hyphen/i/l/m/n/o/one/p/period/q/r/s/t/three/two/u/underscore/v/w/x/y/zero) /FontFile 177 0 R >> endobj 179 0 obj << /Length1 1625 /Length2 5995 /Length3 0 /Length 6818 /Filter /FlateDecode >> stream xڭTeX. `pAfF@J;i A@AJn?~:YF j^= g4\]?ԾP:*X{@ZXMu(wG;.kdA>SE`]hég?Ly ח??׵|{A3"-{A ]jm,i+A=QM.s9K`_o1zX,& r$YݭWxvb]jFFu'4iR?">O)lRmҼp'i~jCOj?+-XtG^b̘Mh(ܢ[@.)#IY;P+$t+2 9ɛ/M*DV g .V7rɩAщyiLv1 cZj 鸧)YX" J9GvIP.{"E.whYj0V r5x̋7GRss\\Z̒2pK;uOb4(Eęj*7cC/Rܢ~:W1~sdx@cCE7n¿BC=Gc޻ʏ\ɩI[8Ēi1NV.l*nͲ^HZ3Ժ#qwl/(rU=L9|',"ÃDyr;2Wީ#͆EOm"Hc:[]TSSN+8::wc{)^d|XAi6K29䡘Oc T.g4fE߸J@…t]{?SࣷM˗hJ?gJt#^fHfM4ib۠E¸c)vpb}oS[ߎ sJUMQhFR-AѺ|~MWk[ѻH9o'jP`eE܍k$S08}Fy۪_$Ê]$Ԯl-Dyem)kO~ w8Lȫ$clkE*b<t\E}J i{K=qXm/ֆTeð~q7Hb }fD GR^s"V9v٧I4/.V^'EG~Y?uJԊ{i[\}@K#])h8}⇇! D4HpXĞb<k-F3tBKDҏ+Wn>Ov:ͩYʲ#˟KA>i?, lNff%![> sKªJU T_ȗqn7⽓%{`xU>o^^;NU"9zꥹ(բ{ǀ Eâ 9Α[3-V6U# ˉ n.u[$TAGazJm{~?}f:ēO4:ÏWv)m}1-5+1}e,_bo̵ !ި6M!b<#s0k'Kڴ ?.`rFe3BwMcp{#2ToGrv^J}J 6Y[c똚DrA 1ԥc7dE%8'\#QU15w#nTi̒.c3x~4@zXLaPq|E~ßAg—xBaʳ`DYxPwy'sDI (! \@ly5(C:1nBbQ$d& 0B}x&K[y3m"@@mcgv[3]rm?G@oOz?qY ;-}8_0Wy]Ė[ zE;X~5Y2_OsмEڒ b~Vk)P?;9}r:@_.KPl.z#w[`3lw+V$z(P.sq (OTt議ˊ|5$+mM5xPXטd%JiOʧe]>Zt\\{ tr 4ǡ(KdžBt4lڊQrii^TU >DAq 70^P۬I0)d v^V'8={Jj&adԀ.i.h}c?u}w/JÓhyРp%S]jrU$w@7^+a5Cb 7o͌x:QDonN3$X2>'ߨdMl;psZwnvFRTF YqLӚb!o |uUѦnƳ%RǑdՊb< 4i!o;I:jvWk~[ّ̂Ur`/ 5Pś !{bjegʒ//Azis93$y]21bqEң4.kCGի-J/R c?wؗ TEɂ.{s*b,'ZcJV]lI8օ$AC:lRYXLGlUBxKƆ1UfyR/K+d:У3~Yjh2/BzVP L!L )k/\ҬQALQІ5Br}J65ۗDf#eA=Q *jv cxr ,=R*t4!v!=Q3CqjEU]/.j3gu ѿ5M)\ GA2br=-U3#Oܱ،=) ̧Wm8 cၽe2d)s'l)ŸjN5c7x[9TiZcO S{p1JZgW+5JG4sy [lƈn`j|"=Nr֜:fB]YSǕ_c}?fD;Gĩ*R6D74Y{Rk?y3'Zm٨9ufU\~z8ݪm8"b9)_ 9Hϼס? '?&~.Rv+EX(`'x7|F K2ʗRrC矀L;57t9[L5K (-7e۞ʚP~_G#EѢ6ՌYY>p˽yRTs0.6*f#gꂂeEh=Ǚ&g&2ojB_4컩 6~]a|i6#ܖ4@mW|p{R~E,X)A~8 E)%4t1+7|K;yBruk.\5!ӚHvqq'u*g[i<;]PPD%Pu+ kɏ\Y%|e2 j}*qv 7'Υ*}ˊ8A2 1e .UQhԼk-;HA5SZHBr]UnDԥ.-ԠocAH5jWL<ÏW7B$jF2AM?r::zR푒*;zł }Cõ׿l] >aR()чu:xvI%~ӱSQf#@Ble]jm;9vZE+;}9MZMyΩ7L˶?>QL 6)tҬe` !%RVKb6{C{5X Ȍ|S6q*ȵ\ tD|ȰޕzԿKA,3?|t  V(etgYmq_P1F,tjtwzZ |CvL%]T:nBp$ͳ8x}@)+\fjK p͗i X5Qŷv/d}V6Ee%ĿNq$B鈳B>COiB䃨c\ˈMF:s37kGlf9Hqmpdek)JňD}Lbww;]m澵&U4wQ(tscMþabnŸ>URidA3QQgJ*ւ-O_QCɁ&-I3$q6)Y4@^dVx cv]7jI˓eѷ+Yq * 2cɈ] ⊻#$Cz2>T\|bd:hEzΐjP$YrrRtΟ1jhRƋPr>W<_J`g_˧0fvT.xT4ېxZj]HlP&VCzauQ=.?F.·>k5*3 puNj8.8eu9Lۥ<V&&v@t/pЙgEn|w䒞[pNcZa=}|uVPI ;)%X?eg$ܴa(ܼiۉRa¯24oyKr{F#5r \,7P:Y=啃'6}xđ^h~TT9 nh38cLn22|/>7@0Yμ9xe;CY1ܷMmc%K%!z?/LfjuQ`zy>[]&;嬪|+6\3Ɵ*,O rnH+}5F^ a)SPbUΌ{A^ ie{P*C( 18Q'-g=vqԑgw DZSXś+DY! endstream endobj 180 0 obj << /Type /FontDescriptor /FontName /HCIQCW+NimbusSanL-BoldItal /Flags 4 /FontBBox [-177 -309 1107 953] /Ascent 722 /CapHeight 722 /Descent -217 /ItalicAngle -12 /StemV 145 /XHeight 532 /CharSet (/R/a/e/five/l/one/period/s/three) /FontFile 179 0 R >> endobj 181 0 obj << /Length1 1144 /Length2 1887 /Length3 0 /Length 2612 /Filter /FlateDecode >> stream xuS{7 {t>x2FGg c(<]<d`pX"֊ǡk@CH$$rR.a^fB "|ZYg-@t#@ \"d"L;h|,FvBv}&idL4n@ uk^ )hSs88;ԅ|Vმ\F!7< K` S)05) 0\r,8|0)08@(< MA7ǁ UzTf Y `Nw2\(''4mͬSPE|" ]M0  G'XE]/vO%Q@@IBx,WW -g28vޙdwdˁŁgM<28t1A\7( 0uŁ$ ͿY-0 J4 r(.J S*Ӂ?2)|giZ ƃ̠XF]JmpT3y֙O| ɒb7VGs]H  o =T\l&85H)JSX!T~arƇ(;)'U9kұϜ=&4Kft윻 fǞJ)]TW}M.ب]{lZu`oW6*9cx&#U7g4z:47K2{A,aJJ=)x/ EZ%VqZ^R tu4ChS 5mrXku>uni|4%v1T]O5)?+zsS@ĵ3',3,gm&*wfKk* )w<8Dǵ_{2K/Tn6T!cL~}kP>=q{dT!9pQhѶ4R;5Lxev=۷$:DW{x_0Isޏ^L|K&v+]Χ$)s(3,FhH젌XmD}_)bki!uKssw~)u_4o}48Zjǽz֫5aj;o^ړ+6R~r5A&z#{8]]RM{ Ged]/<);Y1tBG5H2)3?Ю֢6HI]5rۆlѽ\eg>k2x6uyAe$4c'47AY=p{,s!%֑ -zuR+AXt\ˆ/95kC^Gſ8 9ɪI [;`;Ý"%D׋~1;5$t&ݥ"fVcFx*.*KQ u]qԉ=#71BR6xY~<ߖ?e?.>@U=BAZwa虤CCbĞAAt~O0GӶoי3=~-LHG-Mkw}nPuk^!Ņ.ORM_=i#3e&@+ˍ4xn1BBo3*=@>vw\RSHV➣5@''qjRIc2•z% yv)Ӿ!pپY5|I)Nlg&^5W\qkS)+Cޙ:zdS}8䌆KrᑴF L~ MP_7 _ endstream endobj 182 0 obj << /Type /FontDescriptor /FontName /OCGPRB+NimbusSanL-Regu /Flags 4 /FontBBox [-174 -285 1001 953] /Ascent 712 /CapHeight 712 /Descent -213 /ItalicAngle 0 /StemV 85 /XHeight 523 /CharSet (/A/E/M/P/S) /FontFile 181 0 R >> endobj 183 0 obj << /Length1 1626 /Length2 11862 /Length3 0 /Length 12695 /Filter /FlateDecode >> stream xڭxeP\.wk5;IFkBpww@9sΝgU]wMK*a` urqTv.vʬ* s0M΋BK+ B@H 2H\\NAAAZ3 `edff/?5o.`K{ۋdy ?v+l H+Tr {3jj 6(@. F39\bIG arKp9ہ]\`3lofj7߀,to\ .f`G-?pBr7Ks3׿J[M ]\ 9-3o.`{!`8, 0oοꁎ{;m '[N3[nK= _`o:7 bkf@m= vU[Je=(_!?rr󿇖uUڽ ?v mo{ kѸ_.@;߭uA@+`k:%opqCv{3+_˵Aζ`{oV`3 doߨ< \6TO7lQ #)'`|{o8|Yq{ xuoad-mS/[<=  eqL8:%=RC?*m X\ Ͽʡ/ˆ`su[øП_vv;m;@>Ԍ]yXt̻쟊SF|>U^3T@6tvOKs,.  &7]-}@_| sV42072i|]oэJ{@qQ-ּ%MŢr/RmWu핝JNI"i Z9'_dP1i1w[I~^xEf8_X)J{6 XʚK G(M;i' 1mΈ^C(g.{_~x͊)E crŰ]ZuF)p Y7L0 i=;nN7$^FlBO0ф,餄=ΚD=S1xsKcO)AOc[(-$ dhՌ@}C:عnŽO>&W"u9`_ Żb ?b߄.6V{ȍCPΌeU#jp.{UDEl͌p<EI^?n<U/zƷRIڈaV^$rb36%|-QCOŤtN9 3z[K=V:p%VQH>c5qZTa:uu.[[!tP |KJu( 'kϵvzI1u"Q~Z9J/q%tǀ #5l_J{%O"YϕxG%rHtWzK*~gxR1DGEKx$λ!+2T|`q+'_Nw̽HGe;wW6W*b+.XMϜ[(֗ ict*Tܭ1RVBU'635pI7]ބb*-Ҹ0| D7=fOg yͤʵ$U{軨{YE!Kt0?Nr*Ow A9I?&GJ>cfB;EHĶ.?t_ S5OL\?/]fBоI78! (vT,egfUHq}Y>gBLpKB!y U*^}jH< Z~G*PKLٌ%:, yzbHy\"-ִz/[YZJlSfdDUk&#+iD/rۋ+|K\px@(Rx 0ϵ4H,dYQ\1do9!Kʒ[?wF瑸Xe|BF񻘛+; zT/D_4L]kE`3f1r@҄3ҔyZRnw{jG'+} (XV h/{q#D)Y/qgK/fܡc'ڒr2?JuN%h 0-  k:pm=T^BMO*(9QNUNbta:FAz2`W DqsXwa+Dm⾆i5n> >iYsnz/;,>Q!b&L˄fu*'ЗfC9Ge\:y[` Eͮk4IcN; `끍 ͱ*ꈻtd;]!1ЃLA&DM&"_Aќ/K`~EJ3֫ʌj0\.^9 G(oBWT~(.D^j_,ϔJ 19+9tMݽz5Y3ӨIPbiwK,̼)!zH$DŅTўcYw".!ˌf`DI%sJ_O3Z[񻼪H>BNxi.4HE"X)~mغBLjY~ɺjE?Y~aMR])ے@V_G!Tj@?~a%=l5JYʐ]#ݢwi%tj¡sJ%K'T}YYW:Ǿ`!:~sƣM 3ft(s3_ ËIBxMLu~M8Qf<.?i%`Э>`SXt?͵8. "Q2{xzkZVDW?3S#$o{E(#0seS;bԗ.KђSO+F^I#v:sjSɿ?ѕve(FiVDW!B7~! N x C[:mE1GRܳ;߮2ۭ̈썆WjԏONU\]w_UDk_tކ#>=I V6b_yӰW| <MrӲe5H#iz>$ِ"xYP6P䄋aFy pV(gN$` ƥ3\$V. >c:#dd|nR#A8nOB4e 4u,J mZ,%a,(:Mޘ8Jmߣ?Ae!?s!a~T3(of«OBX D®ښ;`EDpغdQQ $%W{E!KvƬF .`S ɀk+ɘié,XA'lOc{L&1@^ס V_>"wq඿3$eqjnxz`" KڣxZduYV̖ٹ/Vbt0EÕ% @')ӱoJ{,Ta$4wt)n?(_G,:^d#b b ,<y:"G;uх>K!_v b6嶡; O(46HEk#֋YI5ϜEyc D2ۿ'T:Jg=>݅/ɋKx}蒐X%wz>(6+S zae/R1n/&gqcWz.fɻhZ咘G#SEJ]βtu+;wc:_4 ;J%[f1Ǵe}e֢M!0#)-Č97Y^~R"4 2( ߈iz=]\֭S۱%^KJ)5+bGzB+K:J:} 4JȐVrJMT&QїX[%{Yw7JE̔9:T<j{#CUI5gK_(3=51wte 1U_vQL%_PIN8S,u|B$$ _BWHbM%߹[7k磌N~KNp>-&oh/Қձ0#3 UXiB~OJU8_+;-Gvx ^XWl2cʔ9iOWm Z1[kwb7CB |cl ^ b- {J`ZJ>̩MC̈yᠩqe1e7U+|@>|,^V -θ<yU2vf"ː cʯG[Qļ%:i(Xt/ ~ii!⯻AfmTEvJcaGT7.M6,fkS!8?p!UGSyD~nhi| ۝=J9ضelYU{⇎2WNq@(1i㫪"U$CKuCx@c-مnFR]}{} Z?uhܖSYa #wr{Er%ױK[@w pe}fOյq'bT^Qv&bw$ӘQ7WqJc]|`B&㢛Dx;v ;#iy6<'ʜounܨE&@9En%O>PQn8 6>t]Ѣ1j#TNH,U8Mfzzyb #\߻=;'|w'ej$co&V])nv4N8s5AygÛ:j, ?5)4Ύl@-ry_G= R9*}e4EdxóߚIQEe$#x"bZV3xPP~%dp5j#U-~3'kJJfk&ʳLKv~56Ki(`M t~<-gj46dtj' ¨ FOBB,(wS`e+tЏ)zbUWonW~W#C|5'J[GͰ?/W3̑XX_ћĊlorϜ2IH9j׀3Ye @A6G %UqV?b]K"3q;880x4^ Y1Jجy #GUD> Gx=t'v,l{U5QHwN}LQ{|?N_vn 8=i5 "Xj<7@|J_PB U51+&Wje9N㣙α/}61XZ=@ߗ%/Y Q4﷡Ի͆v$S#h<ر9J[M\ Q;tN9Nqc'}i5wf}N}riYӔfK6⌜!^-ȷ|7)5faɅa9!߫ơK2a nQ?`ƎB]l| ~mSQ//B GDz62$#ftWLjwQ%Tcӓ.crN嶇 jz}@Yξ3`|,2[!a};FĐsFMv<)2zmdI?;u(q&X7PG8O 8n0d@uqZYAY49M9,loNc8嚶1@5~$iK eNlT&ǂ|ĭV%> LڪbZ5-'D-mC]6zq#N -MBJ!ΉVo "ٛpҸ]^KJBtqqA,Z51 Iw rH_tSf6¢'m@]AEך*3:"ښǠ͟8m#nBԴ8@h RqiM/ɊF)lm+E@uKZ#o0zyJ8d_ЦXkLҟ_K LŖ#K8,(^qLl瘔ySVH4oRpac3LO^] 1ŃuXtTɨ˨7d}_,VYxPrEagФ)?/1n0gql;\IV׊Q:]Fu` B1U2t6C7;;4?%άzMBqϑA:1 SOg )S YB bƲj⛪tbnj:I5Ysfz SJv04>=x51@W9R΄NGgh3g$ Vw_4Z $Nb]dGi~hB12$d"'V8:Im w')~bX4/!M2j>9x@H v󰵟PIwcՆ?m c4Q;q{,ǿ'>Sq܏#bjqʷy3 ّBn٬wCl"o~3~ĂKegnedJ3}Ŏ6zoq !ZMȨea<C EN@{.MtSӇ*'xLl'c ]juBӤX;+?.hdSƒfr&[HwJz]^nk`YF[ "oQLןxղrܣ6=-NP_ wNzwND}QlZ($9cb`J6ux҅կv%6~rD0cqP9'~״bNn4/%lB }RD fa$r+|$ˬh!AllFXq=I45+c˰; __h P|O*]G8HtAV6 -~'e/)!gR`&&(fzr/ZUZm*WCKg0)hON{4yJv!A4e%dͻ`wxF_RxȤ]-}lZnGgAOM*P{ɤ@ :XZ0䷓[uԴV@/.N{B.D.Ԏ U(-;&Sx@ۗ(|I ^ rY;;6'+. =1Ɍ?bW_tKҕH?_`qT&Sk=i6+i}_XU\=X ,̈́OԞIwv T\gsh~߶xh$#"0- ZBAk/noqڔYzH{<j) iS}#q)t:&-"xk` 85lbthDj;5?cFBz#fjJϘ7JW? 6~7źbɼU&S4RU4fcHW"\QYUwZ㟔-+3Z-<|S:bJ5\}q誠1:.Oϑ2RB(IIgK<.ӕ*5NY2^WXN?5NoL'gi 5vX50 0Xv<8uft^#bJdRpăLXK෿Hg|beIo~H#=GVS^8Moo 2:ʬ),#>S&S7* a~"Xdbn ČCf0 J_?YyDt٥2 3#>-H%~7?z-Bfȟ~nc՟IKAilv%e2S/wM-}ZP`լЊdvKzxrG5fʀLLk#LF!5Ծ XBr7M:Ma1"BT&մ92Gi4Zc\jwzFAfУPT]]p,H.`{ޑZS7%]rGqR2ʫ}I[F&W8Qxpޡ#ͱ _Ñ9 鳅<ЁPs`!tM*|(;`Hk0F77G0zr[d'縄gk37N7Gf0 Gq8JVN݂iWi+JI  endstream endobj 184 0 obj << /Type /FontDescriptor /FontName /UPXWQM+NimbusRomNo9L-Medi /Flags 4 /FontBBox [-168 -341 1000 960] /Ascent 690 /CapHeight 690 /Descent -209 /ItalicAngle 0 /StemV 140 /XHeight 461 /CharSet (/A/B/C/D/E/F/I/L/M/N/O/P/S/T/V/X/a/b/c/colon/d/e/four/hyphen/i/l/n/nine/o/one/p/r/s/seven/six/t/three/two/u/underscore/v/w/x/y/zero) /FontFile 183 0 R >> endobj 185 0 obj << /Length1 1630 /Length2 17141 /Length3 0 /Length 17986 /Filter /FlateDecode >> stream xڬct]&vvlΎ*VŶ*mIŶQͯӧt{{M\\sEA bbod*io 5ruVcP65wsQP9Xۉ4LMVV @@ACGGLFlinfjc`kjQba 01)(~j @ giljlJ0w034gƿX"C_7ScSTS'[KgKg,m\MI_ 98 hldUQ\yX`o Wbhi p1p')o`NJ?38:ؘ:;OwNR翼e?stq61ccaolsK;8fEoL fo&v6S38&y{!w,3@ -_9_.}В66;wEcc1?yWk v1;032[h,iajhbl03۳LLl,LrXN823_3I+*)o G5MQQ{7 '7+&俀XnfU?~y/0v&iƮNNI[5pK|AVi.ع,% {vx* kx?<O>dhG{lzRL/ |h~nRvpd+AL?ӈZۆdV?ܝPR+~"`sz'sAkZىV[pzFxH5862+n(Ԧm#1ot.ݏd4 Bewa<Ku_ 'k} - 56kGTgdDp%fر(݄S~#xDX# բɌ>33ۜTk:"q#$lbVv'7*7"))ae.Vaw-~6y'b-qhHwؘvZO(45&HEWRj/uPzR7ЈAS4!/E )sVGytt`y&hDG(x"E`5QS3ɓ_hxLP`ȫz?dcsַbߍ]7쳢y TϮRN OX2G^ٟxM等6fP|h48wl ljL_+mI4\EP^SϏk!G4_4|aLU-h)s<"3h@G)@:xP ÝQe׽w&cC zɛK;[HӁ@:Y7u0= Oz#s<^$HQL@Ig&KyP[*>H{!b7n/}/anR]cp8aօf2%[=ɦ}BWt  ;ґs |'TLB&a7PQNFI @=ٵ9&f4({̜)KFMy9hkQ5ZO)AfXkNqwL\%wNPI5VKK =WPsSC1P_o *GZ][iUQ?oQ;|]Fq&+JJg.qŚCzN\|eb s`(Lb0kiU6#N3VYBrOu4f (˝_ d< &k"`ܶD}v~>}΢j s1Azn/TAHY$mКcM WGsD~8RwRo_.W?sF7/@%NQ:_X/{ ~cGRZh@=T/QH_T0Ox@jRf;[T{! )|sA|B smCĵMMw},2NFOw&(CP<1e Noϒ9T ljS .~;! I҅EFEf7 'p8Z7KFke]b  ,\,/KCj]G(:qdEwȐiZ}:,<*yI6n'ūAKU TۚuV0/mQ3I .V1~!Gy Pq%b`+)t4 ;}%TSOU \Y^ABH"9‘X"rؚ%sB>g P(iU0E0?2l.< I\|ߵt=#ҊS({jپtu' ٻ` ǹP= `ʐ*7ȓ+Yz0Ts^Π'J+Ck\(n"f51ق%'h m3[37_“7')6~׾ñxh+1nC!>wpwr&ot Tx\#RYSd:S#f?OjR*C8V5c ;usE~ p BsYJArGSFoi+ Hm&L=%oڈ[)[`z_wx9aߘѣb鼒=4i,'xx^gBe:GoTw1x;Y!lO k5\9>t3VڨbwY["1iHT*?.KV2u}R}LلtɫR%v*GWQ]NgD_g|QN6ʠ%P?>6 T'pu,\JpGp'~T3pÿf2bY_Et#O #Fm-0'I߶͘7P{I[X؍Y ?(S->&|pӕS좣;V+@JNyÙ> VuQͳNj5 <:.?Z@QBJ̵_Ćg+QǂqځDMG1q{ &p`m!Dm|F{{-G4ՈgH"Uz@QH5!z#0h5yyC{sc ̄}\ڭ?7@́)*Uzt1vxKPYo}͒|#`8ZH{ѯZ6D_y\k%dsFڏƊFGP#a§MGe]U^#ȁ%uhcܽԖYTw;^$d"E62kl/K)>$%~^3ͪIMufsZ-0tѬ"9dtCR9UFtr' (UI_׆O#ؤmh'LhF*4#[G'K[ڝi9ݺ[\V/Cԋbq%)K"nPzh6 eֈ] m޵7p3687.~`{[ejyp:@1EHwt?lζ"}Սh;s& 3F Х2c56Yt?S6YP-ikCpj .V֚yFj}^B >1)p`!$ ON<9%R,e'im妭=K:E~d-4\uj0|BB@[l9a& 6haMZg<=D',~=t Tڧ^ *dA٠QJ[pM%ܿ-SV*ء!7)岑Y _BkLt`K9':+Iϥ\iQˏ?e8zwGәS@j0<ο\&`|V/DKzXy -N)X@i;V|T.Y/<_;\ Qlx.(A5:A<3;e_ڎRU8А_ \u)ѼH;Cʇt+ &H<'fx؉M1g'*YwM'/tq40X"R o pLwN5|U ȹe]R.4Pmġwlc{eOz{5f(+O+AOa-Z:J:E;*y:([Ӫe\H/v!kU蹂["'9m]Mɂ8CI,ʦs殌hDPCO’5xgPim,+ K0^P*LJ ]%ϱ_$Ƈ R%ܬa*1N)$?-',k, X \db2g(RVH: WnO{z .SZٗ3,*G,$++{uEp)>eH[MzYNzl/J#p(gtym\Fbԡ`DG:u, Y'V`zJ9$Z)f@;zaeͣZDƲ^(T^*]a&+>~y?+)"Yb%߂=Nĵ&!r& Q1O 31õ$O'mzC ,#P>_ң*dJ_۷RVBg" YXlB 7Yzq'#7Y 5W|N> F;?C35̒?v`V9ޮ*T^ n SAEQ_̽ni?I2ۥ=.j(yj䌽.t1bwaG7 y/ӂx&\ڞpTb v0J@۽b!雲xBykaޱa/ifbub)Psnq䲗]w]>۞?7@IvEI8.| AOz:V.;ɡ+v {{Y!9Hv*tQk>]]1aZ95,%΃4de8\rp oa+WLiggtśR@)* AnTymGii;{_[VvmBÂ}bcl{fvTk'+-QҭXF݂Um&I-D&XY&f{ȕPW_uWl: CĻ+:8{DUw>Z 07B Qku~n$oHv  ̟(HU~8WrWh`| `nA\,c'ZNԊcmGl)^4J}՗3o%YDv,)>JR_cդb]:hOg j;l,fٳ$I]. |aP-c gM J[TT*xI`=p]UQ((6P+֖,7-_ =zwM=ϟ|8DDҐ|[XfLR{~DEňM n0y`G pMB|)NStB'Rץ{apL1SQrf}ks:)%tי,/#^d;\S6,g7$(k3>h.&9P-IJ 1:95mE[1ZY8×uBؽ !P`hU' [Zߵl2SeLy3<rތ TVń%lhy/>JTXm$!`Ssʡ]f}hU- ;gNeW/4ZlP 12x1NV(͚œġ]W7 ,;9_A}$Z:ٽCe&~<+;\Z9wgMݹ|^dֺocӖ<-[|6]lxO|x~P+BРd[i*0U;7K/?Y(n 4FPgmycgG8ySw bnk`R7d0_),"?i2y->3%&mqC312RwG~h%?z)`R*]6(]Y ĺ* ʡff 2гzq'aWAYHv7,`0mg BZDʦ23 OutGP[-ǣX>0uCg@$YW9x>&C߰d``8hJ࣮ﱷ { ՠsZjr]w+2va﷌=gڮ׆EC¢_+VW#ڴ] LC}_S0FX W0:"`o g5^Xr慦~>|r&7`$0A]+Ơ* u A%6wWPUd`+; }]pld&&5RZF9TX+IS'ODXsg֕cA7ן4dOt_>v\fډmj+J0=Jy<xY竰\^u\BTt *述RKU Z/: sdmH"$DjݯMN\RI]"$cUԮx9u4f &4C~(,u x4- wyƓX j#Lf%װ)8_ NFFZu :O_ˢC]۠`^ HC=;9D ZO|Sy.ԏW7ʀXAgl& 5)W6ϰ kmARF >!801<Ǜj %* "i3f=ˡFM@>*9QҰ ı7Mzɔ)zN@H\Н ԍ`X]\$kjs)*\K.Ԣ}'G'N[ @u,z:iz9l]_x3-p;Ψ9i ̼d\#a0,S'.%0:~ W-ΟOwrC[b5cQ"dL97vb12YJ7 6EoBi60W"0Pq>;pIf~@ێ%9xbR K<_)iY[q#޵n Sdq,VbnA HO}yt_1,w۠$ ͫÁȕ)5)1PmWzzʩ0m#u P6H /{<-OHH?STK |X'eZ-dN؉*> w6v)fnq ~P#6#b!&N2Q^ QNCK|$׺7/UĎut&'P6LkS<),\+7Y ."ic>^w}8!2ra=rC:tyH=SwY'.`L$}D4J1NXWJGJK:/o8ŮrĦڄ*-ހުxAt9!M.4[1"] felN=XhCqq;B1 +oIao0c!u0X9xET?6x< G uǵ0?7o[ȗȺmv*|w7f4efg ]BF~Z.R"c=vbog_#G ! xz`DoBcn;a@x_<5y.>!ߵ()Ta@DMdk ]rSmlKջe&',g9%,(m~iL~5"Jmcw@),p)YU[&Lrv:t(ygQj^Mkjxy|-c#.9:~tctCFzV&;GhLNal͓f|td7Tܪyy,r}d|dTM_MA?쭐IsNKȉRyKg ~Jiϓ<ƌoصY=嵤'!cE*l[eZ`>Eu0׭~sqDKrU/ۤZ-D/>Yl5D÷[T4P&و :TombE(yNU݇ ^`1w;vI,% e00c&&!wJ2t%m9BRYXf/~A44ۿ8*ue윫yP]UXz@/96gưϽ;릕>JnrJ;:TgSQ1w]iV}5DO&{kY.),$ˏm`~؆e̶t21#j  q|ڋ ߊ(ئ ڧ\,)c#@oH@kNjLI2uӄ)HMC*PS? aa,:=n n ,Ղ,mEs(%χib*I~Eg4ɸ+w@QD?W.g<+#t`(k>jκ_ i7uFLEɄ+p+˭;k-db*^DvP(A%<{{MYqEEQ-<#?r^Ƞ*ɺW 黼=ݡU^cE]a3n=1uJ[^*TMK$3;# ۄ@Ѓ ݄ud1.`l`r.& V"fƦGT:.Z)0_U\<7ugYjwrŶ$:^0eh ʢ4CV|. rcpbmES(9j9N)UbgT5@oڛRFmzͷV*r}_}Ȏ䟪orP)b4oOD+ X=]9 ¸sr;SoSiGˬ,è$Yo22 [AaԀ_9X%ŐGzj/hwm4j5( EeD 9-P1z).hg}9M(MV;ѶH;Nߜm`n,lE4C-ԃP'B>;oj! &͔l[ݸ:O۹nS(9M.ý;JF4bk &WY01H"#gӃq\ҏ1L΄|:C|gU)I}-`F̾92 G½}M$jk$8Ú0iq%Y EVG ~BZJ@‘֪>X,AL/!w%?7VGx \:vgrMY]O}Cmǐ`EUOJ,K;bO=1;nYKG|'/n41*SHgo))C`s*ӪJ8i"K@`oLjF{yK JTr^3Spz*F"y=.K{zg,_@!c:$M21Ѝb~m@ hsMQ٪jG|hı!Ύ.{h|aaaD_gĔ`58Gc> qd:M%! :vC{B3>$:u@vON&z -DiN)#ʥG“1mcq {KZꉡ˵ݚL&L* g3`(G\͒U|zQ b:!3ѵܥ3d=gZ$`Tkm66&E8cǴ,eXIJ*[APX@O}(h%`\mrIe؈ַoem=A'HYH0߄G $ZV2б*c'@XŌ$\HHsJPfFgA|,A{22YrsI3 fy)&@,.pӿVZiQY7SSPׁgT-v i1]~"^i#H{p[(d_S)]y8Iѧ*SIPr϶P8101|Wom3ꂩ r֬JUw6s`B.={O")͊<)X~O^m-m Utz)%ݴΞ#2)1}Ӵۨo~Rc?7L*y\>(siR9=TujCͼ*3/[槆́R~/JV,Z#?R~d㬿93a eun%95pLt]hԔW3iOT~0>Er Dm_aiL*Zg3`pю4ʄUdָ1#OA>=Ƒ"Ԏ $Ho"uM 2w}̯J.q9ܤi>,V8z#MR"{YSʑehUԆG蕻ulHrf Dܶ*'O}euH*X[o\QbsN'zL wGH(f 8(X;OIqsKd<WШG,@`]o, ̒BÜD^L w]tl$€:hz.?{-6寧')]%CS@]G>:eOv(~mh^5?coA%~i&#kC&S0bK5geIrfz ;eA/v:lXhL [7!E=N๯")U}Q Gx.iv3T!⸡}'ks&b޳'-"`LQ%#&du+5Qӄ~y]C7 Pی+ o '~˷ǂ7i-Tzj0 L&z?ՒPj[hƚ:oӈi7̈́H{>\ 53"!%P.6;o(j2+Jє.Q+C:X"8JSwU>2(vLXe{F%WdBŐm0(f韪5V_E&ԷaAQH`@w %s!Rr3x޸y =w+- +k0*`"7p0jx+*9UJ!E8* bq,CGM"B5 y$ms175%P.@!$Ct ͪJ`40=Y&\c+ڮDW HjI rl—NWVOT,O*a}nn`SilI}>b`-:V\ȺW+"$u|i jUJ8\#Qk3,2ƣ7D1].0w>QHnc7*-R0E_g`_W9:Btt*<ӛO*RG_dUk!UCU4^.u'à$NG}j9?voLޟ[DZ߮N1{ëa᪎b1}@Ƈʶ+5 PUܣs,J2vQzR(A3j.$tiXH6;H!t魸]3;*1'J%ss+Җ(H/ a)c3nCMMū㐧  ](@0/]S6\oi0r泲0y>3r+|מ`nZxE}[(WpbӚu[xĖB]o:\ca 43:}+L_scLU 4~C5F LՒԠ,+)"[ bwww>[r({C֝f<ƕk)`jkJᩭJ Qk!+7F%Py0? u2 ~ߜ.+.P0bv endstream endobj 186 0 obj << /Type /FontDescriptor /FontName /IVPKQQ+NimbusRomNo9L-Regu /Flags 4 /FontBBox [-168 -281 1000 924] /Ascent 678 /CapHeight 651 /Descent -216 /ItalicAngle 0 /StemV 85 /XHeight 450 /CharSet (/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/a/b/bullet/c/colon/comma/d/e/eight/equal/f/fi/five/fl/four/g/h/hyphen/i/j/k/l/m/n/nine/o/one/p/parenleft/parenright/period/q/quoteleft/r/s/seven/six/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 185 0 R >> endobj 187 0 obj << /Length1 1647 /Length2 12130 /Length3 0 /Length 12983 /Filter /FlateDecode >> 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 188 0 obj << /Type /FontDescriptor /FontName /MNMWTC+NimbusRomNo9L-ReguItal /Flags 4 /FontBBox [-169 -270 1010 924] /Ascent 669 /CapHeight 669 /Descent -193 /ItalicAngle -15 /StemV 78 /XHeight 441 /CharSet (/A/B/C/D/E/I/L/P/S/T/a/b/bracketleft/bracketright/c/colon/d/e/equal/f/fl/g/h/hyphen/i/k/l/m/n/o/p/parenleft/parenright/quoteright/r/s/semicolon/t/u/v/w/x/y/zero) /FontFile 187 0 R >> endobj 161 0 obj << /Type /Encoding /Differences [2/fi/fl 30/grave/quotesingle 33/exclam/quotedbl/numbersign/dollar/percent 39/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon 61/equal/greater 65/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/bracketleft 93/bracketright 95/underscore/quoteleft/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 124/bar 149/bullet] >> endobj 99 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ISOGAG+NimbusMonL-Bold /FontDescriptor 172 0 R /FirstChar 52 /LastChar 121 /Widths 164 0 R /Encoding 161 0 R >> endobj 98 0 obj << /Type /Font /Subtype /Type1 /BaseFont /WESPMR+NimbusMonL-Regu /FontDescriptor 174 0 R /FirstChar 30 /LastChar 124 /Widths 165 0 R /Encoding 161 0 R >> endobj 100 0 obj << /Type /Font /Subtype /Type1 /BaseFont /LJFTOE+NimbusMonL-ReguObli /FontDescriptor 176 0 R /FirstChar 35 /LastChar 120 /Widths 163 0 R /Encoding 161 0 R >> endobj 77 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ENPVXQ+NimbusSanL-Bold /FontDescriptor 178 0 R /FirstChar 44 /LastChar 121 /Widths 170 0 R /Encoding 161 0 R >> endobj 78 0 obj << /Type /Font /Subtype /Type1 /BaseFont /HCIQCW+NimbusSanL-BoldItal /FontDescriptor 180 0 R /FirstChar 46 /LastChar 115 /Widths 169 0 R /Encoding 161 0 R >> endobj 160 0 obj << /Type /Font /Subtype /Type1 /BaseFont /OCGPRB+NimbusSanL-Regu /FontDescriptor 182 0 R /FirstChar 65 /LastChar 83 /Widths 162 0 R /Encoding 161 0 R >> endobj 79 0 obj << /Type /Font /Subtype /Type1 /BaseFont /UPXWQM+NimbusRomNo9L-Medi /FontDescriptor 184 0 R /FirstChar 45 /LastChar 121 /Widths 168 0 R /Encoding 161 0 R >> endobj 80 0 obj << /Type /Font /Subtype /Type1 /BaseFont /IVPKQQ+NimbusRomNo9L-Regu /FontDescriptor 186 0 R /FirstChar 2 /LastChar 149 /Widths 167 0 R /Encoding 161 0 R >> endobj 82 0 obj << /Type /Font /Subtype /Type1 /BaseFont /MNMWTC+NimbusRomNo9L-ReguItal /FontDescriptor 188 0 R /FirstChar 3 /LastChar 121 /Widths 166 0 R /Encoding 161 0 R >> endobj 83 0 obj << /Type /Pages /Count 6 /Parent 189 0 R /Kids [47 0 R 85 0 R 91 0 R 95 0 R 102 0 R 106 0 R] >> endobj 113 0 obj << /Type /Pages /Count 4 /Parent 189 0 R /Kids [110 0 R 123 0 R 133 0 R 157 0 R] >> endobj 189 0 obj << /Type /Pages /Count 10 /Kids [83 0 R 113 0 R] >> endobj 190 0 obj << /Type /Outlines /First 4 0 R /Last 44 0 R /Count 5 >> endobj 44 0 obj << /Title 45 0 R /A 42 0 R /Parent 190 0 R /Prev 40 0 R >> endobj 40 0 obj << /Title 41 0 R /A 38 0 R /Parent 190 0 R /Prev 28 0 R /Next 44 0 R >> endobj 36 0 obj << /Title 37 0 R /A 34 0 R /Parent 28 0 R /Prev 32 0 R >> endobj 32 0 obj << /Title 33 0 R /A 30 0 R /Parent 28 0 R /Next 36 0 R >> endobj 28 0 obj << /Title 29 0 R /A 26 0 R /Parent 190 0 R /Prev 16 0 R /Next 40 0 R /First 32 0 R /Last 36 0 R /Count -2 >> endobj 24 0 obj << /Title 25 0 R /A 22 0 R /Parent 16 0 R /Prev 20 0 R >> endobj 20 0 obj << /Title 21 0 R /A 18 0 R /Parent 16 0 R /Next 24 0 R >> endobj 16 0 obj << /Title 17 0 R /A 14 0 R /Parent 190 0 R /Prev 4 0 R /Next 28 0 R /First 20 0 R /Last 24 0 R /Count -2 >> endobj 12 0 obj << /Title 13 0 R /A 10 0 R /Parent 4 0 R /Prev 8 0 R >> endobj 8 0 obj << /Title 9 0 R /A 6 0 R /Parent 4 0 R /Next 12 0 R >> endobj 4 0 obj << /Title 5 0 R /A 2 0 R /Parent 190 0 R /Next 16 0 R /First 8 0 R /Last 12 0 R /Count -2 >> endobj 191 0 obj << /Names [(Doc-Start) 76 0 R (Hfootnote.1) 88 0 R (Hfootnote.2) 89 0 R (Hfootnote.3) 129 0 R (page.1) 75 0 R (page.10) 159 0 R] /Limits [(Doc-Start) (page.10)] >> endobj 192 0 obj << /Names [(page.2) 87 0 R (page.3) 93 0 R (page.4) 97 0 R (page.5) 104 0 R (page.6) 108 0 R (page.7) 112 0 R] /Limits [(page.2) (page.7)] >> endobj 193 0 obj << /Names [(page.8) 125 0 R (page.9) 135 0 R (section*.1) 81 0 R (section*.6) 43 0 R (section.1) 3 0 R (section.2) 15 0 R] /Limits [(page.8) (section.2)] >> endobj 194 0 obj << /Names [(section.3) 27 0 R (section.4) 39 0 R (subsection.1.1) 7 0 R (subsection.1.2) 11 0 R (subsection.2.1) 19 0 R (subsection.2.2) 23 0 R] /Limits [(section.3) (subsection.2.2)] >> endobj 195 0 obj << /Names [(subsection.3.1) 31 0 R (subsection.3.2) 35 0 R (subsubsection*.2) 126 0 R (subsubsection*.3) 127 0 R (subsubsection*.4) 128 0 R (subsubsection*.5) 136 0 R] /Limits [(subsection.3.1) (subsubsection*.5)] >> endobj 196 0 obj << /Kids [191 0 R 192 0 R 193 0 R 194 0 R 195 0 R] /Limits [(Doc-Start) (subsubsection*.5)] >> endobj 197 0 obj << /Dests 196 0 R >> endobj 198 0 obj << /Type /Catalog /Pages 189 0 R /Outlines 190 0 R /Names 197 0 R /PageMode/UseOutlines /OpenAction 46 0 R >> endobj 199 0 obj << /Author(\376\377\000L\000i\000s\000a\000n\000d\000r\000o\000\040\000D\000a\000l\000c\000i\000n)/Title(\376\377\000S\000L\000E\000P\000c\000\040\000f\000o\000r\000\040\000P\000y\000t\000h\000o\000n)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.18)/Keywords() /CreationDate (D:20210528103803+02'00') /ModDate (D:20210528103803+02'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) kpathsea version 6.2.3) >> endobj xref 0 200 0000000000 65535 f 0000000015 00000 n 0000000937 00000 n 0000011392 00000 n 0000150903 00000 n 0000000982 00000 n 0000001048 00000 n 0000014569 00000 n 0000150833 00000 n 0000001098 00000 n 0000001164 00000 n 0000017944 00000 n 0000150761 00000 n 0000001215 00000 n 0000001292 00000 n 0000020820 00000 n 0000150637 00000 n 0000001338 00000 n 0000001405 00000 n 0000020875 00000 n 0000150563 00000 n 0000001456 00000 n 0000001678 00000 n 0000026121 00000 n 0000150489 00000 n 0000001729 00000 n 0000001910 00000 n 0000028411 00000 n 0000150364 00000 n 0000001956 00000 n 0000002043 00000 n 0000028467 00000 n 0000150290 00000 n 0000002094 00000 n 0000002258 00000 n 0000032556 00000 n 0000150216 00000 n 0000002309 00000 n 0000002414 00000 n 0000036298 00000 n 0000150128 00000 n 0000002460 00000 n 0000002532 00000 n 0000036354 00000 n 0000150053 00000 n 0000002579 00000 n 0000002631 00000 n 0000007930 00000 n 0000002679 00000 n 0000003345 00000 n 0000004195 00000 n 0000005276 00000 n 0000008183 00000 n 0000008333 00000 n 0000008488 00000 n 0000008643 00000 n 0000008792 00000 n 0000008946 00000 n 0000009100 00000 n 0000009249 00000 n 0000009404 00000 n 0000009559 00000 n 0000009709 00000 n 0000009859 00000 n 0000010036 00000 n 0000010205 00000 n 0000010372 00000 n 0000010538 00000 n 0000010704 00000 n 0000010879 00000 n 0000011055 00000 n 0000014210 00000 n 0000014361 00000 n 0000011446 00000 n 0000006382 00000 n 0000011231 00000 n 0000011286 00000 n 0000148662 00000 n 0000148832 00000 n 0000149176 00000 n 0000149349 00000 n 0000011337 00000 n 0000149521 00000 n 0000149697 00000 n 0000014732 00000 n 0000014076 00000 n 0000011564 00000 n 0000014514 00000 n 0000014623 00000 n 0000014678 00000 n 0000017999 00000 n 0000017781 00000 n 0000014826 00000 n 0000017889 00000 n 0000020930 00000 n 0000020657 00000 n 0000018105 00000 n 0000020765 00000 n 0000148317 00000 n 0000148147 00000 n 0000148487 00000 n 0000023783 00000 n 0000023615 00000 n 0000021061 00000 n 0000023726 00000 n 0000026177 00000 n 0000025953 00000 n 0000023891 00000 n 0000026064 00000 n 0000028523 00000 n 0000028242 00000 n 0000026297 00000 n 0000028354 00000 n 0000149809 00000 n 0000031144 00000 n 0000031317 00000 n 0000031471 00000 n 0000031639 00000 n 0000031811 00000 n 0000031989 00000 n 0000032157 00000 n 0000032324 00000 n 0000032838 00000 n 0000030956 00000 n 0000028630 00000 n 0000032499 00000 n 0000032611 00000 n 0000032668 00000 n 0000032725 00000 n 0000032782 00000 n 0000035614 00000 n 0000035809 00000 n 0000036410 00000 n 0000035466 00000 n 0000032969 00000 n 0000036184 00000 n 0000036241 00000 n 0000035998 00000 n 0000037307 00000 n 0000037456 00000 n 0000037605 00000 n 0000037754 00000 n 0000037903 00000 n 0000038052 00000 n 0000038201 00000 n 0000038350 00000 n 0000038497 00000 n 0000038646 00000 n 0000038794 00000 n 0000038942 00000 n 0000039090 00000 n 0000039239 00000 n 0000039386 00000 n 0000039534 00000 n 0000039682 00000 n 0000039830 00000 n 0000040035 00000 n 0000037039 00000 n 0000036542 00000 n 0000039978 00000 n 0000149006 00000 n 0000147683 00000 n 0000040131 00000 n 0000040226 00000 n 0000040589 00000 n 0000040888 00000 n 0000041287 00000 n 0000041754 00000 n 0000042321 00000 n 0000042649 00000 n 0000042948 00000 n 0000043279 00000 n 0000052467 00000 n 0000052750 00000 n 0000071412 00000 n 0000071968 00000 n 0000081206 00000 n 0000081527 00000 n 0000091883 00000 n 0000092245 00000 n 0000099183 00000 n 0000099450 00000 n 0000102182 00000 n 0000102420 00000 n 0000115236 00000 n 0000115599 00000 n 0000133706 00000 n 0000134182 00000 n 0000147286 00000 n 0000149910 00000 n 0000149979 00000 n 0000151011 00000 n 0000151192 00000 n 0000151351 00000 n 0000151525 00000 n 0000151729 00000 n 0000151963 00000 n 0000152075 00000 n 0000152113 00000 n 0000152240 00000 n trailer << /Size 200 /Root 198 0 R /Info 199 0 R /ID [<1E440F71001E17C51AF413C401EFFE6F> <1E440F71001E17C51AF413C401EFFE6F>] >> startxref 152747 %%EOF slepc4py-3.15.1/docs/index.html0000644000175100017510000002616414054125727017111 0ustar jromanjroman00000000000000 SLEPc for Python

        SLEPc for Python

        Author: Lisandro Dalcin
        Contact: dalcinl@gmail.com

        Online Documentation

        Discussion and Support

        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.15.1/docs/CHANGES.html0000644000175100017510000002660614054125727017053 0ustar jromanjroman00000000000000 CHANGES: SLEPc for Python

        CHANGES: SLEPc for Python

        Author: Lisandro Dalcin
        Contact: dalcinl@gmail.com

        Release 3.15.1

        • Updates in installation scripts.

        Release 3.15.0

        • Update to SLEPc 3.15 release.

        Release 3.14.0

        • Update to SLEPc 3.14 release.

        Release 3.13.0

        • Update to SLEPc 3.13 release.

        Release 3.12.0

        • Update to SLEPc 3.12 release.

        Release 3.11.0

        • Update to SLEPc 3.11 release.

        Release 3.10.0

        • Update to SLEPc 3.10 release.

        Release 3.9.0

        • Update to SLEPc 3.9 release.

        Release 3.8.0

        • Update to SLEPc 3.8 release.

        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.15.1/conf/0000755000175100017510000000000014054125756015102 5ustar jromanjroman00000000000000slepc4py-3.15.1/conf/slepcconf.py0000644000175100017510000001473414054125637017437 0ustar jromanjroman00000000000000# -------------------------------------------------------------------- __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, strip_prefix 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 conf.baseconf import makefile from distutils.errors import DistutilsError # -------------------------------------------------------------------- class SlepcConfig(PetscConfig): def __init__(self, slepc_dir, petsc_dir, petsc_arch, dest_dir=None): PetscConfig.__init__(self, petsc_dir, petsc_arch, dest_dir='') if dest_dir is None: dest_dir = os.environ.get('DESTDIR') 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'] self.SLEPC_DESTDIR = dest_dir def configure_extension(self, extension): PetscConfig.configure_extension(self, extension) SLEPC_DIR = self.SLEPC_DIR PETSC_ARCH = self.PETSC_ARCH SLEPC_DESTDIR = self.SLEPC_DESTDIR # take into account the case of prefix PETSc with non-prefix SLEPc SLEPC_ARCH_DIR = PETSC_ARCH if PETSC_ARCH else os.environ.get('PETSC_ARCH', '') # includes and libraries SLEPC_INCLUDE = [ os.path.join(SLEPC_DIR, SLEPC_ARCH_DIR, 'include'), os.path.join(SLEPC_DIR, 'include'), ] SLEPC_LIB_DIR = [ os.path.join(SLEPC_DIR, SLEPC_ARCH_DIR, 'lib'), os.path.join(SLEPC_DIR, 'lib'), ] slepc_cfg = { } slepc_cfg['include_dirs'] = SLEPC_INCLUDE slepc_cfg['library_dirs'] = SLEPC_LIB_DIR if 'petscvec' in self['PETSC_LIB']: slepc_variables = os.path.join(SLEPC_DIR, 'lib', 'slepc', 'conf', 'slepc_variables') slepc_libs = makefile(open(slepc_variables, 'rt')).get('SHLIBS').replace('lib', '').split() else: slepc_libs = ['slepc'] slepc_cfg['libraries'] = slepc_libs slepc_cfg['runtime_library_dirs'] = [strip_prefix(SLEPC_DESTDIR, d) for d in SLEPC_LIB_DIR] 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 """ SLEPC_DESTDIR = None for arch in arch_list: conf = self.get_config_arch(arch) SLEPC_DESTDIR = conf.SLEPC_DESTDIR # all archs will have same value variables = {'SLEPC_DIR' : strip_prefix(SLEPC_DESTDIR, 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.15.1/conf/epydoc.cfg0000644000175100017510000001055414054125637017051 0ustar jromanjroman00000000000000[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://gitlab.com/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.15.1/conf/__init__.py0000644000175100017510000000000014054125637017177 0ustar jromanjroman00000000000000slepc4py-3.15.1/conf/baseconf.py0000644000175100017510000007205514054125637017243 0ustar jromanjroman00000000000000# -------------------------------------------------------------------- __all__ = ['PetscConfig', 'setup', 'Extension', 'config', 'build', 'build_src', 'build_ext', 'clean', 'test', 'sdist', 'log', ] # -------------------------------------------------------------------- import sys, os import re 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 'CONDA_BUILD' in os.environ: return 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, dest_dir=None): if dest_dir is None: dest_dir = os.environ.get('DESTDIR') 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'] self.DESTDIR = dest_dir language_map = {'CONLY':'c', 'CXXONLY':'c++'} self.language = language_map[self['PETSC_LANGUAGE']] def __getitem__(self, item): return self.configdict[item] def get(self, item, default=None): return self.configdict.get(item, default) 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): # includes and libraries # paths in PETSc config files point to final installation location, but # we might be building against PETSc in staging location (DESTDIR) when # DESTDIR is set, so append DESTDIR (if nonempty) to those paths petsc_inc = flaglist(prepend_to_flags(self.DESTDIR, self['PETSC_CC_INCLUDES'])) lib_flags = prepend_to_flags(self.DESTDIR, '-L%s %s' % \ (self['PETSC_LIB_DIR'], self['PETSC_LIB_BASIC'])) petsc_lib = flaglist(lib_flags) # runtime_library_dirs is not supported on Windows if sys.platform != 'win32': # if DESTDIR is set, then we're building against PETSc in a staging # directory, but rpath needs to point to final install directory. rpath = strip_prefix(self.DESTDIR, self['PETSC_LIB_DIR']) petsc_lib['runtime_library_dirs'].append(rpath) # 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 getenv = os.environ.get # distutils C/C++ compiler (cc, cflags, ccshared, cxx) = get_config_vars( 'CC', 'CFLAGS', 'CCSHARED', 'CXX') ccshared = getenv('CCSHARED', ccshared or '') cflags = getenv('CFLAGS', cflags or '') cflags = cflags.replace('-Wstrict-prototypes', '') # distutils linker (ldflags, ldshared, so_ext) = get_config_vars( 'LDFLAGS', 'LDSHARED', 'SO') ld = cc ldshared = getenv('LDSHARED', ldshared) ldflags = getenv('LDFLAGS', cflags + ' ' + (ldflags or '')) ldcmd = split_quoted(ld) + split_quoted(ldflags) ldshared = [flg for flg in split_quoted(ldshared) if flg not in ldcmd] ldshared = str.join(' ', ldshared) # def get_flags(cmd): try: return ' '.join(split_quoted(cmd)[1:]) except: return '' # PETSc C compiler PCC = self['PCC'] PCC_FLAGS = get_flags(cc) + ' ' + self['PCC_FLAGS'] PCC_FLAGS = PCC_FLAGS.replace('-fvisibility=hidden', '') PCC = getenv('PCC', PCC) + ' ' + getenv('PCCFLAGS', PCC_FLAGS) PCC_SHARED = str.join(' ', (PCC, ccshared, cflags)) # PETSc C++ compiler PCXX = PCC if self.language == 'c++' else self.get('CXX', cxx) # PETSc 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) 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) self.DESTDIR = config.DESTDIR 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' : strip_prefix(self.DESTDIR, 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) and self.petsc_arch: 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) # -------------------------------------------------------------------- if setuptools: try: from setuptools.command import egg_info as mod_egg_info _FileList = mod_egg_info.FileList class FileList(_FileList): def process_template_line(self, line): level = log.set_threshold(log.ERROR) try: _FileList.process_template_line(self, line) finally: log.set_threshold(level) mod_egg_info.FileList = FileList except: pass # -------------------------------------------------------------------- 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 def prepend_to_flags(path, flags): """Prepend a path to compiler flags with absolute paths""" if not path: return flags def append_path(m): switch = m.group(1) open_quote = m.group(4) old_path = m.group(5) close_quote = m.group(6) if os.path.isabs(old_path): moded_path = os.path.normpath(path + os.path.sep + old_path) return switch + open_quote + moded_path + close_quote return m.group(0) return re.sub(r'((^|\s+)(-I|-L))(\s*["\']?)(\S+)(["\']?)', append_path, flags) def strip_prefix(prefix, string): if not prefix: return string return re.sub(r'^' + prefix, '', string) # -------------------------------------------------------------------- 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.15.1/conf/cythonize.py0000755000175100017510000000453314054125637017476 0ustar jromanjroman00000000000000#!/usr/bin/env python import sys, os def cythonize(source, output=None, 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: if output is None: name, _ = os.path.splitext(source) output = name + '.c' else: name, _ = os.path.splitext(output) outputs_c = [output] outputs_h = [name + '.h', name + '_api.h'] # change working directory if wdir: os.chdir(wdir) # run Cython on source options = CompilationOptions(default_options) if Options.directive_types['language_level'] is str: options.language_level = '3str' 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', 'slepc4py.SLEPc.c', includes=['include', petsc4py.get_include()], destdir_h=os.path.join('include', 'slepc4py'), wdir='src') ) slepc4py-3.15.1/conf/epydocify.py0000755000175100017510000000550514054125637017455 0ustar jromanjroman00000000000000#!/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.15.1/conf/metadata.py0000644000175100017510000000160614054125637017235 0ustar jromanjroman00000000000000classifiers = """ 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.15.1/src/0000755000175100017510000000000014054125756014744 5ustar jromanjroman00000000000000slepc4py-3.15.1/src/SLEPc/0000755000175100017510000000000014054125756015652 5ustar jromanjroman00000000000000slepc4py-3.15.1/src/SLEPc/RG.pyx0000644000175100017510000001614414054125637016730 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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 toBool(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.15.1/src/SLEPc/ST.pyx0000644000175100017510000003475714054125637016760 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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 = asBool(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 toBool(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 setMatrices(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( STSetMatrices(self.st, n, mats) ) def getMatrices(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( STGetMatrix(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): """ 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 setPreconditionerMat(self, Mat P=None): """ Sets the matrix to be used to build the preconditioner. Parameters ---------- P: Mat, optional The matrix that will be used in constructing the preconditioner. """ cdef PetscMat Pmat = P.mat if P is not None else NULL CHKERR( STSetPreconditionerMat(self.st, Pmat) ) def getPreconditionerMat(self): """ Gets the matrix previously set by setPreconditionerMat(). Returns ------- P: Mat The matrix that will be used in constructing the preconditioner. """ cdef Mat P = Mat() CHKERR( STGetPreconditionerMat(self.st, &P.mat) ) PetscINCREF(P.obj) return P # def setUp(self): """ Prepares for the use of a spectral transformation. """ CHKERR( STSetUp(self.st) ) def 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. """ CHKERR( STApply(self.st, x.vec, y.vec) ) def 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. """ 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.15.1/src/SLEPc/PEP.pyx0000644000175100017510000011736414054125637017052 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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. - `ALL`: All eigenvalues in an interval. - `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 ALL = PEP_ALL 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 = def_Viewer(viewer) 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 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( PEPGetTarget(self.pep, &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( PEPSetTarget(self.pep, sval) ) 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 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( PEPGetInterval(self.pep, &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 quadratic eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with `PEP.Which.ALL`, see `setWhichEigenpairs()`. """ cdef PetscReal rval1 = asReal(inta) cdef PetscReal rval2 = asReal(intb) CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) 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): """ 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): """ 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): """ 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 = Vr.vec if Vr is not None else NULL cdef PetscVec veci = Vi.vec if Vi is not None else NULL CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) return toComplex(sval1, 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 = def_Viewer(viewer) CHKERR( PEPErrorView(self.pep, et, vwr) ) # def setLinearEPS(self, EPS eps): """ 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 setLinearLinearization(self, alpha=1.0, beta=0.0): """ Set the coefficients that define the linearization of a quadratic eigenproblem. Parameters ---------- alpha: float first parameter of the linearization. beta: float second parameter of the linearization. """ cdef PetscReal a = alpha cdef PetscReal b = beta CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) def getLinearLinearization(self): """ Returns the coefficients that define the linearization of a quadratic eigenproblem. Returns ------- alpha: float first parameter of the linearization. beta: float second parameter of the linearization. """ cdef PetscReal a = 0.0 cdef PetscReal b = 0.0 CHKERR( PEPLinearGetLinearization(self.pep, &a, &b) ) return (a, b) def 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 . """ cdef PetscBool sval = asBool(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 toBool(sval) # def setTOARRestart(self, keep): """ Sets the restart parameter for the TOAR 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( PEPTOARSetRestart(self.pep, val) ) def getTOARRestart(self): """ Gets the restart parameter used in the TOAR method. Returns ------- keep: float The number of vectors to be kept at restart. """ cdef PetscReal val = 0 CHKERR( PEPTOARGetRestart(self.pep, &val) ) return val def setTOARLocking(self, lock): """ Choose between locking and non-locking variants of the TOAR 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( PEPTOARSetLocking(self.pep, val) ) def getTOARLocking(self): """ Gets the locking flag used in the TOAR method. Returns ------- lock: bool The locking flag. """ cdef PetscBool tval = PETSC_FALSE CHKERR( PEPTOARGetLocking(self.pep, &tval) ) return tval # def setSTOARLocking(self, lock): """ Choose between locking and non-locking variants of the STOAR 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( PEPSTOARSetLocking(self.pep, val) ) def getSTOARLocking(self): """ Gets the locking flag used in the STOAR method. Returns ------- lock: bool The locking flag. """ cdef PetscBool tval = PETSC_FALSE CHKERR( PEPSTOARGetLocking(self.pep, &tval) ) return tval def setSTOARDetectZeros(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. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS. """ cdef PetscBool val = detect CHKERR( PEPSTOARSetDetectZeros(self.pep, val) ) def getSTOARDetectZeros(self): """ Gets the flag that enforces zero detection in spectrum slicing. Returns ------- detect: bool The zero detection flag. """ cdef PetscBool tval = PETSC_FALSE CHKERR( PEPSTOARGetDetectZeros(self.pep, &tval) ) return tval def setSTOARDimensions(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( PEPSTOARSetDimensions(self.pep, ival1, ival2, ival3) ) def getSTOARDimensions(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( PEPSTOARGetDimensions(self.pep, &ival1, &ival2, &ival3) ) return (toInt(ival1), toInt(ival2), toInt(ival3)) # def setJDRestart(self, keep): """ Sets the restart parameter for the Jacobi-Davidson 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( PEPJDSetRestart(self.pep, val) ) def getJDRestart(self): """ Gets the restart parameter used in the Jacobi-Davidson method. Returns ------- keep: float The number of vectors to be kept at restart. """ cdef PetscReal val = 0 CHKERR( PEPJDGetRestart(self.pep, &val) ) return val def setJDFix(self, fix): """ Sets the threshold for changing the target in the correction equation. Parameters ---------- fix: float Threshold for changing the target. Notes ----- The target in the correction equation is fixed at the first iterations. When the norm of the residual vector is lower than the fix value, the target is set to the corresponding eigenvalue. """ cdef PetscReal val = fix CHKERR( PEPJDSetFix(self.pep, val) ) def getJDFix(self): """ Gets threshold for changing the target in the correction equation. Returns ------- fix: float The threshold for changing the target. """ cdef PetscReal val = 0 CHKERR( PEPJDGetFix(self.pep, &val) ) return val # ----------------------------------------------------------------------------- del PEPType del PEPProblemType del PEPWhich del PEPBasis del PEPScale del PEPRefine del PEPRefineScheme del PEPExtract del PEPErrorType del PEPConv del PEPConvergedReason # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/BV.pyx0000644000175100017510000006400714054125637016730 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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 createMat(self): """ Creates a new Mat object of dense type and copies the contents of the BV object. Returns ------- mat: the new matrix. """ cdef Mat mat = Mat() CHKERR( BVCreateMat(self.bv, &mat.mat) ) return mat 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, 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 or None, bint indef): """ Sets the bilinear form to be used for inner products. Parameters ---------- mat: Mat or None 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, 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. """ 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): """ 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, 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): """ 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([toScalar(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): """ 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): """ 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 or None, 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. """ cdef BV X = self cdef PetscInt kx=0, ky=0 CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) cdef PetscMat Amat = NULL if A is None else A.mat cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) return M def 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. """ 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, 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, 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 resize(self, m, copy=True): """ Change the number of columns. Parameters ---------- m - the new number of columns. copy - a flag indicating whether current values should be kept. Notes ----- Internal storage is reallocated. If copy is True, then the contents are copied to the leading part of the new space. """ cdef PetscInt ival = asInt(m) cdef PetscBool tval = PETSC_TRUE if copy else PETSC_FALSE CHKERR( BVResize(self.bv, ival, tval) ) 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 setRandomNormal(self): """ Set the active columns of BV to random numbers (with normal distribution). Notes ----- All active columns (except the leading ones) are modified. """ CHKERR( BVSetRandomNormal(self.bv) ) def 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. """ cdef PetscReal norm = 0 cdef PetscBool ldep = PETSC_FALSE CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) return (toReal(norm), toBool(ldep)) def orthogonalize(self, Mat R=None, **kargs): """ Orthogonalize all columns (except leading ones), that is, compute the QR decomposition. Parameters ---------- R: Mat, optional 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.15.1/src/SLEPc/DS.pyx0000644000175100017510000003201714054125637016723 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- class DSType(object): """ DS type """ HEP = S_(DSHEP) NHEP = S_(DSNHEP) GHEP = S_(DSGHEP) GHIEP = S_(DSGHIEP) GNHEP = S_(DSGNHEP) NHEPTS = S_(DSNHEPTS) 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 = def_Viewer(viewer) 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 = asInt(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 toInt(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 = asBool(comp) 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 toBool(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)*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 = asBool(ext) 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 toBool(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 = asBool(ref) 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 toBool(val) def truncate(self, n, trim=False): """ Truncates the system represented in the DS object. Parameters ---------- n: integer The new size. trim: boolean A flag to indicate if the factorization must be trimmed. """ cdef PetscInt val = asInt(n) cdef PetscBool flg = asBool(trim) CHKERR( DSTruncate(self.ds, val, flg) ) 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) ) def getMat(self, matname): """ Returns the requested matrix as a sequential dense Mat object. Parameters ---------- matname: `DS.MatType` enumerate The requested matrix. """ cdef SlepcDSMatType mname = matname cdef Mat mat = Mat() CHKERR( DSGetMat(self.ds, mname, &mat.mat) ) return mat # ----------------------------------------------------------------------------- del DSType del DSStateType del DSMatType # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/slepcmpi.pxi0000644000175100017510000000124614054125637020211 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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.15.1/src/SLEPc/MFN.pyx0000644000175100017510000002252514054125637017040 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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): """ 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): """ 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): """ 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, 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. """ 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.15.1/src/SLEPc/slepceps.pxi0000644000175100017510000003017014054125637020211 0ustar jromanjroman00000000000000cdef 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 EPSLYAPII SlepcEPSType EPSLAPACK SlepcEPSType EPSARPACK SlepcEPSType EPSBLZPACK SlepcEPSType EPSTRLAN SlepcEPSType EPSBLOPEX SlepcEPSType EPSPRIMME SlepcEPSType EPSFEAST SlepcEPSType EPSSCALAPACK SlepcEPSType EPSELPA SlepcEPSType EPSELEMENTAL SlepcEPSType EPSEVSL 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 ctypedef int (*SlepcEPSCtxDel)(void*) ctypedef int (*SlepcEPSStoppingFunction)(SlepcEPS, PetscInt, PetscInt, PetscInt, PetscInt, SlepcEPSConvergedReason*, void*) except PETSC_ERR_PYTHON ctypedef int (*SlepcEPSMonitorFunction)(SlepcEPS, PetscInt, PetscInt, PetscScalar*, PetscScalar*, PetscReal*, PetscInt, void*) except PETSC_ERR_PYTHON 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 EPSSetTwoSided(SlepcEPS,PetscBool) int EPSGetTwoSided(SlepcEPS,PetscBool*) 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 EPSGetLeftEigenvector(SlepcEPS,PetscInt,PetscVec,PetscVec) int EPSGetEigenpair(SlepcEPS,PetscInt,PetscScalar*,PetscScalar*,PetscVec,PetscVec) int EPSGetInvariantSubspace(SlepcEPS,PetscVec*) int EPSSetStoppingTestFunction(SlepcEPS,SlepcEPSStoppingFunction,void*,SlepcEPSCtxDel); int EPSStoppingBasic(SlepcEPS,PetscInt,PetscInt,PetscInt,PetscInt,SlepcEPSConvergedReason*,void*) except PETSC_ERR_PYTHON int EPSGetErrorEstimate(SlepcEPS,PetscInt,PetscReal*) int EPSComputeError(SlepcEPS,PetscInt,SlepcEPSErrorType,PetscReal*) int EPSErrorView(SlepcEPS,SlepcEPSErrorType,PetscViewer) int EPSMonitorSet(SlepcEPS,SlepcEPSMonitorFunction,void*,SlepcEPSCtxDel) int EPSMonitorCancel(SlepcEPS) int EPSMonitor(SlepcEPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt) 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*) # ----------------------------------------------------------------------------- cdef inline EPS ref_EPS(SlepcEPS eps): cdef EPS ob = EPS() ob.eps = eps PetscINCREF(ob.obj) return ob # ----------------------------------------------------------------------------- cdef int EPS_Stopping( SlepcEPS eps, PetscInt its, PetscInt max_it, PetscInt nconv, PetscInt nev, SlepcEPSConvergedReason *r, void *ctx, ) except PETSC_ERR_PYTHON with gil: cdef EPS Eps = ref_EPS(eps) (stopping, args, kargs) = Eps.get_attr('__stopping__') reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) if reason is None: r[0] = EPS_CONVERGED_ITERATING elif reason is False: r[0] = EPS_CONVERGED_ITERATING elif reason is True: r[0] = EPS_CONVERGED_USER else: r[0] = reason # ----------------------------------------------------------------------------- cdef int EPS_Monitor( SlepcEPS eps, PetscInt its, PetscInt nconv, PetscScalar *eigr, PetscScalar *eigi, PetscReal *errest, PetscInt nest, void *ctx, ) except PETSC_ERR_PYTHON with gil: cdef EPS Eps = ref_EPS(eps) cdef object monitorlist = Eps.get_attr('__monitor__') if monitorlist is None: return 0 cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] cdef object err = [toReal(errest[i]) for i in range(nest)] for (monitor, args, kargs) in monitorlist: monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) return 0 # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/slepcrg.pxi0000644000175100017510000000170314054125637020032 0ustar jromanjroman00000000000000cdef 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.15.1/src/SLEPc/SVD.pyx0000644000175100017510000006604114054125637017055 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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. Wrappers to external SVD solvers (should be enabled during installation of SLEPc) - `SCALAPACK`: - `ELEMENTAL`: - `PRIMME`: """ CROSS = S_(SVDCROSS) CYCLIC = S_(SVDCYCLIC) LAPACK = S_(SVDLAPACK) LANCZOS = S_(SVDLANCZOS) TRLANCZOS = S_(SVDTRLANCZOS) RANDOMIZED = S_(SVDRANDOMIZED) SCALAPACK = S_(SVDSCALAPACK) ELEMENTAL = S_(SVDELEMENTAL) PRIMME = S_(SVDPRIMME) class SVDProblemType(object): """ SVD problem type - `STANDARD`: Standard SVD. - `GENERALIZED`: Generalized singular value decomposition (GSVD). """ STANDARD = SVD_STANDARD GENERALIZED = SVD_GENERALIZED 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 CONVERGED_MAXIT = SVD_CONVERGED_MAXIT 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 ProblemType = SVDProblemType 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 = def_Viewer(viewer) 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 getProblemType(self): """ Gets the problem type from the SVD object. Returns ------- problem_type: `SVD.ProblemType` enumerate The problem type that was previously set. """ cdef SlepcSVDProblemType val = SVD_STANDARD CHKERR( SVDGetProblemType(self.svd, &val) ) return val def setProblemType(self, problem_type): """ Specifies the type of the singular value problem. Parameters ---------- problem_type: `SVD.ProblemType` enumerate The problem type to be set. """ cdef SlepcSVDProblemType val = problem_type CHKERR( SVDSetProblemType(self.svd, val) ) def isGeneralized(self): """ Tells whether the SVD object corresponds to a generalized singular value problem. Returns ------- flag: boolean True if two matrices were set with `setOperators()`. """ cdef PetscBool tval = PETSC_FALSE CHKERR( SVDIsGeneralized(self.svd, &tval) ) return toBool(tval) # 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 toBool(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 = asBool(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,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 = U.bv if U is not None else NULL CHKERR( SVDSetBV(self.svd, VBV, UBV) ) def getOperators(self): """ Gets the matrices associated with the singular value problem. Returns ------- A: Mat The matrix associated with the singular value problem. B: Mat The second matrix in the case of GSVD. """ cdef Mat A = Mat() cdef Mat B = Mat() CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) PetscINCREF(A.obj) PetscINCREF(B.obj) return (A, B) def setOperators(self, Mat A, Mat B=None): """ Sets the matrices associated with the singular value problem. Parameters ---------- A: Mat The matrix associated with the singular value problem. B: Mat, optional The second matrix in the case of GSVD; if not provided, a usual SVD is assumed. """ cdef PetscMat Bmat = B.mat if B is not None else NULL CHKERR( SVDSetOperators(self.svd, A.mat, Bmat) ) # def setInitialSpaces(self, spaceright=None, spaceleft=None): """ Sets the initial spaces from which the SVD solver starts to iterate. Parameters ---------- spaceright: sequence of Vec The right initial space. spaceleft: sequence of Vec The left initial space. """ cdef Py_ssize_t i = 0 if spaceright is None: spaceright = [] elif isinstance(spaceright, Vec): spaceright = [spaceright] cdef PetscVec *isr = NULL cdef Py_ssize_t nr = len(spaceright) cdef tmp1 = allocate(nr*sizeof(Vec),&isr) for i in range(nr): isr[i] = (spaceright[i]).vec if spaceleft is None: spaceright = [] elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] cdef PetscVec *isl = NULL cdef Py_ssize_t nl = len(spaceleft) cdef tmp2 = allocate(nl*sizeof(Vec),&isl) for i in range(nl): isl[i] = (spaceleft[i]).vec CHKERR( SVDSetInitialSpaces(self.svd, nr, isr, nl, isl) ) # 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, 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()`. """ 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 = U.vec if U is not None else NULL cdef PetscVec Vvec = V.vec if V is not None else NULL 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 = def_Viewer(viewer) CHKERR( SVDErrorView(self.svd, et, vwr) ) # def setCrossEPS(self, EPS eps): """ 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): """ 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 = asBool(flag) 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 toBool(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 = asBool(flag) 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 = asBool(flag) CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) setOperator = setOperators # backward compatibility # 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 SVDProblemType del SVDErrorType del SVDWhich del SVDConvergedReason # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/EPS.pyx0000644000175100017510000017005614054125637017052 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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. - `LYAPII`: Lyapunov inverse iteration. - `LAPACK`: Wrappers to dense eigensolvers in Lapack. Wrappers to external eigensolvers (should be enabled during installation of SLEPc) - `ARPACK`: - `BLZPACK`: - `TRLAN`: - `BLOPEX`: - `PRIMME`: - `FEAST`: - `SCALAPACK`: - `ELPA`: - `ELEMENTAL`: - `EVSL`: """ # 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) LYAPII = S_(EPSLYAPII) LAPACK = S_(EPSLAPACK) # with external libraries ARPACK = S_(EPSARPACK) BLZPACK = S_(EPSBLZPACK) TRLAN = S_(EPSTRLAN) BLOPEX = S_(EPSBLOPEX) PRIMME = S_(EPSPRIMME) FEAST = S_(EPSFEAST) SCALAPACK = S_(EPSSCALAPACK) ELPA = S_(EPSELPA) ELEMENTAL = S_(EPSELEMENTAL) EVSL = S_(EPSEVSL) 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 = def_Viewer(viewer) 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 toBool(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 toBool(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 toBool(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 getTwoSided(self): """ Returns the flag indicating whether a two-sided variant of the algorithm is being used or not. Returns ------- twosided: bool Whether the two-sided variant is to be used or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( EPSGetTwoSided(self.eps, &tval) ) return tval def setTwoSided(self, twosided): """ Sets the solver to use a two-sided variant so that left eigenvectors are also computed. Parameters ---------- twosided: bool Whether the two-sided variant is to be used or not. """ cdef PetscBool tval = twosided CHKERR( EPSSetTwoSided(self.eps, tval) ) 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): """ 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): """ 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): """ 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): """ 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, 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 = B.mat if B is not None else NULL 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) ) # --- convergence --- def setStoppingTest(self, stopping, args=None, kargs=None): """ Sets a function to decide when to stop the outer iteration of the eigensolver. """ if stopping is not None: if args is None: args = () if kargs is None: kargs = {} self.set_attr('__stopping__', (stopping, args, kargs)) CHKERR( EPSSetStoppingTestFunction(self.eps, EPS_Stopping, NULL, NULL) ) else: self.set_attr('__stopping__', None) CHKERR( EPSSetStoppingTestFunction(self.eps, EPSStoppingBasic, NULL, NULL) ) # --- monitoring --- def setMonitor(self, monitor, args=None, kargs=None): """ Appends a monitor function to the list of monitors. """ if monitor is None: return cdef object monitorlist = self.get_attr('__monitor__') if monitorlist is None: monitorlist = [] self.set_attr('__monitor__', monitorlist) CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) if args is None: args = () if kargs is None: kargs = {} monitorlist.append((monitor, args, kargs)) def getMonitor(self): """ Gets the list of monitor functions. """ return self.get_attr('__monitor__') def cancelMonitor(self): """ Clears all monitors for an EPS object. """ CHKERR( EPSMonitorCancel(self.eps) ) self.set_attr('__monitor__', None) # 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 toComplex(sval1, sval2) def 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()`. """ cdef PetscVec vecr = Vr.vec cdef PetscVec veci = Vi.vec if Vi is not None else NULL CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): """ Gets the i-th left eigenvector as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. Wr: Vec Placeholder for the returned eigenvector (real part). Wi: Vec, optional Placeholder for the returned eigenvector (imaginary part). Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). Eigensolutions are indexed according to the ordering criterion established with `setWhichEigenpairs()`. Left eigenvectors are available only if the twosided flag was set with `setTwoSided()`. """ cdef PetscVec vecr = Wr.vec cdef PetscVec veci = Wi.vec if Wi is not None else NULL CHKERR( EPSGetLeftEigenvector(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 = Vr.vec if Vr is not None else NULL cdef PetscVec veci = Vi.vec if Vi is not None else NULL CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) return toComplex(sval1, 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 = def_Viewer(viewer) 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 = asBool(delayed) 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 toBool(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 = V.vec if V is not None else NULL 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 `structure` flag is passed to the `PETSc.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 = Au.mat if Au is not None else NULL cdef PetscMat Bmat = Bu.mat if Bu is not None else NULL 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 = asInt(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 toInt(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.15.1/src/SLEPc/slepcds.pxi0000644000175100017510000000504314054125637020031 0ustar jromanjroman00000000000000cdef extern from * nogil: ctypedef char* SlepcDSType "const char*" SlepcDSType DSHEP SlepcDSType DSNHEP SlepcDSType DSGHEP SlepcDSType DSGHIEP SlepcDSType DSGNHEP SlepcDSType DSNHEPTS 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,PetscBool) 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 DSGetMat(SlepcDS,SlepcDSMatType,PetscMat*) int DSRestoreMat(SlepcDS,SlepcDSMatType,PetscMat*) 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.15.1/src/SLEPc/SLEPc.pyx0000644000175100017510000001614114054125637017323 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 "compat.h": pass 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? -1.0 cdef inline object toBool(PetscBool value): return True if value else False cdef inline PetscBool asBool(object value) except? 0: return PETSC_TRUE if value else PETSC_FALSE 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? -1.0: return PyPetscScalar_AsPetscScalar(value) cdef inline object toComplex(PetscScalar rvalue, PetscScalar ivalue): return complex(toScalar(rvalue),toScalar(ivalue)) # ----------------------------------------------------------------------------- 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.15.1/src/SLEPc/Sys.pyx0000644000175100017510000000301414054125637017166 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- cdef class Sys: @classmethod def getVersion(cls, devel=False, date=False, author=False): cdef char cversion[256] cdef PetscInt major=0, minor=0, micro=0, release=0 CHKERR( SlepcGetVersion(cversion, sizeof(cversion)) ) CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) out = version = (toInt(major), toInt(minor), toInt(micro)) if devel or date or author: out = [version] if devel: out.append(not release) if date: vstr = bytes2str(cversion) if release != 0: date = vstr.split(",", 1)[-1].strip() else: date = vstr.split("GIT Date:")[-1].strip() out.append(date) if author: author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') author = tuple([s.strip() for s in author if s]) out.append(author) return tuple(out) @classmethod def getVersionInfo(cls): version, dev, date, author = cls.getVersion(True, True, True) return dict(major = version[0], minor = version[1], subminor = version[2], release = not dev, date = date, authorinfo = author) # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/slepcsys.pxi0000644000175100017510000000444114054125637020242 0ustar jromanjroman00000000000000cdef 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: const_char SLEPC_AUTHOR_INFO[] int SlepcGetVersion(char[],size_t) int SlepcGetVersionNumber(PetscInt*,PetscInt*,PetscInt*,PetscInt*) int SlepcInitialize(int*,char***,char[],char[]) int SlepcFinalize() PetscBool 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 inline PetscViewer def_Viewer(Viewer viewer): return viewer.vwr if viewer is not None else NULL slepc4py-3.15.1/src/SLEPc/NEP.pyx0000644000175100017510000005315014054125637017040 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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): """ 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): """ 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 = Vr.vec if Vr is not None else NULL cdef PetscVec veci = Vi.vec if Vi is not None else NULL CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) return toComplex(sval1, sval2) def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): """ Gets the i-th left eigenvector as computed by `solve()`. Parameters ---------- i: int Index of the solution to be obtained. Wr: Vec Placeholder for the returned eigenvector (real part). Wi: Vec, optional Placeholder for the returned eigenvector (imaginary part). Notes ----- The index ``i`` should be a value between ``0`` and ``nconv-1`` (see `getConverged()`). Eigensolutions are indexed according to the ordering criterion established with `setWhichEigenpairs()`. Left eigenvectors are available only if the twosided flag was set with `setTwoSided()`. """ cdef PetscVec vecr = Wr.vec cdef PetscVec veci = Wi.vec if Wi is not None else NULL CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) 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 = def_Viewer(viewer) 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 = F.mat if F is not None else NULL cdef PetscMat Pmat = P.mat if P is not None else Fmat 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 = J.mat if J is not None else NULL 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) ) def getTwoSided(self): """ Returns the flag indicating whether a two-sided variant of the algorithm is being used or not. Returns ------- twosided: bool Whether the two-sided variant is to be used or not. """ cdef PetscBool tval = PETSC_FALSE CHKERR( NEPGetTwoSided(self.nep, &tval) ) return tval def setTwoSided(self, twosided): """ Sets the solver to use a two-sided variant so that left eigenvectors are also computed. Parameters ---------- twosided: bool Whether the two-sided variant is to be used or not. """ cdef PetscBool tval = twosided CHKERR( NEPSetTwoSided(self.nep, tval) ) # ----------------------------------------------------------------------------- del NEPType del NEPErrorType del NEPWhich del NEPConvergedReason del NEPRefine del NEPRefineScheme # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/slepcnep.pxi0000644000175100017510000001317014054125637020205 0ustar jromanjroman00000000000000cdef 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 NEPSetTwoSided(SlepcNEP,PetscBool) int NEPGetTwoSided(SlepcNEP,PetscBool*) 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 NEPGetLeftEigenvector(SlepcNEP,PetscInt,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.15.1/src/SLEPc/allocate.pxi0000644000175100017510000000132214054125637020154 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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.15.1/src/SLEPc/slepcpep.pxi0000644000175100017510000001324314054125637020210 0ustar jromanjroman00000000000000cdef 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_ALL 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 PEPSetTarget(SlepcPEP,PetscScalar) int PEPGetTarget(SlepcPEP,PetscScalar*) int PEPSetInterval(SlepcPEP,PetscReal,PetscReal) int PEPGetInterval(SlepcPEP,PetscReal*,PetscReal*) int PEPGetConvergedReason(SlepcPEP,SlepcPEPConvergedReason*) int PEPLinearSetLinearization(SlepcPEP,PetscReal,PetscReal) int PEPLinearGetLinearization(SlepcPEP,PetscReal*,PetscReal*) int PEPLinearSetExplicitMatrix(SlepcPEP,PetscBool) int PEPLinearGetExplicitMatrix(SlepcPEP,PetscBool*) int PEPLinearSetEPS(SlepcPEP,SlepcEPS) int PEPLinearGetEPS(SlepcPEP,SlepcEPS*) int PEPTOARSetRestart(SlepcPEP,PetscReal); int PEPTOARGetRestart(SlepcPEP,PetscReal*); int PEPTOARSetLocking(SlepcPEP,PetscBool); int PEPTOARGetLocking(SlepcPEP,PetscBool*); int PEPSTOARSetLocking(SlepcPEP,PetscBool); int PEPSTOARGetLocking(SlepcPEP,PetscBool*); int PEPSTOARSetDetectZeros(SlepcPEP,PetscBool); int PEPSTOARGetDetectZeros(SlepcPEP,PetscBool*); int PEPSTOARSetDimensions(SlepcPEP,PetscInt,PetscInt,PetscInt); int PEPSTOARGetDimensions(SlepcPEP,PetscInt*,PetscInt*,PetscInt*); int PEPJDSetRestart(SlepcPEP,PetscReal); int PEPJDGetRestart(SlepcPEP,PetscReal*); int PEPJDSetFix(SlepcPEP,PetscReal); int PEPJDGetFix(SlepcPEP,PetscReal*); cdef extern from * nogil: int VecCopy(PetscVec,PetscVec) int VecSet(PetscVec,PetscScalar) int VecDestroy(PetscVec*) slepc4py-3.15.1/src/SLEPc/slepcsvd.pxi0000644000175100017510000000566414054125637020230 0ustar jromanjroman00000000000000cdef extern from * nogil: ctypedef char* SlepcSVDType "const char*" SlepcSVDType SVDCROSS SlepcSVDType SVDCYCLIC SlepcSVDType SVDLAPACK SlepcSVDType SVDLANCZOS SlepcSVDType SVDTRLANCZOS SlepcSVDType SVDRANDOMIZED SlepcSVDType SVDSCALAPACK SlepcSVDType SVDELEMENTAL SlepcSVDType SVDPRIMME ctypedef enum SlepcSVDProblemType "SVDProblemType": SVD_STANDARD SVD_GENERALIZED 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_CONVERGED_MAXIT 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 SVDSetProblemType(SlepcSVD,SlepcSVDProblemType) int SVDGetProblemType(SlepcSVD,SlepcSVDProblemType*) int SVDIsGeneralized(SlepcSVD,PetscBool*) int SVDSetBV(SlepcSVD,SlepcBV,SlepcBV) int SVDGetBV(SlepcSVD,SlepcBV*,SlepcBV*) int SVDSetOperators(SlepcSVD,PetscMat,PetscMat) int SVDGetOperators(SlepcSVD,PetscMat*,PetscMat*) int SVDSetInitialSpaces(SlepcSVD,PetscInt,PetscVec*,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.15.1/src/SLEPc/slepcmfn.pxi0000644000175100017510000000310614054125637020201 0ustar jromanjroman00000000000000cdef 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 ctypedef enum SlepcFunction "SlepcFunction": SLEPC_FUNCTION_NONE SLEPC_FUNCTION_EXP SLEPC_FUNCTION_LAST 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.15.1/src/SLEPc/FN.pyx0000644000175100017510000001653414054125637016726 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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 = def_Viewer(viewer) 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): """ 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): """ 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) ) def setCombineChildren(self, comb, FN f1, FN f2): """ Sets the two child functions that constitute this combined function, and the way they must be combined. Parameters ---------- comb: `FN.CombineType` enumerate How to combine the functions (addition, multiplication, division, composition). f1: FN First function. f2: FN Second function. """ cdef SlepcFNCombineType val = comb CHKERR( FNCombineSetChildren(self.fn, val, f1.fn, f2.fn) ) # ----------------------------------------------------------------------------- del FNType del FNCombineType # ----------------------------------------------------------------------------- slepc4py-3.15.1/src/SLEPc/slepcfn.pxi0000644000175100017510000000356614054125637020036 0ustar jromanjroman00000000000000cdef 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.15.1/src/SLEPc/slepcst.pxi0000644000175100017510000000307214054125637020051 0ustar jromanjroman00000000000000cdef 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 STGetMatrix(SlepcST,PetscInt,PetscMat*) int STSetMatrices(SlepcST,PetscInt,PetscMat*) int STSetMatStructure(SlepcST,PetscMatStructure) int STSetPreconditionerMat(SlepcST,PetscMat) int STGetPreconditionerMat(SlepcST,PetscMat*) 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.15.1/src/SLEPc/slepcbv.pxi0000644000175100017510000000626414054125637020040 0ustar jromanjroman00000000000000cdef 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 BVCreateMat(SlepcBV,PetscMat*) 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 BVResize(SlepcBV,PetscInt,PetscBool) 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 BVSetRandomNormal(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.15.1/src/SLEPc/CAPI.pyx0000644000175100017510000000756514054125637017143 0ustar jromanjroman00000000000000# ----------------------------------------------------------------------------- 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.15.1/src/slepc4py.SLEPc.pyx0000644000175100017510000000056014054125637020155 0ustar jromanjroman00000000000000#cython: embedsignature=True #cython: cdivision=True #cython: binding=False #cython: auto_pickle=False #cython: always_allow_keywords=True #cython: allow_none_for_extension_args=False #cython: autotestdict=False #cython: warn.multiple_declarators=False #cython: optimize.use_switch=False from __future__ import absolute_import cimport cython include "SLEPc/SLEPc.pyx" slepc4py-3.15.1/src/include/0000755000175100017510000000000014054125756016367 5ustar jromanjroman00000000000000slepc4py-3.15.1/src/include/custom.h0000644000175100017510000000134414054125637020052 0ustar jromanjroman00000000000000#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.15.1/src/include/slepc4py/0000755000175100017510000000000014054125756020132 5ustar jromanjroman00000000000000slepc4py-3.15.1/src/include/slepc4py/slepc4py.i0000644000175100017510000000302414054125637022044 0ustar jromanjroman00000000000000/* 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.15.1/src/include/slepc4py/SLEPc.pxd0000644000175100017510000000413114054125637021552 0ustar jromanjroman00000000000000# 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.15.1/src/include/slepc4py/slepc4py.SLEPc_api.h0000644000175100017510000003303414054125703023577 0ustar jromanjroman00000000000000/* Generated by Cython 0.29.22 */ #ifndef __PYX_HAVE_API__slepc4py__SLEPc #define __PYX_HAVE_API__slepc4py__SLEPc #ifdef __MINGW64__ #define MS_WIN64 #endif #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_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_proto #define __PYX_HAVE_RT_ImportType_proto enum __Pyx_ImportType_CheckSize { __Pyx_ImportType_CheckSize_Error = 0, __Pyx_ImportType_CheckSize_Warn = 1, __Pyx_ImportType_CheckSize_Ignore = 2 }; static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif result = PyObject_GetAttrString(module, class_name); 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 ((size_t)basicsize < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif static int import_slepc4py__SLEPc(void) { PyObject *module = 0; module = PyImport_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; __pyx_ptype_8slepc4py_5SLEPc_ST = __Pyx_ImportType(module, "slepc4py.SLEPc", "ST", sizeof(struct PySlepcSTObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_ST) goto bad; __pyx_ptype_8slepc4py_5SLEPc_BV = __Pyx_ImportType(module, "slepc4py.SLEPc", "BV", sizeof(struct PySlepcBVObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_BV) goto bad; __pyx_ptype_8slepc4py_5SLEPc_DS = __Pyx_ImportType(module, "slepc4py.SLEPc", "DS", sizeof(struct PySlepcDSObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_DS) goto bad; __pyx_ptype_8slepc4py_5SLEPc_FN = __Pyx_ImportType(module, "slepc4py.SLEPc", "FN", sizeof(struct PySlepcFNObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_FN) goto bad; __pyx_ptype_8slepc4py_5SLEPc_RG = __Pyx_ImportType(module, "slepc4py.SLEPc", "RG", sizeof(struct PySlepcRGObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_RG) goto bad; __pyx_ptype_8slepc4py_5SLEPc_EPS = __Pyx_ImportType(module, "slepc4py.SLEPc", "EPS", sizeof(struct PySlepcEPSObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_EPS) goto bad; __pyx_ptype_8slepc4py_5SLEPc_SVD = __Pyx_ImportType(module, "slepc4py.SLEPc", "SVD", sizeof(struct PySlepcSVDObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_SVD) goto bad; __pyx_ptype_8slepc4py_5SLEPc_PEP = __Pyx_ImportType(module, "slepc4py.SLEPc", "PEP", sizeof(struct PySlepcPEPObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_PEP) goto bad; __pyx_ptype_8slepc4py_5SLEPc_NEP = __Pyx_ImportType(module, "slepc4py.SLEPc", "NEP", sizeof(struct PySlepcNEPObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_NEP) goto bad; __pyx_ptype_8slepc4py_5SLEPc_MFN = __Pyx_ImportType(module, "slepc4py.SLEPc", "MFN", sizeof(struct PySlepcMFNObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8slepc4py_5SLEPc_MFN) goto bad; Py_DECREF(module); module = 0; return 0; bad: Py_XDECREF(module); return -1; } #endif /* !__PYX_HAVE_API__slepc4py__SLEPc */ slepc4py-3.15.1/src/include/slepc4py/slepc4py.h0000644000175100017510000000050014054125637022037 0ustar jromanjroman00000000000000/* 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.15.1/src/include/slepc4py/slepc4py.SLEPc.h0000644000175100017510000001121514054125703022743 0ustar jromanjroman00000000000000/* Generated by Cython 0.29.22 */ #ifndef __PYX_HAVE__slepc4py__SLEPc #define __PYX_HAVE__slepc4py__SLEPc #include "Python.h" 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 */ /* WARNING: the interface of the module init function changed in CPython 3.5. */ /* It now returns a PyModuleDef instance instead of a PyModule instance. */ #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initSLEPc(void); #else PyMODINIT_FUNC PyInit_SLEPc(void); #endif #endif /* !__PYX_HAVE__slepc4py__SLEPc */ slepc4py-3.15.1/src/include/slepc4py/__init__.pyx0000644000175100017510000000007014054125637022426 0ustar jromanjroman00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com slepc4py-3.15.1/src/include/slepc4py/__init__.pxd0000644000175100017510000000007014054125637022401 0ustar jromanjroman00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com slepc4py-3.15.1/src/include/compat.h0000644000175100017510000000144014054125637020020 0ustar jromanjroman00000000000000#ifndef SLEPC4PY_COMPAT_H #define SLEPC4PY_COMPAT_H #if !defined(PETSC_USE_COMPLEX) #define SlepcPEPJDUnavailable(pep) do { \ PetscFunctionBegin; \ SETERRQ1(PetscObjectComm((PetscObject)pep),PETSC_ERR_SUP,"%s() not available with real scalars",PETSC_FUNCTION_NAME); \ PetscFunctionReturn(PETSC_ERR_SUP);} while (0) PetscErrorCode PEPJDSetRestart(PEP pep,PETSC_UNUSED PetscReal keep){SlepcPEPJDUnavailable(pep);} PetscErrorCode PEPJDGetRestart(PEP pep,PETSC_UNUSED PetscReal *keep){SlepcPEPJDUnavailable(pep);} PetscErrorCode PEPJDSetFix(PEP pep,PETSC_UNUSED PetscReal fix){SlepcPEPJDUnavailable(pep);} PetscErrorCode PEPJDGetFix(PEP pep,PETSC_UNUSED PetscReal *fix){SlepcPEPJDUnavailable(pep);} #undef SlepcPEPJDUnavailable #endif /*PETSC_USE_COMPLEX*/ #endif /*SLEPC4PY_COMPAT_H*/ slepc4py-3.15.1/src/include/scalar.h0000644000175100017510000000107714054125637020010 0ustar jromanjroman00000000000000static 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.15.1/src/__main__.py0000644000175100017510000000425714054125637017044 0ustar jromanjroman00000000000000# 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.15.1/src/SLEPc.c0000644000175100017510000000012314054125637016010 0ustar jromanjroman00000000000000#define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #include "slepc4py.SLEPc.c" slepc4py-3.15.1/src/lib/0000755000175100017510000000000014054125756015512 5ustar jromanjroman00000000000000slepc4py-3.15.1/src/lib/slepc.cfg0000644000175100017510000000012214054125637017272 0ustar jromanjroman00000000000000SLEPC_DIR = %(SLEPC_DIR)s PETSC_DIR = %(PETSC_DIR)s PETSC_ARCH = %(PETSC_ARCH)s slepc4py-3.15.1/src/lib/__init__.py0000644000175100017510000000322614054125637017624 0ustar jromanjroman00000000000000# 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.15.1/src/SLEPc.py0000644000175100017510000000035114054125637016221 0ustar jromanjroman00000000000000ARCH = 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.15.1/src/__init__.py0000644000175100017510000000413414054125637017055 0ustar jromanjroman00000000000000# 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: https://slepc.upv.es .. _PETSc: https://www.mcs.anl.gov/petsc """ __author__ = 'Lisandro Dalcin' __version__ = '3.15.1' __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.15.1/src/SLEPc.pxd0000644000175100017510000000013614054125637016365 0ustar jromanjroman00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com include "include/slepc4py/SLEPc.pxd" slepc4py-3.15.1/src/slepc4py.SLEPc.c0000644000175100017510001520220114054125703017553 0ustar jromanjroman00000000000000/* Generated by Cython 0.29.22 */ #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 < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_29_22" #define CYTHON_HEX_VERSION 0x001D16F0 #define CYTHON_FUTURE_DIVISION 1 #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 #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #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_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #ifndef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #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 #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_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif 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 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" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #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) #endif #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 #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #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 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 #define PyMem_RawMalloc(n) PyMem_Malloc(n) #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) #define PyMem_RawFree(p) PyMem_Free(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #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 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #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_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #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_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #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_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #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_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #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(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? 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 #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #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 #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #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) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #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 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #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 /* Early includes */ #include "slepc.h" #include "petsc.h" #include "compat.h" #include "custom.h" #include "scalar.h" #include "string.h" #include "stdio.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #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_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #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))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #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) #define __Pyx_sst_abs(value) ((Py_ssize_t)_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 const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const 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_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const 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) 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); } #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) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #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) + 1); 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 CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime = NULL; 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/slepceps.pxi", "SLEPc/SLEPc.pyx", "SLEPc/slepcmpi.pxi", "SLEPc/slepcsys.pxi", "SLEPc/slepcfn.pxi", "SLEPc/slepcnep.pxi", "SLEPc/Sys.pyx", "SLEPc/BV.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", }; /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /*--- Type declarations ---*/ struct PyPetscCommObject; struct PyPetscObjectObject; struct PyPetscViewerObject; struct PyPetscRandomObject; struct PyPetscISObject; struct PyPetscLGMapObject; struct PyPetscSFObject; struct PyPetscVecObject; struct PyPetscFEObject; struct PyPetscQuadObject; struct PyPetscScatterObject; struct PyPetscSectionObject; struct PyPetscMatObject; struct PyPetscNullSpaceObject; struct PyPetscPCObject; struct PyPetscKSPObject; struct PyPetscSNESObject; struct PyPetscTSObject; struct PyPetscTAOObject; struct PyPetscAOObject; struct PyPetscDMObject; struct PyPetscDSObject; struct PyPetscPartitionerObject; struct PyPetscDMLabelObject; 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":91 * # -------------------------------------------------------------------- * * 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":99 * 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":111 * 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":117 * 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":123 * 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":129 * 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":135 * 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":141 * 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":147 * cdef PetscVec vec * * ctypedef public api class FE(Object) [ # <<<<<<<<<<<<<< * type PyPetscFE_Type, * object PyPetscFEObject, */ struct PyPetscFEObject { struct PyPetscObjectObject __pyx_base; PetscFE fe; }; typedef struct PyPetscFEObject PyPetscFEObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscFE_Type; /* "petsc4py/PETSc.pxd":153 * cdef PetscFE fe * * ctypedef public api class Quad(Object) [ # <<<<<<<<<<<<<< * type PyPetscQuad_Type, * object PyPetscQuadObject, */ struct PyPetscQuadObject { struct PyPetscObjectObject __pyx_base; PetscQuadrature quad; }; typedef struct PyPetscQuadObject PyPetscQuadObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscQuad_Type; /* "petsc4py/PETSc.pxd":159 * cdef PetscQuadrature quad * * 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":165 * 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":171 * 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":177 * 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":183 * 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":189 * 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":195 * 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":201 * 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":207 * 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":213 * 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":219 * 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":225 * cdef PetscDM dm * * ctypedef public api class DS(Object) [ # <<<<<<<<<<<<<< * type PyPetscDS_Type, * object PyPetscDSObject, */ struct PyPetscDSObject { struct PyPetscObjectObject __pyx_base; PetscDS ds; }; typedef struct PyPetscDSObject PyPetscDSObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDS_Type; /* "petsc4py/PETSc.pxd":231 * cdef PetscDS ds * * 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; /* "petsc4py/PETSc.pxd":237 * cdef PetscPartitioner part * * ctypedef public api class DMLabel(Object) [ # <<<<<<<<<<<<<< * type PyPetscDMLabel_Type, * object PyPetscDMLabelObject, */ struct PyPetscDMLabelObject { struct PyPetscObjectObject __pyx_base; DMLabel dmlabel; }; typedef struct PyPetscDMLabelObject PyPetscDMLabelObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDMLabel_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":99 * 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":111 * 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":117 * 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":123 * 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":129 * 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":135 * 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":141 * 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) PyPetscFE_Type; /* "petsc4py/PETSc.pxd":147 * cdef PetscVec vec * * ctypedef public api class FE(Object) [ # <<<<<<<<<<<<<< * type PyPetscFE_Type, * object PyPetscFEObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_FE { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_FE *__pyx_vtabptr_8petsc4py_5PETSc_FE; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscQuad_Type; /* "petsc4py/PETSc.pxd":153 * cdef PetscFE fe * * ctypedef public api class Quad(Object) [ # <<<<<<<<<<<<<< * type PyPetscQuad_Type, * object PyPetscQuadObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_Quad { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_Quad *__pyx_vtabptr_8petsc4py_5PETSc_Quad; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscScatter_Type; /* "petsc4py/PETSc.pxd":159 * cdef PetscQuadrature quad * * 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":165 * 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":171 * 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":177 * 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":183 * 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":189 * 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":195 * 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":201 * 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":207 * 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":213 * 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":219 * 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) PyPetscDS_Type; /* "petsc4py/PETSc.pxd":225 * cdef PetscDM dm * * ctypedef public api class DS(Object) [ # <<<<<<<<<<<<<< * type PyPetscDS_Type, * object PyPetscDSObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_DS { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_DS *__pyx_vtabptr_8petsc4py_5PETSc_DS; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPartitioner_Type; /* "petsc4py/PETSc.pxd":231 * cdef PetscDS ds * * 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) PyPetscDMLabel_Type; /* "petsc4py/PETSc.pxd":237 * cdef PetscPartitioner part * * ctypedef public api class DMLabel(Object) [ # <<<<<<<<<<<<<< * type PyPetscDMLabel_Type, * object PyPetscDMLabelObject, */ struct __pyx_vtabstruct_8petsc4py_5PETSc_DMLabel { struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base; }; static struct __pyx_vtabstruct_8petsc4py_5PETSc_DMLabel *__pyx_vtabptr_8petsc4py_5PETSc_DMLabel; __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":63 * # ----------------------------------------------------------------------------- * * 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":219 * # ----------------------------------------------------------------------------- * * 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":80 * # ----------------------------------------------------------------------------- * * 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":169 * # ----------------------------------------------------------------------------- * * 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_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* decode_c_string_utf16.proto */ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 0; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = -1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { int byteorder = 1; return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); } /* 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); } /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* 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 /* 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 /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* 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 int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #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); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, 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); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #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_FAST_THREAD_STATE #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_FAST_THREAD_STATE #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 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); /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS 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); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* 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_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS 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); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCall2Args.proto */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* 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); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } #define __Pyx_GetModuleGlobalNameUncached(var, name) {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* 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); /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto #define __PYX_HAVE_RT_ImportType_proto enum __Pyx_ImportType_CheckSize { __Pyx_ImportType_CheckSize_Error = 0, __Pyx_ImportType_CheckSize_Warn = 1, __Pyx_ImportType_CheckSize_Ignore = 2 }; static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); #endif /* GetVTable.proto */ static void* __Pyx_GetVtable(PyObject *dict); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* 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); /* ClassMethod.proto */ #include "descrobject.h" static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* 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_USE_TYPE_SLOTS #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); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); #else #define __Pyx_RegisterCleanup() (0) #endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* 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); /* GCCDiagnostics.proto */ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* 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); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* 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_SVDProblemType(SVDProblemType 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); /* 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 EPSConvergedReason __Pyx_PyInt_As_EPSConvergedReason(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 *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value); /* 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 DSMatType __Pyx_PyInt_As_DSMatType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE FNCombineType __Pyx_PyInt_As_FNCombineType(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(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 SVDProblemType __Pyx_PyInt_As_SVDProblemType(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 *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* FunctionExport.proto */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /* 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_FE = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Quad = 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_DS = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Partitioner = 0; static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DMLabel = 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 'cython' */ /* 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_toBool(PetscBool); /*proto*/ static CYTHON_INLINE PetscBool __pyx_f_8slepc4py_5SLEPc_asBool(PyObject *); /*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 PyObject *__pyx_f_8slepc4py_5SLEPc_toComplex(PetscScalar, PetscScalar); /*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 PetscViewer __pyx_f_8slepc4py_5SLEPc_def_Viewer(struct PyPetscViewerObject *); /*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 PySlepcEPSObject *__pyx_f_8slepc4py_5SLEPc_ref_EPS(EPS); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_EPS_Stopping(EPS, PetscInt, PetscInt, PetscInt, PetscInt, EPSConvergedReason *, void *); /*proto*/ static int __pyx_f_8slepc4py_5SLEPc_EPS_Monitor(EPS, PetscInt, PetscInt, PetscScalar *, PetscScalar *, PetscReal *, PetscInt, void *); /*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" extern int __pyx_module_is_main_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_BV[] = "BV"; static const char __pyx_k_Bu[] = "Bu"; static const char __pyx_k_DS[] = "DS"; static const char __pyx_k_Dl[] = "Dl"; static const char __pyx_k_Dr[] = "Dr"; static const char __pyx_k_FN[] = "FN"; 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_RG[] = "RG"; static const char __pyx_k_ST[] = "ST"; 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_Wi[] = "Wi"; static const char __pyx_k_Wr[] = "Wr"; static const char __pyx_k__2[] = ","; static const char __pyx_k__4[] = "\n"; static const char __pyx_k_bv[] = "bv"; static const char __pyx_k_ds[] = "ds"; static const char __pyx_k_f1[] = "f1"; static const char __pyx_k_f2[] = "f2"; 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_EPS[] = "EPS"; 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_MFN[] = "MFN"; 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_Sys[] = "Sys"; 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_fix[] = "fix"; 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_ELPA[] = "ELPA"; static const char __pyx_k_EVSL[] = "EVSL"; 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_comb[] = "comb"; 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_copy[] = "copy"; 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_name[] = "__name__"; static const char __pyx_k_orth[] = "orth"; static const char __pyx_k_trim[] = "trim"; 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_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_p_mem[] = "_p_mem"; 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_LYAPII[] = "LYAPII"; static const char __pyx_k_NHEPTS[] = "NHEPTS"; 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_matname[] = "matname"; static const char __pyx_k_monitor[] = "monitor"; 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_GIT_Date[] = "GIT Date:"; 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_STANDARD[] = "STANDARD"; 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_stopping[] = "stopping"; 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_twosided[] = "twosided"; 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_ELEMENTAL[] = "ELEMENTAL"; 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_SCALAPACK[] = "SCALAPACK"; 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_spaceleft[] = "spaceleft"; 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_RANDOMIZED[] = "RANDOMIZED"; 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_spaceright[] = "spaceright"; static const char __pyx_k_CombineType[] = "CombineType"; static const char __pyx_k_DSStateType[] = "DSStateType"; static const char __pyx_k_GENERALIZED[] = "GENERALIZED"; 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_setOperator[] = "setOperator"; 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_setOperators[] = "setOperators"; 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_SVDProblemType[] = "SVDProblemType"; 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_CONVERGED_MAXIT[] = "CONVERGED_MAXIT"; 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_SLEPc_SLEPc_pyx[] = "SLEPc/SLEPc.pyx"; 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_cline_in_traceback[] = "cline_in_traceback"; 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 - `LYAPII`: Lyapunov inverse iteration.\n - `LAPACK`: Wrappers to dense eigensolvers in Lapack.\n\n Wrappers to external eigensolvers\n (should be enabled during installation of SLEPc)\n\n - `ARPACK`:\n - `BLZPACK`:\n - `TRLAN`:\n - `BLOPEX`:\n - `PRIMME`:\n - `FEAST`:\n - `SCALAPACK`:\n - `ELPA`:\n - `ELEMENTAL`:\n - `EVSL`:\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 - `ALL`: All eigenvalues in an interval.\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_problem_type_STANDARD_Stand[] = "\n SVD problem type\n\n - `STANDARD`: Standard SVD.\n - `GENERALIZED`: Generalized singular value decomposition (GSVD).\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\n Wrappers to external SVD solvers\n (should be enabled during installation of SLEPc)\n\n - `SCALAPACK`:\n - `ELEMENTAL`:\n - `PRIMME`:\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_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_BV; 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_MAXIT; 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_DS; 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_ELEMENTAL; static PyObject *__pyx_n_s_ELLIPSE; static PyObject *__pyx_n_s_ELPA; static PyObject *__pyx_n_s_EPS; 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_EVSL; 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_FN; 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_GENERALIZED; static PyObject *__pyx_n_s_GHEP; static PyObject *__pyx_n_s_GHIEP; static PyObject *__pyx_kp_s_GIT_Date; 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_LYAPII; static PyObject *__pyx_n_s_LanczosReorthogType; static PyObject *__pyx_n_s_MAT; static PyObject *__pyx_n_s_MBE; static PyObject *__pyx_n_s_MFN; 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_NHEPTS; 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_RANDOMIZED; 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_RG; 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_SCALAPACK; 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_kp_s_SLEPc_SLEPc_pyx; 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_ST; static PyObject *__pyx_n_s_STANDARD; 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_SVDProblemType; 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_problem_type_STANDARD_Stand; 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_Sys; 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_Wi; static PyObject *__pyx_n_s_Wr; 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_kp_s__4; 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_cline_in_traceback; static PyObject *__pyx_n_s_comb; static PyObject *__pyx_n_s_comm; static PyObject *__pyx_n_s_comp; static PyObject *__pyx_n_s_conv; static PyObject *__pyx_n_s_copy; 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_f1; static PyObject *__pyx_n_s_f2; static PyObject *__pyx_n_s_finalize; static PyObject *__pyx_n_s_fix; 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_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_matname; 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_monitor; static PyObject *__pyx_n_s_mpd; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; 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_p_mem; 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_setOperator; static PyObject *__pyx_n_s_setOperators; 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_spaceleft; static PyObject *__pyx_n_s_spaceright; 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_stopping; 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_trim; static PyObject *__pyx_n_s_trueres; static PyObject *__pyx_n_s_twosided; 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_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(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_32setMatrices(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getMatrices(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_42setPreconditionerMat(struct PySlepcSTObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_P); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44getPreconditionerMat(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46setUp(struct PySlepcSTObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_48apply(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_50applyTranspose(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_52setCayleyAntishift(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_8createMat(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10duplicate(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_12copy(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_result); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14setType(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_bv_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16getType(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_18setSizes(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_m); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_20setSizesFromVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_w, PyObject *__pyx_v_m); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22getSizes(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24setOptionsPrefix(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26getOptionsPrefix(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28setFromOptions(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30getOrthogonalization(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_32setOrthogonalization(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_34getMatrix(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_36setMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_mat, int __pyx_v_indef); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_38applyMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_40setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42getActiveColumns(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_44scaleColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_alpha); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46scale(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_48insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50insertVecs(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_52dotVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54getColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_56restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_58dot(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_60matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_62matMult(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_64matMultHermitianTranspose(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_66multVec(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_68normColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_norm_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70norm(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_norm_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72resize(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_copy); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74setRandom(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_76setRandomNormal(struct PySlepcBVObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_78orthogonalizeVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_80orthogonalize(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, PyObject *__pyx_v_trim); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(struct PySlepcDSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_52getMat(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_matname); /* 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 PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_30setCombineChildren(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comb, struct PySlepcFNObject *__pyx_v_f1, struct PySlepcFNObject *__pyx_v_f2); /* 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_56getTwoSided(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setTwoSided(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_twosided); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setConvergenceTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrueResidual(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrueResidual(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trueres); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getTrackAll(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setTrackAll(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_74setDimensions(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_76getST(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_78setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getBV(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_82setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getDS(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_86setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getRG(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_90setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92getOperators(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_94setOperators(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96setDeflationSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setInitialSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100setStoppingTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_stopping, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102setMonitor(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_monitor, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getMonitor(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106cancelMonitor(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108setUp(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110solve(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getIterationNumber(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getConvergedReason(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getConverged(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118getEigenvalue(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_120getEigenvector(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_122getLeftEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Wr, struct PyPetscVecObject *__pyx_v_Wi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_124getEigenpair(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_126getInvariantSubspace(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getErrorEstimate(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_130computeError(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_132errorView(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setPowerShiftType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_shift); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_reorthog); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_keep); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_lock); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154setKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_npart); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158setKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_detect); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurDimensions(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_164getKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getKrylovSchurSubcommInfo(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_168getKrylovSchurSubcommPairs(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_V); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_170getKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_172updateKrylovSchurSubcommMats(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_174setKrylovSchurSubintervals(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_subint); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_176setRQCGReset(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nrest); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_178getRQCGReset(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_22getProblemType(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setProblemType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_problem_type); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26isGeneralized(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30setImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34setWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36getTolerances(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_38setTolerances(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40getDimensions(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_42setDimensions(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_44getBV(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_46setBV(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_V, struct PySlepcBVObject *__pyx_v_U); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48getOperators(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_50setOperators(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52setInitialSpaces(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_spaceright, PyObject *__pyx_v_spaceleft); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54cancelMonitor(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56setUp(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58solve(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getIterationNumber(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getConvergedReason(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getConverged(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66getValue(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_68getVectors(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_70getSingularTriplet(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_72computeError(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_74errorView(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_76setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78getCrossEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_80setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82getCyclicEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_86getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_88setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_90setTRLanczosOneSide(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_34getTarget(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTarget(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getTolerances(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40getInterval(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42setInterval(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_inta, PyObject *__pyx_v_intb); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_44setTolerances(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setConvergenceTest(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getRefine(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_52setRefine(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_54getTrackAll(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setTrackAll(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getDimensions(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_60setDimensions(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_62getST(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_64setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_66getScale(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_68setScale(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_70getBV(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_72setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74getRG(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_76setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78getOperators(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80setOperators(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82setInitialSpace(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84cancelMonitor(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86setUp(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88solve(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getIterationNumber(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92getConvergedReason(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94getConverged(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_96getEigenpair(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_98getErrorEstimate(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_100computeError(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_102errorView(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearEPS(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_108setLinearLinearization(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_110getLinearLinearization(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_112setLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_114getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_116setTOARRestart(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_keep); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_118getTOARRestart(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_120setTOARLocking(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_lock); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_122getTOARLocking(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_124setSTOARLocking(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_lock); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_126getSTOARLocking(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_128setSTOARDetectZeros(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_detect); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_130getSTOARDetectZeros(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_132setSTOARDimensions(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_134getSTOARDimensions(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_136setJDRestart(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_keep); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_138getJDRestart(struct PySlepcPEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_140setJDFix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_fix); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_142getJDFix(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_66getLeftEigenvector(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Wr, struct PyPetscVecObject *__pyx_v_Wi); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68getErrorEstimate(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_70computeError(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_72errorView(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_74setFunction(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_76setJacobian(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_78setSplitOperator(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_A, PyObject *__pyx_v_f, PyObject *__pyx_v_structure); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_80getTwoSided(struct PySlepcNEPObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_82setTwoSided(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_twosided); /* 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_0_0; static PyObject *__pyx_float_1_0; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_codeobj__53; static PyObject *__pyx_codeobj__54; /* Late includes */ /* "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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_r = Py_None; __Pyx_INCREF(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_r = Py_None; __Pyx_INCREF(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_UNPACK_METHODS && 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); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; 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_AsWritableString(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_r = Py_None; __Pyx_INCREF(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_UNPACK_METHODS && 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); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 = ((PyObject *)__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(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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 (unlikely(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_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, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_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 * */ (void)(__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":97 * PetscScalar PyPetscScalar_AsPetscScalar(object) except? -1.0 * * cdef inline object toBool(PetscBool value): # <<<<<<<<<<<<<< * return True if value else False * cdef inline PetscBool asBool(object value) except? 0: */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toBool(PetscBool __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("toBool", 0); /* "SLEPc/SLEPc.pyx":98 * * cdef inline object toBool(PetscBool value): * return True if value else False # <<<<<<<<<<<<<< * cdef inline PetscBool asBool(object value) except? 0: * return PETSC_TRUE if value else PETSC_FALSE */ __Pyx_XDECREF(__pyx_r); if (__pyx_v_value) { __Pyx_INCREF(Py_True); __pyx_t_1 = Py_True; } else { __Pyx_INCREF(Py_False); __pyx_t_1 = Py_False; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":97 * PetscScalar PyPetscScalar_AsPetscScalar(object) except? -1.0 * * cdef inline object toBool(PetscBool value): # <<<<<<<<<<<<<< * return True if value else False * cdef inline PetscBool asBool(object value) except? 0: */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":99 * cdef inline object toBool(PetscBool value): * return True if value else False * cdef inline PetscBool asBool(object value) except? 0: # <<<<<<<<<<<<<< * return PETSC_TRUE if value else PETSC_FALSE * */ static CYTHON_INLINE PetscBool __pyx_f_8slepc4py_5SLEPc_asBool(PyObject *__pyx_v_value) { PetscBool __pyx_r; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asBool", 0); /* "SLEPc/SLEPc.pyx":100 * return True if value else False * cdef inline PetscBool asBool(object value) except? 0: * return PETSC_TRUE if value else PETSC_FALSE # <<<<<<<<<<<<<< * * cdef inline object toInt(PetscInt value): */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(4, 100, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_1 = PETSC_TRUE; } else { __pyx_t_1 = PETSC_FALSE; } __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":99 * cdef inline object toBool(PetscBool value): * return True if value else False * cdef inline PetscBool asBool(object value) except? 0: # <<<<<<<<<<<<<< * return PETSC_TRUE if value else PETSC_FALSE * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.asBool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = ((PetscBool)0); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":102 * return PETSC_TRUE if value else PETSC_FALSE * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toInt", 0); /* "SLEPc/SLEPc.pyx":103 * * 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, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":102 * return PETSC_TRUE if value else PETSC_FALSE * * 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":104 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asInt", 0); /* "SLEPc/SLEPc.pyx":105 * 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, 105, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":104 * 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":107 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toReal", 0); /* "SLEPc/SLEPc.pyx":108 * * 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, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":107 * 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":109 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asReal", 0); /* "SLEPc/SLEPc.pyx":110 * 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, 110, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":109 * 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":112 * return value * * cdef inline object toScalar(PetscScalar value): # <<<<<<<<<<<<<< * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except? -1.0: */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toScalar(PetscScalar __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toScalar", 0); /* "SLEPc/SLEPc.pyx":113 * * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) # <<<<<<<<<<<<<< * cdef inline PetscScalar asScalar(object value) except? -1.0: * return PyPetscScalar_AsPetscScalar(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyPetscScalar_FromPetscScalar(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":112 * return value * * cdef inline object toScalar(PetscScalar value): # <<<<<<<<<<<<<< * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except? -1.0: */ /* 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":114 * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except? -1.0: # <<<<<<<<<<<<<< * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asScalar", 0); /* "SLEPc/SLEPc.pyx":115 * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except? -1.0: * return PyPetscScalar_AsPetscScalar(value) # <<<<<<<<<<<<<< * * cdef inline object toComplex(PetscScalar rvalue, PetscScalar ivalue): */ __pyx_t_1 = PyPetscScalar_AsPetscScalar(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(4, 115, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":114 * cdef inline object toScalar(PetscScalar value): * return PyPetscScalar_FromPetscScalar(value) * cdef inline PetscScalar asScalar(object value) except? -1.0: # <<<<<<<<<<<<<< * return PyPetscScalar_AsPetscScalar(value) * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.asScalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = ((PetscScalar)(-1.0)); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SLEPc.pyx":117 * return PyPetscScalar_AsPetscScalar(value) * * cdef inline object toComplex(PetscScalar rvalue, PetscScalar ivalue): # <<<<<<<<<<<<<< * return complex(toScalar(rvalue),toScalar(ivalue)) * */ static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toComplex(PetscScalar __pyx_v_rvalue, PetscScalar __pyx_v_ivalue) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toComplex", 0); /* "SLEPc/SLEPc.pyx":118 * * cdef inline object toComplex(PetscScalar rvalue, PetscScalar ivalue): * return complex(toScalar(rvalue),toScalar(ivalue)) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_rvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_ivalue); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SLEPc.pyx":117 * return PyPetscScalar_AsPetscScalar(value) * * cdef inline object toComplex(PetscScalar rvalue, PetscScalar ivalue): # <<<<<<<<<<<<<< * return complex(toScalar(rvalue),toScalar(ivalue)) * */ /* 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.toComplex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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":48 * PetscBool 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("matstructure", 0); /* "SLEPc/slepcsys.pxi":50 * 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":51 * 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":52 * 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":53 * 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, 53, __pyx_L1_error) __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "SLEPc/slepcsys.pxi":48 * PetscBool 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":55 * 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":56 * * 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":57 * 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":58 * 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":55 * 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":60 * 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":61 * * 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":62 * 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":64 * 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":65 * cdef PetscObject tmp * tmp = obj[0]; obj[0] = NULL * return PetscObjectDestroy(&tmp) # <<<<<<<<<<<<<< * * cdef inline PetscViewer def_Viewer(Viewer viewer): */ __pyx_r = PetscObjectDestroy((&__pyx_v_tmp)); goto __pyx_L0; /* "SLEPc/slepcsys.pxi":60 * 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/slepcsys.pxi":67 * return PetscObjectDestroy(&tmp) * * cdef inline PetscViewer def_Viewer(Viewer viewer): # <<<<<<<<<<<<<< * return viewer.vwr if viewer is not None else NULL */ static CYTHON_INLINE PetscViewer __pyx_f_8slepc4py_5SLEPc_def_Viewer(struct PyPetscViewerObject *__pyx_v_viewer) { PetscViewer __pyx_r; __Pyx_RefNannyDeclarations PetscViewer __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("def_Viewer", 0); /* "SLEPc/slepcsys.pxi":68 * * cdef inline PetscViewer def_Viewer(Viewer viewer): * return viewer.vwr if viewer is not None else NULL # <<<<<<<<<<<<<< */ __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_viewer->vwr; } else { __pyx_t_1 = ((PetscViewer)NULL); } __pyx_r = __pyx_t_1; goto __pyx_L0; /* "SLEPc/slepcsys.pxi":67 * return PetscObjectDestroy(&tmp) * * cdef inline PetscViewer def_Viewer(Viewer viewer): # <<<<<<<<<<<<<< * return viewer.vwr if viewer is not None else NULL */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/slepcbv.pxi":76 * * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("BV_Sizes", 0); /* "SLEPc/slepcbv.pxi":82 * ) 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":84 * 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":85 * 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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(2, 85, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 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, 85, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 85, __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, 85, __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_L9_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_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 85, __pyx_L3_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_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, 85, __pyx_L3_error) __pyx_L10_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":84 * 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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "SLEPc/slepcbv.pxi":86 * 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, 86, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); /* "SLEPc/slepcbv.pxi":87 * 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_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "SLEPc/slepcbv.pxi":84 * cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE * cdef object on, oN * try: # <<<<<<<<<<<<<< * on, oN = size * except (TypeError, ValueError): */ __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_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_L8_try_end:; } /* "SLEPc/slepcbv.pxi":88 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L1_error) __pyx_v_n = __pyx_t_11; } /* "SLEPc/slepcbv.pxi":89 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(2, 89, __pyx_L1_error) __pyx_v_N = __pyx_t_11; } /* "SLEPc/slepcbv.pxi":90 * 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_L16_bool_binop_done; } __pyx_t_10 = ((__pyx_v_N == PETSC_DECIDE) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L16_bool_binop_done:; if (unlikely(__pyx_t_9)) { __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 90, __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, 90, __pyx_L1_error) } /* "SLEPc/slepcbv.pxi":93 * "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":94 * # 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":95 * if _n != NULL: _n[0] = n * if _N != NULL: _N[0] = N * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepcbv.pxi":76 * * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((Py_ssize_t)-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(__pyx_t_3 == ((PetscScalar)((PetscScalar)(-1.0))) && 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/slepceps.pxi":269 * # ----------------------------------------------------------------------------- * * cdef inline EPS ref_EPS(SlepcEPS eps): # <<<<<<<<<<<<<< * cdef EPS ob = EPS() * ob.eps = eps */ static CYTHON_INLINE struct PySlepcEPSObject *__pyx_f_8slepc4py_5SLEPc_ref_EPS(EPS __pyx_v_eps) { struct PySlepcEPSObject *__pyx_v_ob = 0; struct PySlepcEPSObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ref_EPS", 0); /* "SLEPc/slepceps.pxi":270 * * cdef inline EPS ref_EPS(SlepcEPS eps): * cdef EPS ob = EPS() # <<<<<<<<<<<<<< * ob.eps = eps * PetscINCREF(ob.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 270, __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 PySlepcEPSObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/slepceps.pxi":271 * cdef inline EPS ref_EPS(SlepcEPS eps): * cdef EPS ob = EPS() * ob.eps = eps # <<<<<<<<<<<<<< * PetscINCREF(ob.obj) * return ob */ __pyx_v_ob->eps = __pyx_v_eps; /* "SLEPc/slepceps.pxi":272 * cdef EPS ob = EPS() * ob.eps = eps * PetscINCREF(ob.obj) # <<<<<<<<<<<<<< * return ob * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj)); /* "SLEPc/slepceps.pxi":273 * ob.eps = eps * 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/slepceps.pxi":269 * # ----------------------------------------------------------------------------- * * cdef inline EPS ref_EPS(SlepcEPS eps): # <<<<<<<<<<<<<< * cdef EPS ob = EPS() * ob.eps = eps */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.ref_EPS", __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/slepceps.pxi":277 * # ----------------------------------------------------------------------------- * * cdef int EPS_Stopping( # <<<<<<<<<<<<<< * SlepcEPS eps, * PetscInt its, */ static int __pyx_f_8slepc4py_5SLEPc_EPS_Stopping(EPS __pyx_v_eps, PetscInt __pyx_v_its, PetscInt __pyx_v_max_it, PetscInt __pyx_v_nconv, PetscInt __pyx_v_nev, EPSConvergedReason *__pyx_v_r, CYTHON_UNUSED void *__pyx_v_ctx) { struct PySlepcEPSObject *__pyx_v_Eps = 0; PyObject *__pyx_v_stopping = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kargs = NULL; PyObject *__pyx_v_reason = NULL; 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 *); int __pyx_t_7; int __pyx_t_8; EPSConvergedReason __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("EPS_Stopping", 0); /* "SLEPc/slepceps.pxi":286 * void *ctx, * ) except PETSC_ERR_PYTHON with gil: * cdef EPS Eps = ref_EPS(eps) # <<<<<<<<<<<<<< * (stopping, args, kargs) = Eps.get_attr('__stopping__') * reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_EPS(__pyx_v_eps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":287 * ) except PETSC_ERR_PYTHON with gil: * cdef EPS Eps = ref_EPS(eps) * (stopping, args, kargs) = Eps.get_attr('__stopping__') # <<<<<<<<<<<<<< * reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) * if reason is None: r[0] = EPS_CONVERGED_ITERATING */ __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_Eps->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Eps), ((char *)"__stopping__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 287, __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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(3, 287, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 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(3, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 287, __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(3, 287, __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(3, 287, __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(3, 287, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_stopping = __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/slepceps.pxi":288 * cdef EPS Eps = ref_EPS(eps) * (stopping, args, kargs) = Eps.get_attr('__stopping__') * reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) # <<<<<<<<<<<<<< * if reason is None: r[0] = EPS_CONVERGED_ITERATING * elif reason is False: r[0] = EPS_CONVERGED_ITERATING */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_max_it); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_nconv); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_nev); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_Eps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Eps)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_Eps)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(3, 288, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kargs))) { __pyx_t_2 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_stopping, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reason = __pyx_t_5; __pyx_t_5 = 0; /* "SLEPc/slepceps.pxi":289 * (stopping, args, kargs) = Eps.get_attr('__stopping__') * reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) * if reason is None: r[0] = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * elif reason is False: r[0] = EPS_CONVERGED_ITERATING * elif reason is True: r[0] = EPS_CONVERGED_USER */ __pyx_t_7 = (__pyx_v_reason == Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { (__pyx_v_r[0]) = EPS_CONVERGED_ITERATING; goto __pyx_L5; } /* "SLEPc/slepceps.pxi":290 * reason = stopping(Eps, toInt(its), toInt(max_it), toInt(nconv), toInt(nev), *args, **kargs) * if reason is None: r[0] = EPS_CONVERGED_ITERATING * elif reason is False: r[0] = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * elif reason is True: r[0] = EPS_CONVERGED_USER * else: r[0] = reason */ __pyx_t_8 = (__pyx_v_reason == Py_False); __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { (__pyx_v_r[0]) = EPS_CONVERGED_ITERATING; goto __pyx_L5; } /* "SLEPc/slepceps.pxi":291 * if reason is None: r[0] = EPS_CONVERGED_ITERATING * elif reason is False: r[0] = EPS_CONVERGED_ITERATING * elif reason is True: r[0] = EPS_CONVERGED_USER # <<<<<<<<<<<<<< * else: r[0] = reason * */ __pyx_t_7 = (__pyx_v_reason == Py_True); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { (__pyx_v_r[0]) = EPS_CONVERGED_USER; goto __pyx_L5; } /* "SLEPc/slepceps.pxi":292 * elif reason is False: r[0] = EPS_CONVERGED_ITERATING * elif reason is True: r[0] = EPS_CONVERGED_USER * else: r[0] = reason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ /*else*/ { __pyx_t_9 = ((EPSConvergedReason)__Pyx_PyInt_As_EPSConvergedReason(__pyx_v_reason)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 292, __pyx_L1_error) (__pyx_v_r[0]) = __pyx_t_9; } __pyx_L5:; /* "SLEPc/slepceps.pxi":277 * # ----------------------------------------------------------------------------- * * cdef int EPS_Stopping( # <<<<<<<<<<<<<< * SlepcEPS eps, * PetscInt its, */ /* 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_XDECREF(__pyx_t_5); __Pyx_AddTraceback("slepc4py.SLEPc.EPS_Stopping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = (-1); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Eps); __Pyx_XDECREF(__pyx_v_stopping); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XDECREF(__pyx_v_reason); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/slepceps.pxi":296 * # ----------------------------------------------------------------------------- * * cdef int EPS_Monitor( # <<<<<<<<<<<<<< * SlepcEPS eps, * PetscInt its, */ static int __pyx_f_8slepc4py_5SLEPc_EPS_Monitor(EPS __pyx_v_eps, PetscInt __pyx_v_its, PetscInt __pyx_v_nconv, PetscScalar *__pyx_v_eigr, PetscScalar *__pyx_v_eigi, PetscReal *__pyx_v_errest, PetscInt __pyx_v_nest, CYTHON_UNUSED void *__pyx_v_ctx) { struct PySlepcEPSObject *__pyx_v_Eps = 0; PyObject *__pyx_v_monitorlist = 0; PyObject *__pyx_v_eig = 0; PyObject *__pyx_v_err = 0; PyObject *__pyx_v_monitor = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kargs = NULL; PetscInt __pyx_7genexpr__pyx_v_i; PetscInt __pyx_8genexpr1__pyx_v_i; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PetscInt __pyx_t_4; PetscInt __pyx_t_5; PetscInt __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("EPS_Monitor", 0); /* "SLEPc/slepceps.pxi":306 * void *ctx, * ) except PETSC_ERR_PYTHON with gil: * cdef EPS Eps = ref_EPS(eps) # <<<<<<<<<<<<<< * cdef object monitorlist = Eps.get_attr('__monitor__') * if monitorlist is None: return 0 */ __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_EPS(__pyx_v_eps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":307 * ) except PETSC_ERR_PYTHON with gil: * cdef EPS Eps = ref_EPS(eps) * cdef object monitorlist = Eps.get_attr('__monitor__') # <<<<<<<<<<<<<< * if monitorlist is None: return 0 * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] */ __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_Eps->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Eps), ((char *)"__monitor__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_monitorlist = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":308 * cdef EPS Eps = ref_EPS(eps) * cdef object monitorlist = Eps.get_attr('__monitor__') * if monitorlist is None: return 0 # <<<<<<<<<<<<<< * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] * cdef object err = [toReal(errest[i]) for i in range(nest)] */ __pyx_t_2 = (__pyx_v_monitorlist == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "SLEPc/slepceps.pxi":309 * cdef object monitorlist = Eps.get_attr('__monitor__') * if monitorlist is None: return 0 * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] # <<<<<<<<<<<<<< * cdef object err = [toReal(errest[i]) for i in range(nest)] * for (monitor, args, kargs) in monitorlist: */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_nest; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_7genexpr__pyx_v_i = __pyx_t_6; __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_toComplex((__pyx_v_eigr[__pyx_7genexpr__pyx_v_i]), (__pyx_v_eigi[__pyx_7genexpr__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ __pyx_v_eig = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":310 * if monitorlist is None: return 0 * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] * cdef object err = [toReal(errest[i]) for i in range(nest)] # <<<<<<<<<<<<<< * for (monitor, args, kargs) in monitorlist: * monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_nest; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_8genexpr1__pyx_v_i = __pyx_t_6; __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_toReal((__pyx_v_errest[__pyx_8genexpr1__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ __pyx_v_err = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":311 * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] * cdef object err = [toReal(errest[i]) for i in range(nest)] * for (monitor, args, kargs) in monitorlist: # <<<<<<<<<<<<<< * monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) * return 0 */ if (likely(PyList_CheckExact(__pyx_v_monitorlist)) || PyTuple_CheckExact(__pyx_v_monitorlist)) { __pyx_t_1 = __pyx_v_monitorlist; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_monitorlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 311, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 311, __pyx_L1_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 311, __pyx_L1_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } } else { __pyx_t_7 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(3, 311, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_7); } if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { PyObject* sequence = __pyx_t_7; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(3, 311, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); __pyx_t_12 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); index = 2; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(3, 311, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L11_unpacking_done; __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(3, 311, __pyx_L1_error) __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_monitor, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_args, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_kargs, __pyx_t_12); __pyx_t_12 = 0; /* "SLEPc/slepceps.pxi":312 * cdef object err = [toReal(errest[i]) for i in range(nest)] * for (monitor, args, kargs) in monitorlist: * monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_nconv); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_Eps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_Eps)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_Eps)); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_12); __Pyx_INCREF(__pyx_v_eig); __Pyx_GIVEREF(__pyx_v_eig); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_v_eig); __Pyx_INCREF(__pyx_v_err); __Pyx_GIVEREF(__pyx_v_err); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_v_err); __pyx_t_7 = 0; __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(__pyx_v_kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(3, 312, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kargs))) { __pyx_t_12 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); } else { __pyx_t_12 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); } __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_monitor, __pyx_t_7, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "SLEPc/slepceps.pxi":311 * cdef object eig = [toComplex(eigr[i], eigi[i]) for i in range(nest)] * cdef object err = [toReal(errest[i]) for i in range(nest)] * for (monitor, args, kargs) in monitorlist: # <<<<<<<<<<<<<< * monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) * return 0 */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepceps.pxi":313 * for (monitor, args, kargs) in monitorlist: * monitor(Eps, toInt(its), toInt(nconv), eig, err, *args, **kargs) * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepceps.pxi":296 * # ----------------------------------------------------------------------------- * * cdef int EPS_Monitor( # <<<<<<<<<<<<<< * SlepcEPS eps, * PetscInt its, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("slepc4py.SLEPc.EPS_Monitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = (-1); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Eps); __Pyx_XDECREF(__pyx_v_monitorlist); __Pyx_XDECREF(__pyx_v_eig); __Pyx_XDECREF(__pyx_v_err); __Pyx_XDECREF(__pyx_v_monitor); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/slepcnep.pxi":120 * # ----------------------------------------------------------------------------- * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ref_Mat", 0); /* "SLEPc/slepcnep.pxi":121 * * cdef inline Mat ref_Mat(PetscMat mat): * cdef Mat ob = Mat() # <<<<<<<<<<<<<< * ob.mat = mat * PetscINCREF(ob.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 121, __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":122 * 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":123 * cdef Mat ob = Mat() * ob.mat = mat * PetscINCREF(ob.obj) # <<<<<<<<<<<<<< * return ob * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj)); /* "SLEPc/slepcnep.pxi":124 * 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":120 * # ----------------------------------------------------------------------------- * * 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":128 * # ----------------------------------------------------------------------------- * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ref_NEP", 0); /* "SLEPc/slepcnep.pxi":129 * * cdef inline NEP ref_NEP(SlepcNEP nep): * cdef NEP ob = NEP() # <<<<<<<<<<<<<< * ob.nep = nep * PetscINCREF(ob.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 129, __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":130 * 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":131 * cdef NEP ob = NEP() * ob.nep = nep * PetscINCREF(ob.obj) # <<<<<<<<<<<<<< * return ob * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj)); /* "SLEPc/slepcnep.pxi":132 * 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":128 * # ----------------------------------------------------------------------------- * * 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":136 * # ----------------------------------------------------------------------------- * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("NEP_Function", 0); /* "SLEPc/slepcnep.pxi":143 * 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, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":144 * ) 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, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Amat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":145 * 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, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Bmat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":146 * 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, 146, __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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(8, 146, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 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, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 146, __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, 146, __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, 146, __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, 146, __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":147 * 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, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 147, __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 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 147, __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, 147, __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, 147, __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, 147, __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, 147, __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, 147, __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":148 * (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":149 * 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":150 * 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":151 * 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":136 * # ----------------------------------------------------------------------------- * * 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 __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/slepcnep.pxi":155 * # ----------------------------------------------------------------------------- * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("NEP_Jacobian", 0); /* "SLEPc/slepcnep.pxi":161 * 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, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":162 * ) 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, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_Jmat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/slepcnep.pxi":163 * 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, 163, __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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(8, 163, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 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, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 163, __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, 163, __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, 163, __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, 163, __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":164 * 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, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 164, __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 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 164, __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, 164, __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, 164, __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, 164, __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, 164, __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, 164, __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":165 * (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":166 * 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":167 * cdef PetscMat Jtmp = NULL * Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp * return 0 # <<<<<<<<<<<<<< * */ __pyx_r = 0; goto __pyx_L0; /* "SLEPc/slepcnep.pxi":155 * # ----------------------------------------------------------------------------- * * 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 __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, devel=False, date=False, author=False): # <<<<<<<<<<<<<< * cdef char cversion[256] * cdef PetscInt major=0, minor=0, micro=0, release=0 */ /* 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, 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_devel = 0; PyObject *__pyx_v_date = 0; PyObject *__pyx_v_author = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getVersion (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_devel,&__pyx_n_s_date,&__pyx_n_s_author,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_False); values[1] = ((PyObject *)Py_False); values[2] = ((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 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_devel); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_date); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_author); if (value) { values[2] = 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 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_devel = values[0]; __pyx_v_date = values[1]; __pyx_v_author = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getVersion", 0, 0, 3, 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_devel, __pyx_v_date, __pyx_v_author); /* 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_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author) { char __pyx_v_cversion[0x100]; PetscInt __pyx_v_major; PetscInt __pyx_v_minor; PetscInt __pyx_v_micro; PetscInt __pyx_v_release; PyObject *__pyx_v_out = NULL; PyObject *__pyx_v_version = NULL; PyObject *__pyx_v_vstr = NULL; PyObject *__pyx_8genexpr2__pyx_v_s = NULL; 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; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVersion", 0); __Pyx_INCREF(__pyx_v_date); __Pyx_INCREF(__pyx_v_author); /* "SLEPc/Sys.pyx":8 * def getVersion(cls, devel=False, date=False, author=False): * cdef char cversion[256] * cdef PetscInt major=0, minor=0, micro=0, release=0 # <<<<<<<<<<<<<< * CHKERR( SlepcGetVersion(cversion, sizeof(cversion)) ) * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) */ __pyx_v_major = 0; __pyx_v_minor = 0; __pyx_v_micro = 0; __pyx_v_release = 0; /* "SLEPc/Sys.pyx":9 * cdef char cversion[256] * cdef PetscInt major=0, minor=0, micro=0, release=0 * CHKERR( SlepcGetVersion(cversion, sizeof(cversion)) ) # <<<<<<<<<<<<<< * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) * out = version = (toInt(major), toInt(minor), toInt(micro)) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcGetVersion(__pyx_v_cversion, (sizeof(__pyx_v_cversion)))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 9, __pyx_L1_error) /* "SLEPc/Sys.pyx":10 * cdef PetscInt major=0, minor=0, micro=0, release=0 * CHKERR( SlepcGetVersion(cversion, sizeof(cversion)) ) * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) # <<<<<<<<<<<<<< * out = version = (toInt(major), toInt(minor), toInt(micro)) * if devel or date or author: */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcGetVersionNumber((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_micro), (&__pyx_v_release))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 10, __pyx_L1_error) /* "SLEPc/Sys.pyx":11 * CHKERR( SlepcGetVersion(cversion, sizeof(cversion)) ) * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) * out = version = (toInt(major), toInt(minor), toInt(micro)) # <<<<<<<<<<<<<< * if devel or date or author: * out = [version] */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_major); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_minor); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_micro); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 11, __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_INCREF(__pyx_t_5); __pyx_v_out = __pyx_t_5; __Pyx_INCREF(__pyx_t_5); __pyx_v_version = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":12 * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) * out = version = (toInt(major), toInt(minor), toInt(micro)) * if devel or date or author: # <<<<<<<<<<<<<< * out = [version] * if devel: */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 12, __pyx_L1_error) if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 12, __pyx_L1_error) if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 12, __pyx_L1_error) __pyx_t_6 = __pyx_t_7; __pyx_L4_bool_binop_done:; if (__pyx_t_6) { /* "SLEPc/Sys.pyx":13 * out = version = (toInt(major), toInt(minor), toInt(micro)) * if devel or date or author: * out = [version] # <<<<<<<<<<<<<< * if devel: * out.append(not release) */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_version); __Pyx_GIVEREF(__pyx_v_version); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_version); __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":14 * if devel or date or author: * out = [version] * if devel: # <<<<<<<<<<<<<< * out.append(not release) * if date: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 14, __pyx_L1_error) if (__pyx_t_6) { /* "SLEPc/Sys.pyx":15 * out = [version] * if devel: * out.append(not release) # <<<<<<<<<<<<<< * if date: * vstr = bytes2str(cversion) */ __pyx_t_5 = __Pyx_PyBool_FromLong((!((__pyx_v_release != 0) != 0))); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":14 * if devel or date or author: * out = [version] * if devel: # <<<<<<<<<<<<<< * out.append(not release) * if date: */ } /* "SLEPc/Sys.pyx":16 * if devel: * out.append(not release) * if date: # <<<<<<<<<<<<<< * vstr = bytes2str(cversion) * if release != 0: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 16, __pyx_L1_error) if (__pyx_t_6) { /* "SLEPc/Sys.pyx":17 * out.append(not release) * if date: * vstr = bytes2str(cversion) # <<<<<<<<<<<<<< * if release != 0: * date = vstr.split(",", 1)[-1].strip() */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cversion); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_vstr = __pyx_t_5; __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":18 * if date: * vstr = bytes2str(cversion) * if release != 0: # <<<<<<<<<<<<<< * date = vstr.split(",", 1)[-1].strip() * else: */ __pyx_t_6 = ((__pyx_v_release != 0) != 0); if (__pyx_t_6) { /* "SLEPc/Sys.pyx":19 * vstr = bytes2str(cversion) * if release != 0: * date = vstr.split(",", 1)[-1].strip() # <<<<<<<<<<<<<< * else: * date = vstr.split("GIT Date:")[-1].strip() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vstr, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":18 * if date: * vstr = bytes2str(cversion) * if release != 0: # <<<<<<<<<<<<<< * date = vstr.split(",", 1)[-1].strip() * else: */ goto __pyx_L9; } /* "SLEPc/Sys.pyx":21 * date = vstr.split(",", 1)[-1].strip() * else: * date = vstr.split("GIT Date:")[-1].strip() # <<<<<<<<<<<<<< * out.append(date) * if author: */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vstr, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_s_GIT_Date) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_GIT_Date); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_5); __pyx_t_5 = 0; } __pyx_L9:; /* "SLEPc/Sys.pyx":22 * else: * date = vstr.split("GIT Date:")[-1].strip() * out.append(date) # <<<<<<<<<<<<<< * if author: * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_v_date); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 22, __pyx_L1_error) /* "SLEPc/Sys.pyx":16 * if devel: * out.append(not release) * if date: # <<<<<<<<<<<<<< * vstr = bytes2str(cversion) * if release != 0: */ } /* "SLEPc/Sys.pyx":23 * date = vstr.split("GIT Date:")[-1].strip() * out.append(date) * if author: # <<<<<<<<<<<<<< * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') * author = tuple([s.strip() for s in author if s]) */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 23, __pyx_L1_error) if (__pyx_t_6) { /* "SLEPc/Sys.pyx":24 * out.append(date) * if author: * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') # <<<<<<<<<<<<<< * author = tuple([s.strip() for s in author if s]) * out.append(author) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_bytes2str(SLEPC_AUTHOR_INFO); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_s__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":25 * if author: * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') * author = tuple([s.strip() for s in author if s]) # <<<<<<<<<<<<<< * out.append(author) * return tuple(out) */ { /* enter inner scope */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_v_author)) || PyTuple_CheckExact(__pyx_v_author)) { __pyx_t_4 = __pyx_v_author; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_author); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 25, __pyx_L13_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 25, __pyx_L13_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 25, __pyx_L13_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(9, 25, __pyx_L13_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_s, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_8genexpr2__pyx_v_s); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 25, __pyx_L13_error) if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(9, 25, __pyx_L13_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_s); __pyx_8genexpr2__pyx_v_s = 0; goto __pyx_L17_exit_scope; __pyx_L13_error:; __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_s); __pyx_8genexpr2__pyx_v_s = 0; goto __pyx_L1_error; __pyx_L17_exit_scope:; } /* exit inner scope */ __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/Sys.pyx":26 * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') * author = tuple([s.strip() for s in author if s]) * out.append(author) # <<<<<<<<<<<<<< * return tuple(out) * */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_v_author); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 26, __pyx_L1_error) /* "SLEPc/Sys.pyx":23 * date = vstr.split("GIT Date:")[-1].strip() * out.append(date) * if author: # <<<<<<<<<<<<<< * author = bytes2str(SLEPC_AUTHOR_INFO).split('\n') * author = tuple([s.strip() for s in author if s]) */ } /* "SLEPc/Sys.pyx":12 * CHKERR( SlepcGetVersionNumber(&major, &minor, µ, &release) ) * out = version = (toInt(major), toInt(minor), toInt(micro)) * if devel or date or author: # <<<<<<<<<<<<<< * out = [version] * if devel: */ } /* "SLEPc/Sys.pyx":27 * author = tuple([s.strip() for s in author if s]) * out.append(author) * return tuple(out) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 27, __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, devel=False, date=False, author=False): # <<<<<<<<<<<<<< * cdef char cversion[256] * cdef PetscInt major=0, minor=0, micro=0, release=0 */ /* 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_11); __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_out); __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_vstr); __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_s); __Pyx_XDECREF(__pyx_v_date); __Pyx_XDECREF(__pyx_v_author); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/Sys.pyx":30 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * version, dev, date, author = cls.getVersion(True, True, True) * return dict(major = version[0], */ /* 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(PyTypeObject *__pyx_v_cls) { PyObject *__pyx_v_version = NULL; PyObject *__pyx_v_dev = NULL; PyObject *__pyx_v_date = NULL; PyObject *__pyx_v_author = 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 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVersionInfo", 0); /* "SLEPc/Sys.pyx":31 * @classmethod * def getVersionInfo(cls): * version, dev, date, author = cls.getVersion(True, True, True) # <<<<<<<<<<<<<< * return dict(major = version[0], * minor = version[1], */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_getVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 31, __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(9, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(9, 31, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_5 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(9, 31, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_7(__pyx_t_6); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(9, 31, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(9, 31, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_version = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_dev = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_date = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_author = __pyx_t_5; __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":32 * def getVersionInfo(cls): * version, dev, date, author = cls.getVersion(True, True, True) * return dict(major = version[0], # <<<<<<<<<<<<<< * minor = version[1], * subminor = version[2], */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_version, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_major, __pyx_t_5) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":33 * version, dev, date, author = cls.getVersion(True, True, True) * return dict(major = version[0], * minor = version[1], # <<<<<<<<<<<<<< * subminor = version[2], * release = not dev, */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_version, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_minor, __pyx_t_5) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":34 * return dict(major = version[0], * minor = version[1], * subminor = version[2], # <<<<<<<<<<<<<< * release = not dev, * date = date, */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_version, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_subminor, __pyx_t_5) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":35 * minor = version[1], * subminor = version[2], * release = not dev, # <<<<<<<<<<<<<< * date = date, * authorinfo = author) */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_dev); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 35, __pyx_L1_error) __pyx_t_5 = __Pyx_PyBool_FromLong((!__pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_release, __pyx_t_5) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "SLEPc/Sys.pyx":36 * subminor = version[2], * release = not dev, * date = date, # <<<<<<<<<<<<<< * authorinfo = author) * */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date, __pyx_v_date) < 0) __PYX_ERR(9, 32, __pyx_L1_error) /* "SLEPc/Sys.pyx":37 * release = not dev, * date = date, * authorinfo = author) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_authorinfo, __pyx_v_author) < 0) __PYX_ERR(9, 32, __pyx_L1_error) __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/Sys.pyx":30 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * version, dev, date, author = cls.getVersion(True, True, True) * return dict(major = version[0], */ /* 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_XDECREF(__pyx_t_6); __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_dev); __Pyx_XDECREF(__pyx_v_date); __Pyx_XDECREF(__pyx_v_author); __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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); CYTHON_FALLTHROUGH; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/ST.pyx":57 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( STView(self.st, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/ST.pyx":58 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( STView(self.st, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STView(__pyx_v_self->st, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 58, __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":60 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/ST.pyx":64 * 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 == ((int)-1))) __PYX_ERR(0, 64, __pyx_L1_error) /* "SLEPc/ST.pyx":65 * """ * CHKERR( STDestroy(&self.st) ) * self.st = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->st = NULL; /* "SLEPc/ST.pyx":66 * 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":60 * 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":68 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/ST.pyx":72 * 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 == ((int)-1))) __PYX_ERR(0, 72, __pyx_L1_error) /* "SLEPc/ST.pyx":68 * 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":74 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 74, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 74, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/ST.pyx":84 * 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, 84, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/ST.pyx":85 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STCreate(__pyx_v_ccomm, (&__pyx_v_newst))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 86, __pyx_L1_error) /* "SLEPc/ST.pyx":87 * cdef SlepcST newst = NULL * CHKERR( STCreate(ccomm, &newst) ) * SlepcCLEAR(self.obj); self.st = newst # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->st = __pyx_v_newst; /* "SLEPc/ST.pyx":88 * 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":74 * 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":90 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 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_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, 90, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_st_type); /* "SLEPc/ST.pyx":108 * 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":109 * """ * 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, 109, __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":110 * 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 == ((int)-1))) __PYX_ERR(0, 110, __pyx_L1_error) /* "SLEPc/ST.pyx":90 * 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":112 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/ST.pyx":121 * 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":122 * """ * 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 == ((int)-1))) __PYX_ERR(0, 122, __pyx_L1_error) /* "SLEPc/ST.pyx":123 * 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, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":112 * 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":125 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 125, __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, 125, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/ST.pyx":142 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( STSetOptionsPrefix(self.st, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/ST.pyx":143 * """ * 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, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":144 * 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 == ((int)-1))) __PYX_ERR(0, 144, __pyx_L1_error) /* "SLEPc/ST.pyx":125 * 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":146 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/ST.pyx":156 * 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":157 * """ * 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 == ((int)-1))) __PYX_ERR(0, 157, __pyx_L1_error) /* "SLEPc/ST.pyx":158 * 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, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":146 * 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":160 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/ST.pyx":170 * 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 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error) /* "SLEPc/ST.pyx":160 * 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":174 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 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_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, 174, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setShift", 0); /* "SLEPc/ST.pyx":189 * factorization. * """ * cdef PetscScalar sval = asScalar(shift) # <<<<<<<<<<<<<< * CHKERR( STSetShift(self.st, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_shift); if (unlikely(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":190 * """ * 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 == ((int)-1))) __PYX_ERR(0, 190, __pyx_L1_error) /* "SLEPc/ST.pyx":174 * # * * 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":192 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getShift", 0); /* "SLEPc/ST.pyx":201 * 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":202 * """ * 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 == ((int)-1))) __PYX_ERR(0, 202, __pyx_L1_error) /* "SLEPc/ST.pyx":203 * 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, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":192 * 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":205 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 205, __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, 205, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTransform", 0); /* "SLEPc/ST.pyx":219 * otherwise it is applied to the original problem. * """ * cdef PetscBool sval = asBool(flag) # <<<<<<<<<<<<<< * CHKERR( STSetTransform(self.st, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_flag); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":220 * """ * cdef PetscBool sval = asBool(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 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error) /* "SLEPc/ST.pyx":205 * 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":222 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTransform", 0); /* "SLEPc/ST.pyx":236 * otherwise it is applied to the original problem. * """ * cdef PetscBool sval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( STGetTransform(self.st, &sval) ) * return toBool(sval) */ __pyx_v_sval = PETSC_FALSE; /* "SLEPc/ST.pyx":237 * """ * cdef PetscBool sval = PETSC_FALSE * CHKERR( STGetTransform(self.st, &sval) ) # <<<<<<<<<<<<<< * return toBool(sval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetTransform(__pyx_v_self->st, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 237, __pyx_L1_error) /* "SLEPc/ST.pyx":238 * cdef PetscBool sval = PETSC_FALSE * CHKERR( STGetTransform(self.st, &sval) ) * return toBool(sval) # <<<<<<<<<<<<<< * * def setMatMode(self, mode): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":222 * 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":240 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 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_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, 240, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMatMode", 0); /* "SLEPc/ST.pyx":275 * `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, 275, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/ST.pyx":276 * """ * 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 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) /* "SLEPc/ST.pyx":240 * return toBool(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":278 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMatMode", 0); /* "SLEPc/ST.pyx":288 * 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":289 * """ * 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 == ((int)-1))) __PYX_ERR(0, 289, __pyx_L1_error) /* "SLEPc/ST.pyx":290 * cdef SlepcSTMatMode val = ST_MATMODE_INPLACE * CHKERR( STGetMatMode(self.st, &val) ) * return val # <<<<<<<<<<<<<< * * def setMatrices(self, operators): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_STMatMode(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":278 * 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":292 * return val * * def setMatrices(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_33setMatrices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_32setMatrices[] = "ST.setMatrices(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_33setMatrices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_operators = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMatrices (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setMatrices") < 0)) __PYX_ERR(0, 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_operators = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMatrices", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 292, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatrices", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_32setMatrices(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_operators); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_32setMatrices(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMatrices", 0); __Pyx_INCREF(__pyx_v_operators); /* "SLEPc/ST.pyx":301 * 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 = __Pyx_PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":302 * """ * 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":303 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(0, 303, __pyx_L1_error) __pyx_v_n = __pyx_t_2; /* "SLEPc/ST.pyx":304 * 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( STSetMatrices(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, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/ST.pyx":305 * 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( STSetMatrices(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, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(0, 305, __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":306 * cdef tmp = allocate(n*sizeof(PetscMat),&mats) * for k from 0 <= k < n: mats[k] = (operators[k]).mat * CHKERR( STSetMatrices(self.st, n, mats) ) # <<<<<<<<<<<<<< * * def getMatrices(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatrices(__pyx_v_self->st, ((PetscInt)__pyx_v_n), __pyx_v_mats)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 306, __pyx_L1_error) /* "SLEPc/ST.pyx":292 * return val * * def setMatrices(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.setMatrices", __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":308 * CHKERR( STSetMatrices(self.st, n, mats) ) * * def getMatrices(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_35getMatrices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_34getMatrices[] = "ST.getMatrices(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_35getMatrices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMatrices (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getMatrices", 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, "getMatrices", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_34getMatrices(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getMatrices(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMatrices", 0); /* "SLEPc/ST.pyx":318 * """ * 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":319 * 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":320 * 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 == ((int)-1))) __PYX_ERR(0, 320, __pyx_L1_error) /* "SLEPc/ST.pyx":321 * cdef PetscInt k=0, n=0 * CHKERR( STGetNumMatrices(self.st, &n) ) * cdef object operators = [] # <<<<<<<<<<<<<< * for k from 0 <= k < n: * CHKERR( STGetMatrix(self.st, k, &mat) ) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_operators = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/ST.pyx":322 * CHKERR( STGetNumMatrices(self.st, &n) ) * cdef object operators = [] * for k from 0 <= k < n: # <<<<<<<<<<<<<< * CHKERR( STGetMatrix(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":323 * cdef object operators = [] * for k from 0 <= k < n: * CHKERR( STGetMatrix(self.st, k, &mat) ) # <<<<<<<<<<<<<< * A = Mat(); A.mat = mat; PetscINCREF(A.obj) * operators.append(A) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetMatrix(__pyx_v_self->st, __pyx_v_k, (&__pyx_v_mat))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error) /* "SLEPc/ST.pyx":324 * for k from 0 <= k < n: * CHKERR( STGetMatrix(self.st, k, &mat) ) * A = Mat(); A.mat = mat; PetscINCREF(A.obj) # <<<<<<<<<<<<<< * operators.append(A) * return tuple(operators) */ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __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; (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/ST.pyx":325 * CHKERR( STGetMatrix(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 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error) } /* "SLEPc/ST.pyx":326 * 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 = __Pyx_PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/ST.pyx":308 * CHKERR( STSetMatrices(self.st, n, mats) ) * * def getMatrices(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.getMatrices", __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":328 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 328, __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, 328, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMatStructure", 0); /* "SLEPc/ST.pyx":349 * 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)((MatStructure)-1L)))) __PYX_ERR(0, 349, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/ST.pyx":350 * """ * cdef PetscMatStructure val = matstructure(structure) * CHKERR( STSetMatStructure(self.st, val) ) # <<<<<<<<<<<<<< * * def setKSP(self, KSP ksp): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatStructure(__pyx_v_self->st, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 350, __pyx_L1_error) /* "SLEPc/ST.pyx":328 * 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":352 * CHKERR( STSetMatStructure(self.st, val) ) * * def setKSP(self, KSP ksp): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 352, __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, 352, __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, 352, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKSP", 0); /* "SLEPc/ST.pyx":362 * 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 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error) /* "SLEPc/ST.pyx":352 * CHKERR( STSetMatStructure(self.st, val) ) * * def setKSP(self, KSP ksp): # <<<<<<<<<<<<<< * """ * 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":364 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKSP", 0); /* "SLEPc/ST.pyx":380 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_KSP)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ksp = ((struct PyPetscKSPObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":381 * """ * 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 == ((int)-1))) __PYX_ERR(0, 381, __pyx_L1_error) /* "SLEPc/ST.pyx":382 * cdef KSP ksp = KSP() * CHKERR( STGetKSP(self.st, &ksp.ksp) ) * PetscINCREF(ksp.obj) # <<<<<<<<<<<<<< * return ksp * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ksp->__pyx_base.obj)); /* "SLEPc/ST.pyx":383 * CHKERR( STGetKSP(self.st, &ksp.ksp) ) * PetscINCREF(ksp.obj) * return ksp # <<<<<<<<<<<<<< * * def setPreconditionerMat(self, Mat P=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ksp)); __pyx_r = ((PyObject *)__pyx_v_ksp); goto __pyx_L0; /* "SLEPc/ST.pyx":364 * 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":385 * return ksp * * def setPreconditionerMat(self, Mat P=None): # <<<<<<<<<<<<<< * """ * Sets the matrix to be used to build the preconditioner. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setPreconditionerMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_42setPreconditionerMat[] = "ST.setPreconditionerMat(self, Mat P=None)\n\n Sets the matrix to be used to build the preconditioner.\n\n Parameters\n ----------\n P: Mat, optional\n The matrix that will be used in constructing the preconditioner.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setPreconditionerMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_P = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setPreconditionerMat (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_P,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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_P); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPreconditionerMat") < 0)) __PYX_ERR(0, 385, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_P = ((struct PyPetscMatObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setPreconditionerMat", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 385, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setPreconditionerMat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_P), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "P", 0))) __PYX_ERR(0, 385, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_42setPreconditionerMat(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_P); /* 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_42setPreconditionerMat(struct PySlepcSTObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_P) { Mat __pyx_v_Pmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Mat __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setPreconditionerMat", 0); /* "SLEPc/ST.pyx":394 * The matrix that will be used in constructing the preconditioner. * """ * cdef PetscMat Pmat = P.mat if P is not None else NULL # <<<<<<<<<<<<<< * CHKERR( STSetPreconditionerMat(self.st, Pmat) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_P) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_P->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Pmat = __pyx_t_1; /* "SLEPc/ST.pyx":395 * """ * cdef PetscMat Pmat = P.mat if P is not None else NULL * CHKERR( STSetPreconditionerMat(self.st, Pmat) ) # <<<<<<<<<<<<<< * * def getPreconditionerMat(self): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetPreconditionerMat(__pyx_v_self->st, __pyx_v_Pmat)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 395, __pyx_L1_error) /* "SLEPc/ST.pyx":385 * return ksp * * def setPreconditionerMat(self, Mat P=None): # <<<<<<<<<<<<<< * """ * Sets the matrix to be used to build the preconditioner. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.ST.setPreconditionerMat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":397 * CHKERR( STSetPreconditionerMat(self.st, Pmat) ) * * def getPreconditionerMat(self): # <<<<<<<<<<<<<< * """ * Gets the matrix previously set by setPreconditionerMat(). */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45getPreconditionerMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_44getPreconditionerMat[] = "ST.getPreconditionerMat(self)\n\n Gets the matrix previously set by setPreconditionerMat().\n\n Returns\n -------\n P: Mat\n The matrix that will be used in constructing the preconditioner.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45getPreconditionerMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getPreconditionerMat (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getPreconditionerMat", 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, "getPreconditionerMat", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_44getPreconditionerMat(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44getPreconditionerMat(struct PySlepcSTObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_P = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPreconditionerMat", 0); /* "SLEPc/ST.pyx":406 * The matrix that will be used in constructing the preconditioner. * """ * cdef Mat P = Mat() # <<<<<<<<<<<<<< * CHKERR( STGetPreconditionerMat(self.st, &P.mat) ) * PetscINCREF(P.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_P = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":407 * """ * cdef Mat P = Mat() * CHKERR( STGetPreconditionerMat(self.st, &P.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(P.obj) * return P */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetPreconditionerMat(__pyx_v_self->st, (&__pyx_v_P->mat))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 407, __pyx_L1_error) /* "SLEPc/ST.pyx":408 * cdef Mat P = Mat() * CHKERR( STGetPreconditionerMat(self.st, &P.mat) ) * PetscINCREF(P.obj) # <<<<<<<<<<<<<< * return P * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_P->__pyx_base.obj)); /* "SLEPc/ST.pyx":409 * CHKERR( STGetPreconditionerMat(self.st, &P.mat) ) * PetscINCREF(P.obj) * return P # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_P)); __pyx_r = ((PyObject *)__pyx_v_P); goto __pyx_L0; /* "SLEPc/ST.pyx":397 * CHKERR( STSetPreconditionerMat(self.st, Pmat) ) * * def getPreconditionerMat(self): # <<<<<<<<<<<<<< * """ * Gets the matrix previously set by setPreconditionerMat(). */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.ST.getPreconditionerMat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_P); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/ST.pyx":413 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Prepares for the use of a spectral transformation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_46setUp[] = "ST.setUp(self)\n\n Prepares for the use of a spectral transformation.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47setUp(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_46setUp(((struct PySlepcSTObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46setUp(struct PySlepcSTObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/ST.pyx":417 * Prepares for the use of a spectral transformation. * """ * CHKERR( STSetUp(self.st) ) # <<<<<<<<<<<<<< * * def apply(self, Vec x, Vec y): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetUp(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 417, __pyx_L1_error) /* "SLEPc/ST.pyx":413 * # * * 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":419 * CHKERR( STSetUp(self.st) ) * * def apply(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * Applies the spectral transformation operator to a vector, for */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_49apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_48apply[] = "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_49apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply", 1, 2, 2, 1); __PYX_ERR(0, 419, __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, 419, __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, 419, __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, 419, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 419, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_48apply(((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_48apply(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply", 0); /* "SLEPc/ST.pyx":432 * The result vector. * """ * CHKERR( STApply(self.st, x.vec, y.vec) ) # <<<<<<<<<<<<<< * * def applyTranspose(self, Vec x, Vec y): */ __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 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L1_error) /* "SLEPc/ST.pyx":419 * CHKERR( STSetUp(self.st) ) * * def apply(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * 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":434 * CHKERR( STApply(self.st, x.vec, y.vec) ) * * def applyTranspose(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * Applies the transpose of the operator to a vector, for */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_51applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_50applyTranspose[] = "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_51applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("applyTranspose", 1, 2, 2, 1); __PYX_ERR(0, 434, __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, 434, __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, 434, __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, 434, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 434, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_50applyTranspose(((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_50applyTranspose(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("applyTranspose", 0); /* "SLEPc/ST.pyx":447 * 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 == ((int)-1))) __PYX_ERR(0, 447, __pyx_L1_error) /* "SLEPc/ST.pyx":434 * CHKERR( STApply(self.st, x.vec, y.vec) ) * * def applyTranspose(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * 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":451 * # * * def setCayleyAntishift(self, tau): # <<<<<<<<<<<<<< * """ * Sets the value of the anti-shift for the Cayley spectral */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_53setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2ST_52setCayleyAntishift[] = "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_53setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tau = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 451, __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, 451, __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_52setCayleyAntishift(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_tau); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_52setCayleyAntishift(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCayleyAntishift", 0); /* "SLEPc/ST.pyx":469 * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/ST.pyx":470 * """ * 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 == ((int)-1))) __PYX_ERR(0, 470, __pyx_L1_error) /* "SLEPc/ST.pyx":451 * # * * 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":475 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":476 * 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, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __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":475 * * 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":477 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":478 * 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, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":477 * 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_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":481 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":482 * 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, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __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":481 * * 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":483 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":484 * 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, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":483 * 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_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":487 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/ST.pyx":488 * 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, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __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":487 * * 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":489 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/ST.pyx":490 * 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, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":489 * 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_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 63, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 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(10, 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/BV.pyx":73 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( BVView(self.bv, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/BV.pyx":74 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( BVView(self.bv, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVView(__pyx_v_self->bv, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 74, __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":76 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/BV.pyx":80 * 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 == ((int)-1))) __PYX_ERR(10, 80, __pyx_L1_error) /* "SLEPc/BV.pyx":81 * """ * CHKERR( BVDestroy(&self.bv) ) * self.bv = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->bv = NULL; /* "SLEPc/BV.pyx":82 * 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":76 * 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":84 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 84, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 84, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/BV.pyx":94 * 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(10, 94, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/BV.pyx":95 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_ccomm, (&__pyx_v_newbv))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(10, 96, __pyx_L1_error) /* "SLEPc/BV.pyx":97 * cdef SlepcBV newbv = NULL * CHKERR( BVCreate(ccomm, &newbv) ) * SlepcCLEAR(self.obj); self.bv = newbv # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->bv = __pyx_v_newbv; /* "SLEPc/BV.pyx":98 * CHKERR( BVCreate(ccomm, &newbv) ) * SlepcCLEAR(self.obj); self.bv = newbv * return self # <<<<<<<<<<<<<< * * def createMat(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "SLEPc/BV.pyx":84 * 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":100 * return self * * def createMat(self): # <<<<<<<<<<<<<< * """ * Creates a new Mat object of dense type and copies the contents of the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9createMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_8createMat[] = "BV.createMat(self)\n\n Creates a new Mat object of dense type and copies the contents of the\n BV object.\n\n Returns\n -------\n mat: the new matrix. \n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9createMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createMat (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("createMat", 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, "createMat", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_8createMat(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_8createMat(struct PySlepcBVObject *__pyx_v_self) { struct PyPetscMatObject *__pyx_v_mat = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("createMat", 0); /* "SLEPc/BV.pyx":109 * mat: the new matrix. * """ * cdef Mat mat = Mat() # <<<<<<<<<<<<<< * CHKERR( BVCreateMat(self.bv, &mat.mat) ) * return mat */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":110 * """ * cdef Mat mat = Mat() * CHKERR( BVCreateMat(self.bv, &mat.mat) ) # <<<<<<<<<<<<<< * return mat * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreateMat(__pyx_v_self->bv, (&__pyx_v_mat->mat))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(10, 110, __pyx_L1_error) /* "SLEPc/BV.pyx":111 * cdef Mat mat = Mat() * CHKERR( BVCreateMat(self.bv, &mat.mat) ) * return mat # <<<<<<<<<<<<<< * * def duplicate(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); __pyx_r = ((PyObject *)__pyx_v_mat); goto __pyx_L0; /* "SLEPc/BV.pyx":100 * return self * * def createMat(self): # <<<<<<<<<<<<<< * """ * Creates a new Mat object of dense type and copies the contents of the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.BV.createMat", __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":113 * return mat * * def duplicate(self): # <<<<<<<<<<<<<< * """ * Duplicate the BV object with the same type and dimensions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11duplicate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_10duplicate[] = "BV.duplicate(self)\n\n Duplicate the BV object with the same type and dimensions.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11duplicate(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_10duplicate(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10duplicate(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("duplicate", 0); /* "SLEPc/BV.pyx":117 * 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_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 117, __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(10, 117, __pyx_L1_error) __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":118 * """ * 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 == ((int)-1))) __PYX_ERR(10, 118, __pyx_L1_error) /* "SLEPc/BV.pyx":119 * 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":113 * return mat * * 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":121 * return bv * * def copy(self, BV result=None): # <<<<<<<<<<<<<< * if result is None: * result = type(self)() */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_12copy[] = "BV.copy(self, BV result=None)"; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_result = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(10, 121, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(10, 121, __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(10, 121, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_12copy(((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_12copy(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); __Pyx_INCREF((PyObject *)__pyx_v_result); /* "SLEPc/BV.pyx":122 * * 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":123 * 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_UNPACK_METHODS && 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); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 123, __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(10, 123, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_result, ((struct PySlepcBVObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":122 * * def copy(self, BV result=None): * if result is None: # <<<<<<<<<<<<<< * result = type(self)() * if result.bv == NULL: */ } /* "SLEPc/BV.pyx":124 * 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":125 * 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 == ((int)-1))) __PYX_ERR(10, 125, __pyx_L1_error) /* "SLEPc/BV.pyx":124 * 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":126 * 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 == ((int)-1))) __PYX_ERR(10, 126, __pyx_L1_error) /* "SLEPc/BV.pyx":127 * 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":121 * 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":129 * return result * * def setType(self, bv_type): # <<<<<<<<<<<<<< * """ * Selects the type for the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_15setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_14setType[] = "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_15setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bv_type = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 129, __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(10, 129, __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_14setType(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_bv_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14setType(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_bv_type); /* "SLEPc/BV.pyx":138 * 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":139 * """ * 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(10, 139, __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":140 * 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 == ((int)-1))) __PYX_ERR(10, 140, __pyx_L1_error) /* "SLEPc/BV.pyx":129 * 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":142 * CHKERR( BVSetType(self.bv, cval) ) * * def getType(self): # <<<<<<<<<<<<<< * """ * Gets the BV type of this object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_17getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_16getType[] = "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_17getType(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_16getType(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16getType(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/BV.pyx":151 * 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":152 * """ * 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 == ((int)-1))) __PYX_ERR(10, 152, __pyx_L1_error) /* "SLEPc/BV.pyx":153 * 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(10, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":142 * 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":155 * 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_19setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizes[] = "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_19setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sizes = 0; PyObject *__pyx_v_m = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sizes)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSizes", 1, 2, 2, 1); __PYX_ERR(10, 155, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizes") < 0)) __PYX_ERR(10, 155, __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(10, 155, __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_18setSizes(((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_18setSizes(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSizes", 0); /* "SLEPc/BV.pyx":172 * 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":173 * """ * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(10, 173, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/BV.pyx":174 * 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 == ((int)-1))) __PYX_ERR(10, 174, __pyx_L1_error) /* "SLEPc/BV.pyx":175 * cdef PetscInt ival = asInt(m) * BV_Sizes(sizes, &n, &N) * CHKERR( BVSetSizes(self.bv, n, N, ival) ) # <<<<<<<<<<<<<< * * def setSizesFromVec(self, Vec w, 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 == ((int)-1))) __PYX_ERR(10, 175, __pyx_L1_error) /* "SLEPc/BV.pyx":155 * 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":177 * CHKERR( BVSetSizes(self.bv, n, N, ival) ) * * def setSizesFromVec(self, Vec w, m): # <<<<<<<<<<<<<< * """ * Sets the local and global sizes, and the number of columns. Local and */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_21setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_20setSizesFromVec[] = "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_21setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_w = 0; PyObject *__pyx_v_m = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSizesFromVec", 1, 2, 2, 1); __PYX_ERR(10, 177, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizesFromVec") < 0)) __PYX_ERR(10, 177, __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(10, 177, __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(10, 177, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_20setSizesFromVec(((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_20setSizesFromVec(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSizesFromVec", 0); /* "SLEPc/BV.pyx":189 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(10, 189, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/BV.pyx":190 * """ * 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 == ((int)-1))) __PYX_ERR(10, 190, __pyx_L1_error) /* "SLEPc/BV.pyx":177 * CHKERR( BVSetSizes(self.bv, n, N, ival) ) * * def setSizesFromVec(self, Vec w, 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":192 * 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_23getSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_22getSizes[] = "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_23getSizes(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_22getSizes(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22getSizes(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSizes", 0); /* "SLEPc/BV.pyx":203 * 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":204 * """ * 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 == ((int)-1))) __PYX_ERR(10, 204, __pyx_L1_error) /* "SLEPc/BV.pyx":205 * 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(10, 205, __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(10, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 205, __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(10, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 205, __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":192 * 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":208 * * * 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_25setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_24setOptionsPrefix[] = "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_25setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 208, __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, 208, __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_24setOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_prefix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24setOptionsPrefix(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/BV.pyx":225 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( BVSetOptionsPrefix(self.bv, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/BV.pyx":226 * """ * 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(10, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":227 * 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 == ((int)-1))) __PYX_ERR(10, 227, __pyx_L1_error) /* "SLEPc/BV.pyx":208 * * * 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":229 * 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_27getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_26getOptionsPrefix[] = "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_27getOptionsPrefix(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_26getOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26getOptionsPrefix(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/BV.pyx":239 * 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":240 * """ * 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 == ((int)-1))) __PYX_ERR(10, 240, __pyx_L1_error) /* "SLEPc/BV.pyx":241 * 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(10, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":229 * 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":243 * return bytes2str(prefix) * * def setFromOptions(self): # <<<<<<<<<<<<<< * """ * Sets BV options from the options database. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_29setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_28setFromOptions[] = "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_29setFromOptions(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_28setFromOptions(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28setFromOptions(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/BV.pyx":252 * option. * """ * CHKERR( BVSetFromOptions(self.bv) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetFromOptions(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 252, __pyx_L1_error) /* "SLEPc/BV.pyx":243 * 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":256 * # * * def getOrthogonalization(self): # <<<<<<<<<<<<<< * """ * Gets the orthogonalization settings from the BV object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_31getOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_30getOrthogonalization[] = "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_31getOrthogonalization(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_30getOrthogonalization(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30getOrthogonalization(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOrthogonalization", 0); /* "SLEPc/BV.pyx":272 * 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":273 * """ * 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":274 * 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":275 * 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":276 * 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 == ((int)-1))) __PYX_ERR(10, 276, __pyx_L1_error) /* "SLEPc/BV.pyx":277 * 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(10, 277, __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(10, 277, __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(10, 277, __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(10, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 277, __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":256 * # * * 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":279 * 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_33setOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_32setOrthogonalization[] = "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_33setOrthogonalization(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_refine); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eta); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(10, 279, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(10, 279, __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_32setOrthogonalization(((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_32setOrthogonalization(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOrthogonalization", 0); /* "SLEPc/BV.pyx":311 * 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":312 * """ * 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":313 * 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":314 * 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":315 * 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 == ((int)-1))) __PYX_ERR(10, 315, __pyx_L1_error) /* "SLEPc/BV.pyx":316 * 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(10, 316, __pyx_L1_error) __pyx_v_val1 = __pyx_t_4; } /* "SLEPc/BV.pyx":317 * 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(10, 317, __pyx_L1_error) __pyx_v_val2 = __pyx_t_5; } /* "SLEPc/BV.pyx":318 * 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(10, 318, __pyx_L1_error) __pyx_v_val3 = __pyx_t_6; } /* "SLEPc/BV.pyx":319 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(10, 319, __pyx_L1_error) __pyx_v_rval = __pyx_t_7; } /* "SLEPc/BV.pyx":320 * 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 == ((int)-1))) __PYX_ERR(10, 320, __pyx_L1_error) /* "SLEPc/BV.pyx":279 * 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":324 * # * * def getMatrix(self): # <<<<<<<<<<<<<< * """ * Retrieves the matrix representation of the inner product. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_35getMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_34getMatrix[] = "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_35getMatrix(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_34getMatrix(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_34getMatrix(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMatrix", 0); /* "SLEPc/BV.pyx":332 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mat = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":333 * """ * 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":334 * 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 == ((int)-1))) __PYX_ERR(10, 334, __pyx_L1_error) /* "SLEPc/BV.pyx":335 * cdef PetscBool indef = PETSC_FALSE * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) * PetscINCREF(mat.obj) # <<<<<<<<<<<<<< * return mat, indef * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_mat->__pyx_base.obj)); /* "SLEPc/BV.pyx":336 * CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) ) * PetscINCREF(mat.obj) * return mat, indef # <<<<<<<<<<<<<< * * def setMatrix(self, Mat mat or None, bint indef): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_PetscBool(__pyx_v_indef); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 336, __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":324 * # * * 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":338 * return mat, indef * * def setMatrix(self, Mat mat or None, bint indef): # <<<<<<<<<<<<<< * """ * Sets the bilinear form to be used for inner products. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_37setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_36setMatrix[] = "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 or None\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_37setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_mat = 0; int __pyx_v_indef; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indef)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setMatrix", 1, 2, 2, 1); __PYX_ERR(10, 338, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatrix") < 0)) __PYX_ERR(10, 338, __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(10, 338, __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(10, 338, __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(10, 338, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_36setMatrix(((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_36setMatrix(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 Mat __pyx_t_1; int __pyx_t_2; PetscBool __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMatrix", 0); /* "SLEPc/BV.pyx":349 * 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 = ((Mat)NULL); } else { __pyx_t_1 = __pyx_v_mat->mat; } __pyx_v_m = __pyx_t_1; /* "SLEPc/BV.pyx":350 * """ * 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":351 * 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, Vec y): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetMatrix(__pyx_v_self->bv, __pyx_v_m, __pyx_v_tval)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(10, 351, __pyx_L1_error) /* "SLEPc/BV.pyx":338 * return mat, indef * * def setMatrix(self, Mat mat or None, 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":353 * CHKERR( BVSetMatrix(self.bv, m, tval) ) * * def applyMatrix(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * Multiplies a vector with the matrix associated to the bilinear */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_39applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_38applyMatrix[] = "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_39applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_x = 0; struct PyPetscVecObject *__pyx_v_y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("applyMatrix", 1, 2, 2, 1); __PYX_ERR(10, 353, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyMatrix") < 0)) __PYX_ERR(10, 353, __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(10, 353, __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(10, 353, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(10, 353, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_38applyMatrix(((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_38applyMatrix(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("applyMatrix", 0); /* "SLEPc/BV.pyx":370 * 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 == ((int)-1))) __PYX_ERR(10, 370, __pyx_L1_error) /* "SLEPc/BV.pyx":353 * CHKERR( BVSetMatrix(self.bv, m, tval) ) * * def applyMatrix(self, Vec x, Vec y): # <<<<<<<<<<<<<< * """ * 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":372 * 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_41setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_40setActiveColumns[] = "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_41setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_l; int __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setActiveColumns", 1, 2, 2, 1); __PYX_ERR(10, 372, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setActiveColumns") < 0)) __PYX_ERR(10, 372, __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(10, 372, __pyx_L3_error) __pyx_v_k = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 372, __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(10, 372, __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_40setActiveColumns(((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_40setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setActiveColumns", 0); /* "SLEPc/BV.pyx":383 * 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 == ((int)-1))) __PYX_ERR(10, 383, __pyx_L1_error) /* "SLEPc/BV.pyx":372 * 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":385 * CHKERR( BVSetActiveColumns(self.bv, l, k) ) * * def getActiveColumns(self): # <<<<<<<<<<<<<< * """ * Returns the current active dimensions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_43getActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_42getActiveColumns[] = "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_43getActiveColumns(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_42getActiveColumns(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42getActiveColumns(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getActiveColumns", 0); /* "SLEPc/BV.pyx":396 * 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":397 * """ * 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 == ((int)-1))) __PYX_ERR(10, 397, __pyx_L1_error) /* "SLEPc/BV.pyx":398 * 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(10, 398, __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(10, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 398, __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":385 * 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":400 * 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_45scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_44scaleColumn[] = "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_45scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; PyObject *__pyx_v_alpha = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scaleColumn", 1, 2, 2, 1); __PYX_ERR(10, 400, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scaleColumn") < 0)) __PYX_ERR(10, 400, __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(10, 400, __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(10, 400, __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_44scaleColumn(((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_44scaleColumn(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scaleColumn", 0); /* "SLEPc/BV.pyx":411 * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(10, 411, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/BV.pyx":412 * """ * 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 == ((int)-1))) __PYX_ERR(10, 412, __pyx_L1_error) /* "SLEPc/BV.pyx":400 * 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":414 * 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_47scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_46scale[] = "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_47scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 414, __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(10, 414, __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_46scale(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46scale(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scale", 0); /* "SLEPc/BV.pyx":427 * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(10, 427, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/BV.pyx":428 * """ * cdef PetscScalar sval = asScalar(alpha) * CHKERR( BVScale(self.bv, sval) ) # <<<<<<<<<<<<<< * * def insertVec(self, int j, Vec w): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVScale(__pyx_v_self->bv, __pyx_v_sval)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(10, 428, __pyx_L1_error) /* "SLEPc/BV.pyx":414 * 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":430 * CHKERR( BVScale(self.bv, sval) ) * * def insertVec(self, int j, Vec w): # <<<<<<<<<<<<<< * """ * Insert a vector into the specified column. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVec[] = "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_49insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; struct PyPetscVecObject *__pyx_v_w = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVec", 1, 2, 2, 1); __PYX_ERR(10, 430, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVec") < 0)) __PYX_ERR(10, 430, __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(10, 430, __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(10, 430, __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(10, 430, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_48insertVec(((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_48insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insertVec", 0); /* "SLEPc/BV.pyx":441 * The vector to be copied. * """ * CHKERR( BVInsertVec(self.bv, j, w.vec) ) # <<<<<<<<<<<<<< * * def insertVecs(self, int s, W, 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 == ((int)-1))) __PYX_ERR(10, 441, __pyx_L1_error) /* "SLEPc/BV.pyx":430 * CHKERR( BVScale(self.bv, sval) ) * * def insertVec(self, int j, Vec w): # <<<<<<<<<<<<<< * """ * 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":443 * CHKERR( BVInsertVec(self.bv, j, w.vec) ) * * def insertVecs(self, int s, W, bint orth): # <<<<<<<<<<<<<< * """ * Insert a set of vectors into specified columns. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_51insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_50insertVecs[] = "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_51insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_s; PyObject *__pyx_v_W = 0; int __pyx_v_orth; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_W)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 1); __PYX_ERR(10, 443, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_orth)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 2); __PYX_ERR(10, 443, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVecs") < 0)) __PYX_ERR(10, 443, __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(10, 443, __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(10, 443, __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(10, 443, __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:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_50insertVecs(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_s, __pyx_v_W, __pyx_v_orth); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50insertVecs(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; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; PetscBool __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insertVecs", 0); __Pyx_INCREF(__pyx_v_W); /* "SLEPc/BV.pyx":469 * 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(10, 469, __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":470 * """ * 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":471 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(10, 471, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/BV.pyx":472 * 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(10, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/BV.pyx":473 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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(10, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(10, 473, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_ws[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/BV.pyx":474 * 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":475 * 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_8 = PETSC_TRUE; } else { __pyx_t_8 = PETSC_FALSE; } __pyx_v_tval = __pyx_t_8; /* "SLEPc/BV.pyx":476 * 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_9 = __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_9 == ((int)-1))) __PYX_ERR(10, 476, __pyx_L1_error) /* "SLEPc/BV.pyx":477 * 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): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":443 * CHKERR( BVInsertVec(self.bv, j, w.vec) ) * * def insertVecs(self, int s, W, 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":479 * return toInt(m) * * def dotVec(self, Vec v): # <<<<<<<<<<<<<< * """ * Computes multiple dot products of a vector against all the column */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_53dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_52dotVec[] = "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_53dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_v = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 479, __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(10, 479, __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(10, 479, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_52dotVec(((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_52dotVec(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_8genexpr3__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dotVec", 0); __Pyx_INCREF((PyObject *)__pyx_v_v); /* "SLEPc/BV.pyx":501 * 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(10, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 501, __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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(10, 501, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS 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(10, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 501, __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(10, 501, __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(10, 501, __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(10, 501, __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":502 * """ * l, k = self.getActiveColumns() * cdef PetscScalar* mval = NULL # <<<<<<<<<<<<<< * cdef tmp = allocate((k - l)*sizeof(PetscScalar), &mval) * */ __pyx_v_mval = NULL; /* "SLEPc/BV.pyx":503 * 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(10, 503, __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(10, 503, __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(10, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/BV.pyx":505 * 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 == ((int)-1))) __PYX_ERR(10, 505, __pyx_L1_error) /* "SLEPc/BV.pyx":507 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 507, __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(10, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 507, __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_8petsc4py_5PETSc_Vec))))) __PYX_ERR(10, 507, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_v, ((struct PyPetscVecObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":508 * * v = Vec().create(COMM_SELF) * v.setType('seq') # <<<<<<<<<<<<<< * v.setSizes((DECIDE, k-l)) * v.setArray([toScalar(mval[i]) for i in range(0, k - l)]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_seq) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_seq); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":509 * v = Vec().create(COMM_SELF) * v.setType('seq') * v.setSizes((DECIDE, k-l)) # <<<<<<<<<<<<<< * v.setArray([toScalar(mval[i]) for i in range(0, k - l)]) * v.ghostUpdate() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setSizes); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DECIDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":510 * v.setType('seq') * v.setSizes((DECIDE, k-l)) * v.setArray([toScalar(mval[i]) for i in range(0, k - l)]) # <<<<<<<<<<<<<< * v.ghostUpdate() * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); { /* enter inner scope */ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 510, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 510, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 510, __pyx_L7_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(10, 510, __pyx_L7_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(10, 510, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 510, __pyx_L7_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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __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(10, 510, __pyx_L7_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 510, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __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(10, 510, __pyx_L7_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 510, __pyx_L7_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(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(10, 510, __pyx_L7_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_8genexpr3__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(10, 510, __pyx_L7_error) __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toScalar((__pyx_v_mval[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 510, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_4))) __PYX_ERR(10, 510, __pyx_L7_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0; goto __pyx_L10_exit_scope; __pyx_L7_error:; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0; goto __pyx_L1_error; __pyx_L10_exit_scope:; } /* exit inner scope */ __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":511 * v.setSizes((DECIDE, k-l)) * v.setArray([toScalar(mval[i]) for i in range(0, k - l)]) * v.ghostUpdate() # <<<<<<<<<<<<<< * * return v */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_ghostUpdate); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":513 * 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":479 * return toInt(m) * * def dotVec(self, Vec v): # <<<<<<<<<<<<<< * """ * 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_8genexpr3__pyx_v_i); __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":515 * 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_55getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_54getColumn[] = "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_55getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 515, __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(10, 515, __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(10, 515, __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_54getColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54getColumn(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getColumn", 0); /* "SLEPc/BV.pyx":534 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_v = ((struct PyPetscVecObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":535 * """ * 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 == ((int)-1))) __PYX_ERR(10, 535, __pyx_L1_error) /* "SLEPc/BV.pyx":536 * cdef Vec v = Vec() * CHKERR( BVGetColumn(self.bv, j, &v.vec) ) * return v # <<<<<<<<<<<<<< * * def restoreColumn(self, int j, Vec v): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_v)); __pyx_r = ((PyObject *)__pyx_v_v); goto __pyx_L0; /* "SLEPc/BV.pyx":515 * 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":538 * return v * * def restoreColumn(self, int j, Vec v): # <<<<<<<<<<<<<< * """ * Restore a column obtained with BVGetColumn(). */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_57restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_56restoreColumn[] = "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_57restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; struct PyPetscVecObject *__pyx_v_v = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("restoreColumn", 1, 2, 2, 1); __PYX_ERR(10, 538, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "restoreColumn") < 0)) __PYX_ERR(10, 538, __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(10, 538, __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(10, 538, __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(10, 538, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_56restoreColumn(((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_56restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("restoreColumn", 0); /* "SLEPc/BV.pyx":554 * The arguments must match the corresponding call to BVGetColumn(). * """ * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) # <<<<<<<<<<<<<< * * def dot(self, BV Y): */ __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 == ((int)-1))) __PYX_ERR(10, 554, __pyx_L1_error) /* "SLEPc/BV.pyx":538 * return v * * def restoreColumn(self, int j, Vec v): # <<<<<<<<<<<<<< * """ * 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":556 * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) * * def dot(self, BV Y): # <<<<<<<<<<<<<< * """ * Computes the 'block-dot' product of two basis vectors objects. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_59dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_58dot[] = "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_59dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_Y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 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_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(10, 556, __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(10, 556, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_58dot(((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_58dot(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); /* "SLEPc/BV.pyx":587 * (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":588 * """ * 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":589 * 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 == ((int)-1))) __PYX_ERR(10, 589, __pyx_L1_error) /* "SLEPc/BV.pyx":590 * 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 == ((int)-1))) __PYX_ERR(10, 590, __pyx_L1_error) /* "SLEPc/BV.pyx":591 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 591, __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(10, 591, __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(10, 591, __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(10, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 591, __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(10, 591, __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 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_comm, __pyx_t_3) < 0) __PYX_ERR(10, 591, __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(10, 591, __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(10, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 591, __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(10, 591, __pyx_L1_error) __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/BV.pyx":592 * 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 == ((int)-1))) __PYX_ERR(10, 592, __pyx_L1_error) /* "SLEPc/BV.pyx":593 * 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 or None, BV Y): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_M)); __pyx_r = ((PyObject *)__pyx_v_M); goto __pyx_L0; /* "SLEPc/BV.pyx":556 * CHKERR( BVRestoreColumn(self.bv, j, &v.vec) ) * * def dot(self, BV Y): # <<<<<<<<<<<<<< * """ * 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":595 * return M * * def matProject(self, Mat A or None, BV Y): # <<<<<<<<<<<<<< * """ * Computes the projection of a matrix onto a subspace. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_61matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_60matProject[] = "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_61matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("matProject", 1, 2, 2, 1); __PYX_ERR(10, 595, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matProject") < 0)) __PYX_ERR(10, 595, __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(10, 595, __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(10, 595, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "Y", 0))) __PYX_ERR(10, 595, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_60matProject(((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_60matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) { struct PySlepcBVObject *__pyx_v_X = 0; PetscInt __pyx_v_kx; PetscInt __pyx_v_ky; Mat __pyx_v_Amat; struct PyPetscMatObject *__pyx_v_M = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Mat __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("matProject", 0); /* "SLEPc/BV.pyx":614 * Projection of the matrix A onto the subspace. * """ * cdef BV X = self # <<<<<<<<<<<<<< * cdef PetscInt kx=0, ky=0 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_X = __pyx_v_self; /* "SLEPc/BV.pyx":615 * """ * cdef BV X = self * cdef PetscInt kx=0, ky=0 # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) */ __pyx_v_kx = 0; __pyx_v_ky = 0; /* "SLEPc/BV.pyx":616 * cdef BV X = self * cdef PetscInt kx=0, ky=0 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) # <<<<<<<<<<<<<< * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * 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 == ((int)-1))) __PYX_ERR(10, 616, __pyx_L1_error) /* "SLEPc/BV.pyx":617 * cdef PetscInt kx=0, ky=0 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) # <<<<<<<<<<<<<< * cdef PetscMat Amat = NULL if A is None else A.mat * 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 == ((int)-1))) __PYX_ERR(10, 617, __pyx_L1_error) /* "SLEPc/BV.pyx":618 * CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) ) * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * cdef PetscMat Amat = NULL if A is None else A.mat # <<<<<<<<<<<<<< * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) */ __pyx_t_3 = (((PyObject *)__pyx_v_A) == Py_None); if ((__pyx_t_3 != 0)) { __pyx_t_2 = ((Mat)NULL); } else { __pyx_t_2 = __pyx_v_A->mat; } __pyx_v_Amat = __pyx_t_2; /* "SLEPc/BV.pyx":619 * CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) ) * cdef PetscMat Amat = NULL if A is None else A.mat * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() # <<<<<<<<<<<<<< * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) * return M */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_createDense); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_PetscInt(__pyx_v_ky); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_From_PetscInt(__pyx_v_kx); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_comm, __pyx_t_5) < 0) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setUp); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_8petsc4py_5PETSc_Mat))))) __PYX_ERR(10, 619, __pyx_L1_error) __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/BV.pyx":620 * cdef PetscMat Amat = NULL if A is None else A.mat * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * 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 == ((int)-1))) __PYX_ERR(10, 620, __pyx_L1_error) /* "SLEPc/BV.pyx":621 * cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp() * CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) ) * return M # <<<<<<<<<<<<<< * * def matMult(self, Mat A, 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":595 * return M * * def matProject(self, Mat A or None, BV Y): # <<<<<<<<<<<<<< * """ * Computes the projection of a matrix onto a subspace. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __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":623 * return M * * def matMult(self, Mat A, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product for each column, Y = A*V. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_63matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_62matMult[] = "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_63matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(10, 623, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(10, 623, __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(10, 623, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(10, 623, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_62matMult(((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_62matMult(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("matMult", 0); __Pyx_INCREF((PyObject *)__pyx_v_Y); /* "SLEPc/BV.pyx":649 * 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":650 * """ * 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":651 * 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":652 * 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":653 * 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":654 * 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":655 * 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":656 * 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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 656, __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":657 * 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":658 * 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 == ((int)-1))) __PYX_ERR(10, 658, __pyx_L1_error) /* "SLEPc/BV.pyx":659 * 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 == ((int)-1))) __PYX_ERR(10, 659, __pyx_L1_error) /* "SLEPc/BV.pyx":660 * 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 == ((int)-1))) __PYX_ERR(10, 660, __pyx_L1_error) /* "SLEPc/BV.pyx":661 * 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 == ((int)-1))) __PYX_ERR(10, 661, __pyx_L1_error) /* "SLEPc/BV.pyx":662 * 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 == ((int)-1))) __PYX_ERR(10, 662, __pyx_L1_error) /* "SLEPc/BV.pyx":657 * 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":663 * 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":664 * 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 == ((int)-1))) __PYX_ERR(10, 664, __pyx_L1_error) /* "SLEPc/BV.pyx":665 * 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 == ((int)-1))) __PYX_ERR(10, 665, __pyx_L1_error) /* "SLEPc/BV.pyx":666 * 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 == ((int)-1))) __PYX_ERR(10, 666, __pyx_L1_error) /* "SLEPc/BV.pyx":667 * 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 == ((int)-1))) __PYX_ERR(10, 667, __pyx_L1_error) /* "SLEPc/BV.pyx":663 * 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":668 * 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 == ((int)-1))) __PYX_ERR(10, 668, __pyx_L1_error) /* "SLEPc/BV.pyx":669 * CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) ) * CHKERR( BVMatMult(self.bv, A.mat, Y.bv) ) * return Y # <<<<<<<<<<<<<< * * def matMultHermitianTranspose(self, Mat A, 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":623 * return M * * def matMult(self, Mat A, 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":671 * return Y * * def matMultHermitianTranspose(self, Mat A, BV Y=None): # <<<<<<<<<<<<<< * """ * Computes the matrix-vector product with the conjugate transpose of a */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_65matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_64matMultHermitianTranspose[] = "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_65matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PySlepcBVObject *__pyx_v_Y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(10, 671, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(10, 671, __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(10, 671, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(10, 671, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_64matMultHermitianTranspose(((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_64matMultHermitianTranspose(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("matMultHermitianTranspose", 0); __Pyx_INCREF((PyObject *)__pyx_v_Y); /* "SLEPc/BV.pyx":693 * 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":694 * """ * 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":695 * 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":696 * 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":697 * 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":698 * 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":699 * 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":700 * 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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 700, __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":701 * 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":702 * 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 == ((int)-1))) __PYX_ERR(10, 702, __pyx_L1_error) /* "SLEPc/BV.pyx":703 * 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 == ((int)-1))) __PYX_ERR(10, 703, __pyx_L1_error) /* "SLEPc/BV.pyx":704 * 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 == ((int)-1))) __PYX_ERR(10, 704, __pyx_L1_error) /* "SLEPc/BV.pyx":705 * 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 == ((int)-1))) __PYX_ERR(10, 705, __pyx_L1_error) /* "SLEPc/BV.pyx":706 * 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 == ((int)-1))) __PYX_ERR(10, 706, __pyx_L1_error) /* "SLEPc/BV.pyx":701 * 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":707 * 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":708 * 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 == ((int)-1))) __PYX_ERR(10, 708, __pyx_L1_error) /* "SLEPc/BV.pyx":709 * 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 == ((int)-1))) __PYX_ERR(10, 709, __pyx_L1_error) /* "SLEPc/BV.pyx":710 * 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 == ((int)-1))) __PYX_ERR(10, 710, __pyx_L1_error) /* "SLEPc/BV.pyx":711 * 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 == ((int)-1))) __PYX_ERR(10, 711, __pyx_L1_error) /* "SLEPc/BV.pyx":707 * 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":712 * 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 == ((int)-1))) __PYX_ERR(10, 712, __pyx_L1_error) /* "SLEPc/BV.pyx":713 * 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, q): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_Y)); __pyx_r = ((PyObject *)__pyx_v_Y); goto __pyx_L0; /* "SLEPc/BV.pyx":671 * return Y * * def matMultHermitianTranspose(self, Mat A, 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":715 * return Y * * def multVec(self, alpha, beta, Vec y, q): # <<<<<<<<<<<<<< * """ * Computes y = beta*y + alpha*X*q. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_67multVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_66multVec[] = "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_67multVec(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_beta)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 1); __PYX_ERR(10, 715, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 2); __PYX_ERR(10, 715, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 3); __PYX_ERR(10, 715, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multVec") < 0)) __PYX_ERR(10, 715, __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(10, 715, __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(10, 715, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_66multVec(((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_66multVec(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("multVec", 0); /* "SLEPc/BV.pyx":730 * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(10, 730, __pyx_L1_error) __pyx_v_sval1 = __pyx_t_1; /* "SLEPc/BV.pyx":731 * """ * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(10, 731, __pyx_L1_error) __pyx_v_sval2 = __pyx_t_1; /* "SLEPc/BV.pyx":732 * 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":733 * 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":734 * 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(10, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/BV.pyx":735 * 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":736 * 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 == ((int)-1))) __PYX_ERR(10, 736, __pyx_L1_error) /* "SLEPc/BV.pyx":737 * 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(10, 737, __pyx_L1_error) } } #endif /* "SLEPc/BV.pyx":738 * 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 == ((int)-1))) __PYX_ERR(10, 738, __pyx_L1_error) /* "SLEPc/BV.pyx":715 * return Y * * def multVec(self, alpha, beta, Vec y, 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":740 * 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_69normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_68normColumn[] = "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_69normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_j; PyObject *__pyx_v_norm_type = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(10, 740, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(10, 740, __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(10, 740, __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_68normColumn(((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_68normColumn(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normColumn", 0); /* "SLEPc/BV.pyx":763 * 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":764 * """ * 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(10, 764, __pyx_L1_error) __pyx_v_ntype = __pyx_t_3; } /* "SLEPc/BV.pyx":765 * 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":766 * 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 == ((int)-1))) __PYX_ERR(10, 766, __pyx_L1_error) /* "SLEPc/BV.pyx":767 * 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(10, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":740 * 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":769 * 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_71norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_70norm[] = "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_71norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_norm_type = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(10, 769, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(10, 769, __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_70norm(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_norm_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70norm(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("norm", 0); /* "SLEPc/BV.pyx":791 * 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":792 * """ * 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(10, 792, __pyx_L1_error) __pyx_v_ntype = __pyx_t_3; } /* "SLEPc/BV.pyx":793 * 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":794 * 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 == ((int)-1))) __PYX_ERR(10, 794, __pyx_L1_error) /* "SLEPc/BV.pyx":795 * cdef PetscReal norm = 0 * CHKERR( BVNorm(self.bv, ntype, &norm) ) * return toReal(norm) # <<<<<<<<<<<<<< * * def resize(self, m, copy=True): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/BV.pyx":769 * 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":797 * return toReal(norm) * * def resize(self, m, copy=True): # <<<<<<<<<<<<<< * """ * Change the number of columns. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73resize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_72resize[] = "BV.resize(self, m, copy=True)\n\n Change the number of columns.\n\n Parameters\n ----------\n m - the new number of columns.\n copy - a flag indicating whether current values should be kept.\n\n Notes\n -----\n Internal storage is reallocated. If copy is True, then the contents are\n copied to the leading part of the new space.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73resize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_m = 0; PyObject *__pyx_v_copy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_copy,0}; PyObject* values[2] = {0,0}; values[1] = ((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 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resize") < 0)) __PYX_ERR(10, 797, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_m = values[0]; __pyx_v_copy = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("resize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 797, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.resize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_72resize(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_m, __pyx_v_copy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72resize(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_copy) { PetscInt __pyx_v_ival; PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; PetscBool __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resize", 0); /* "SLEPc/BV.pyx":811 * copied to the leading part of the new space. * """ * cdef PetscInt ival = asInt(m) # <<<<<<<<<<<<<< * cdef PetscBool tval = PETSC_TRUE if copy else PETSC_FALSE * CHKERR( BVResize(self.bv, ival, tval) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_1 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(10, 811, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/BV.pyx":812 * """ * cdef PetscInt ival = asInt(m) * cdef PetscBool tval = PETSC_TRUE if copy else PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVResize(self.bv, ival, tval) ) * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_copy); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(10, 812, __pyx_L1_error) if (__pyx_t_3) { __pyx_t_2 = PETSC_TRUE; } else { __pyx_t_2 = PETSC_FALSE; } __pyx_v_tval = __pyx_t_2; /* "SLEPc/BV.pyx":813 * cdef PetscInt ival = asInt(m) * cdef PetscBool tval = PETSC_TRUE if copy else PETSC_FALSE * CHKERR( BVResize(self.bv, ival, tval) ) # <<<<<<<<<<<<<< * * def setRandom(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVResize(__pyx_v_self->bv, __pyx_v_ival, __pyx_v_tval)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(10, 813, __pyx_L1_error) /* "SLEPc/BV.pyx":797 * return toReal(norm) * * def resize(self, m, copy=True): # <<<<<<<<<<<<<< * """ * Change 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.resize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":815 * CHKERR( BVResize(self.bv, ival, tval) ) * * def setRandom(self): # <<<<<<<<<<<<<< * """ * Set the active columns of BV to random numbers. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_75setRandom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_74setRandom[] = "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_75setRandom(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_74setRandom(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74setRandom(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRandom", 0); /* "SLEPc/BV.pyx":823 * All active columns (except the leading ones) are modified. * """ * CHKERR( BVSetRandom(self.bv) ) # <<<<<<<<<<<<<< * * def setRandomNormal(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetRandom(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 823, __pyx_L1_error) /* "SLEPc/BV.pyx":815 * CHKERR( BVResize(self.bv, ival, tval) ) * * 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":825 * CHKERR( BVSetRandom(self.bv) ) * * def setRandomNormal(self): # <<<<<<<<<<<<<< * """ * Set the active columns of BV to random numbers (with normal distribution). */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_77setRandomNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_76setRandomNormal[] = "BV.setRandomNormal(self)\n\n Set the active columns of BV to random numbers (with normal distribution).\n\n Notes\n -----\n All active columns (except the leading ones) are modified.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_77setRandomNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setRandomNormal (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("setRandomNormal", 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, "setRandomNormal", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_76setRandomNormal(((struct PySlepcBVObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_76setRandomNormal(struct PySlepcBVObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRandomNormal", 0); /* "SLEPc/BV.pyx":833 * All active columns (except the leading ones) are modified. * """ * CHKERR( BVSetRandomNormal(self.bv) ) # <<<<<<<<<<<<<< * * def orthogonalizeVec(self, Vec v): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetRandomNormal(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 833, __pyx_L1_error) /* "SLEPc/BV.pyx":825 * CHKERR( BVSetRandom(self.bv) ) * * def setRandomNormal(self): # <<<<<<<<<<<<<< * """ * Set the active columns of BV to random numbers (with normal distribution). */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.BV.setRandomNormal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/BV.pyx":835 * CHKERR( BVSetRandomNormal(self.bv) ) * * def orthogonalizeVec(self, Vec v): # <<<<<<<<<<<<<< * """ * Orthogonalize a vector with respect to a set of vectors. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_79orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_78orthogonalizeVec[] = "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_79orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_v = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(10, 835, __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(10, 835, __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(10, 835, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_78orthogonalizeVec(((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_78orthogonalizeVec(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("orthogonalizeVec", 0); /* "SLEPc/BV.pyx":860 * 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":861 * """ * cdef PetscReal norm = 0 * cdef PetscBool ldep = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) * return (toReal(norm), toBool(ldep)) */ __pyx_v_ldep = PETSC_FALSE; /* "SLEPc/BV.pyx":862 * cdef PetscReal norm = 0 * cdef PetscBool ldep = PETSC_FALSE * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) # <<<<<<<<<<<<<< * return (toReal(norm), toBool(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 == ((int)-1))) __PYX_ERR(10, 862, __pyx_L1_error) /* "SLEPc/BV.pyx":863 * cdef PetscBool ldep = PETSC_FALSE * CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) ) * return (toReal(norm), toBool(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(10, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_ldep); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 863, __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":835 * CHKERR( BVSetRandomNormal(self.bv) ) * * def orthogonalizeVec(self, Vec v): # <<<<<<<<<<<<<< * """ * 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":865 * return (toReal(norm), toBool(ldep)) * * def orthogonalize(self, Mat R=None, **kargs): # <<<<<<<<<<<<<< * """ * Orthogonalize all columns (except leading ones), */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_81orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2BV_80orthogonalize[] = "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, optional\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_81orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_R = 0; PyObject *__pyx_v_kargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(10, 865, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(10, 865, __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(10, 865, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_80orthogonalize(((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_80orthogonalize(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; Mat __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("orthogonalize", 0); /* "SLEPc/BV.pyx":879 * 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(10, 879, __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(10, 879, __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(10, 879, __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":880 * """ * 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 = ((Mat)NULL); } else { __pyx_t_4 = __pyx_v_R->mat; } __pyx_v_Rmat = __pyx_t_4; /* "SLEPc/BV.pyx":881 * 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 == ((int)-1))) __PYX_ERR(10, 881, __pyx_L1_error) /* "SLEPc/BV.pyx":865 * return (toReal(norm), toBool(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":73 * 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":74 * * def __cinit__(self): * self.obj = &self.ds # <<<<<<<<<<<<<< * self.ds = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->ds)); /* "SLEPc/DS.pyx":75 * def __cinit__(self): * self.obj = &self.ds * self.ds = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->ds = NULL; /* "SLEPc/DS.pyx":73 * 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":77 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 77, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 77, __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(11, 77, __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/DS.pyx":87 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( DSView(self.ds, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/DS.pyx":88 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( DSView(self.ds, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSView(__pyx_v_self->ds, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 88, __pyx_L1_error) /* "SLEPc/DS.pyx":77 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 104, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(11, 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 == ((int)-1))) __PYX_ERR(11, 116, __pyx_L1_error) /* "SLEPc/DS.pyx":117 * cdef SlepcDS newds = NULL * CHKERR( DSCreate(ccomm, &newds) ) * SlepcCLEAR(self.obj); self.ds = newds # <<<<<<<<<<<<<< * return self * */ (void)(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(11, 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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(11, 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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("allocate", 0); /* "SLEPc/DS.pyx":204 * matrices, including the extra row if present). * """ * cdef PetscInt val = asInt(ld) # <<<<<<<<<<<<<< * CHKERR( DSAllocate(self.ds, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ld); if (unlikely(__pyx_t_1 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 204, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":205 * """ * cdef PetscInt val = asInt(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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 toInt(val) */ __pyx_v_val = 0; /* "SLEPc/DS.pyx":217 * """ * cdef PetscInt val = 0 * CHKERR( DSGetLeadingDimension(self.ds, &val) ) # <<<<<<<<<<<<<< * return toInt(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetLeadingDimension(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 217, __pyx_L1_error) /* "SLEPc/DS.pyx":218 * cdef PetscInt val = 0 * CHKERR( DSGetLeadingDimension(self.ds, &val) ) * return toInt(val) # <<<<<<<<<<<<<< * * def setState(self, state): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 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 toInt(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(11, 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 == ((int)-1))) __PYX_ERR(11, 241, __pyx_L1_error) /* "SLEPc/DS.pyx":220 * return toInt(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(11, 256, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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(11, 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(11, 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(11, 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(11, 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(11, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(11, 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 == ((int)-1))) __PYX_ERR(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(11, 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(11, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 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(11, 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 PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCompact", 0); /* "SLEPc/DS.pyx":356 * The default is ``False``. * """ * cdef PetscBool val = asBool(comp) # <<<<<<<<<<<<<< * CHKERR( DSSetCompact(self.ds, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_comp); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(11, 356, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":357 * """ * cdef PetscBool val = asBool(comp) * 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 == ((int)-1))) __PYX_ERR(11, 357, __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":359 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCompact", 0); /* "SLEPc/DS.pyx":368 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetCompact(self.ds, &val) ) * return toBool(val) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":369 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetCompact(self.ds, &val) ) # <<<<<<<<<<<<<< * return toBool(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetCompact(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 369, __pyx_L1_error) /* "SLEPc/DS.pyx":370 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetCompact(self.ds, &val) ) * return toBool(val) # <<<<<<<<<<<<<< * * def setExtraRow(self, ext): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":359 * 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":372 * return toBool(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 (n+1)*n . If this flag is activated, all transformations\n applied to the right of the matrix also affect this additional\n row. In that case, (n+1) must be less or equal than the\n leading 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 372, __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(11, 372, __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 PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setExtraRow", 0); /* "SLEPc/DS.pyx":392 * The default is ``False``. * """ * cdef PetscBool val = asBool(ext) # <<<<<<<<<<<<<< * CHKERR( DSSetExtraRow(self.ds, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_ext); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(11, 392, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":393 * """ * cdef PetscBool val = asBool(ext) * 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 == ((int)-1))) __PYX_ERR(11, 393, __pyx_L1_error) /* "SLEPc/DS.pyx":372 * return toBool(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":395 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getExtraRow", 0); /* "SLEPc/DS.pyx":404 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetExtraRow(self.ds, &val) ) * return toBool(val) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":405 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetExtraRow(self.ds, &val) ) # <<<<<<<<<<<<<< * return toBool(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetExtraRow(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 405, __pyx_L1_error) /* "SLEPc/DS.pyx":406 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetExtraRow(self.ds, &val) ) * return toBool(val) # <<<<<<<<<<<<<< * * def setRefined(self, ref): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":395 * 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":408 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(11, 408, __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(11, 408, __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 PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRefined", 0); /* "SLEPc/DS.pyx":428 * The default is ``False``. * """ * cdef PetscBool val = asBool(ref) # <<<<<<<<<<<<<< * CHKERR( DSSetRefined(self.ds, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_ref); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(11, 428, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":429 * """ * cdef PetscBool val = asBool(ref) * 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 == ((int)-1))) __PYX_ERR(11, 429, __pyx_L1_error) /* "SLEPc/DS.pyx":408 * return toBool(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":431 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRefined", 0); /* "SLEPc/DS.pyx":440 * The flag. * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( DSGetRefined(self.ds, &val) ) * return toBool(val) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/DS.pyx":441 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetRefined(self.ds, &val) ) # <<<<<<<<<<<<<< * return toBool(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetRefined(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 441, __pyx_L1_error) /* "SLEPc/DS.pyx":442 * cdef PetscBool val = PETSC_FALSE * CHKERR( DSGetRefined(self.ds, &val) ) * return toBool(val) # <<<<<<<<<<<<<< * * def truncate(self, n, trim=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/DS.pyx":431 * 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":444 * return toBool(val) * * def truncate(self, n, trim=False): # <<<<<<<<<<<<<< * """ * 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, trim=False)\n\n Truncates the system represented in the DS object.\n\n Parameters\n ----------\n n: integer\n The new size.\n trim: boolean\n A flag to indicate if the factorization must be trimmed.\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_v_trim = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("truncate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_trim,0}; PyObject* values[2] = {0,0}; values[1] = ((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 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_trim); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "truncate") < 0)) __PYX_ERR(11, 444, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_n = values[0]; __pyx_v_trim = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("truncate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 444, __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, __pyx_v_trim); /* 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, PyObject *__pyx_v_trim) { PetscInt __pyx_v_val; PetscBool __pyx_v_flg; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscInt __pyx_t_1; PetscBool __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("truncate", 0); /* "SLEPc/DS.pyx":455 * A flag to indicate if the factorization must be trimmed. * """ * cdef PetscInt val = asInt(n) # <<<<<<<<<<<<<< * cdef PetscBool flg = asBool(trim) * CHKERR( DSTruncate(self.ds, val, flg) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_n); if (unlikely(__pyx_t_1 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(11, 455, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/DS.pyx":456 * """ * cdef PetscInt val = asInt(n) * cdef PetscBool flg = asBool(trim) # <<<<<<<<<<<<<< * CHKERR( DSTruncate(self.ds, val, flg) ) * */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_trim); if (unlikely(__pyx_t_2 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(11, 456, __pyx_L1_error) __pyx_v_flg = __pyx_t_2; /* "SLEPc/DS.pyx":457 * cdef PetscInt val = asInt(n) * cdef PetscBool flg = asBool(trim) * CHKERR( DSTruncate(self.ds, val, flg) ) # <<<<<<<<<<<<<< * * def updateExtraRow(self): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSTruncate(__pyx_v_self->ds, __pyx_v_val, __pyx_v_flg)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(11, 457, __pyx_L1_error) /* "SLEPc/DS.pyx":444 * return toBool(val) * * def truncate(self, n, trim=False): # <<<<<<<<<<<<<< * """ * 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, flg) ) * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("updateExtraRow", 0); /* "SLEPc/DS.pyx":464 * row gets up-to-date after a call to `solve()`. * """ * CHKERR( DSUpdateExtraRow(self.ds) ) # <<<<<<<<<<<<<< * * def getMat(self, matname): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSUpdateExtraRow(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 464, __pyx_L1_error) /* "SLEPc/DS.pyx":459 * CHKERR( DSTruncate(self.ds, val, flg) ) * * 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/DS.pyx":466 * CHKERR( DSUpdateExtraRow(self.ds) ) * * def getMat(self, matname): # <<<<<<<<<<<<<< * """ * Returns the requested matrix as a sequential dense Mat object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_53getMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2DS_52getMat[] = "DS.getMat(self, matname)\n\n Returns the requested matrix as a sequential dense Mat object.\n\n Parameters\n ----------\n matname: `DS.MatType` enumerate\n The requested matrix.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_53getMat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_matname = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMat (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_matname,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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matname)) != 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, "getMat") < 0)) __PYX_ERR(11, 466, __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_matname = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getMat", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 466, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.DS.getMat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_52getMat(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_matname); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_52getMat(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_matname) { DSMatType __pyx_v_mname; struct PyPetscMatObject *__pyx_v_mat = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations DSMatType __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMat", 0); /* "SLEPc/DS.pyx":475 * The requested matrix. * """ * cdef SlepcDSMatType mname = matname # <<<<<<<<<<<<<< * cdef Mat mat = Mat() * CHKERR( DSGetMat(self.ds, mname, &mat.mat) ) */ __pyx_t_1 = ((DSMatType)__Pyx_PyInt_As_DSMatType(__pyx_v_matname)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 475, __pyx_L1_error) __pyx_v_mname = __pyx_t_1; /* "SLEPc/DS.pyx":476 * """ * cdef SlepcDSMatType mname = matname * cdef Mat mat = Mat() # <<<<<<<<<<<<<< * CHKERR( DSGetMat(self.ds, mname, &mat.mat) ) * return mat */ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_mat = ((struct PyPetscMatObject *)__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/DS.pyx":477 * cdef SlepcDSMatType mname = matname * cdef Mat mat = Mat() * CHKERR( DSGetMat(self.ds, mname, &mat.mat) ) # <<<<<<<<<<<<<< * return mat * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetMat(__pyx_v_self->ds, __pyx_v_mname, (&__pyx_v_mat->mat))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(11, 477, __pyx_L1_error) /* "SLEPc/DS.pyx":478 * cdef Mat mat = Mat() * CHKERR( DSGetMat(self.ds, mname, &mat.mat) ) * return mat # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); __pyx_r = ((PyObject *)__pyx_v_mat); goto __pyx_L0; /* "SLEPc/DS.pyx":466 * CHKERR( DSUpdateExtraRow(self.ds) ) * * def getMat(self, matname): # <<<<<<<<<<<<<< * """ * Returns the requested matrix as a sequential dense Mat object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.DS.getMat", __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/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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 44, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 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(12, 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/FN.pyx":54 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( FNView(self.fn, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/FN.pyx":55 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( FNView(self.fn, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNView(__pyx_v_self->fn, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 55, __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":57 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/FN.pyx":61 * 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 == ((int)-1))) __PYX_ERR(12, 61, __pyx_L1_error) /* "SLEPc/FN.pyx":62 * """ * CHKERR( FNDestroy(&self.fn) ) * self.fn = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->fn = NULL; /* "SLEPc/FN.pyx":63 * 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":57 * 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":65 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 65, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 65, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/FN.pyx":75 * 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(12, 75, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/FN.pyx":76 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNCreate(__pyx_v_ccomm, (&__pyx_v_newfn))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 77, __pyx_L1_error) /* "SLEPc/FN.pyx":78 * cdef SlepcFN newfn = NULL * CHKERR( FNCreate(ccomm, &newfn) ) * SlepcCLEAR(self.obj); self.fn = newfn # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->fn = __pyx_v_newfn; /* "SLEPc/FN.pyx":79 * 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":65 * 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":81 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(12, 81, __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(12, 81, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_fn_type); /* "SLEPc/FN.pyx":90 * 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":91 * """ * 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(12, 91, __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":92 * 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 == ((int)-1))) __PYX_ERR(12, 92, __pyx_L1_error) /* "SLEPc/FN.pyx":81 * 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":94 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/FN.pyx":103 * 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":104 * """ * 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 == ((int)-1))) __PYX_ERR(12, 104, __pyx_L1_error) /* "SLEPc/FN.pyx":105 * 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(12, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":94 * 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":107 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 107, __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, 107, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/FN.pyx":124 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( FNSetOptionsPrefix(self.fn, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/FN.pyx":125 * """ * 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(12, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/FN.pyx":126 * 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 == ((int)-1))) __PYX_ERR(12, 126, __pyx_L1_error) /* "SLEPc/FN.pyx":107 * 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":128 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/FN.pyx":138 * 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":139 * """ * 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 == ((int)-1))) __PYX_ERR(12, 139, __pyx_L1_error) /* "SLEPc/FN.pyx":140 * 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(12, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":128 * 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":142 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/FN.pyx":151 * option. * """ * CHKERR( FNSetFromOptions(self.fn) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetFromOptions(__pyx_v_self->fn)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 151, __pyx_L1_error) /* "SLEPc/FN.pyx":142 * 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":155 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(12, 155, __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(12, 155, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluateFunction", 0); /* "SLEPc/FN.pyx":169 * 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":170 * """ * 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(12, 170, __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 == ((int)-1))) __PYX_ERR(12, 170, __pyx_L1_error) /* "SLEPc/FN.pyx":171 * 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(12, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":155 * # * * 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":173 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(12, 173, __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(12, 173, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluateDerivative", 0); /* "SLEPc/FN.pyx":187 * 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":188 * """ * 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(12, 188, __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 == ((int)-1))) __PYX_ERR(12, 188, __pyx_L1_error) /* "SLEPc/FN.pyx":189 * 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(12, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "SLEPc/FN.pyx":173 * 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":191 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(12, 191, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(12, 191, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setScale", 0); /* "SLEPc/FN.pyx":202 * 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":203 * """ * 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":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) * 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(__pyx_t_3 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(12, 204, __pyx_L1_error) __pyx_v_aval = __pyx_t_3; } /* "SLEPc/FN.pyx":205 * 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(__pyx_t_3 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(12, 205, __pyx_L1_error) __pyx_v_bval = __pyx_t_3; } /* "SLEPc/FN.pyx":206 * 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 == ((int)-1))) __PYX_ERR(12, 206, __pyx_L1_error) /* "SLEPc/FN.pyx":191 * 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":208 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getScale", 0); /* "SLEPc/FN.pyx":219 * 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":220 * """ * 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 == ((int)-1))) __PYX_ERR(12, 220, __pyx_L1_error) /* "SLEPc/FN.pyx":221 * 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(12, 221, __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(12, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 221, __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":208 * 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":225 * # * * def setRationalNumerator(self, alpha): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(12, 225, __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(12, 225, __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:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRationalNumerator", 0); /* "SLEPc/FN.pyx":234 * Coefficients. * """ * cdef PetscInt na = 0 # <<<<<<<<<<<<<< * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) */ __pyx_v_na = 0; /* "SLEPc/FN.pyx":235 * """ * 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":236 * 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(12, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/FN.pyx":237 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) # <<<<<<<<<<<<<< * * def setRationalDenominator(self, alpha): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetNumerator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 237, __pyx_L1_error) /* "SLEPc/FN.pyx":225 * # * * def setRationalNumerator(self, alpha): # <<<<<<<<<<<<<< * """ * 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":239 * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) * * def setRationalDenominator(self, alpha): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(12, 239, __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(12, 239, __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:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha); /* function exit code */ __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRationalDenominator", 0); /* "SLEPc/FN.pyx":248 * Coefficients. * """ * cdef PetscInt na = 0 # <<<<<<<<<<<<<< * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) */ __pyx_v_na = 0; /* "SLEPc/FN.pyx":249 * """ * 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":250 * 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(12, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/FN.pyx":251 * cdef PetscScalar *a = NULL * cdef object tmp1 = iarray_s(alpha, &na, &a) * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) # <<<<<<<<<<<<<< * * def setCombineChildren(self, comb, FN f1, FN f2): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetDenominator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 251, __pyx_L1_error) /* "SLEPc/FN.pyx":239 * CHKERR( FNRationalSetNumerator(self.fn, na, a) ) * * def setRationalDenominator(self, alpha): # <<<<<<<<<<<<<< * """ * 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/FN.pyx":253 * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) * * def setCombineChildren(self, comb, FN f1, FN f2): # <<<<<<<<<<<<<< * """ * Sets the two child functions that constitute this combined */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_31setCombineChildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_2FN_30setCombineChildren[] = "FN.setCombineChildren(self, comb, FN f1, FN f2)\n\n Sets the two child functions that constitute this combined\n function, and the way they must be combined.\n\n Parameters\n ----------\n comb: `FN.CombineType` enumerate\n How to combine the functions (addition, multiplication, division, composition).\n f1: FN\n First function.\n f2: FN\n Second function.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_31setCombineChildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_comb = 0; struct PySlepcFNObject *__pyx_v_f1 = 0; struct PySlepcFNObject *__pyx_v_f2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setCombineChildren (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comb,&__pyx_n_s_f1,&__pyx_n_s_f2,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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comb)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setCombineChildren", 1, 3, 3, 1); __PYX_ERR(12, 253, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setCombineChildren", 1, 3, 3, 2); __PYX_ERR(12, 253, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCombineChildren") < 0)) __PYX_ERR(12, 253, __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_comb = values[0]; __pyx_v_f1 = ((struct PySlepcFNObject *)values[1]); __pyx_v_f2 = ((struct PySlepcFNObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setCombineChildren", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 253, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setCombineChildren", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f1), __pyx_ptype_8slepc4py_5SLEPc_FN, 0, "f1", 0))) __PYX_ERR(12, 253, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f2), __pyx_ptype_8slepc4py_5SLEPc_FN, 0, "f2", 0))) __PYX_ERR(12, 253, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_30setCombineChildren(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_comb, __pyx_v_f1, __pyx_v_f2); /* 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_30setCombineChildren(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comb, struct PySlepcFNObject *__pyx_v_f1, struct PySlepcFNObject *__pyx_v_f2) { FNCombineType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations FNCombineType __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCombineChildren", 0); /* "SLEPc/FN.pyx":267 * Second function. * """ * cdef SlepcFNCombineType val = comb # <<<<<<<<<<<<<< * CHKERR( FNCombineSetChildren(self.fn, val, f1.fn, f2.fn) ) * */ __pyx_t_1 = ((FNCombineType)__Pyx_PyInt_As_FNCombineType(__pyx_v_comb)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 267, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/FN.pyx":268 * """ * cdef SlepcFNCombineType val = comb * CHKERR( FNCombineSetChildren(self.fn, val, f1.fn, f2.fn) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNCombineSetChildren(__pyx_v_self->fn, __pyx_v_val, __pyx_v_f1->fn, __pyx_v_f2->fn)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 268, __pyx_L1_error) /* "SLEPc/FN.pyx":253 * CHKERR( FNRationalSetDenominator(self.fn, na, a) ) * * def setCombineChildren(self, comb, FN f1, FN f2): # <<<<<<<<<<<<<< * """ * Sets the two child functions that constitute this combined */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.FN.setCombineChildren", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 26, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 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(13, 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/RG.pyx":36 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( RGView(self.rg, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/RG.pyx":37 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( RGView(self.rg, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGView(__pyx_v_self->rg, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(13, 37, __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":39 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/RG.pyx":43 * 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 == ((int)-1))) __PYX_ERR(13, 43, __pyx_L1_error) /* "SLEPc/RG.pyx":44 * """ * CHKERR( RGDestroy(&self.rg) ) * self.rg = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->rg = NULL; /* "SLEPc/RG.pyx":45 * 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":39 * 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":47 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 47, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 47, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/RG.pyx":57 * 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(13, 57, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/RG.pyx":58 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGCreate(__pyx_v_ccomm, (&__pyx_v_newrg))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 59, __pyx_L1_error) /* "SLEPc/RG.pyx":60 * cdef SlepcRG newrg = NULL * CHKERR( RGCreate(ccomm, &newrg) ) * SlepcCLEAR(self.obj); self.rg = newrg # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->rg = __pyx_v_newrg; /* "SLEPc/RG.pyx":61 * 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":47 * 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":63 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(13, 63, __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(13, 63, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_rg_type); /* "SLEPc/RG.pyx":72 * 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":73 * """ * 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(13, 73, __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":74 * 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 == ((int)-1))) __PYX_ERR(13, 74, __pyx_L1_error) /* "SLEPc/RG.pyx":63 * 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":76 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/RG.pyx":85 * 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":86 * """ * 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 == ((int)-1))) __PYX_ERR(13, 86, __pyx_L1_error) /* "SLEPc/RG.pyx":87 * 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(13, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":76 * 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":89 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 89, __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, 89, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/RG.pyx":106 * AUTOMATICALLY the hyphen. * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( RGSetOptionsPrefix(self.rg, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/RG.pyx":107 * """ * 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(13, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/RG.pyx":108 * 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 == ((int)-1))) __PYX_ERR(13, 108, __pyx_L1_error) /* "SLEPc/RG.pyx":89 * 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":110 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/RG.pyx":120 * 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":121 * """ * 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 == ((int)-1))) __PYX_ERR(13, 121, __pyx_L1_error) /* "SLEPc/RG.pyx":122 * 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(13, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":110 * 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":124 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/RG.pyx":133 * option. * """ * CHKERR( RGSetFromOptions(self.rg) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetFromOptions(__pyx_v_self->rg)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(13, 133, __pyx_L1_error) /* "SLEPc/RG.pyx":124 * 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":137 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isTrivial", 0); /* "SLEPc/RG.pyx":148 * ellipse with infinite radius. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( RGIsTrivial(self.rg, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/RG.pyx":149 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGIsTrivial(self.rg, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIsTrivial(__pyx_v_self->rg, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(13, 149, __pyx_L1_error) /* "SLEPc/RG.pyx":150 * cdef PetscBool tval = PETSC_FALSE * CHKERR( RGIsTrivial(self.rg, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def getComplement(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":137 * # * * 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":152 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getComplement", 0); /* "SLEPc/RG.pyx":161 * 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":162 * """ * 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 == ((int)-1))) __PYX_ERR(13, 162, __pyx_L1_error) /* "SLEPc/RG.pyx":163 * 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(13, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/RG.pyx":152 * return toBool(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":165 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(13, 165, __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(13, 165, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setComplement", 0); /* "SLEPc/RG.pyx":175 * 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(13, 175, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/RG.pyx":176 * """ * 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 == ((int)-1))) __PYX_ERR(13, 176, __pyx_L1_error) /* "SLEPc/RG.pyx":165 * 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":180 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_center)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 1); __PYX_ERR(13, 180, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vscale)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 2); __PYX_ERR(13, 180, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEllipseParameters") < 0)) __PYX_ERR(13, 180, __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(13, 180, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setEllipseParameters", 0); /* "SLEPc/RG.pyx":193 * 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(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(13, 193, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/RG.pyx":194 * """ * 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(13, 194, __pyx_L1_error) __pyx_v_val1 = __pyx_t_2; /* "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_vscale); if (unlikely((__pyx_t_2 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(13, 195, __pyx_L1_error) __pyx_v_val2 = __pyx_t_2; /* "SLEPc/RG.pyx":196 * 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 == ((int)-1))) __PYX_ERR(13, 196, __pyx_L1_error) /* "SLEPc/RG.pyx":180 * # * * 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":198 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEllipseParameters", 0); /* "SLEPc/RG.pyx":211 * The vertical scale. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * cdef PetscReal val1 = 0 * cdef PetscReal val2 = 0 */ __pyx_v_sval = 0.0; /* "SLEPc/RG.pyx":212 * """ * 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":213 * 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":214 * 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 == ((int)-1))) __PYX_ERR(13, 214, __pyx_L1_error) /* "SLEPc/RG.pyx":215 * 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(13, 215, __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(13, 215, __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(13, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 215, __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":198 * 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":217 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 1); __PYX_ERR(13, 217, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 2); __PYX_ERR(13, 217, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 3); __PYX_ERR(13, 217, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIntervalEndpoints") < 0)) __PYX_ERR(13, 217, __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(13, 217, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setIntervalEndpoints", 0); /* "SLEPc/RG.pyx":232 * 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(13, 232, __pyx_L1_error) __pyx_v_va = __pyx_t_1; /* "SLEPc/RG.pyx":233 * """ * 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(13, 233, __pyx_L1_error) __pyx_v_vb = __pyx_t_1; /* "SLEPc/RG.pyx":234 * 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(13, 234, __pyx_L1_error) __pyx_v_vc = __pyx_t_1; /* "SLEPc/RG.pyx":235 * 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(13, 235, __pyx_L1_error) __pyx_v_vd = __pyx_t_1; /* "SLEPc/RG.pyx":236 * 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 == ((int)-1))) __PYX_ERR(13, 236, __pyx_L1_error) /* "SLEPc/RG.pyx":217 * 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":238 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIntervalEndpoints", 0); /* "SLEPc/RG.pyx":253 * 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":254 * """ * cdef PetscReal va = 0 * cdef PetscReal vb = 0 # <<<<<<<<<<<<<< * cdef PetscReal vc = 0 * cdef PetscReal vd = 0 */ __pyx_v_vb = 0.0; /* "SLEPc/RG.pyx":255 * 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":256 * 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":257 * 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 == ((int)-1))) __PYX_ERR(13, 257, __pyx_L1_error) /* "SLEPc/RG.pyx":258 * 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(13, 258, __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(13, 258, __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(13, 258, __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(13, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 258, __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":238 * 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":237 * 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":238 * * def __cinit__(self): * self.obj = &self.eps # <<<<<<<<<<<<<< * self.eps = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->eps)); /* "SLEPc/EPS.pyx":239 * def __cinit__(self): * self.obj = &self.eps * self.eps = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->eps = NULL; /* "SLEPc/EPS.pyx":237 * 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":241 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 241, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 241, __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(14, 241, __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/EPS.pyx":251 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( EPSView(self.eps, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/EPS.pyx":252 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( EPSView(self.eps, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSView(__pyx_v_self->eps, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 252, __pyx_L1_error) /* "SLEPc/EPS.pyx":241 * 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":254 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/EPS.pyx":258 * 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 == ((int)-1))) __PYX_ERR(14, 258, __pyx_L1_error) /* "SLEPc/EPS.pyx":259 * """ * CHKERR( EPSDestroy(&self.eps) ) * self.eps = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->eps = NULL; /* "SLEPc/EPS.pyx":260 * 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":254 * 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":262 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/EPS.pyx":266 * 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 == ((int)-1))) __PYX_ERR(14, 266, __pyx_L1_error) /* "SLEPc/EPS.pyx":262 * 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":268 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 268, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 268, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/EPS.pyx":278 * 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(14, 278, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/EPS.pyx":279 * """ * 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":280 * 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 == ((int)-1))) __PYX_ERR(14, 280, __pyx_L1_error) /* "SLEPc/EPS.pyx":281 * cdef SlepcEPS neweps = NULL * CHKERR( EPSCreate(ccomm, &neweps) ) * SlepcCLEAR(self.obj); self.eps = neweps # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->eps = __pyx_v_neweps; /* "SLEPc/EPS.pyx":282 * 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":268 * 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":284 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 284, __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(14, 284, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_eps_type); /* "SLEPc/EPS.pyx":302 * 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":303 * """ * 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(14, 303, __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":304 * 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 == ((int)-1))) __PYX_ERR(14, 304, __pyx_L1_error) /* "SLEPc/EPS.pyx":284 * 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":306 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/EPS.pyx":315 * 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":316 * """ * 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 == ((int)-1))) __PYX_ERR(14, 316, __pyx_L1_error) /* "SLEPc/EPS.pyx":317 * 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(14, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":306 * 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":319 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/EPS.pyx":329 * 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":330 * """ * 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 == ((int)-1))) __PYX_ERR(14, 330, __pyx_L1_error) /* "SLEPc/EPS.pyx":331 * 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(14, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":319 * 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":333 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 333, __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, 333, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/EPS.pyx":356 * E2.setOptionsPrefix("eig2_") * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( EPSSetOptionsPrefix(self.eps, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/EPS.pyx":357 * """ * 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(14, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":358 * 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 == ((int)-1))) __PYX_ERR(14, 358, __pyx_L1_error) /* "SLEPc/EPS.pyx":333 * 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":360 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 360, __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, 360, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/EPS.pyx":370 * 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":371 * """ * 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(14, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":372 * 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 == ((int)-1))) __PYX_ERR(14, 372, __pyx_L1_error) /* "SLEPc/EPS.pyx":360 * 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":374 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/EPS.pyx":385 * option. * """ * CHKERR( EPSSetFromOptions(self.eps) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetFromOptions(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 385, __pyx_L1_error) /* "SLEPc/EPS.pyx":374 * 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":389 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getProblemType", 0); /* "SLEPc/EPS.pyx":398 * 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":399 * """ * 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 == ((int)-1))) __PYX_ERR(14, 399, __pyx_L1_error) /* "SLEPc/EPS.pyx":400 * 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(14, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":389 * # * * 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":402 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 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_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(14, 402, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setProblemType", 0); /* "SLEPc/EPS.pyx":427 * 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(14, 427, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":428 * """ * 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 == ((int)-1))) __PYX_ERR(14, 428, __pyx_L1_error) /* "SLEPc/EPS.pyx":402 * 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":430 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isGeneralized", 0); /* "SLEPc/EPS.pyx":440 * True if two matrices were set with `setOperators()`. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsGeneralized(self.eps, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":441 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsGeneralized(self.eps, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsGeneralized(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 441, __pyx_L1_error) /* "SLEPc/EPS.pyx":442 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsGeneralized(self.eps, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def isHermitian(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":430 * 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":444 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isHermitian", 0); /* "SLEPc/EPS.pyx":455 * Hermitian. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsHermitian(self.eps, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":456 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsHermitian(self.eps, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsHermitian(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 456, __pyx_L1_error) /* "SLEPc/EPS.pyx":457 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsHermitian(self.eps, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def isPositive(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":444 * return toBool(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":459 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isPositive", 0); /* "SLEPc/EPS.pyx":470 * positive. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSIsPositive(self.eps, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":471 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsPositive(self.eps, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsPositive(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 471, __pyx_L1_error) /* "SLEPc/EPS.pyx":472 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSIsPositive(self.eps, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def getBalance(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":459 * return toBool(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":474 * return toBool(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBalance", 0); /* "SLEPc/EPS.pyx":488 * 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":489 * """ * 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":490 * 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":491 * 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 == ((int)-1))) __PYX_ERR(14, 491, __pyx_L1_error) /* "SLEPc/EPS.pyx":492 * 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(14, 492, __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, 492, __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(14, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 492, __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":474 * return toBool(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":494 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_balance); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iterations); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 494, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(14, 494, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBalance", 0); /* "SLEPc/EPS.pyx":508 * 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":509 * """ * 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":510 * 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":511 * 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(14, 511, __pyx_L1_error) __pyx_v_val = __pyx_t_3; } /* "SLEPc/EPS.pyx":512 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 512, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/EPS.pyx":513 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(14, 513, __pyx_L1_error) __pyx_v_rval = __pyx_t_5; } /* "SLEPc/EPS.pyx":514 * 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 == ((int)-1))) __PYX_ERR(14, 514, __pyx_L1_error) /* "SLEPc/EPS.pyx":494 * 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":516 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getExtraction", 0); /* "SLEPc/EPS.pyx":525 * The method of extraction. * """ * cdef SlepcEPSExtraction val = EPS_RITZ # <<<<<<<<<<<<<< * CHKERR( EPSGetExtraction(self.eps, &val) ) * return val */ __pyx_v_val = EPS_RITZ; /* "SLEPc/EPS.pyx":526 * """ * 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 == ((int)-1))) __PYX_ERR(14, 526, __pyx_L1_error) /* "SLEPc/EPS.pyx":527 * 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(14, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":516 * 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":529 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 529, __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(14, 529, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setExtraction", 0); /* "SLEPc/EPS.pyx":549 * *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(14, 549, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":550 * """ * 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 == ((int)-1))) __PYX_ERR(14, 550, __pyx_L1_error) /* "SLEPc/EPS.pyx":529 * 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":552 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/EPS.pyx":561 * 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":562 * """ * 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 == ((int)-1))) __PYX_ERR(14, 562, __pyx_L1_error) /* "SLEPc/EPS.pyx":563 * 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(14, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":552 * 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":565 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 565, __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(14, 565, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/EPS.pyx":583 * 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(14, 583, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":584 * """ * 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 == ((int)-1))) __PYX_ERR(14, 584, __pyx_L1_error) /* "SLEPc/EPS.pyx":565 * 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":586 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTarget", 0); /* "SLEPc/EPS.pyx":599 * 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":600 * """ * 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 == ((int)-1))) __PYX_ERR(14, 600, __pyx_L1_error) /* "SLEPc/EPS.pyx":601 * 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(14, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":586 * 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":603 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 603, __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(14, 603, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTarget", 0); /* "SLEPc/EPS.pyx":618 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval = asScalar(target) # <<<<<<<<<<<<<< * CHKERR( EPSSetTarget(self.eps, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_target); if (unlikely(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(14, 618, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/EPS.pyx":619 * """ * 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 == ((int)-1))) __PYX_ERR(14, 619, __pyx_L1_error) /* "SLEPc/EPS.pyx":603 * 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":621 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getInterval", 0); /* "SLEPc/EPS.pyx":636 * 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":637 * """ * 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":638 * 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 == ((int)-1))) __PYX_ERR(14, 638, __pyx_L1_error) /* "SLEPc/EPS.pyx":639 * 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(14, 639, __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(14, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 639, __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":621 * 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":641 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inta)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, 1); __PYX_ERR(14, 641, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInterval") < 0)) __PYX_ERR(14, 641, __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(14, 641, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInterval", 0); /* "SLEPc/EPS.pyx":660 * `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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(14, 660, __pyx_L1_error) __pyx_v_rval1 = __pyx_t_1; /* "SLEPc/EPS.pyx":661 * """ * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(14, 661, __pyx_L1_error) __pyx_v_rval2 = __pyx_t_1; /* "SLEPc/EPS.pyx":662 * 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 == ((int)-1))) __PYX_ERR(14, 662, __pyx_L1_error) /* "SLEPc/EPS.pyx":641 * 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":666 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/EPS.pyx":678 * 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":679 * """ * 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":680 * 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 == ((int)-1))) __PYX_ERR(14, 680, __pyx_L1_error) /* "SLEPc/EPS.pyx":681 * 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(14, 681, __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, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 681, __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":666 * # * * 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":683 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 683, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 683, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/EPS.pyx":700 * 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":701 * """ * 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":702 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(14, 702, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/EPS.pyx":703 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 703, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/EPS.pyx":704 * 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 getTwoSided(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 == ((int)-1))) __PYX_ERR(14, 704, __pyx_L1_error) /* "SLEPc/EPS.pyx":683 * 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":706 * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) * * def getTwoSided(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether a two-sided variant */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_56getTwoSided[] = "EPS.getTwoSided(self)\n\n Returns the flag indicating whether a two-sided variant\n of the algorithm is being used or not.\n\n Returns\n -------\n twosided: bool\n Whether the two-sided variant is to be used or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTwoSided (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTwoSided", 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, "getTwoSided", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_56getTwoSided(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_56getTwoSided(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTwoSided", 0); /* "SLEPc/EPS.pyx":716 * Whether the two-sided variant is to be used or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSGetTwoSided(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":717 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTwoSided(self.eps, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTwoSided(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 717, __pyx_L1_error) /* "SLEPc/EPS.pyx":718 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSGetTwoSided(self.eps, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTwoSided(self, twosided): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":706 * CHKERR( EPSSetTolerances(self.eps, rval, ival) ) * * def getTwoSided(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether a two-sided variant */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":720 * return tval * * def setTwoSided(self, twosided): # <<<<<<<<<<<<<< * """ * Sets the solver to use a two-sided variant so that left */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_58setTwoSided[] = "EPS.setTwoSided(self, twosided)\n\n Sets the solver to use a two-sided variant so that left\n eigenvectors are also computed.\n\n Parameters\n ----------\n twosided: bool\n Whether the two-sided variant is to be used or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_twosided = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTwoSided (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_twosided,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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_twosided)) != 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, "setTwoSided") < 0)) __PYX_ERR(14, 720, __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_twosided = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTwoSided", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 720, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_58setTwoSided(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_twosided); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setTwoSided(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_twosided) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTwoSided", 0); /* "SLEPc/EPS.pyx":730 * Whether the two-sided variant is to be used or not. * """ * cdef PetscBool tval = twosided # <<<<<<<<<<<<<< * CHKERR( EPSSetTwoSided(self.eps, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_twosided)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 730, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/EPS.pyx":731 * """ * cdef PetscBool tval = twosided * CHKERR( EPSSetTwoSided(self.eps, tval) ) # <<<<<<<<<<<<<< * * def getConvergenceTest(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTwoSided(__pyx_v_self->eps, __pyx_v_tval)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(14, 731, __pyx_L1_error) /* "SLEPc/EPS.pyx":720 * return tval * * def setTwoSided(self, twosided): # <<<<<<<<<<<<<< * """ * Sets the solver to use a two-sided variant so that left */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":733 * CHKERR( EPSSetTwoSided(self.eps, tval) ) * * def getConvergenceTest(self): # <<<<<<<<<<<<<< * """ * Return the method used to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_61getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_60getConvergenceTest[] = "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_61getConvergenceTest(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_60getConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self) { EPSConv __pyx_v_conv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergenceTest", 0); /* "SLEPc/EPS.pyx":744 * 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":745 * """ * 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 == ((int)-1))) __PYX_ERR(14, 745, __pyx_L1_error) /* "SLEPc/EPS.pyx":746 * 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(14, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":733 * CHKERR( EPSSetTwoSided(self.eps, tval) ) * * 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":748 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_63setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_62setConvergenceTest[] = "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_63setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_conv = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 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_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(14, 748, __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_62setConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_conv); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setConvergenceTest(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setConvergenceTest", 0); /* "SLEPc/EPS.pyx":759 * 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(14, 759, __pyx_L1_error) __pyx_v_tconv = __pyx_t_1; /* "SLEPc/EPS.pyx":760 * """ * 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 == ((int)-1))) __PYX_ERR(14, 760, __pyx_L1_error) /* "SLEPc/EPS.pyx":748 * 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":762 * 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_65getTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrueResidual[] = "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_65getTrueResidual(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_64getTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrueResidual(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTrueResidual", 0); /* "SLEPc/EPS.pyx":772 * 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":773 * """ * 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 == ((int)-1))) __PYX_ERR(14, 773, __pyx_L1_error) /* "SLEPc/EPS.pyx":774 * 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(14, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":762 * 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":776 * return tval * * def setTrueResidual(self, trueres): # <<<<<<<<<<<<<< * """ * Specifies if the solver must compute the true residual */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrueResidual[] = "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_67setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trueres = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 776, __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(14, 776, __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_66setTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trueres); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrueResidual(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTrueResidual", 0); /* "SLEPc/EPS.pyx":786 * 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(14, 786, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/EPS.pyx":787 * """ * 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 == ((int)-1))) __PYX_ERR(14, 787, __pyx_L1_error) /* "SLEPc/EPS.pyx":776 * 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":789 * 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_69getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_68getTrackAll[] = "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_69getTrackAll(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_68getTrackAll(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getTrackAll(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/EPS.pyx":799 * 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":800 * """ * 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 == ((int)-1))) __PYX_ERR(14, 800, __pyx_L1_error) /* "SLEPc/EPS.pyx":801 * 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(14, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":789 * 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":803 * 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_71setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_70setTrackAll[] = "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_71setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trackall = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 803, __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(14, 803, __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_70setTrackAll(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trackall); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setTrackAll(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/EPS.pyx":813 * 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(14, 813, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/EPS.pyx":814 * """ * 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 == ((int)-1))) __PYX_ERR(14, 814, __pyx_L1_error) /* "SLEPc/EPS.pyx":803 * 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":816 * 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_73getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_72getDimensions[] = "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_73getDimensions(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_72getDimensions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/EPS.pyx":831 * 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":832 * """ * 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":833 * 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":834 * 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 == ((int)-1))) __PYX_ERR(14, 834, __pyx_L1_error) /* "SLEPc/EPS.pyx":835 * 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(14, 835, __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, 835, __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, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 835, __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":816 * 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":837 * 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_75setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_74setDimensions[] = "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_75setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 837, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(14, 837, __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_74setDimensions(((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_74setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/EPS.pyx":871 * 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":872 * """ * 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":873 * 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":874 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 874, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/EPS.pyx":875 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 875, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/EPS.pyx":876 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 876, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/EPS.pyx":877 * 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 == ((int)-1))) __PYX_ERR(14, 877, __pyx_L1_error) /* "SLEPc/EPS.pyx":837 * 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":879 * 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_77getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_76getST[] = "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_77getST(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_76getST(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_76getST(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getST", 0); /* "SLEPc/EPS.pyx":889 * The spectral transformation. * """ * cdef ST st = ST() # <<<<<<<<<<<<<< * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":890 * """ * 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 == ((int)-1))) __PYX_ERR(14, 890, __pyx_L1_error) /* "SLEPc/EPS.pyx":891 * cdef ST st = ST() * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) # <<<<<<<<<<<<<< * return st * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj)); /* "SLEPc/EPS.pyx":892 * CHKERR( EPSGetST(self.eps, &st.st) ) * PetscINCREF(st.obj) * return st # <<<<<<<<<<<<<< * * def setST(self, ST st): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_st)); __pyx_r = ((PyObject *)__pyx_v_st); goto __pyx_L0; /* "SLEPc/EPS.pyx":879 * 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":894 * return st * * def setST(self, ST st): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_79setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_78setST[] = "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_79setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcSTObject *__pyx_v_st = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 894, __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(14, 894, __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(14, 894, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_78setST(((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_78setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setST", 0); /* "SLEPc/EPS.pyx":904 * 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 == ((int)-1))) __PYX_ERR(14, 904, __pyx_L1_error) /* "SLEPc/EPS.pyx":894 * return st * * def setST(self, ST st): # <<<<<<<<<<<<<< * """ * 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":906 * 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_81getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_80getBV[] = "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_81getBV(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_80getBV(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getBV(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/EPS.pyx":915 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":916 * """ * 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 == ((int)-1))) __PYX_ERR(14, 916, __pyx_L1_error) /* "SLEPc/EPS.pyx":917 * cdef BV bv = BV() * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj)); /* "SLEPc/EPS.pyx":918 * CHKERR( EPSGetBV(self.eps, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/EPS.pyx":906 * 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":920 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_83setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_82setBV[] = "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_83setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 920, __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(14, 920, __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(14, 920, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_82setBV(((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_82setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/EPS.pyx":929 * 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 == ((int)-1))) __PYX_ERR(14, 929, __pyx_L1_error) /* "SLEPc/EPS.pyx":920 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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":931 * 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_85getDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_84getDS[] = "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_85getDS(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_84getDS(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getDS(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDS", 0); /* "SLEPc/EPS.pyx":940 * The direct solver context. * """ * cdef DS ds = DS() # <<<<<<<<<<<<<< * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ds = ((struct PySlepcDSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":941 * """ * 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 == ((int)-1))) __PYX_ERR(14, 941, __pyx_L1_error) /* "SLEPc/EPS.pyx":942 * cdef DS ds = DS() * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) # <<<<<<<<<<<<<< * return ds * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ds->__pyx_base.obj)); /* "SLEPc/EPS.pyx":943 * CHKERR( EPSGetDS(self.eps, &ds.ds) ) * PetscINCREF(ds.obj) * return ds # <<<<<<<<<<<<<< * * def setDS(self, DS ds): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ds)); __pyx_r = ((PyObject *)__pyx_v_ds); goto __pyx_L0; /* "SLEPc/EPS.pyx":931 * 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":945 * return ds * * def setDS(self, DS ds): # <<<<<<<<<<<<<< * """ * Associates a direct solver object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_87setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_86setDS[] = "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_87setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcDSObject *__pyx_v_ds = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 945, __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(14, 945, __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(14, 945, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_86setDS(((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_86setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDS", 0); /* "SLEPc/EPS.pyx":954 * 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 == ((int)-1))) __PYX_ERR(14, 954, __pyx_L1_error) /* "SLEPc/EPS.pyx":945 * return ds * * def setDS(self, DS ds): # <<<<<<<<<<<<<< * """ * 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":956 * 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_89getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_88getRG[] = "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_89getRG(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_88getRG(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getRG(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/EPS.pyx":965 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":966 * """ * 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 == ((int)-1))) __PYX_ERR(14, 966, __pyx_L1_error) /* "SLEPc/EPS.pyx":967 * cdef RG rg = RG() * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj)); /* "SLEPc/EPS.pyx":968 * CHKERR( EPSGetRG(self.eps, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/EPS.pyx":956 * 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":970 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_91setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_90setRG[] = "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_91setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcRGObject *__pyx_v_rg = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 970, __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(14, 970, __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(14, 970, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_90setRG(((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_90setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/EPS.pyx":979 * 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 == ((int)-1))) __PYX_ERR(14, 979, __pyx_L1_error) /* "SLEPc/EPS.pyx":970 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * 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":981 * 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_93getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_92getOperators[] = "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_93getOperators(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_92getOperators(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92getOperators(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/EPS.pyx":992 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":993 * """ * cdef Mat A = Mat() * cdef Mat B = Mat() # <<<<<<<<<<<<<< * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":994 * 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 == ((int)-1))) __PYX_ERR(14, 994, __pyx_L1_error) /* "SLEPc/EPS.pyx":995 * cdef Mat B = Mat() * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * PetscINCREF(B.obj) * return (A, B) */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/EPS.pyx":996 * CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) * PetscINCREF(B.obj) # <<<<<<<<<<<<<< * return (A, B) * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj)); /* "SLEPc/EPS.pyx":997 * PetscINCREF(A.obj) * PetscINCREF(B.obj) * return (A, B) # <<<<<<<<<<<<<< * * def setOperators(self, Mat A, Mat B=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 997, __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":981 * 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":999 * return (A, B) * * def setOperators(self, Mat A, Mat B=None): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_95setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_94setOperators[] = "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_95setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PyPetscMatObject *__pyx_v_B = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 999, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(14, 999, __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(14, 999, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "B", 0))) __PYX_ERR(14, 999, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_94setOperators(((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_94setOperators(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 Mat __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOperators", 0); /* "SLEPc/EPS.pyx":1011 * if not provided, a standard eigenproblem is assumed. * """ * cdef PetscMat Bmat = B.mat if B is not None else NULL # <<<<<<<<<<<<<< * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_B) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_B->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Bmat = __pyx_t_1; /* "SLEPc/EPS.pyx":1012 * """ * cdef PetscMat Bmat = B.mat if B is not None else NULL * CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) ) # <<<<<<<<<<<<<< * * def setDeflationSpace(self, space): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetOperators(__pyx_v_self->eps, __pyx_v_A->mat, __pyx_v_Bmat)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(14, 1012, __pyx_L1_error) /* "SLEPc/EPS.pyx":999 * return (A, B) * * def setOperators(self, Mat A, 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":1014 * 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_97setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_96setDeflationSpace[] = "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_97setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1014, __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(14, 1014, __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_96setDeflationSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96setDeflationSpace(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; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDeflationSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/EPS.pyx":1038 * 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(14, 1038, __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":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) */ __pyx_v_vs = NULL; /* "SLEPc/EPS.pyx":1040 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(14, 1040, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/EPS.pyx":1041 * 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(14, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1042 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(14, 1042, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/EPS.pyx":1043 * 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_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDeflationSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(14, 1043, __pyx_L1_error) /* "SLEPc/EPS.pyx":1014 * 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":1047 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_99setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_98setInitialSpace[] = "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_99setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 1047, __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, 1047, __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_98setInitialSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setInitialSpace(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; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/EPS.pyx":1072 * 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(14, 1072, __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":1073 * """ * 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":1074 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(14, 1074, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/EPS.pyx":1075 * 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(14, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1076 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(14, 1076, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/EPS.pyx":1077 * cdef tmp = allocate(ns*sizeof(Vec),&vs) * for i in range(ns): vs[i] = (space[i]).vec * CHKERR( EPSSetInitialSpace(self.eps, ns, vs) ) # <<<<<<<<<<<<<< * * # --- convergence --- */ __pyx_t_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetInitialSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(14, 1077, __pyx_L1_error) /* "SLEPc/EPS.pyx":1047 * # * * 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":1081 * # --- convergence --- * * def setStoppingTest(self, stopping, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets a function to decide when to stop the outer iteration of the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101setStoppingTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_100setStoppingTest[] = "EPS.setStoppingTest(self, stopping, args=None, kargs=None)\n\n Sets a function to decide when to stop the outer iteration of the eigensolver.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101setStoppingTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stopping = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setStoppingTest (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stopping,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[3] = {0,0,0}; 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stopping)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kargs); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setStoppingTest") < 0)) __PYX_ERR(14, 1081, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stopping = values[0]; __pyx_v_args = values[1]; __pyx_v_kargs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setStoppingTest", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 1081, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setStoppingTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_100setStoppingTest(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_stopping, __pyx_v_args, __pyx_v_kargs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100setStoppingTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_stopping, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setStoppingTest", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/EPS.pyx":1085 * Sets a function to decide when to stop the outer iteration of the eigensolver. * """ * if stopping is not None: # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_1 = (__pyx_v_stopping != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "SLEPc/EPS.pyx":1086 * """ * if stopping is not None: * if args is None: args = () # <<<<<<<<<<<<<< * if kargs is None: kargs = {} * self.set_attr('__stopping__', (stopping, 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/EPS.pyx":1087 * if stopping is not None: * if args is None: args = () * if kargs is None: kargs = {} # <<<<<<<<<<<<<< * self.set_attr('__stopping__', (stopping, args, kargs)) * CHKERR( EPSSetStoppingTestFunction(self.eps, EPS_Stopping, NULL, NULL) ) */ __pyx_t_1 = (__pyx_v_kargs == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/EPS.pyx":1088 * if args is None: args = () * if kargs is None: kargs = {} * self.set_attr('__stopping__', (stopping, args, kargs)) # <<<<<<<<<<<<<< * CHKERR( EPSSetStoppingTestFunction(self.eps, EPS_Stopping, NULL, NULL) ) * else: */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_stopping); __Pyx_GIVEREF(__pyx_v_stopping); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stopping); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); __Pyx_GIVEREF(__pyx_v_kargs); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_kargs); __pyx_t_4 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__stopping__"), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/EPS.pyx":1089 * if kargs is None: kargs = {} * self.set_attr('__stopping__', (stopping, args, kargs)) * CHKERR( EPSSetStoppingTestFunction(self.eps, EPS_Stopping, NULL, NULL) ) # <<<<<<<<<<<<<< * else: * self.set_attr('__stopping__', None) */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetStoppingTestFunction(__pyx_v_self->eps, __pyx_f_8slepc4py_5SLEPc_EPS_Stopping, NULL, NULL)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(14, 1089, __pyx_L1_error) /* "SLEPc/EPS.pyx":1085 * Sets a function to decide when to stop the outer iteration of the eigensolver. * """ * if stopping is not None: # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ goto __pyx_L3; } /* "SLEPc/EPS.pyx":1091 * CHKERR( EPSSetStoppingTestFunction(self.eps, EPS_Stopping, NULL, NULL) ) * else: * self.set_attr('__stopping__', None) # <<<<<<<<<<<<<< * CHKERR( EPSSetStoppingTestFunction(self.eps, EPSStoppingBasic, NULL, NULL) ) * */ /*else*/ { __pyx_t_4 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__stopping__"), Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "SLEPc/EPS.pyx":1092 * else: * self.set_attr('__stopping__', None) * CHKERR( EPSSetStoppingTestFunction(self.eps, EPSStoppingBasic, NULL, NULL) ) # <<<<<<<<<<<<<< * * # --- monitoring --- */ __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetStoppingTestFunction(__pyx_v_self->eps, EPSStoppingBasic, NULL, NULL)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(14, 1092, __pyx_L1_error) } __pyx_L3:; /* "SLEPc/EPS.pyx":1081 * # --- convergence --- * * def setStoppingTest(self, stopping, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Sets a function to decide when to stop the outer iteration of the eigensolver. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setStoppingTest", __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/EPS.pyx":1096 * # --- monitoring --- * * def setMonitor(self, monitor, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Appends a monitor function to the list of monitors. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103setMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_102setMonitor[] = "EPS.setMonitor(self, monitor, args=None, kargs=None)\n\n Appends a monitor function to the list of monitors.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103setMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_monitor = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setMonitor (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_monitor,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[3] = {0,0,0}; 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_monitor)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kargs); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMonitor") < 0)) __PYX_ERR(14, 1096, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_monitor = values[0]; __pyx_v_args = values[1]; __pyx_v_kargs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setMonitor", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 1096, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_102setMonitor(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_monitor, __pyx_v_args, __pyx_v_kargs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102setMonitor(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_monitor, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { PyObject *__pyx_v_monitorlist = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setMonitor", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/EPS.pyx":1100 * Appends a monitor function to the list of monitors. * """ * if monitor is None: return # <<<<<<<<<<<<<< * cdef object monitorlist = self.get_attr('__monitor__') * if monitorlist is None: */ __pyx_t_1 = (__pyx_v_monitor == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "SLEPc/EPS.pyx":1101 * """ * if monitor is None: return * cdef object monitorlist = self.get_attr('__monitor__') # <<<<<<<<<<<<<< * if monitorlist is None: * monitorlist = [] */ __pyx_t_3 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__monitor__")); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_monitorlist = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1102 * if monitor is None: return * cdef object monitorlist = self.get_attr('__monitor__') * if monitorlist is None: # <<<<<<<<<<<<<< * monitorlist = [] * self.set_attr('__monitor__', monitorlist) */ __pyx_t_2 = (__pyx_v_monitorlist == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "SLEPc/EPS.pyx":1103 * cdef object monitorlist = self.get_attr('__monitor__') * if monitorlist is None: * monitorlist = [] # <<<<<<<<<<<<<< * self.set_attr('__monitor__', monitorlist) * CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_monitorlist, __pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1104 * if monitorlist is None: * monitorlist = [] * self.set_attr('__monitor__', monitorlist) # <<<<<<<<<<<<<< * CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) * if args is None: args = () */ __pyx_t_3 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__monitor__"), __pyx_v_monitorlist); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1105 * monitorlist = [] * self.set_attr('__monitor__', monitorlist) * CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSMonitorSet(__pyx_v_self->eps, __pyx_f_8slepc4py_5SLEPc_EPS_Monitor, NULL, NULL)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(14, 1105, __pyx_L1_error) /* "SLEPc/EPS.pyx":1102 * if monitor is None: return * cdef object monitorlist = self.get_attr('__monitor__') * if monitorlist is None: # <<<<<<<<<<<<<< * monitorlist = [] * self.set_attr('__monitor__', monitorlist) */ } /* "SLEPc/EPS.pyx":1106 * self.set_attr('__monitor__', monitorlist) * CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) * if args is None: args = () # <<<<<<<<<<<<<< * if kargs is None: kargs = {} * monitorlist.append((monitor, 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/EPS.pyx":1107 * CHKERR( EPSMonitorSet(self.eps, EPS_Monitor, NULL, NULL) ) * if args is None: args = () * if kargs is None: kargs = {} # <<<<<<<<<<<<<< * monitorlist.append((monitor, args, kargs)) * */ __pyx_t_2 = (__pyx_v_kargs == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_3); __pyx_t_3 = 0; } /* "SLEPc/EPS.pyx":1108 * if args is None: args = () * if kargs is None: kargs = {} * monitorlist.append((monitor, args, kargs)) # <<<<<<<<<<<<<< * * def getMonitor(self): */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 1108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_monitor); __Pyx_GIVEREF(__pyx_v_monitor); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_monitor); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); __Pyx_GIVEREF(__pyx_v_kargs); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_kargs); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_monitorlist, __pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(14, 1108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":1096 * # --- monitoring --- * * def setMonitor(self, monitor, args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Appends a monitor function to the list of monitors. */ /* 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.setMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_monitorlist); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1110 * monitorlist.append((monitor, args, kargs)) * * def getMonitor(self): # <<<<<<<<<<<<<< * """ * Gets the list of monitor functions. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_104getMonitor[] = "EPS.getMonitor(self)\n\n Gets the list of monitor functions.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getMonitor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getMonitor", 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, "getMonitor", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_104getMonitor(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getMonitor(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getMonitor", 0); /* "SLEPc/EPS.pyx":1114 * Gets the list of monitor functions. * """ * return self.get_attr('__monitor__') # <<<<<<<<<<<<<< * * def cancelMonitor(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__monitor__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1110 * monitorlist.append((monitor, args, kargs)) * * def getMonitor(self): # <<<<<<<<<<<<<< * """ * Gets the list of monitor functions. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1116 * return self.get_attr('__monitor__') * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an EPS object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_106cancelMonitor[] = "EPS.cancelMonitor(self)\n\n Clears all monitors for an EPS object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107cancelMonitor(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_106cancelMonitor(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106cancelMonitor(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/EPS.pyx":1120 * Clears all monitors for an EPS object. * """ * CHKERR( EPSMonitorCancel(self.eps) ) # <<<<<<<<<<<<<< * self.set_attr('__monitor__', None) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSMonitorCancel(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 1120, __pyx_L1_error) /* "SLEPc/EPS.pyx":1121 * """ * CHKERR( EPSMonitorCancel(self.eps) ) * self.set_attr('__monitor__', None) # <<<<<<<<<<<<<< * * # */ __pyx_t_2 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__monitor__"), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/EPS.pyx":1116 * return self.get_attr('__monitor__') * * 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_XDECREF(__pyx_t_2); __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":1125 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_109setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_108setUp[] = "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_109setUp(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_108setUp(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108setUp(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/EPS.pyx":1136 * 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 == ((int)-1))) __PYX_ERR(14, 1136, __pyx_L1_error) /* "SLEPc/EPS.pyx":1125 * # * * 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":1138 * CHKERR( EPSSetUp(self.eps) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_110solve[] = "EPS.solve(self)\n\n Solves the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111solve(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_110solve(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110solve(struct PySlepcEPSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/EPS.pyx":1142 * 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 == ((int)-1))) __PYX_ERR(14, 1142, __pyx_L1_error) /* "SLEPc/EPS.pyx":1138 * 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":1144 * 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_113getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_112getIterationNumber[] = "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_113getIterationNumber(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_112getIterationNumber(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getIterationNumber(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/EPS.pyx":1155 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetIterationNumber(self.eps, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/EPS.pyx":1156 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1156, __pyx_L1_error) /* "SLEPc/EPS.pyx":1157 * 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(14, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1144 * 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":1159 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_115getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_114getConvergedReason[] = "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_115getConvergedReason(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_114getConvergedReason(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getConvergedReason(struct PySlepcEPSObject *__pyx_v_self) { EPSConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/EPS.pyx":1169 * converged. * """ * cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( EPSGetConvergedReason(self.eps, &val) ) * return val */ __pyx_v_val = EPS_CONVERGED_ITERATING; /* "SLEPc/EPS.pyx":1170 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1170, __pyx_L1_error) /* "SLEPc/EPS.pyx":1171 * 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(14, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1159 * 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":1173 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_117getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_116getConverged[] = "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_117getConverged(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_116getConverged(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getConverged(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/EPS.pyx":1186 * 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":1187 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1187, __pyx_L1_error) /* "SLEPc/EPS.pyx":1188 * 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(14, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1173 * 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":1190 * 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_119getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_118getEigenvalue[] = "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_119getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1190, __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, 1190, __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(14, 1190, __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_118getEigenvalue(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118getEigenvalue(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEigenvalue", 0); /* "SLEPc/EPS.pyx":1211 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) */ __pyx_v_sval1 = 0.0; /* "SLEPc/EPS.pyx":1212 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) * return toComplex(sval1, sval2) */ __pyx_v_sval2 = 0.0; /* "SLEPc/EPS.pyx":1213 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) # <<<<<<<<<<<<<< * return toComplex(sval1, 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 == ((int)-1))) __PYX_ERR(14, 1213, __pyx_L1_error) /* "SLEPc/EPS.pyx":1214 * cdef PetscScalar sval2 = 0 * CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) ) * return toComplex(sval1, sval2) # <<<<<<<<<<<<<< * * def getEigenvector(self, int i, Vec Vr, Vec Vi=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toComplex(__pyx_v_sval1, __pyx_v_sval2); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1190 * 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_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":1216 * return toComplex(sval1, sval2) * * def getEigenvector(self, int i, Vec Vr, Vec Vi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th eigenvector as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_121getEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_120getEigenvector[] = "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_121getEigenvector(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Vr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getEigenvector", 0, 2, 3, 1); __PYX_ERR(14, 1216, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 1216, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(14, 1216, __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(14, 1216, __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(14, 1216, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(14, 1216, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_120getEigenvector(((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_120getEigenvector(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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEigenvector", 0); /* "SLEPc/EPS.pyx":1236 * `setWhichEigenpairs()`. * """ * cdef PetscVec vecr = Vr.vec # <<<<<<<<<<<<<< * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) */ __pyx_t_1 = __pyx_v_Vr->vec; __pyx_v_vecr = __pyx_t_1; /* "SLEPc/EPS.pyx":1237 * """ * cdef PetscVec vecr = Vr.vec * cdef PetscVec veci = Vi.vec if Vi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/EPS.pyx":1238 * cdef PetscVec vecr = Vr.vec * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) # <<<<<<<<<<<<<< * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenvector(__pyx_v_self->eps, __pyx_v_i, __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(14, 1238, __pyx_L1_error) /* "SLEPc/EPS.pyx":1216 * return toComplex(sval1, sval2) * * def getEigenvector(self, int i, Vec Vr, 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":1240 * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th left eigenvector as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123getLeftEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_122getLeftEigenvector[] = "EPS.getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)\n\n Gets the i-th left eigenvector as computed by `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Wr: Vec\n Placeholder for the returned eigenvector (real part).\n Wi: 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()`). Eigensolutions are indexed\n according to the ordering criterion established with\n `setWhichEigenpairs()`.\n\n Left eigenvectors are available only if the twosided flag was set\n with `setTwoSided()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123getLeftEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Wr = 0; struct PyPetscVecObject *__pyx_v_Wi = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLeftEigenvector (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Wr,&__pyx_n_s_Wi,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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Wr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getLeftEigenvector", 0, 2, 3, 1); __PYX_ERR(14, 1240, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Wi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getLeftEigenvector") < 0)) __PYX_ERR(14, 1240, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(14, 1240, __pyx_L3_error) __pyx_v_Wr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Wi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getLeftEigenvector", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 1240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getLeftEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Wr), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "Wr", 0))) __PYX_ERR(14, 1240, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Wi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Wi", 0))) __PYX_ERR(14, 1240, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_122getLeftEigenvector(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Wr, __pyx_v_Wi); /* 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_122getLeftEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Wr, struct PyPetscVecObject *__pyx_v_Wi) { Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLeftEigenvector", 0); /* "SLEPc/EPS.pyx":1263 * with `setTwoSided()`. * """ * cdef PetscVec vecr = Wr.vec # <<<<<<<<<<<<<< * cdef PetscVec veci = Wi.vec if Wi is not None else NULL * CHKERR( EPSGetLeftEigenvector(self.eps, i, vecr, veci) ) */ __pyx_t_1 = __pyx_v_Wr->vec; __pyx_v_vecr = __pyx_t_1; /* "SLEPc/EPS.pyx":1264 * """ * cdef PetscVec vecr = Wr.vec * cdef PetscVec veci = Wi.vec if Wi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetLeftEigenvector(self.eps, i, vecr, veci) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_Wi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Wi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/EPS.pyx":1265 * cdef PetscVec vecr = Wr.vec * cdef PetscVec veci = Wi.vec if Wi is not None else NULL * CHKERR( EPSGetLeftEigenvector(self.eps, i, vecr, veci) ) # <<<<<<<<<<<<<< * * def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetLeftEigenvector(__pyx_v_self->eps, __pyx_v_i, __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(14, 1265, __pyx_L1_error) /* "SLEPc/EPS.pyx":1240 * CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) ) * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th left 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.getLeftEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/EPS.pyx":1267 * CHKERR( EPSGetLeftEigenvector(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_125getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_124getEigenpair[] = "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_125getEigenpair(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 1267, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 1267, __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(14, 1267, __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(14, 1267, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(14, 1267, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_124getEigenpair(((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_124getEigenpair(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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/EPS.pyx":1294 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/EPS.pyx":1295 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/EPS.pyx":1296 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vr) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vr->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_vecr = __pyx_t_1; /* "SLEPc/EPS.pyx":1297 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/EPS.pyx":1298 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return toComplex(sval1, sval2) * */ __pyx_t_3 = __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_3 == ((int)-1))) __PYX_ERR(14, 1298, __pyx_L1_error) /* "SLEPc/EPS.pyx":1299 * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) # <<<<<<<<<<<<<< * * def getInvariantSubspace(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toComplex(__pyx_v_sval1, __pyx_v_sval2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1267 * CHKERR( EPSGetLeftEigenvector(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_4); __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":1301 * return toComplex(sval1, sval2) * * def getInvariantSubspace(self): # <<<<<<<<<<<<<< * """ * Gets an orthonormal basis of the computed invariant subspace. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_127getInvariantSubspace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_126getInvariantSubspace[] = "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_127getInvariantSubspace(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_126getInvariantSubspace(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_126getInvariantSubspace(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; PetscInt __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getInvariantSubspace", 0); /* "SLEPc/EPS.pyx":1319 * 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":1320 * """ * 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":1321 * 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(14, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_subspace = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1322 * 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 == ((int)-1))) __PYX_ERR(14, 1322, __pyx_L1_error) /* "SLEPc/EPS.pyx":1323 * 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":1324 * 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":1325 * 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 == ((int)-1))) __PYX_ERR(14, 1325, __pyx_L1_error) /* "SLEPc/EPS.pyx":1326 * 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 == ((int)-1))) __PYX_ERR(14, 1326, __pyx_L1_error) /* "SLEPc/EPS.pyx":1327 * 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":1328 * 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(14, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1329 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "SLEPc/EPS.pyx":1330 * 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":1331 * 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 == ((int)-1))) __PYX_ERR(14, 1331, __pyx_L1_error) } /* "SLEPc/EPS.pyx":1332 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1332, __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_7 = __Pyx_PyList_Append(__pyx_v_subspace, ((PyObject *)__pyx_v_V)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(14, 1332, __pyx_L1_error) } /* "SLEPc/EPS.pyx":1333 * 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 == ((int)-1))) __PYX_ERR(14, 1333, __pyx_L1_error) /* "SLEPc/EPS.pyx":1334 * 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":1301 * return toComplex(sval1, 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":1338 * # * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_129getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_128getErrorEstimate[] = "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_129getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1338, __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, 1338, __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(14, 1338, __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_128getErrorEstimate(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getErrorEstimate(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/EPS.pyx":1359 * `computeError()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/EPS.pyx":1360 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1360, __pyx_L1_error) /* "SLEPc/EPS.pyx":1361 * 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(14, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1338 * # * * 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":1363 * 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_131computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_130computeError[] = "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_131computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 1363, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 1363, __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, 1363, __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_130computeError(((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_130computeError(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/EPS.pyx":1387 * ``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":1388 * """ * 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":1389 * 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(14, 1389, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/EPS.pyx":1390 * 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 == ((int)-1))) __PYX_ERR(14, 1390, __pyx_L1_error) /* "SLEPc/EPS.pyx":1391 * 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(14, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1363 * 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":1393 * 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_133errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_132errorView[] = "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_133errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 1393, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 1393, __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(14, 1393, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_132errorView(((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_132errorView(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; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/EPS.pyx":1414 * * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) */ __pyx_v_et = EPS_ERROR_RELATIVE; /* "SLEPc/EPS.pyx":1415 * """ * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( EPSErrorView(self.eps, et, 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(14, 1415, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/EPS.pyx":1416 * cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( EPSErrorView(self.eps, et, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/EPS.pyx":1417 * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( EPSErrorView(self.eps, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSErrorView(__pyx_v_self->eps, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(14, 1417, __pyx_L1_error) /* "SLEPc/EPS.pyx":1393 * 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":1421 * # * * def setPowerShiftType(self, shift): # <<<<<<<<<<<<<< * """ * Sets the type of shifts used during the power iteration. This */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_135setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_134setPowerShiftType[] = "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_135setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shift = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1421, __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(14, 1421, __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_134setPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_shift); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setPowerShiftType(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setPowerShiftType", 0); /* "SLEPc/EPS.pyx":1447 * 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(14, 1447, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1448 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1448, __pyx_L1_error) /* "SLEPc/EPS.pyx":1421 * # * * 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":1450 * 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_137getPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_136getPowerShiftType[] = "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_137getPowerShiftType(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_136getPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self) { EPSPowerShiftType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getPowerShiftType", 0); /* "SLEPc/EPS.pyx":1459 * 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":1460 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1460, __pyx_L1_error) /* "SLEPc/EPS.pyx":1461 * 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(14, 1461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1450 * 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":1463 * return val * * def setArnoldiDelayed(self, delayed): # <<<<<<<<<<<<<< * """ * Activates or deactivates delayed reorthogonalization in the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_139setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_138setArnoldiDelayed[] = "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_139setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_delayed = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1463, __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(14, 1463, __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_138setArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_delayed); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setArnoldiDelayed", 0); /* "SLEPc/EPS.pyx":1483 * algorithm. * """ * cdef PetscBool val = asBool(delayed) # <<<<<<<<<<<<<< * CHKERR( EPSArnoldiSetDelayed(self.eps, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_delayed); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(14, 1483, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1484 * """ * cdef PetscBool val = asBool(delayed) * 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 == ((int)-1))) __PYX_ERR(14, 1484, __pyx_L1_error) /* "SLEPc/EPS.pyx":1463 * 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":1486 * 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_141getArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_140getArnoldiDelayed[] = "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_141getArnoldiDelayed(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_140getArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getArnoldiDelayed", 0); /* "SLEPc/EPS.pyx":1496 * True if delayed reorthogonalization is to be used. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1497 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSArnoldiGetDelayed(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 1497, __pyx_L1_error) /* "SLEPc/EPS.pyx":1498 * cdef PetscBool tval = PETSC_FALSE * CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def setLanczosReorthogType(self, reorthog): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1486 * 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":1500 * return toBool(tval) * * def setLanczosReorthogType(self, reorthog): # <<<<<<<<<<<<<< * """ * Sets the type of reorthogonalization used during the Lanczos */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_143setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_142setLanczosReorthogType[] = "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_143setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reorthog = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1500, __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(14, 1500, __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_142setLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_reorthog); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setLanczosReorthogType(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLanczosReorthogType", 0); /* "SLEPc/EPS.pyx":1515 * `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(14, 1515, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1516 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1516, __pyx_L1_error) /* "SLEPc/EPS.pyx":1500 * return toBool(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":1518 * 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_145getLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_144getLanczosReorthogType[] = "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_145getLanczosReorthogType(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_144getLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self) { EPSLanczosReorthogType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLanczosReorthogType", 0); /* "SLEPc/EPS.pyx":1529 * """ * cdef SlepcEPSLanczosReorthogType val = \ * EPS_LANCZOS_REORTHOG_LOCAL # <<<<<<<<<<<<<< * CHKERR( EPSLanczosGetReorthog(self.eps, &val) ) * return val */ __pyx_v_val = EPS_LANCZOS_REORTHOG_LOCAL; /* "SLEPc/EPS.pyx":1530 * 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 == ((int)-1))) __PYX_ERR(14, 1530, __pyx_L1_error) /* "SLEPc/EPS.pyx":1531 * 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(14, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1518 * 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":1535 * # * * def setKrylovSchurRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the Krylov-Schur method, in */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurRestart[] = "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_147setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_keep = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1535, __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(14, 1535, __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_146setKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_keep); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurRestart(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurRestart", 0); /* "SLEPc/EPS.pyx":1550 * 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(14, 1550, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1551 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1551, __pyx_L1_error) /* "SLEPc/EPS.pyx":1535 * # * * 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":1553 * 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_149getKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurRestart[] = "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_149getKrylovSchurRestart(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_148getKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurRestart", 0); /* "SLEPc/EPS.pyx":1562 * 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":1563 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1563, __pyx_L1_error) /* "SLEPc/EPS.pyx":1564 * 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(14, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1553 * 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":1566 * return val * * def setKrylovSchurLocking(self, lock): # <<<<<<<<<<<<<< * """ * Choose between locking and non-locking variants of the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurLocking[] = "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_151setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lock = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1566, __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(14, 1566, __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_150setKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_lock); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurLocking(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurLocking", 0); /* "SLEPc/EPS.pyx":1583 * 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(14, 1583, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1584 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1584, __pyx_L1_error) /* "SLEPc/EPS.pyx":1566 * 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":1586 * 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_153getKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurLocking[] = "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_153getKrylovSchurLocking(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_152getKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurLocking", 0); /* "SLEPc/EPS.pyx":1595 * The locking flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1596 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1596, __pyx_L1_error) /* "SLEPc/EPS.pyx":1597 * 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(14, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1586 * 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":1599 * 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_155setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_154setKrylovSchurPartitions[] = "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_155setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_npart = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1599, __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(14, 1599, __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_154setKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_npart); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154setKrylovSchurPartitions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurPartitions", 0); /* "SLEPc/EPS.pyx":1617 * 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(14, 1617, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1618 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1618, __pyx_L1_error) /* "SLEPc/EPS.pyx":1599 * 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":1620 * 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_157getKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurPartitions[] = "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_157getKrylovSchurPartitions(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_156getKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurPartitions", 0); /* "SLEPc/EPS.pyx":1630 * The number of partitions. * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) ) * return val */ __pyx_v_val = 0; /* "SLEPc/EPS.pyx":1631 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1631, __pyx_L1_error) /* "SLEPc/EPS.pyx":1632 * 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(14, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1620 * 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":1634 * 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_159setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_158setKrylovSchurDetectZeros[] = "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_159setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_detect = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1634, __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(14, 1634, __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_158setKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_detect); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158setKrylovSchurDetectZeros(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurDetectZeros", 0); /* "SLEPc/EPS.pyx":1654 * 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(14, 1654, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1655 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1655, __pyx_L1_error) /* "SLEPc/EPS.pyx":1634 * 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":1657 * 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_161getKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_160getKrylovSchurDetectZeros[] = "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_161getKrylovSchurDetectZeros(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_160getKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurDetectZeros", 0); /* "SLEPc/EPS.pyx":1666 * The zero detection flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/EPS.pyx":1667 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1667, __pyx_L1_error) /* "SLEPc/EPS.pyx":1668 * 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(14, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1657 * 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":1670 * 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_163setKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurDimensions[] = "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_163setKrylovSchurDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 1670, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(14, 1670, __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_162setKrylovSchurDimensions(((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_162setKrylovSchurDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurDimensions", 0); /* "SLEPc/EPS.pyx":1685 * 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":1686 * """ * 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":1687 * 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":1688 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 1688, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1689 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 1689, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1690 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 1690, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/EPS.pyx":1691 * 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 == ((int)-1))) __PYX_ERR(14, 1691, __pyx_L1_error) /* "SLEPc/EPS.pyx":1670 * 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":1693 * 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_165getKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_164getKrylovSchurDimensions[] = "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_165getKrylovSchurDimensions(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_164getKrylovSchurDimensions(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_164getKrylovSchurDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurDimensions", 0); /* "SLEPc/EPS.pyx":1707 * 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":1708 * """ * 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":1709 * 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":1710 * 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 == ((int)-1))) __PYX_ERR(14, 1710, __pyx_L1_error) /* "SLEPc/EPS.pyx":1711 * 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(14, 1711, __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, 1711, __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, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 1711, __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":1693 * 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":1713 * 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_167getKrylovSchurSubcommInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_166getKrylovSchurSubcommInfo[] = "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_167getKrylovSchurSubcommInfo(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_166getKrylovSchurSubcommInfo(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getKrylovSchurSubcommInfo(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurSubcommInfo", 0); /* "SLEPc/EPS.pyx":1734 * 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":1735 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef Vec vec * vec = Vec() */ __pyx_v_ival2 = 0; /* "SLEPc/EPS.pyx":1737 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_vec = ((struct PyPetscVecObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1738 * 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 == ((int)-1))) __PYX_ERR(14, 1738, __pyx_L1_error) /* "SLEPc/EPS.pyx":1739 * 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(14, 1739, __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(14, 1739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 1739, __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":1713 * 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":1741 * 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_169getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_168getKrylovSchurSubcommPairs[] = "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_169getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_V = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommPairs", 1, 2, 2, 1); __PYX_ERR(14, 1741, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getKrylovSchurSubcommPairs") < 0)) __PYX_ERR(14, 1741, __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(14, 1741, __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(14, 1741, __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, 0, "V", 0))) __PYX_ERR(14, 1741, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_168getKrylovSchurSubcommPairs(((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_168getKrylovSchurSubcommPairs(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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurSubcommPairs", 0); /* "SLEPc/EPS.pyx":1764 * see `getKrylovSchurSubcommInfo()`. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * cdef PetscVec vec = V.vec if V is not None else NULL * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) */ __pyx_v_sval = 0.0; /* "SLEPc/EPS.pyx":1765 * """ * cdef PetscScalar sval = 0 * cdef PetscVec vec = V.vec if V is not None else NULL # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) * return toScalar(sval) */ __pyx_t_2 = (((PyObject *)__pyx_v_V) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_V->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_vec = __pyx_t_1; /* "SLEPc/EPS.pyx":1766 * cdef PetscScalar sval = 0 * cdef PetscVec vec = V.vec if V is not None else NULL * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommPairs(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval), __pyx_v_vec)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(14, 1766, __pyx_L1_error) /* "SLEPc/EPS.pyx":1767 * cdef PetscVec vec = V.vec if V is not None else NULL * CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) ) * return toScalar(sval) # <<<<<<<<<<<<<< * * def getKrylovSchurSubcommMats(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 1767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1741 * 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_4); __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":1769 * return toScalar(sval) * * def getKrylovSchurSubcommMats(self): # <<<<<<<<<<<<<< * """ * Gets the eigenproblem matrices stored internally in the subcommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_171getKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_170getKrylovSchurSubcommMats[] = "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_171getKrylovSchurSubcommMats(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_170getKrylovSchurSubcommMats(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_170getKrylovSchurSubcommMats(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getKrylovSchurSubcommMats", 0); /* "SLEPc/EPS.pyx":1788 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1789 * """ * cdef Mat A = Mat() * cdef Mat B = Mat() # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1790 * 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 == ((int)-1))) __PYX_ERR(14, 1790, __pyx_L1_error) /* "SLEPc/EPS.pyx":1791 * cdef Mat B = Mat() * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * PetscINCREF(B.obj) * return (A, B) */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/EPS.pyx":1792 * CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) ) * PetscINCREF(A.obj) * PetscINCREF(B.obj) # <<<<<<<<<<<<<< * return (A, B) * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj)); /* "SLEPc/EPS.pyx":1793 * PetscINCREF(A.obj) * PetscINCREF(B.obj) * return (A, B) # <<<<<<<<<<<<<< * * def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1793, __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":1769 * 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":1795 * 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): */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_173updateKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_172updateKrylovSchurSubcommMats[] = "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\n subcommunicator 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\n subcommunicator level, and optionally updates the global\n matrices in the parent communicator. The updates are\n 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 `structure` flag is passed to the `PETSc.Mat.axpy()` operations\n to perform the updates.\n\n If `globalup` is True, communication is carried out to\n reconstruct the updated matrices in the parent communicator.\n\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_173updateKrylovSchurSubcommMats(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); /* "SLEPc/EPS.pyx":1796 * * 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): * """ */ values[5] = (PyObject *)((struct PyPetscMatObject *)Py_None); /* "SLEPc/EPS.pyx":1797 * 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 */ 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); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Au); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Bu); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_structure); if (value) { values[6] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(14, 1795, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(14, 1795, __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(14, 1795, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Bu), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "Bu", 0))) __PYX_ERR(14, 1796, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_172updateKrylovSchurSubcommMats(((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); /* "SLEPc/EPS.pyx":1795 * 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): */ /* 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_172updateKrylovSchurSubcommMats(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 Mat __pyx_t_1; int __pyx_t_2; MatStructure __pyx_t_3; PetscBool __pyx_t_4; PetscScalar __pyx_t_5; PetscScalar __pyx_t_6; PetscScalar __pyx_t_7; PetscScalar __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("updateKrylovSchurSubcommMats", 0); /* "SLEPc/EPS.pyx":1839 * * """ * cdef PetscMat Amat = Au.mat if Au is not None else NULL # <<<<<<<<<<<<<< * cdef PetscMat Bmat = Bu.mat if Bu is not None else NULL * cdef PetscMatStructure vstr = matstructure(structure) */ __pyx_t_2 = (((PyObject *)__pyx_v_Au) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Au->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Amat = __pyx_t_1; /* "SLEPc/EPS.pyx":1840 * """ * cdef PetscMat Amat = Au.mat if Au is not None else NULL * cdef PetscMat Bmat = Bu.mat if Bu is not None else NULL # <<<<<<<<<<<<<< * cdef PetscMatStructure vstr = matstructure(structure) * cdef PetscBool tval = globalup */ __pyx_t_2 = (((PyObject *)__pyx_v_Bu) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Bu->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Bmat = __pyx_t_1; /* "SLEPc/EPS.pyx":1841 * cdef PetscMat Amat = Au.mat if Au is not None else NULL * cdef PetscMat Bmat = Bu.mat if Bu is not None else NULL * cdef PetscMatStructure vstr = matstructure(structure) # <<<<<<<<<<<<<< * cdef PetscBool tval = globalup * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_3 == ((MatStructure)((MatStructure)-1L)))) __PYX_ERR(14, 1841, __pyx_L1_error) __pyx_v_vstr = __pyx_t_3; /* "SLEPc/EPS.pyx":1842 * cdef PetscMat Bmat = Bu.mat if Bu is not None else NULL * cdef PetscMatStructure vstr = matstructure(structure) * cdef PetscBool tval = globalup # <<<<<<<<<<<<<< * CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) ) * */ __pyx_t_4 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_globalup)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 1842, __pyx_L1_error) __pyx_v_tval = __pyx_t_4; /* "SLEPc/EPS.pyx":1843 * 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_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == ((PetscScalar)-1)) && PyErr_Occurred())) __PYX_ERR(14, 1843, __pyx_L1_error) __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_6 == ((PetscScalar)-1)) && PyErr_Occurred())) __PYX_ERR(14, 1843, __pyx_L1_error) __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_7 == ((PetscScalar)-1)) && PyErr_Occurred())) __PYX_ERR(14, 1843, __pyx_L1_error) __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_8 == ((PetscScalar)-1)) && PyErr_Occurred())) __PYX_ERR(14, 1843, __pyx_L1_error) __pyx_t_9 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurUpdateSubcommMats(__pyx_v_self->eps, __pyx_t_5, __pyx_t_6, __pyx_v_Amat, __pyx_t_7, __pyx_t_8, __pyx_v_Bmat, __pyx_v_vstr, __pyx_v_tval)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(14, 1843, __pyx_L1_error) /* "SLEPc/EPS.pyx":1795 * 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): */ /* 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":1845 * 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_175setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_174setKrylovSchurSubintervals[] = "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_175setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_subint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1845, __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(14, 1845, __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_174setKrylovSchurSubintervals(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_subint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_174setKrylovSchurSubintervals(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; Py_ssize_t __pyx_t_6; PetscReal __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setKrylovSchurSubintervals", 0); /* "SLEPc/EPS.pyx":1865 * [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":1866 * """ * 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 == ((int)-1))) __PYX_ERR(14, 1866, __pyx_L1_error) /* "SLEPc/EPS.pyx":1867 * 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":1868 * 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":1869 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(14, 1869, __pyx_L1_error) __pyx_v_n = __pyx_t_3; /* "SLEPc/EPS.pyx":1870 * 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":1871 * 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 == ((int)-1))) __PYX_ERR(14, 1871, __pyx_L1_error) /* "SLEPc/EPS.pyx":1872 * 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(14, 1872, __pyx_L1_error) } } #endif /* "SLEPc/EPS.pyx":1873 * 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(14, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_tmp = __pyx_t_4; __pyx_t_4 = 0; /* "SLEPc/EPS.pyx":1874 * 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; __pyx_t_5 = __pyx_t_3; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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(14, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_t_4); if (unlikely(__pyx_t_7 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(14, 1874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_subintarray[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/EPS.pyx":1875 * 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 == ((int)-1))) __PYX_ERR(14, 1875, __pyx_L1_error) /* "SLEPc/EPS.pyx":1845 * 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":1877 * 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_177setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_176setRQCGReset[] = "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_177setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_nrest = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(14, 1877, __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(14, 1877, __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_176setRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nrest); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_176setRQCGReset(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRQCGReset", 0); /* "SLEPc/EPS.pyx":1887 * The number of iterations between resets. * """ * cdef PetscInt val = asInt(nrest) # <<<<<<<<<<<<<< * CHKERR( EPSRQCGSetReset(self.eps, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nrest); if (unlikely(__pyx_t_1 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(14, 1887, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/EPS.pyx":1888 * """ * cdef PetscInt val = asInt(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 == ((int)-1))) __PYX_ERR(14, 1888, __pyx_L1_error) /* "SLEPc/EPS.pyx":1877 * 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":1890 * 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_179getRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3EPS_178getRQCGReset[] = "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_179getRQCGReset(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_178getRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_178getRQCGReset(struct PySlepcEPSObject *__pyx_v_self) { PetscInt __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRQCGReset", 0); /* "SLEPc/EPS.pyx":1899 * The number of iterations between resets. * """ * cdef PetscInt val = 0 # <<<<<<<<<<<<<< * CHKERR( EPSRQCGGetReset(self.eps, &val) ) * return toInt(val) */ __pyx_v_val = 0; /* "SLEPc/EPS.pyx":1900 * """ * cdef PetscInt val = 0 * CHKERR( EPSRQCGGetReset(self.eps, &val) ) # <<<<<<<<<<<<<< * return toInt(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSRQCGGetReset(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 1900, __pyx_L1_error) /* "SLEPc/EPS.pyx":1901 * cdef PetscInt val = 0 * CHKERR( EPSRQCGGetReset(self.eps, &val) ) * return toInt(val) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/EPS.pyx":1890 * 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":1905 * # * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1906 * 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(14, 1906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1906, __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":1905 * # * 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":1907 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1908 * 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(14, 1908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1907 * 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_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":1911 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1912 * 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(14, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1912, __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":1911 * * 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":1913 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1914 * 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(14, 1914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1913 * 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_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":1917 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1918 * 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(14, 1918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1918, __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":1917 * * 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":1919 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1920 * 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(14, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1919 * 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_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":1923 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1924 * 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(14, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1924, __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":1923 * * 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":1925 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1926 * 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(14, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1925 * 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_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":1929 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1930 * 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, 1930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1930, __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, 1930, __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":1929 * * 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":1931 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1932 * 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, 1932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1932, __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, 1932, __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, 1932, __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":1931 * 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":1935 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1936 * 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, 1936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1936, __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, 1936, __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":1935 * * 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":1937 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1938 * 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(14, 1938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 1938, __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, 1938, __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, 1938, __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":1937 * 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":1941 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1942 * 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(14, 1942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1942, __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":1941 * * 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":1943 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1944 * 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(14, 1944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1943 * 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_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":1947 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/EPS.pyx":1948 * 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, 1948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1948, __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":1947 * * 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":1949 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/EPS.pyx":1950 * 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, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":1949 * 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_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":92 * 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":93 * * def __cinit__(self): * self.obj = &self.svd # <<<<<<<<<<<<<< * self.svd = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->svd)); /* "SLEPc/SVD.pyx":94 * def __cinit__(self): * self.obj = &self.svd * self.svd = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->svd = NULL; /* "SLEPc/SVD.pyx":92 * 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":96 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 96, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 96, __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(15, 96, __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/SVD.pyx":106 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( SVDView(self.svd, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/SVD.pyx":107 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( SVDView(self.svd, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDView(__pyx_v_self->svd, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 107, __pyx_L1_error) /* "SLEPc/SVD.pyx":96 * 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":109 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/SVD.pyx":113 * 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 == ((int)-1))) __PYX_ERR(15, 113, __pyx_L1_error) /* "SLEPc/SVD.pyx":114 * """ * CHKERR( SVDDestroy(&self.svd) ) * self.svd = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->svd = NULL; /* "SLEPc/SVD.pyx":115 * 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":109 * 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":117 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/SVD.pyx":121 * 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 == ((int)-1))) __PYX_ERR(15, 121, __pyx_L1_error) /* "SLEPc/SVD.pyx":117 * 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":123 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 123, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 123, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/SVD.pyx":133 * 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(15, 133, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/SVD.pyx":134 * """ * 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":135 * 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 == ((int)-1))) __PYX_ERR(15, 135, __pyx_L1_error) /* "SLEPc/SVD.pyx":136 * cdef SlepcSVD newsvd = NULL * CHKERR( SVDCreate(ccomm, &newsvd) ) * SlepcCLEAR(self.obj); self.svd = newsvd # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->svd = __pyx_v_newsvd; /* "SLEPc/SVD.pyx":137 * 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":123 * 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":139 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 139, __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(15, 139, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_svd_type); /* "SLEPc/SVD.pyx":157 * methods. * """ * cdef SlepcSVDType cval = NULL # <<<<<<<<<<<<<< * svd_type = str2bytes(svd_type, &cval) * CHKERR( SVDSetType(self.svd, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/SVD.pyx":158 * """ * 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(15, 158, __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":159 * 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 == ((int)-1))) __PYX_ERR(15, 159, __pyx_L1_error) /* "SLEPc/SVD.pyx":139 * 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":161 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/SVD.pyx":170 * 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":171 * """ * 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 == ((int)-1))) __PYX_ERR(15, 171, __pyx_L1_error) /* "SLEPc/SVD.pyx":172 * 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(15, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":161 * 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":174 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/SVD.pyx":184 * 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":185 * """ * 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 == ((int)-1))) __PYX_ERR(15, 185, __pyx_L1_error) /* "SLEPc/SVD.pyx":186 * 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(15, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":174 * 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":188 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 188, __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, 188, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/SVD.pyx":211 * S2.setOptionsPrefix("svd2_") * """ * cdef const_char *cval = NULL # <<<<<<<<<<<<<< * prefix = str2bytes(prefix, &cval) * CHKERR( SVDSetOptionsPrefix(self.svd, cval) ) */ __pyx_v_cval = NULL; /* "SLEPc/SVD.pyx":212 * """ * 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(15, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":213 * 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 == ((int)-1))) __PYX_ERR(15, 213, __pyx_L1_error) /* "SLEPc/SVD.pyx":188 * 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":215 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 215, __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, 215, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/SVD.pyx":225 * 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":226 * """ * 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(15, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":227 * 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 == ((int)-1))) __PYX_ERR(15, 227, __pyx_L1_error) /* "SLEPc/SVD.pyx":215 * 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":229 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/SVD.pyx":240 * option. * """ * CHKERR( SVDSetFromOptions(self.svd) ) # <<<<<<<<<<<<<< * * def getProblemType(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetFromOptions(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 240, __pyx_L1_error) /* "SLEPc/SVD.pyx":229 * 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":242 * CHKERR( SVDSetFromOptions(self.svd) ) * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_23getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_22getProblemType[] = "SVD.getProblemType(self)\n\n Gets the problem type from the SVD object.\n\n Returns\n -------\n problem_type: `SVD.ProblemType` enumerate\n The problem type that was previously set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_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_3SVD_22getProblemType(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_22getProblemType(struct PySlepcSVDObject *__pyx_v_self) { SVDProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getProblemType", 0); /* "SLEPc/SVD.pyx":251 * The problem type that was previously set. * """ * cdef SlepcSVDProblemType val = SVD_STANDARD # <<<<<<<<<<<<<< * CHKERR( SVDGetProblemType(self.svd, &val) ) * return val */ __pyx_v_val = SVD_STANDARD; /* "SLEPc/SVD.pyx":252 * """ * cdef SlepcSVDProblemType val = SVD_STANDARD * CHKERR( SVDGetProblemType(self.svd, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetProblemType(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 252, __pyx_L1_error) /* "SLEPc/SVD.pyx":253 * cdef SlepcSVDProblemType val = SVD_STANDARD * CHKERR( SVDGetProblemType(self.svd, &val) ) * return val # <<<<<<<<<<<<<< * * def setProblemType(self, problem_type): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_SVDProblemType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":242 * CHKERR( SVDSetFromOptions(self.svd) ) * * def getProblemType(self): # <<<<<<<<<<<<<< * """ * Gets the problem type from the SVD object. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":255 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_24setProblemType[] = "SVD.setProblemType(self, problem_type)\n\n Specifies the type of the singular value problem.\n\n Parameters\n ----------\n problem_type: `SVD.ProblemType` enumerate\n The problem type to be set.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_problem_type = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 255, __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, 255, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_24setProblemType(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_problem_type); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setProblemType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_problem_type) { SVDProblemType __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations SVDProblemType __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setProblemType", 0); /* "SLEPc/SVD.pyx":264 * The problem type to be set. * """ * cdef SlepcSVDProblemType val = problem_type # <<<<<<<<<<<<<< * CHKERR( SVDSetProblemType(self.svd, val) ) * */ __pyx_t_1 = ((SVDProblemType)__Pyx_PyInt_As_SVDProblemType(__pyx_v_problem_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 264, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/SVD.pyx":265 * """ * cdef SlepcSVDProblemType val = problem_type * CHKERR( SVDSetProblemType(self.svd, val) ) # <<<<<<<<<<<<<< * * def isGeneralized(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetProblemType(__pyx_v_self->svd, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(15, 265, __pyx_L1_error) /* "SLEPc/SVD.pyx":255 * return val * * def setProblemType(self, problem_type): # <<<<<<<<<<<<<< * """ * Specifies the type of 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.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":267 * CHKERR( SVDSetProblemType(self.svd, val) ) * * def isGeneralized(self): # <<<<<<<<<<<<<< * """ * Tells whether the SVD object corresponds to a generalized */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_27isGeneralized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_26isGeneralized[] = "SVD.isGeneralized(self)\n\n Tells whether the SVD object corresponds to a generalized\n singular value problem.\n\n Returns\n -------\n flag: boolean\n True if two matrices were set with `setOperators()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_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_3SVD_26isGeneralized(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26isGeneralized(struct PySlepcSVDObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isGeneralized", 0); /* "SLEPc/SVD.pyx":277 * True if two matrices were set with `setOperators()`. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( SVDIsGeneralized(self.svd, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":278 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDIsGeneralized(self.svd, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDIsGeneralized(__pyx_v_self->svd, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 278, __pyx_L1_error) /* "SLEPc/SVD.pyx":279 * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDIsGeneralized(self.svd, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":267 * CHKERR( SVDSetProblemType(self.svd, val) ) * * def isGeneralized(self): # <<<<<<<<<<<<<< * """ * Tells whether the SVD object corresponds to a generalized */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.isGeneralized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":283 * # * * def getImplicitTranspose(self): # <<<<<<<<<<<<<< * """ * Gets the mode used to handle the transpose of the matrix */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_29getImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_28getImplicitTranspose[] = "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_29getImplicitTranspose(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_28getImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self) { PetscBool __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getImplicitTranspose", 0); /* "SLEPc/SVD.pyx":293 * How to handle the transpose (implicitly or not). * """ * cdef PetscBool val = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) * return toBool(val) */ __pyx_v_val = PETSC_FALSE; /* "SLEPc/SVD.pyx":294 * """ * cdef PetscBool val = PETSC_FALSE * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) # <<<<<<<<<<<<<< * return toBool(val) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetImplicitTranspose(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 294, __pyx_L1_error) /* "SLEPc/SVD.pyx":295 * cdef PetscBool val = PETSC_FALSE * CHKERR( SVDGetImplicitTranspose(self.svd, &val) ) * return toBool(val) # <<<<<<<<<<<<<< * * def setImplicitTranspose(self, mode): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":283 * # * * 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":297 * return toBool(val) * * def setImplicitTranspose(self, mode): # <<<<<<<<<<<<<< * """ * Indicates how to handle the transpose of the matrix */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_31setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_30setImplicitTranspose[] = "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_31setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 297, __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(15, 297, __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_30setImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_mode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30setImplicitTranspose(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setImplicitTranspose", 0); /* "SLEPc/SVD.pyx":315 * transpose, but handles it implicitly via MatMultTranspose(). * """ * cdef PetscBool val = asBool(mode) # <<<<<<<<<<<<<< * CHKERR( SVDSetImplicitTranspose(self.svd, val) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(15, 315, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/SVD.pyx":316 * """ * cdef PetscBool val = asBool(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 == ((int)-1))) __PYX_ERR(15, 316, __pyx_L1_error) /* "SLEPc/SVD.pyx":297 * return toBool(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":318 * 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_33getWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_32getWhichSingularTriplets[] = "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_33getWhichSingularTriplets(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_32getWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self) { SVDWhich __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getWhichSingularTriplets", 0); /* "SLEPc/SVD.pyx":328 * smallest). * """ * cdef SlepcSVDWhich val = SVD_LARGEST # <<<<<<<<<<<<<< * CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) ) * return val */ __pyx_v_val = SVD_LARGEST; /* "SLEPc/SVD.pyx":329 * """ * 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 == ((int)-1))) __PYX_ERR(15, 329, __pyx_L1_error) /* "SLEPc/SVD.pyx":330 * 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(15, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":318 * 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":332 * return val * * def setWhichSingularTriplets(self, which): # <<<<<<<<<<<<<< * """ * Specifies which singular triplets are to be sought. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_35setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_34setWhichSingularTriplets[] = "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_35setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_which = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 332, __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(15, 332, __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_34setWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_which); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34setWhichSingularTriplets(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setWhichSingularTriplets", 0); /* "SLEPc/SVD.pyx":342 * 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(15, 342, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/SVD.pyx":343 * """ * 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 == ((int)-1))) __PYX_ERR(15, 343, __pyx_L1_error) /* "SLEPc/SVD.pyx":332 * 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":346 * # * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_37getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_36getTolerances[] = "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_37getTolerances(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_36getTolerances(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36getTolerances(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/SVD.pyx":358 * 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":359 * """ * 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":360 * 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 == ((int)-1))) __PYX_ERR(15, 360, __pyx_L1_error) /* "SLEPc/SVD.pyx":361 * 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(15, 361, __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, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 361, __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":346 * # * * 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":363 * 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_39setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_38setTolerances[] = "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_39setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 363, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 363, __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_38setTolerances(((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_38setTolerances(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/SVD.pyx":380 * 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":381 * """ * 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":382 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(15, 382, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/SVD.pyx":383 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(15, 383, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/SVD.pyx":384 * 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 == ((int)-1))) __PYX_ERR(15, 384, __pyx_L1_error) /* "SLEPc/SVD.pyx":363 * 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":386 * 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_41getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_40getDimensions[] = "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_41getDimensions(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_40getDimensions(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40getDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/SVD.pyx":401 * 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":402 * """ * 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":403 * 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":404 * 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 == ((int)-1))) __PYX_ERR(15, 404, __pyx_L1_error) /* "SLEPc/SVD.pyx":405 * 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(15, 405, __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, 405, __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, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 405, __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":386 * 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":407 * 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_43setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_42setDimensions[] = "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_43setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsv); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 407, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(15, 407, __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_42setDimensions(((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_42setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/SVD.pyx":440 * 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":441 * """ * 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":442 * 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":443 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(15, 443, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/SVD.pyx":444 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(15, 444, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/SVD.pyx":445 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(15, 445, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/SVD.pyx":446 * 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 == ((int)-1))) __PYX_ERR(15, 446, __pyx_L1_error) /* "SLEPc/SVD.pyx":407 * 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":448 * 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_45getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_44getBV[] = "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_45getBV(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_44getBV(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_44getBV(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/SVD.pyx":459 * 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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_V = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":460 * """ * cdef BV V = BV() * cdef BV U = BV() # <<<<<<<<<<<<<< * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_U = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":461 * 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 == ((int)-1))) __PYX_ERR(15, 461, __pyx_L1_error) /* "SLEPc/SVD.pyx":462 * cdef BV U = BV() * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) # <<<<<<<<<<<<<< * PetscINCREF(U.obj) * return (V,U) */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_V->__pyx_base.obj)); /* "SLEPc/SVD.pyx":463 * CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) ) * PetscINCREF(V.obj) * PetscINCREF(U.obj) # <<<<<<<<<<<<<< * return (V,U) * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_U->__pyx_base.obj)); /* "SLEPc/SVD.pyx":464 * PetscINCREF(V.obj) * PetscINCREF(U.obj) * return (V,U) # <<<<<<<<<<<<<< * * def setBV(self, BV V,BV U=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 464, __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":448 * 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":466 * return (V,U) * * def setBV(self, BV V,BV U=None): # <<<<<<<<<<<<<< * """ * Associates basis vectors objects to the SVD solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_47setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_46setBV[] = "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_47setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_V = 0; struct PySlepcBVObject *__pyx_v_U = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(15, 466, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(15, 466, __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(15, 466, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "U", 0))) __PYX_ERR(15, 466, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_46setBV(((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_46setBV(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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/SVD.pyx":477 * The basis vectors context for left singular vectors. * """ * cdef SlepcBV VBV = V.bv # <<<<<<<<<<<<<< * cdef SlepcBV UBV = U.bv if U is not None else NULL * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) */ __pyx_t_1 = __pyx_v_V->bv; __pyx_v_VBV = __pyx_t_1; /* "SLEPc/SVD.pyx":478 * """ * cdef SlepcBV VBV = V.bv * cdef SlepcBV UBV = U.bv if U is not None else NULL # <<<<<<<<<<<<<< * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_U) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_U->bv; } else { __pyx_t_1 = ((BV)NULL); } __pyx_v_UBV = __pyx_t_1; /* "SLEPc/SVD.pyx":479 * cdef SlepcBV VBV = V.bv * cdef SlepcBV UBV = U.bv if U is not None else NULL * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) # <<<<<<<<<<<<<< * * def getOperators(self): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetBV(__pyx_v_self->svd, __pyx_v_VBV, __pyx_v_UBV)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(15, 479, __pyx_L1_error) /* "SLEPc/SVD.pyx":466 * return (V,U) * * def setBV(self, BV V,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":481 * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_48getOperators[] = "SVD.getOperators(self)\n\n Gets the matrices associated with the singular value problem.\n\n Returns\n -------\n A: Mat\n The matrix associated with the singular value problem.\n B: Mat\n The second matrix in the case of GSVD.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49getOperators(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_3SVD_48getOperators(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48getOperators(struct PySlepcSVDObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/SVD.pyx":492 * The second matrix in the case of GSVD. * """ * cdef Mat A = Mat() # <<<<<<<<<<<<<< * cdef Mat B = Mat() * CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":493 * """ * cdef Mat A = Mat() * cdef Mat B = Mat() # <<<<<<<<<<<<<< * CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) * PetscINCREF(A.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":494 * cdef Mat A = Mat() * cdef Mat B = Mat() * CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) # <<<<<<<<<<<<<< * PetscINCREF(A.obj) * PetscINCREF(B.obj) */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetOperators(__pyx_v_self->svd, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(15, 494, __pyx_L1_error) /* "SLEPc/SVD.pyx":495 * cdef Mat B = Mat() * CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * PetscINCREF(B.obj) * return (A, B) */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/SVD.pyx":496 * CHKERR( SVDGetOperators(self.svd, &A.mat, &B.mat) ) * PetscINCREF(A.obj) * PetscINCREF(B.obj) # <<<<<<<<<<<<<< * return (A, B) * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj)); /* "SLEPc/SVD.pyx":497 * PetscINCREF(A.obj) * PetscINCREF(B.obj) * return (A, B) # <<<<<<<<<<<<<< * * def setOperators(self, Mat A, Mat B=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 497, __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/SVD.pyx":481 * CHKERR( SVDSetBV(self.svd, VBV, UBV) ) * * def getOperators(self): # <<<<<<<<<<<<<< * """ * Gets the matrices associated with the singular value problem. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("slepc4py.SLEPc.SVD.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/SVD.pyx":499 * return (A, B) * * def setOperators(self, Mat A, Mat B=None): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_50setOperators[] = "SVD.setOperators(self, Mat A, Mat B=None)\n\n Sets the matrices associated with the singular value problem.\n\n Parameters\n ----------\n A: Mat\n The matrix associated with the singular value problem.\n B: Mat, optional\n The second matrix in the case of GSVD; if not provided,\n a usual SVD is assumed.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscMatObject *__pyx_v_A = 0; struct PyPetscMatObject *__pyx_v_B = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(15, 499, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(15, 499, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.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(15, 499, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "B", 0))) __PYX_ERR(15, 499, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_50setOperators(((struct PySlepcSVDObject *)__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_3SVD_50setOperators(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B) { Mat __pyx_v_Bmat; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Mat __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOperators", 0); /* "SLEPc/SVD.pyx":511 * a usual SVD is assumed. * """ * cdef PetscMat Bmat = B.mat if B is not None else NULL # <<<<<<<<<<<<<< * CHKERR( SVDSetOperators(self.svd, A.mat, Bmat) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_B) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_B->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Bmat = __pyx_t_1; /* "SLEPc/SVD.pyx":512 * """ * cdef PetscMat Bmat = B.mat if B is not None else NULL * CHKERR( SVDSetOperators(self.svd, A.mat, Bmat) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetOperators(__pyx_v_self->svd, __pyx_v_A->mat, __pyx_v_Bmat)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(15, 512, __pyx_L1_error) /* "SLEPc/SVD.pyx":499 * return (A, B) * * def setOperators(self, Mat A, Mat B=None): # <<<<<<<<<<<<<< * """ * Sets the matrices 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.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":516 * # * * def setInitialSpaces(self, spaceright=None, spaceleft=None): # <<<<<<<<<<<<<< * """ * Sets the initial spaces from which the SVD solver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53setInitialSpaces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_52setInitialSpaces[] = "SVD.setInitialSpaces(self, spaceright=None, spaceleft=None)\n\n Sets the initial spaces from which the SVD solver starts to\n iterate.\n\n Parameters\n ----------\n spaceright: sequence of Vec\n The right initial space.\n spaceleft: sequence of Vec\n The left initial space.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53setInitialSpaces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_spaceright = 0; PyObject *__pyx_v_spaceleft = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setInitialSpaces (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_spaceright,&__pyx_n_s_spaceleft,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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_spaceright); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_spaceleft); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpaces") < 0)) __PYX_ERR(15, 516, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_spaceright = values[0]; __pyx_v_spaceleft = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setInitialSpaces", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 516, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setInitialSpaces", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_52setInitialSpaces(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_spaceright, __pyx_v_spaceleft); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52setInitialSpaces(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_spaceright, PyObject *__pyx_v_spaceleft) { Py_ssize_t __pyx_v_i; Vec *__pyx_v_isr; Py_ssize_t __pyx_v_nr; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; Vec *__pyx_v_isl; Py_ssize_t __pyx_v_nl; 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; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInitialSpaces", 0); __Pyx_INCREF(__pyx_v_spaceright); __Pyx_INCREF(__pyx_v_spaceleft); /* "SLEPc/SVD.pyx":528 * The left initial space. * """ * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * if spaceright is None: spaceright = [] * elif isinstance(spaceright, Vec): spaceright = [spaceright] */ __pyx_v_i = 0; /* "SLEPc/SVD.pyx":529 * """ * cdef Py_ssize_t i = 0 * if spaceright is None: spaceright = [] # <<<<<<<<<<<<<< * elif isinstance(spaceright, Vec): spaceright = [spaceright] * cdef PetscVec *isr = NULL */ __pyx_t_1 = (__pyx_v_spaceright == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_spaceright, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "SLEPc/SVD.pyx":530 * cdef Py_ssize_t i = 0 * if spaceright is None: spaceright = [] * elif isinstance(spaceright, Vec): spaceright = [spaceright] # <<<<<<<<<<<<<< * cdef PetscVec *isr = NULL * cdef Py_ssize_t nr = len(spaceright) */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_spaceright, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_spaceright); __Pyx_GIVEREF(__pyx_v_spaceright); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_spaceright); __Pyx_DECREF_SET(__pyx_v_spaceright, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "SLEPc/SVD.pyx":531 * if spaceright is None: spaceright = [] * elif isinstance(spaceright, Vec): spaceright = [spaceright] * cdef PetscVec *isr = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t nr = len(spaceright) * cdef tmp1 = allocate(nr*sizeof(Vec),&isr) */ __pyx_v_isr = NULL; /* "SLEPc/SVD.pyx":532 * elif isinstance(spaceright, Vec): spaceright = [spaceright] * cdef PetscVec *isr = NULL * cdef Py_ssize_t nr = len(spaceright) # <<<<<<<<<<<<<< * cdef tmp1 = allocate(nr*sizeof(Vec),&isr) * for i in range(nr): isr[i] = (spaceright[i]).vec */ __pyx_t_4 = PyObject_Length(__pyx_v_spaceright); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(15, 532, __pyx_L1_error) __pyx_v_nr = __pyx_t_4; /* "SLEPc/SVD.pyx":533 * cdef PetscVec *isr = NULL * cdef Py_ssize_t nr = len(spaceright) * cdef tmp1 = allocate(nr*sizeof(Vec),&isr) # <<<<<<<<<<<<<< * for i in range(nr): isr[i] = (spaceright[i]).vec * if spaceleft is None: spaceright = [] */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_nr) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_isr))); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":534 * cdef Py_ssize_t nr = len(spaceright) * cdef tmp1 = allocate(nr*sizeof(Vec),&isr) * for i in range(nr): isr[i] = (spaceright[i]).vec # <<<<<<<<<<<<<< * if spaceleft is None: spaceright = [] * elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] */ __pyx_t_4 = __pyx_v_nr; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_spaceright, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(15, 534, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_isr[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/SVD.pyx":535 * cdef tmp1 = allocate(nr*sizeof(Vec),&isr) * for i in range(nr): isr[i] = (spaceright[i]).vec * if spaceleft is None: spaceright = [] # <<<<<<<<<<<<<< * elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] * cdef PetscVec *isl = NULL */ __pyx_t_1 = (__pyx_v_spaceleft == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_spaceright, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } /* "SLEPc/SVD.pyx":536 * for i in range(nr): isr[i] = (spaceright[i]).vec * if spaceleft is None: spaceright = [] * elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] # <<<<<<<<<<<<<< * cdef PetscVec *isl = NULL * cdef Py_ssize_t nl = len(spaceleft) */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_spaceleft, __pyx_ptype_8petsc4py_5PETSc_Vec); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_spaceleft); __Pyx_GIVEREF(__pyx_v_spaceleft); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_spaceleft); __Pyx_DECREF_SET(__pyx_v_spaceleft, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L6:; /* "SLEPc/SVD.pyx":537 * if spaceleft is None: spaceright = [] * elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] * cdef PetscVec *isl = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t nl = len(spaceleft) * cdef tmp2 = allocate(nl*sizeof(Vec),&isl) */ __pyx_v_isl = NULL; /* "SLEPc/SVD.pyx":538 * elif isinstance(spaceleft, Vec): spaceleft = [spaceleft] * cdef PetscVec *isl = NULL * cdef Py_ssize_t nl = len(spaceleft) # <<<<<<<<<<<<<< * cdef tmp2 = allocate(nl*sizeof(Vec),&isl) * for i in range(nl): isl[i] = (spaceleft[i]).vec */ __pyx_t_4 = PyObject_Length(__pyx_v_spaceleft); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(15, 538, __pyx_L1_error) __pyx_v_nl = __pyx_t_4; /* "SLEPc/SVD.pyx":539 * cdef PetscVec *isl = NULL * cdef Py_ssize_t nl = len(spaceleft) * cdef tmp2 = allocate(nl*sizeof(Vec),&isl) # <<<<<<<<<<<<<< * for i in range(nl): isl[i] = (spaceleft[i]).vec * CHKERR( SVDSetInitialSpaces(self.svd, nr, isr, nl, isl) ) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_nl) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_isl))); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":540 * cdef Py_ssize_t nl = len(spaceleft) * cdef tmp2 = allocate(nl*sizeof(Vec),&isl) * for i in range(nl): isl[i] = (spaceleft[i]).vec # <<<<<<<<<<<<<< * CHKERR( SVDSetInitialSpaces(self.svd, nr, isr, nl, isl) ) * */ __pyx_t_4 = __pyx_v_nl; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_spaceleft, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(15, 540, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_isl[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/SVD.pyx":541 * cdef tmp2 = allocate(nl*sizeof(Vec),&isl) * for i in range(nl): isl[i] = (spaceleft[i]).vec * CHKERR( SVDSetInitialSpaces(self.svd, nr, isr, nl, isl) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetInitialSpaces(__pyx_v_self->svd, ((PetscInt)__pyx_v_nr), __pyx_v_isr, ((PetscInt)__pyx_v_nl), __pyx_v_isl)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(15, 541, __pyx_L1_error) /* "SLEPc/SVD.pyx":516 * # * * def setInitialSpaces(self, spaceright=None, spaceleft=None): # <<<<<<<<<<<<<< * """ * Sets the initial spaces 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.setInitialSpaces", __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_spaceright); __Pyx_XDECREF(__pyx_v_spaceleft); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/SVD.pyx":545 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for an SVD object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_54cancelMonitor[] = "SVD.cancelMonitor(self)\n\n Clears all monitors for an SVD object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55cancelMonitor(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_54cancelMonitor(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54cancelMonitor(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/SVD.pyx":549 * 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 == ((int)-1))) __PYX_ERR(15, 549, __pyx_L1_error) /* "SLEPc/SVD.pyx":545 * # * * 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":553 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_57setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_56setUp[] = "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_57setUp(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_56setUp(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56setUp(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/SVD.pyx":564 * 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 == ((int)-1))) __PYX_ERR(15, 564, __pyx_L1_error) /* "SLEPc/SVD.pyx":553 * # * * 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":566 * CHKERR( SVDSetUp(self.svd) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the singular value problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_58solve[] = "SVD.solve(self)\n\n Solves the singular value problem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59solve(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_58solve(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58solve(struct PySlepcSVDObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/SVD.pyx":570 * 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 == ((int)-1))) __PYX_ERR(15, 570, __pyx_L1_error) /* "SLEPc/SVD.pyx":566 * 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":572 * 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_61getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_60getIterationNumber[] = "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_61getIterationNumber(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_60getIterationNumber(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getIterationNumber(struct PySlepcSVDObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/SVD.pyx":583 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetIterationNumber(self.svd, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/SVD.pyx":584 * """ * 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 == ((int)-1))) __PYX_ERR(15, 584, __pyx_L1_error) /* "SLEPc/SVD.pyx":585 * 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(15, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":572 * 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":587 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_63getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_62getConvergedReason[] = "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_63getConvergedReason(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_62getConvergedReason(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getConvergedReason(struct PySlepcSVDObject *__pyx_v_self) { SVDConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/SVD.pyx":597 * converged. * """ * cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( SVDGetConvergedReason(self.svd, &val) ) * return val */ __pyx_v_val = SVD_CONVERGED_ITERATING; /* "SLEPc/SVD.pyx":598 * """ * 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 == ((int)-1))) __PYX_ERR(15, 598, __pyx_L1_error) /* "SLEPc/SVD.pyx":599 * 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(15, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":587 * 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":601 * return val * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged singular triplets. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_65getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_64getConverged[] = "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_65getConverged(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_64getConverged(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getConverged(struct PySlepcSVDObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/SVD.pyx":614 * 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":615 * """ * 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 == ((int)-1))) __PYX_ERR(15, 615, __pyx_L1_error) /* "SLEPc/SVD.pyx":616 * 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(15, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":601 * 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":618 * 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_67getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_66getValue[] = "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_67getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 618, __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, 618, __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(15, 618, __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_66getValue(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66getValue(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getValue", 0); /* "SLEPc/SVD.pyx":639 * `setWhichSingularTriplets()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":640 * """ * 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 == ((int)-1))) __PYX_ERR(15, 640, __pyx_L1_error) /* "SLEPc/SVD.pyx":641 * cdef PetscReal rval = 0 * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) ) * return toReal(rval) # <<<<<<<<<<<<<< * * def getVectors(self, int i, Vec U, Vec V): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":618 * 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":643 * return toReal(rval) * * def getVectors(self, int i, Vec U, Vec V): # <<<<<<<<<<<<<< * """ * Gets the i-th left and right singular vectors as computed by */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_69getVectors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_68getVectors[] = "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_69getVectors(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_U)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 1); __PYX_ERR(15, 643, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 2); __PYX_ERR(15, 643, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVectors") < 0)) __PYX_ERR(15, 643, __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(15, 643, __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(15, 643, __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(15, 643, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "V", 0))) __PYX_ERR(15, 643, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_68getVectors(((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_68getVectors(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getVectors", 0); /* "SLEPc/SVD.pyx":664 * `setWhichSingularTriplets()`. * """ * cdef PetscReal dummy = 0 # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) ) * */ __pyx_v_dummy = 0.0; /* "SLEPc/SVD.pyx":665 * """ * 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 == ((int)-1))) __PYX_ERR(15, 665, __pyx_L1_error) /* "SLEPc/SVD.pyx":643 * return toReal(rval) * * def getVectors(self, int i, Vec U, Vec V): # <<<<<<<<<<<<<< * """ * 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":667 * 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_71getSingularTriplet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_70getSingularTriplet[] = "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_71getSingularTriplet(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_U); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(15, 667, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 667, __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(15, 667, __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(15, 667, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "V", 0))) __PYX_ERR(15, 667, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_70getSingularTriplet(((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_70getSingularTriplet(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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSingularTriplet", 0); /* "SLEPc/SVD.pyx":694 * `setWhichSingularTriplets()`. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * cdef PetscVec Uvec = U.vec if U is not None else NULL * cdef PetscVec Vvec = V.vec if V is not None else NULL */ __pyx_v_rval = 0.0; /* "SLEPc/SVD.pyx":695 * """ * cdef PetscReal rval = 0 * cdef PetscVec Uvec = U.vec if U is not None else NULL # <<<<<<<<<<<<<< * cdef PetscVec Vvec = V.vec if V is not None else NULL * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_U) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_U->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_Uvec = __pyx_t_1; /* "SLEPc/SVD.pyx":696 * cdef PetscReal rval = 0 * cdef PetscVec Uvec = U.vec if U is not None else NULL * cdef PetscVec Vvec = V.vec if V is not None else NULL # <<<<<<<<<<<<<< * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) * return toReal(rval) */ __pyx_t_2 = (((PyObject *)__pyx_v_V) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_V->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_Vvec = __pyx_t_1; /* "SLEPc/SVD.pyx":697 * cdef PetscVec Uvec = U.vec if U is not None else NULL * cdef PetscVec Vvec = V.vec if V is not None else NULL * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) # <<<<<<<<<<<<<< * return toReal(rval) * */ __pyx_t_3 = __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_3 == ((int)-1))) __PYX_ERR(15, 697, __pyx_L1_error) /* "SLEPc/SVD.pyx":698 * cdef PetscVec Vvec = V.vec if V is not None else NULL * CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) ) * return toReal(rval) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":667 * 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_4); __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":702 * # * * 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_73computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_72computeError[] = "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_73computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 702, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 702, __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, 702, __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_72computeError(((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_72computeError(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/SVD.pyx":728 * ``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":729 * """ * 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":730 * 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(15, 730, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/SVD.pyx":731 * 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 == ((int)-1))) __PYX_ERR(15, 731, __pyx_L1_error) /* "SLEPc/SVD.pyx":732 * 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(15, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":702 * # * * 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":734 * 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_75errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_74errorView[] = "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_75errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 734, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 734, __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(15, 734, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_74errorView(((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_74errorView(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; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/SVD.pyx":755 * * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) */ __pyx_v_et = SVD_ERROR_RELATIVE; /* "SLEPc/SVD.pyx":756 * """ * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( SVDErrorView(self.svd, et, 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(15, 756, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/SVD.pyx":757 * cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( SVDErrorView(self.svd, et, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/SVD.pyx":758 * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( SVDErrorView(self.svd, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDErrorView(__pyx_v_self->svd, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(15, 758, __pyx_L1_error) /* "SLEPc/SVD.pyx":734 * 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":762 * # * * def setCrossEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_77setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_76setCrossEPS[] = "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_77setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 762, __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(15, 762, __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(15, 762, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_76setCrossEPS(((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_76setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCrossEPS", 0); /* "SLEPc/SVD.pyx":772 * 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 == ((int)-1))) __PYX_ERR(15, 772, __pyx_L1_error) /* "SLEPc/SVD.pyx":762 * # * * def setCrossEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * 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":774 * 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_79getCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_78getCrossEPS[] = "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_79getCrossEPS(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_78getCrossEPS(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78getCrossEPS(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCrossEPS", 0); /* "SLEPc/SVD.pyx":784 * The eigensolver object. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":785 * """ * 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 == ((int)-1))) __PYX_ERR(15, 785, __pyx_L1_error) /* "SLEPc/SVD.pyx":786 * cdef EPS eps = EPS() * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj)); /* "SLEPc/SVD.pyx":787 * CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) * return eps # <<<<<<<<<<<<<< * * def setCyclicEPS(self, EPS eps): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_eps)); __pyx_r = ((PyObject *)__pyx_v_eps); goto __pyx_L0; /* "SLEPc/SVD.pyx":774 * 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":789 * return eps * * def setCyclicEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (`EPS`) to the singular value */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_81setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_80setCyclicEPS[] = "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_81setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(15, 789, __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(15, 789, __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(15, 789, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_80setCyclicEPS(((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_80setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCyclicEPS", 0); /* "SLEPc/SVD.pyx":799 * 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 == ((int)-1))) __PYX_ERR(15, 799, __pyx_L1_error) /* "SLEPc/SVD.pyx":789 * return eps * * def setCyclicEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * 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":801 * 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_83getCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_82getCyclicEPS[] = "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_83getCyclicEPS(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_82getCyclicEPS(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82getCyclicEPS(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCyclicEPS", 0); /* "SLEPc/SVD.pyx":811 * The eigensolver object. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":812 * """ * 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 == ((int)-1))) __PYX_ERR(15, 812, __pyx_L1_error) /* "SLEPc/SVD.pyx":813 * cdef EPS eps = EPS() * CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj)); /* "SLEPc/SVD.pyx":814 * 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":801 * 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":816 * 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_85setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_84setCyclicExplicitMatrix[] = "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_85setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(15, 816, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(15, 816, __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_84setCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setCyclicExplicitMatrix", 0); /* "SLEPc/SVD.pyx":826 * True if ``H(A)`` is built explicitly. * """ * cdef PetscBool tval = asBool(flag) # <<<<<<<<<<<<<< * CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_flag); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(15, 826, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/SVD.pyx":827 * """ * cdef PetscBool tval = asBool(flag) * 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 == ((int)-1))) __PYX_ERR(15, 827, __pyx_L1_error) /* "SLEPc/SVD.pyx":816 * 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":829 * 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_87getCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_86getCyclicExplicitMatrix[] = "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_87getCyclicExplicitMatrix(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_86getCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_86getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getCyclicExplicitMatrix", 0); /* "SLEPc/SVD.pyx":839 * True if ``H(A)`` is built explicitly. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) * return toBool(tval) */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/SVD.pyx":840 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) # <<<<<<<<<<<<<< * return toBool(tval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicGetExplicitMatrix(__pyx_v_self->svd, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 840, __pyx_L1_error) /* "SLEPc/SVD.pyx":841 * cdef PetscBool tval = PETSC_FALSE * CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) ) * return toBool(tval) # <<<<<<<<<<<<<< * * def setLanczosOneSide(self, flag=True): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/SVD.pyx":829 * 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":843 * return toBool(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_89setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_88setLanczosOneSide[] = "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_89setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(15, 843, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(15, 843, __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_88setLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_88setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLanczosOneSide", 0); /* "SLEPc/SVD.pyx":861 * for storing such vectors. * """ * cdef PetscBool tval = asBool(flag) # <<<<<<<<<<<<<< * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_flag); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(15, 861, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/SVD.pyx":862 * """ * cdef PetscBool tval = asBool(flag) * 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 == ((int)-1))) __PYX_ERR(15, 862, __pyx_L1_error) /* "SLEPc/SVD.pyx":843 * return toBool(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":864 * 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_91setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3SVD_90setTRLanczosOneSide[] = "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_91setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(15, 864, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(15, 864, __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_90setTRLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_90setTRLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTRLanczosOneSide", 0); /* "SLEPc/SVD.pyx":881 * to left singular vectors. * """ * cdef PetscBool tval = asBool(flag) # <<<<<<<<<<<<<< * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_flag); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(15, 881, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/SVD.pyx":882 * """ * cdef PetscBool tval = asBool(flag) * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) # <<<<<<<<<<<<<< * * setOperator = setOperators # backward compatibility */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDLanczosSetOneSide(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(15, 882, __pyx_L1_error) /* "SLEPc/SVD.pyx":864 * 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":889 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":890 * 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(15, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 890, __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":889 * * 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":891 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":892 * 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(15, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":891 * 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_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":895 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":896 * 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(15, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 896, __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":895 * * 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":897 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":898 * 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(15, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":897 * 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_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":901 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":902 * 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(15, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 902, __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(15, 902, __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":901 * * 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":903 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":904 * 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(15, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tol, __pyx_v_value) < 0) __PYX_ERR(15, 904, __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(15, 904, __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":903 * 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":907 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":908 * 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(15, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 908, __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(15, 908, __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":907 * * 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":909 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":910 * 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(15, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 910, __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(15, 910, __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(15, 910, __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":909 * 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":913 * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "SLEPc/SVD.pyx":914 * 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(15, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 914, __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":913 * * 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":915 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "SLEPc/SVD.pyx":916 * 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(15, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":915 * 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_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":187 * 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":188 * * def __cinit__(self): * self.obj = &self.pep # <<<<<<<<<<<<<< * self.pep = NULL * */ __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->pep)); /* "SLEPc/PEP.pyx":189 * def __cinit__(self): * self.obj = &self.pep * self.pep = NULL # <<<<<<<<<<<<<< * * def view(self, Viewer viewer=None): */ __pyx_v_self->pep = NULL; /* "SLEPc/PEP.pyx":187 * 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":191 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 191, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 191, __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(16, 191, __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/PEP.pyx":201 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( PEPView(self.pep, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/PEP.pyx":202 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( PEPView(self.pep, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPView(__pyx_v_self->pep, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 202, __pyx_L1_error) /* "SLEPc/PEP.pyx":191 * 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":204 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/PEP.pyx":208 * 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 == ((int)-1))) __PYX_ERR(16, 208, __pyx_L1_error) /* "SLEPc/PEP.pyx":209 * """ * CHKERR( PEPDestroy(&self.pep) ) * self.pep = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->pep = NULL; /* "SLEPc/PEP.pyx":210 * 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":204 * 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":212 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/PEP.pyx":216 * 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 == ((int)-1))) __PYX_ERR(16, 216, __pyx_L1_error) /* "SLEPc/PEP.pyx":212 * 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":218 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 218, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 218, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/PEP.pyx":228 * 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(16, 228, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "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 */ __pyx_v_newpep = NULL; /* "SLEPc/PEP.pyx":230 * 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 == ((int)-1))) __PYX_ERR(16, 230, __pyx_L1_error) /* "SLEPc/PEP.pyx":231 * cdef SlepcPEP newpep = NULL * CHKERR( PEPCreate(ccomm, &newpep) ) * SlepcCLEAR(self.obj); self.pep = newpep # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->pep = __pyx_v_newpep; /* "SLEPc/PEP.pyx":232 * 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":218 * 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":234 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 234, __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(16, 234, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_pep_type); /* "SLEPc/PEP.pyx":243 * 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":244 * """ * 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(16, 244, __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":245 * 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 == ((int)-1))) __PYX_ERR(16, 245, __pyx_L1_error) /* "SLEPc/PEP.pyx":234 * 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":247 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/PEP.pyx":256 * 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":257 * """ * 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 == ((int)-1))) __PYX_ERR(16, 257, __pyx_L1_error) /* "SLEPc/PEP.pyx":258 * 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(16, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":247 * 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":260 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/PEP.pyx":270 * 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":271 * """ * 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 == ((int)-1))) __PYX_ERR(16, 271, __pyx_L1_error) /* "SLEPc/PEP.pyx":272 * 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(16, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":260 * 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":274 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 274, __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, 274, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/PEP.pyx":284 * 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":285 * """ * 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(16, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":286 * 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 == ((int)-1))) __PYX_ERR(16, 286, __pyx_L1_error) /* "SLEPc/PEP.pyx":274 * 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":288 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 288, __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, 288, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/PEP.pyx":298 * 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":299 * """ * 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(16, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":300 * 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 == ((int)-1))) __PYX_ERR(16, 300, __pyx_L1_error) /* "SLEPc/PEP.pyx":288 * 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":302 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/PEP.pyx":308 * 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 == ((int)-1))) __PYX_ERR(16, 308, __pyx_L1_error) /* "SLEPc/PEP.pyx":302 * 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":310 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBasis", 0); /* "SLEPc/PEP.pyx":320 * 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":321 * """ * 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 == ((int)-1))) __PYX_ERR(16, 321, __pyx_L1_error) /* "SLEPc/PEP.pyx":322 * 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(16, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":310 * 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":324 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 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_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(16, 324, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBasis", 0); /* "SLEPc/PEP.pyx":334 * 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(16, 334, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":335 * """ * 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 == ((int)-1))) __PYX_ERR(16, 335, __pyx_L1_error) /* "SLEPc/PEP.pyx":324 * 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":337 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getProblemType", 0); /* "SLEPc/PEP.pyx":346 * 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":347 * """ * 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 == ((int)-1))) __PYX_ERR(16, 347, __pyx_L1_error) /* "SLEPc/PEP.pyx":348 * 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(16, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":337 * 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":350 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 350, __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(16, 350, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setProblemType", 0); /* "SLEPc/PEP.pyx":359 * 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(16, 359, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":360 * """ * 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 == ((int)-1))) __PYX_ERR(16, 360, __pyx_L1_error) /* "SLEPc/PEP.pyx":350 * 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":362 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/PEP.pyx":371 * 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":372 * """ * 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 == ((int)-1))) __PYX_ERR(16, 372, __pyx_L1_error) /* "SLEPc/PEP.pyx":373 * 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(16, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":362 * 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":375 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 375, __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, 375, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/PEP.pyx":384 * 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(16, 384, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":385 * """ * cdef SlepcPEPWhich val = which * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) # <<<<<<<<<<<<<< * * def getTarget(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetWhichEigenpairs(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 385, __pyx_L1_error) /* "SLEPc/PEP.pyx":375 * 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":387 * CHKERR( PEPSetWhichEigenpairs(self.pep, val) ) * * def getTarget(self): # <<<<<<<<<<<<<< * """ * Gets the value of the target. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTarget[] = "PEP.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_3PEP_35getTarget(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_3PEP_34getTarget(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_34getTarget(struct PySlepcPEPObject *__pyx_v_self) { PetscScalar __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTarget", 0); /* "SLEPc/PEP.pyx":400 * If the target was not set by the user, then zero is returned. * """ * cdef PetscScalar sval = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetTarget(self.pep, &sval) ) * return toScalar(sval) */ __pyx_v_sval = 0.0; /* "SLEPc/PEP.pyx":401 * """ * cdef PetscScalar sval = 0 * CHKERR( PEPGetTarget(self.pep, &sval) ) # <<<<<<<<<<<<<< * return toScalar(sval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetTarget(__pyx_v_self->pep, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 401, __pyx_L1_error) /* "SLEPc/PEP.pyx":402 * cdef PetscScalar sval = 0 * CHKERR( PEPGetTarget(self.pep, &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(16, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":387 * CHKERR( PEPSetWhichEigenpairs(self.pep, 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.PEP.getTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":404 * return toScalar(sval) * * def setTarget(self, target): # <<<<<<<<<<<<<< * """ * Sets the value of the target. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTarget[] = "PEP.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_3PEP_37setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_target = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 404, __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(16, 404, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_36setTarget(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTarget(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTarget", 0); /* "SLEPc/PEP.pyx":419 * `setWhichEigenpairs()`. * """ * cdef PetscScalar sval = asScalar(target) # <<<<<<<<<<<<<< * CHKERR( PEPSetTarget(self.pep, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_target); if (unlikely(__pyx_t_1 == ((PetscScalar)((PetscScalar)(-1.0))) && PyErr_Occurred())) __PYX_ERR(16, 419, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/PEP.pyx":420 * """ * cdef PetscScalar sval = asScalar(target) * CHKERR( PEPSetTarget(self.pep, sval) ) # <<<<<<<<<<<<<< * * def getTolerances(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetTarget(__pyx_v_self->pep, __pyx_v_sval)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 420, __pyx_L1_error) /* "SLEPc/PEP.pyx":404 * 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.PEP.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":422 * CHKERR( PEPSetTarget(self.pep, sval) ) * * def getTolerances(self): # <<<<<<<<<<<<<< * """ * Gets the tolerance and maximum iteration count used by the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_39getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_38getTolerances[] = "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_39getTolerances(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_38getTolerances(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getTolerances(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/PEP.pyx":434 * 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":435 * """ * 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":436 * 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 == ((int)-1))) __PYX_ERR(16, 436, __pyx_L1_error) /* "SLEPc/PEP.pyx":437 * cdef PetscInt ival = 0 * CHKERR( PEPGetTolerances(self.pep, &rval, &ival) ) * return (toReal(rval), toInt(ival)) # <<<<<<<<<<<<<< * * def getInterval(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 437, __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, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 437, __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":422 * CHKERR( PEPSetTarget(self.pep, sval) ) * * 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":439 * return (toReal(rval), toInt(ival)) * * def getInterval(self): # <<<<<<<<<<<<<< * """ * Gets the computational interval for spectrum slicing. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_41getInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_40getInterval[] = "PEP.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_3PEP_41getInterval(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_3PEP_40getInterval(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40getInterval(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getInterval", 0); /* "SLEPc/PEP.pyx":454 * If the interval was not set by the user, then zeros are returned. * """ * cdef PetscReal inta = 0 # <<<<<<<<<<<<<< * cdef PetscReal intb = 0 * CHKERR( PEPGetInterval(self.pep, &inta, &intb) ) */ __pyx_v_inta = 0.0; /* "SLEPc/PEP.pyx":455 * """ * cdef PetscReal inta = 0 * cdef PetscReal intb = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetInterval(self.pep, &inta, &intb) ) * return (toReal(inta), toReal(intb)) */ __pyx_v_intb = 0.0; /* "SLEPc/PEP.pyx":456 * cdef PetscReal inta = 0 * cdef PetscReal intb = 0 * CHKERR( PEPGetInterval(self.pep, &inta, &intb) ) # <<<<<<<<<<<<<< * return (toReal(inta), toReal(intb)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetInterval(__pyx_v_self->pep, (&__pyx_v_inta), (&__pyx_v_intb))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 456, __pyx_L1_error) /* "SLEPc/PEP.pyx":457 * cdef PetscReal intb = 0 * CHKERR( PEPGetInterval(self.pep, &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(16, 457, __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(16, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 457, __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":439 * return (toReal(rval), toInt(ival)) * * 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.PEP.getInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":459 * 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_3PEP_43setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_42setInterval[] = "PEP.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 quadratic eigenproblems in a given interval.\n This function provides the interval to be considered. It must\n be used in combination with `PEP.Which.ALL`, see\n `setWhichEigenpairs()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_43setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inta = 0; PyObject *__pyx_v_intb = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inta)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intb)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, 1); __PYX_ERR(16, 459, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInterval") < 0)) __PYX_ERR(16, 459, __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(16, 459, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_42setInterval(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_inta, __pyx_v_intb); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42setInterval(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInterval", 0); /* "SLEPc/PEP.pyx":478 * `setWhichEigenpairs()`. * """ * cdef PetscReal rval1 = asReal(inta) # <<<<<<<<<<<<<< * cdef PetscReal rval2 = asReal(intb) * CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_inta); if (unlikely(__pyx_t_1 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 478, __pyx_L1_error) __pyx_v_rval1 = __pyx_t_1; /* "SLEPc/PEP.pyx":479 * """ * cdef PetscReal rval1 = asReal(inta) * cdef PetscReal rval2 = asReal(intb) # <<<<<<<<<<<<<< * CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_intb); if (unlikely(__pyx_t_1 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 479, __pyx_L1_error) __pyx_v_rval2 = __pyx_t_1; /* "SLEPc/PEP.pyx":480 * cdef PetscReal rval1 = asReal(inta) * cdef PetscReal rval2 = asReal(intb) * CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) # <<<<<<<<<<<<<< * * def setTolerances(self, tol=None, max_it=None): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetInterval(__pyx_v_self->pep, __pyx_v_rval1, __pyx_v_rval2)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 480, __pyx_L1_error) /* "SLEPc/PEP.pyx":459 * 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.PEP.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":482 * CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) * * 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_45setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_44setTolerances[] = "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_45setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tol = 0; PyObject *__pyx_v_max_it = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(16, 482, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(16, 482, __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_44setTolerances(((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_44setTolerances(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/PEP.pyx":494 * 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":495 * """ * 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":496 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 496, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/PEP.pyx":497 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 497, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/PEP.pyx":498 * 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 == ((int)-1))) __PYX_ERR(16, 498, __pyx_L1_error) /* "SLEPc/PEP.pyx":482 * CHKERR( PEPSetInterval(self.pep, rval1, rval2) ) * * 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":500 * 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_47getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_46getConvergenceTest[] = "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_47getConvergenceTest(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_46getConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self) { PEPConv __pyx_v_conv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergenceTest", 0); /* "SLEPc/PEP.pyx":511 * 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":512 * """ * 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 == ((int)-1))) __PYX_ERR(16, 512, __pyx_L1_error) /* "SLEPc/PEP.pyx":513 * 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(16, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":500 * 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":515 * return conv * * def setConvergenceTest(self, conv): # <<<<<<<<<<<<<< * """ * Specifies how to compute the error estimate */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_49setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_48setConvergenceTest[] = "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_49setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_conv = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 515, __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(16, 515, __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_48setConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_conv); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setConvergenceTest(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setConvergenceTest", 0); /* "SLEPc/PEP.pyx":526 * 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(16, 526, __pyx_L1_error) __pyx_v_tconv = __pyx_t_1; /* "SLEPc/PEP.pyx":527 * """ * 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 == ((int)-1))) __PYX_ERR(16, 527, __pyx_L1_error) /* "SLEPc/PEP.pyx":515 * 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":529 * 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_51getRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_50getRefine[] = "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_51getRefine(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_50getRefine(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getRefine(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRefine", 0); /* "SLEPc/PEP.pyx":547 * 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":548 * """ * 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":549 * 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":550 * 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":551 * 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":552 * 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 == ((int)-1))) __PYX_ERR(16, 552, __pyx_L1_error) /* "SLEPc/PEP.pyx":553 * 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(16, 553, __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(16, 553, __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(16, 553, __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(16, 553, __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(16, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 553, __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":529 * 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":555 * 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_53setRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_52setRefine[] = "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_53setRefine(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_npart); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_its); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(16, 555, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(16, 555, __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_52setRefine(((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_52setRefine(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRefine", 0); /* "SLEPc/PEP.pyx":573 * 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(16, 573, __pyx_L1_error) __pyx_v_tref = __pyx_t_1; /* "SLEPc/PEP.pyx":574 * """ * 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":575 * 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":576 * 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":577 * 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":578 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 578, __pyx_L1_error) __pyx_v_tnpart = __pyx_t_4; } /* "SLEPc/PEP.pyx":579 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 579, __pyx_L1_error) __pyx_v_ttol = __pyx_t_5; } /* "SLEPc/PEP.pyx":580 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 580, __pyx_L1_error) __pyx_v_tits = __pyx_t_4; } /* "SLEPc/PEP.pyx":581 * 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(16, 581, __pyx_L1_error) __pyx_v_tscheme = __pyx_t_6; } /* "SLEPc/PEP.pyx":582 * 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 == ((int)-1))) __PYX_ERR(16, 582, __pyx_L1_error) /* "SLEPc/PEP.pyx":555 * 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":584 * 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_55getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_54getTrackAll[] = "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_55getTrackAll(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_54getTrackAll(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_54getTrackAll(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/PEP.pyx":594 * 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":595 * """ * 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 == ((int)-1))) __PYX_ERR(16, 595, __pyx_L1_error) /* "SLEPc/PEP.pyx":596 * 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(16, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":584 * 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":598 * 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_57setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_56setTrackAll[] = "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_57setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_trackall = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 598, __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, 598, __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_56setTrackAll(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_trackall); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setTrackAll(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/PEP.pyx":608 * 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(16, 608, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/PEP.pyx":609 * """ * 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 == ((int)-1))) __PYX_ERR(16, 609, __pyx_L1_error) /* "SLEPc/PEP.pyx":598 * 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":611 * 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_59getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_58getDimensions[] = "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_59getDimensions(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_58getDimensions(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/PEP.pyx":625 * 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":626 * """ * 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":627 * 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":628 * 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 == ((int)-1))) __PYX_ERR(16, 628, __pyx_L1_error) /* "SLEPc/PEP.pyx":629 * 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(16, 629, __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, 629, __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, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 629, __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":611 * 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":631 * 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_61setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_60setDimensions[] = "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_61setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 631, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 631, __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_60setDimensions(((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_60setDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/PEP.pyx":646 * 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":647 * """ * 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":648 * 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":649 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 649, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/PEP.pyx":650 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 650, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/PEP.pyx":651 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 651, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/PEP.pyx":652 * 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 == ((int)-1))) __PYX_ERR(16, 652, __pyx_L1_error) /* "SLEPc/PEP.pyx":631 * 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":654 * 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_63getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_62getST[] = "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_63getST(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_62getST(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_62getST(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getST", 0); /* "SLEPc/PEP.pyx":664 * The spectral transformation. * """ * cdef ST st = ST() # <<<<<<<<<<<<<< * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":665 * """ * 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 == ((int)-1))) __PYX_ERR(16, 665, __pyx_L1_error) /* "SLEPc/PEP.pyx":666 * cdef ST st = ST() * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) # <<<<<<<<<<<<<< * return st * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj)); /* "SLEPc/PEP.pyx":667 * CHKERR( PEPGetST(self.pep, &st.st) ) * PetscINCREF(st.obj) * return st # <<<<<<<<<<<<<< * * def setST(self, ST st): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_st)); __pyx_r = ((PyObject *)__pyx_v_st); goto __pyx_L0; /* "SLEPc/PEP.pyx":654 * 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":669 * return st * * def setST(self, ST st): # <<<<<<<<<<<<<< * """ * Associates a spectral transformation object to the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_65setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_64setST[] = "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_65setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcSTObject *__pyx_v_st = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 669, __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(16, 669, __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(16, 669, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_64setST(((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_64setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setST", 0); /* "SLEPc/PEP.pyx":679 * 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 == ((int)-1))) __PYX_ERR(16, 679, __pyx_L1_error) /* "SLEPc/PEP.pyx":669 * return st * * def setST(self, ST st): # <<<<<<<<<<<<<< * """ * 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":681 * 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_67getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_66getScale[] = "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_67getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyPetscVecObject *__pyx_v_Dl = 0; struct PyPetscVecObject *__pyx_v_Dr = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Dl); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(16, 681, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(16, 681, __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(16, 681, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(16, 681, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_66getScale(((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_66getScale(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getScale", 0); /* "SLEPc/PEP.pyx":703 * 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":704 * """ * 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":705 * 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":706 * 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":707 * 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":708 * 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":709 * 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 == ((int)-1))) __PYX_ERR(16, 709, __pyx_L1_error) /* "SLEPc/PEP.pyx":710 * 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":711 * 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":712 * 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 == ((int)-1))) __PYX_ERR(16, 712, __pyx_L1_error) /* "SLEPc/PEP.pyx":711 * 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":714 * 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 == ((int)-1))) __PYX_ERR(16, 714, __pyx_L1_error) } __pyx_L4:; /* "SLEPc/PEP.pyx":710 * 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":715 * 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":716 * 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":717 * 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 == ((int)-1))) __PYX_ERR(16, 717, __pyx_L1_error) /* "SLEPc/PEP.pyx":716 * 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":719 * 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 == ((int)-1))) __PYX_ERR(16, 719, __pyx_L1_error) } __pyx_L6:; /* "SLEPc/PEP.pyx":715 * else: * CHKERR( VecSet(Dl.vec, 1.0) ) * if Dr.vec != NULL: # <<<<<<<<<<<<<< * if vecr != NULL: * CHKERR( VecCopy(vecr, Dr.vec) ) */ } /* "SLEPc/PEP.pyx":720 * 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 == ((int)-1))) __PYX_ERR(16, 720, __pyx_L1_error) /* "SLEPc/PEP.pyx":721 * 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 == ((int)-1))) __PYX_ERR(16, 721, __pyx_L1_error) /* "SLEPc/PEP.pyx":722 * 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(16, 722, __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(16, 722, __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(16, 722, __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(16, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 722, __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":681 * 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":724 * 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_69setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_68setScale[] = "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_69setScale(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Dl); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Dr); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_its); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(16, 724, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(16, 724, __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(16, 724, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(16, 724, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_68setScale(((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_68setScale(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setScale", 0); /* "SLEPc/PEP.pyx":744 * 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(16, 744, __pyx_L1_error) __pyx_v_senum = __pyx_t_1; /* "SLEPc/PEP.pyx":745 * """ * 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":746 * 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":747 * 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":748 * 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":749 * 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":750 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 750, __pyx_L1_error) __pyx_v_rval1 = __pyx_t_4; } /* "SLEPc/PEP.pyx":751 * 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":752 * 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":753 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 753, __pyx_L1_error) __pyx_v_ival = __pyx_t_6; } /* "SLEPc/PEP.pyx":754 * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(16, 754, __pyx_L1_error) __pyx_v_rval2 = __pyx_t_4; } /* "SLEPc/PEP.pyx":755 * 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 == ((int)-1))) __PYX_ERR(16, 755, __pyx_L1_error) /* "SLEPc/PEP.pyx":724 * 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":757 * 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_71getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_70getBV[] = "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_71getBV(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_70getBV(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_70getBV(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/PEP.pyx":766 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":767 * """ * 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 == ((int)-1))) __PYX_ERR(16, 767, __pyx_L1_error) /* "SLEPc/PEP.pyx":768 * cdef BV bv = BV() * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj)); /* "SLEPc/PEP.pyx":769 * CHKERR( PEPGetBV(self.pep, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/PEP.pyx":757 * 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":771 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * Associates a basis vectors object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_73setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_72setBV[] = "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_73setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcBVObject *__pyx_v_bv = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 771, __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, 771, __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(16, 771, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_72setBV(((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_72setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/PEP.pyx":780 * 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 == ((int)-1))) __PYX_ERR(16, 780, __pyx_L1_error) /* "SLEPc/PEP.pyx":771 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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":782 * 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_75getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_74getRG[] = "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_75getRG(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_74getRG(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74getRG(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/PEP.pyx":791 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":792 * """ * 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 == ((int)-1))) __PYX_ERR(16, 792, __pyx_L1_error) /* "SLEPc/PEP.pyx":793 * cdef RG rg = RG() * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj)); /* "SLEPc/PEP.pyx":794 * CHKERR( PEPGetRG(self.pep, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/PEP.pyx":782 * 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":796 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * Associates a region object to the eigensolver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_77setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_76setRG[] = "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_77setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcRGObject *__pyx_v_rg = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 796, __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, 796, __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(16, 796, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_76setRG(((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_76setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/PEP.pyx":805 * 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 == ((int)-1))) __PYX_ERR(16, 805, __pyx_L1_error) /* "SLEPc/PEP.pyx":796 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * 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":807 * 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_79getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_78getOperators[] = "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_79getOperators(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_78getOperators(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78getOperators(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOperators", 0); /* "SLEPc/PEP.pyx":817 * """ * 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":818 * 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":819 * 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 == ((int)-1))) __PYX_ERR(16, 819, __pyx_L1_error) /* "SLEPc/PEP.pyx":820 * 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(16, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_operators = __pyx_t_2; __pyx_t_2 = 0; /* "SLEPc/PEP.pyx":821 * 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":822 * 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 == ((int)-1))) __PYX_ERR(16, 822, __pyx_L1_error) /* "SLEPc/PEP.pyx":823 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 823, __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; (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/PEP.pyx":824 * 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 == ((int)-1))) __PYX_ERR(16, 824, __pyx_L1_error) } /* "SLEPc/PEP.pyx":825 * 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 = __Pyx_PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":807 * 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":827 * return tuple(operators) * * def setOperators(self, operators): # <<<<<<<<<<<<<< * """ * Sets the matrices associated with the eigenvalue problem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_81setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_80setOperators[] = "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_81setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_operators = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 827, __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(16, 827, __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_80setOperators(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_operators); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80setOperators(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOperators", 0); __Pyx_INCREF(__pyx_v_operators); /* "SLEPc/PEP.pyx":836 * 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 = __Pyx_PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":837 * """ * 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":838 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(16, 838, __pyx_L1_error) __pyx_v_n = __pyx_t_2; /* "SLEPc/PEP.pyx":839 * 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(16, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":840 * 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(16, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(16, 840, __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":841 * 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 == ((int)-1))) __PYX_ERR(16, 841, __pyx_L1_error) /* "SLEPc/PEP.pyx":827 * 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":845 * # * * def setInitialSpace(self, space): # <<<<<<<<<<<<<< * """ * Sets the initial space from which the eigensolver starts to */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_83setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_82setInitialSpace[] = "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_83setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 845, __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, 845, __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_82setInitialSpace(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_space); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82setInitialSpace(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; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/PEP.pyx":855 * 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, 855, __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":856 * """ * 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":857 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(16, 857, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/PEP.pyx":858 * 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(16, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":859 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(16, 859, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/PEP.pyx":860 * 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_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetInitialSpace(__pyx_v_self->pep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(16, 860, __pyx_L1_error) /* "SLEPc/PEP.pyx":845 * # * * 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":864 * # * * def cancelMonitor(self): # <<<<<<<<<<<<<< * """ * Clears all monitors for a PEP object. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_84cancelMonitor[] = "PEP.cancelMonitor(self)\n\n Clears all monitors for a PEP object.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85cancelMonitor(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_84cancelMonitor(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84cancelMonitor(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/PEP.pyx":868 * 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 == ((int)-1))) __PYX_ERR(16, 868, __pyx_L1_error) /* "SLEPc/PEP.pyx":864 * # * * 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":872 * # * * def setUp(self): # <<<<<<<<<<<<<< * """ * Sets up all the internal data structures necessary for the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_87setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_86setUp[] = "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_87setUp(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_86setUp(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86setUp(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/PEP.pyx":877 * 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 == ((int)-1))) __PYX_ERR(16, 877, __pyx_L1_error) /* "SLEPc/PEP.pyx":872 * # * * 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":879 * CHKERR( PEPSetUp(self.pep) ) * * def solve(self): # <<<<<<<<<<<<<< * """ * Solves the eigensystem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_88solve[] = "PEP.solve(self)\n\n Solves the eigensystem.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89solve(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_88solve(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88solve(struct PySlepcPEPObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/PEP.pyx":883 * 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 == ((int)-1))) __PYX_ERR(16, 883, __pyx_L1_error) /* "SLEPc/PEP.pyx":879 * 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":885 * 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_91getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_90getIterationNumber[] = "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_91getIterationNumber(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_90getIterationNumber(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getIterationNumber(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/PEP.pyx":896 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetIterationNumber(self.pep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/PEP.pyx":897 * """ * 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 == ((int)-1))) __PYX_ERR(16, 897, __pyx_L1_error) /* "SLEPc/PEP.pyx":898 * 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(16, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":885 * 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":900 * return toInt(ival) * * def getConvergedReason(self): # <<<<<<<<<<<<<< * """ * Gets the reason why the `solve()` iteration was stopped. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_93getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_92getConvergedReason[] = "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_93getConvergedReason(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_92getConvergedReason(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92getConvergedReason(struct PySlepcPEPObject *__pyx_v_self) { PEPConvergedReason __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/PEP.pyx":910 * converged. * """ * cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( PEPGetConvergedReason(self.pep, &val) ) * return val */ __pyx_v_val = PEP_CONVERGED_ITERATING; /* "SLEPc/PEP.pyx":911 * """ * 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 == ((int)-1))) __PYX_ERR(16, 911, __pyx_L1_error) /* "SLEPc/PEP.pyx":912 * 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(16, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":900 * 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":915 * * * def getConverged(self): # <<<<<<<<<<<<<< * """ * Gets the number of converged eigenpairs. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_95getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_94getConverged[] = "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_95getConverged(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_94getConverged(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94getConverged(struct PySlepcPEPObject *__pyx_v_self) { PetscInt __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/PEP.pyx":924 * Number of converged eigenpairs. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetConverged(self.pep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/PEP.pyx":925 * """ * 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 == ((int)-1))) __PYX_ERR(16, 925, __pyx_L1_error) /* "SLEPc/PEP.pyx":926 * 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(16, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":915 * * * 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":928 * 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_97getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_96getEigenpair[] = "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_97getEigenpair(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 928, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 928, __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, 928, __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(16, 928, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(16, 928, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_96getEigenpair(((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_96getEigenpair(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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/PEP.pyx":948 * The computed eigenvalue. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/PEP.pyx":949 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/PEP.pyx":950 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vr) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vr->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_vecr = __pyx_t_1; /* "SLEPc/PEP.pyx":951 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/PEP.pyx":952 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return toComplex(sval1, sval2) * */ __pyx_t_3 = __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_3 == ((int)-1))) __PYX_ERR(16, 952, __pyx_L1_error) /* "SLEPc/PEP.pyx":953 * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) # <<<<<<<<<<<<<< * * def getErrorEstimate(self, int i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toComplex(__pyx_v_sval1, __pyx_v_sval2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":928 * 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_4); __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":955 * return toComplex(sval1, 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_99getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_98getErrorEstimate[] = "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_99getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 955, __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, 955, __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, 955, __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_98getErrorEstimate(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_98getErrorEstimate(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/PEP.pyx":970 * Error estimate. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/PEP.pyx":971 * """ * 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 == ((int)-1))) __PYX_ERR(16, 971, __pyx_L1_error) /* "SLEPc/PEP.pyx":972 * 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(16, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":955 * return toComplex(sval1, 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":974 * 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_101computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_100computeError[] = "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_101computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 974, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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, 974, __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, 974, __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_100computeError(((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_100computeError(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/PEP.pyx":998 * ``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":999 * """ * 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":1000 * 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(16, 1000, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/PEP.pyx":1001 * 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 == ((int)-1))) __PYX_ERR(16, 1001, __pyx_L1_error) /* "SLEPc/PEP.pyx":1002 * 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(16, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":974 * 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":1004 * 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_103errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_102errorView[] = "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_103errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, 1004, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 1004, __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(16, 1004, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_102errorView(((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_102errorView(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; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/PEP.pyx":1025 * * """ * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) */ __pyx_v_et = PEP_ERROR_RELATIVE; /* "SLEPc/PEP.pyx":1026 * """ * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( PEPErrorView(self.pep, et, 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(16, 1026, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/PEP.pyx":1027 * cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( PEPErrorView(self.pep, et, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/PEP.pyx":1028 * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( PEPErrorView(self.pep, et, vwr) ) # <<<<<<<<<<<<<< * * # */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPErrorView(__pyx_v_self->pep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 1028, __pyx_L1_error) /* "SLEPc/PEP.pyx":1004 * 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":1032 * # * * def setLinearEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * Associate an eigensolver object (EPS) to the polynomial eigenvalue solver. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearEPS[] = "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_105setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PySlepcEPSObject *__pyx_v_eps = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 1032, __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(16, 1032, __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(16, 1032, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearEPS(((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_104setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLinearEPS", 0); /* "SLEPc/PEP.pyx":1041 * 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 == ((int)-1))) __PYX_ERR(16, 1041, __pyx_L1_error) /* "SLEPc/PEP.pyx":1032 * # * * def setLinearEPS(self, EPS eps): # <<<<<<<<<<<<<< * """ * 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":1043 * 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_107getLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearEPS[] = "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_107getLinearEPS(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_106getLinearEPS(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearEPS(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLinearEPS", 0); /* "SLEPc/PEP.pyx":1053 * The linear eigensolver. * """ * cdef EPS eps = EPS() # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":1054 * """ * 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 == ((int)-1))) __PYX_ERR(16, 1054, __pyx_L1_error) /* "SLEPc/PEP.pyx":1055 * cdef EPS eps = EPS() * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) # <<<<<<<<<<<<<< * return eps * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj)); /* "SLEPc/PEP.pyx":1056 * CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) ) * PetscINCREF(eps.obj) * return eps # <<<<<<<<<<<<<< * * def setLinearLinearization(self, alpha=1.0, beta=0.0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_eps)); __pyx_r = ((PyObject *)__pyx_v_eps); goto __pyx_L0; /* "SLEPc/PEP.pyx":1043 * 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":1058 * return eps * * def setLinearLinearization(self, alpha=1.0, beta=0.0): # <<<<<<<<<<<<<< * """ * Set the coefficients that define the linearization of a quadratic eigenproblem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_109setLinearLinearization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_108setLinearLinearization[] = "PEP.setLinearLinearization(self, alpha=1.0, beta=0.0)\n\n Set the coefficients that define the linearization of a quadratic eigenproblem.\n\n Parameters\n ----------\n alpha: float\n first parameter of the linearization.\n beta: float\n second parameter of the linearization.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_109setLinearLinearization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alpha = 0; PyObject *__pyx_v_beta = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setLinearLinearization (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,&__pyx_n_s_beta,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_float_1_0); values[1] = ((PyObject *)__pyx_float_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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, "setLinearLinearization") < 0)) __PYX_ERR(16, 1058, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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("setLinearLinearization", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1058, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearLinearization", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_108setLinearLinearization(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_alpha, __pyx_v_beta); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_108setLinearLinearization(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta) { PetscReal __pyx_v_a; PetscReal __pyx_v_b; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLinearLinearization", 0); /* "SLEPc/PEP.pyx":1069 * second parameter of the linearization. * """ * cdef PetscReal a = alpha # <<<<<<<<<<<<<< * cdef PetscReal b = beta * CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_alpha); if (unlikely((__pyx_t_1 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(16, 1069, __pyx_L1_error) __pyx_v_a = __pyx_t_1; /* "SLEPc/PEP.pyx":1070 * """ * cdef PetscReal a = alpha * cdef PetscReal b = beta # <<<<<<<<<<<<<< * CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_beta); if (unlikely((__pyx_t_1 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(16, 1070, __pyx_L1_error) __pyx_v_b = __pyx_t_1; /* "SLEPc/PEP.pyx":1071 * cdef PetscReal a = alpha * cdef PetscReal b = beta * CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) # <<<<<<<<<<<<<< * * def getLinearLinearization(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetLinearization(__pyx_v_self->pep, __pyx_v_a, __pyx_v_b)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1071, __pyx_L1_error) /* "SLEPc/PEP.pyx":1058 * return eps * * def setLinearLinearization(self, alpha=1.0, beta=0.0): # <<<<<<<<<<<<<< * """ * Set the coefficients that define the linearization of a quadratic eigenproblem. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearLinearization", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1073 * CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) * * def getLinearLinearization(self): # <<<<<<<<<<<<<< * """ * Returns the coefficients that define the linearization of a quadratic eigenproblem. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_111getLinearLinearization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_110getLinearLinearization[] = "PEP.getLinearLinearization(self)\n\n Returns the coefficients that define the linearization of a quadratic eigenproblem.\n\n Returns\n -------\n alpha: float\n first parameter of the linearization.\n beta: float\n second parameter of the linearization.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_111getLinearLinearization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLinearLinearization (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getLinearLinearization", 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, "getLinearLinearization", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_110getLinearLinearization(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_110getLinearLinearization(struct PySlepcPEPObject *__pyx_v_self) { PetscReal __pyx_v_a; PetscReal __pyx_v_b; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLinearLinearization", 0); /* "SLEPc/PEP.pyx":1084 * second parameter of the linearization. * """ * cdef PetscReal a = 0.0 # <<<<<<<<<<<<<< * cdef PetscReal b = 0.0 * CHKERR( PEPLinearGetLinearization(self.pep, &a, &b) ) */ __pyx_v_a = 0.0; /* "SLEPc/PEP.pyx":1085 * """ * cdef PetscReal a = 0.0 * cdef PetscReal b = 0.0 # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetLinearization(self.pep, &a, &b) ) * return (a, b) */ __pyx_v_b = 0.0; /* "SLEPc/PEP.pyx":1086 * cdef PetscReal a = 0.0 * cdef PetscReal b = 0.0 * CHKERR( PEPLinearGetLinearization(self.pep, &a, &b) ) # <<<<<<<<<<<<<< * return (a, b) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetLinearization(__pyx_v_self->pep, (&__pyx_v_a), (&__pyx_v_b))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1086, __pyx_L1_error) /* "SLEPc/PEP.pyx":1087 * cdef PetscReal b = 0.0 * CHKERR( PEPLinearGetLinearization(self.pep, &a, &b) ) * return (a, b) # <<<<<<<<<<<<<< * * def setLinearExplicitMatrix(self, flag): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_b); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 1087, __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":1073 * CHKERR( PEPLinearSetLinearization(self.pep, a, b) ) * * def getLinearLinearization(self): # <<<<<<<<<<<<<< * """ * Returns the coefficients that define the linearization of a quadratic eigenproblem. */ /* 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.getLinearLinearization", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1089 * return (a, b) * * def setLinearExplicitMatrix(self, flag): # <<<<<<<<<<<<<< * """ * Indicate if the matrices A and B for the linearization of the problem */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_113setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_112setLinearExplicitMatrix[] = "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_113setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(16, 1089, __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(16, 1089, __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:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_112setLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_112setLinearExplicitMatrix(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setLinearExplicitMatrix", 0); /* "SLEPc/PEP.pyx":1099 * boolean flag indicating if the matrices are built explicitly . * """ * cdef PetscBool sval = asBool(flag) # <<<<<<<<<<<<<< * CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) ) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asBool(__pyx_v_flag); if (unlikely(__pyx_t_1 == ((PetscBool)((PetscBool)0)) && PyErr_Occurred())) __PYX_ERR(16, 1099, __pyx_L1_error) __pyx_v_sval = __pyx_t_1; /* "SLEPc/PEP.pyx":1100 * """ * cdef PetscBool sval = asBool(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 == ((int)-1))) __PYX_ERR(16, 1100, __pyx_L1_error) /* "SLEPc/PEP.pyx":1089 * return (a, b) * * def setLinearExplicitMatrix(self, flag): # <<<<<<<<<<<<<< * """ * 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":1102 * 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_115getLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_114getLinearExplicitMatrix[] = "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_115getLinearExplicitMatrix(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_114getLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_114getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_sval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLinearExplicitMatrix", 0); /* "SLEPc/PEP.pyx":1111 * flag: boolean * """ * cdef PetscBool sval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) * return toBool(sval) */ __pyx_v_sval = PETSC_FALSE; /* "SLEPc/PEP.pyx":1112 * """ * cdef PetscBool sval = PETSC_FALSE * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) # <<<<<<<<<<<<<< * return toBool(sval) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetExplicitMatrix(__pyx_v_self->pep, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1112, __pyx_L1_error) /* "SLEPc/PEP.pyx":1113 * cdef PetscBool sval = PETSC_FALSE * CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) ) * return toBool(sval) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1102 * 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/PEP.pyx":1117 * # * * def setTOARRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the TOAR method, in */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_117setTOARRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_116setTOARRestart[] = "PEP.setTOARRestart(self, keep)\n\n Sets the restart parameter for the TOAR 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_3PEP_117setTOARRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_keep = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTOARRestart (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setTOARRestart") < 0)) __PYX_ERR(16, 1117, __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("setTOARRestart", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1117, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTOARRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_116setTOARRestart(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_keep); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_116setTOARRestart(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTOARRestart", 0); /* "SLEPc/PEP.pyx":1132 * Allowed values are in the range [0.1,0.9]. The default is 0.5. * """ * cdef PetscReal val = keep # <<<<<<<<<<<<<< * CHKERR( PEPTOARSetRestart(self.pep, val) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_keep); if (unlikely((__pyx_t_1 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(16, 1132, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1133 * """ * cdef PetscReal val = keep * CHKERR( PEPTOARSetRestart(self.pep, val) ) # <<<<<<<<<<<<<< * * def getTOARRestart(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPTOARSetRestart(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1133, __pyx_L1_error) /* "SLEPc/PEP.pyx":1117 * # * * def setTOARRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the TOAR method, in */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTOARRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1135 * CHKERR( PEPTOARSetRestart(self.pep, val) ) * * def getTOARRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the TOAR method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_119getTOARRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_118getTOARRestart[] = "PEP.getTOARRestart(self)\n\n Gets the restart parameter used in the TOAR 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_3PEP_119getTOARRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTOARRestart (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTOARRestart", 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, "getTOARRestart", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_118getTOARRestart(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_118getTOARRestart(struct PySlepcPEPObject *__pyx_v_self) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTOARRestart", 0); /* "SLEPc/PEP.pyx":1144 * The number of vectors to be kept at restart. * """ * cdef PetscReal val = 0 # <<<<<<<<<<<<<< * CHKERR( PEPTOARGetRestart(self.pep, &val) ) * return val */ __pyx_v_val = 0.0; /* "SLEPc/PEP.pyx":1145 * """ * cdef PetscReal val = 0 * CHKERR( PEPTOARGetRestart(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPTOARGetRestart(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1145, __pyx_L1_error) /* "SLEPc/PEP.pyx":1146 * cdef PetscReal val = 0 * CHKERR( PEPTOARGetRestart(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * def setTOARLocking(self, lock): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1135 * CHKERR( PEPTOARSetRestart(self.pep, val) ) * * def getTOARRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the TOAR method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTOARRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1148 * return val * * def setTOARLocking(self, lock): # <<<<<<<<<<<<<< * """ * Choose between locking and non-locking variants of the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_121setTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_120setTOARLocking[] = "PEP.setTOARLocking(self, lock)\n\n Choose between locking and non-locking variants of the\n TOAR 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_3PEP_121setTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lock = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTOARLocking (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setTOARLocking") < 0)) __PYX_ERR(16, 1148, __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("setTOARLocking", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_120setTOARLocking(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_lock); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_120setTOARLocking(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTOARLocking", 0); /* "SLEPc/PEP.pyx":1165 * non-locking variant). * """ * cdef PetscBool val = lock # <<<<<<<<<<<<<< * CHKERR( PEPTOARSetLocking(self.pep, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_lock)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 1165, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1166 * """ * cdef PetscBool val = lock * CHKERR( PEPTOARSetLocking(self.pep, val) ) # <<<<<<<<<<<<<< * * def getTOARLocking(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPTOARSetLocking(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1166, __pyx_L1_error) /* "SLEPc/PEP.pyx":1148 * return val * * def setTOARLocking(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.PEP.setTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1168 * CHKERR( PEPTOARSetLocking(self.pep, val) ) * * def getTOARLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the TOAR method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_123getTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_122getTOARLocking[] = "PEP.getTOARLocking(self)\n\n Gets the locking flag used in the TOAR method.\n\n Returns\n -------\n lock: bool\n The locking flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_123getTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTOARLocking (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTOARLocking", 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, "getTOARLocking", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_122getTOARLocking(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_122getTOARLocking(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTOARLocking", 0); /* "SLEPc/PEP.pyx":1177 * The locking flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPTOARGetLocking(self.pep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/PEP.pyx":1178 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPTOARGetLocking(self.pep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPTOARGetLocking(__pyx_v_self->pep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1178, __pyx_L1_error) /* "SLEPc/PEP.pyx":1179 * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPTOARGetLocking(self.pep, &tval) ) * return tval # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1168 * CHKERR( PEPTOARSetLocking(self.pep, val) ) * * def getTOARLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the TOAR method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1183 * # * * def setSTOARLocking(self, lock): # <<<<<<<<<<<<<< * """ * Choose between locking and non-locking variants of the */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_125setSTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_124setSTOARLocking[] = "PEP.setSTOARLocking(self, lock)\n\n Choose between locking and non-locking variants of the\n STOAR 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_3PEP_125setSTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lock = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSTOARLocking (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setSTOARLocking") < 0)) __PYX_ERR(16, 1183, __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("setSTOARLocking", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1183, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setSTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_124setSTOARLocking(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_lock); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_124setSTOARLocking(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSTOARLocking", 0); /* "SLEPc/PEP.pyx":1200 * non-locking variant). * """ * cdef PetscBool val = lock # <<<<<<<<<<<<<< * CHKERR( PEPSTOARSetLocking(self.pep, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_lock)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 1200, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1201 * """ * cdef PetscBool val = lock * CHKERR( PEPSTOARSetLocking(self.pep, val) ) # <<<<<<<<<<<<<< * * def getSTOARLocking(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARSetLocking(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1201, __pyx_L1_error) /* "SLEPc/PEP.pyx":1183 * # * * def setSTOARLocking(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.PEP.setSTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1203 * CHKERR( PEPSTOARSetLocking(self.pep, val) ) * * def getSTOARLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the STOAR method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_127getSTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_126getSTOARLocking[] = "PEP.getSTOARLocking(self)\n\n Gets the locking flag used in the STOAR method.\n\n Returns\n -------\n lock: bool\n The locking flag.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_127getSTOARLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSTOARLocking (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getSTOARLocking", 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, "getSTOARLocking", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_126getSTOARLocking(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_126getSTOARLocking(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSTOARLocking", 0); /* "SLEPc/PEP.pyx":1212 * The locking flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPSTOARGetLocking(self.pep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/PEP.pyx":1213 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPSTOARGetLocking(self.pep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARGetLocking(__pyx_v_self->pep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1213, __pyx_L1_error) /* "SLEPc/PEP.pyx":1214 * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPSTOARGetLocking(self.pep, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setSTOARDetectZeros(self, detect): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1203 * CHKERR( PEPSTOARSetLocking(self.pep, val) ) * * def getSTOARLocking(self): # <<<<<<<<<<<<<< * """ * Gets the locking flag used in the STOAR method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getSTOARLocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1216 * return tval * * def setSTOARDetectZeros(self, detect): # <<<<<<<<<<<<<< * """ * Sets a flag to enforce detection of zeros during the factorizations */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_129setSTOARDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_128setSTOARDetectZeros[] = "PEP.setSTOARDetectZeros(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 This feature currently requires an external package for factorizations\n with support for zero detection, e.g. MUMPS.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_129setSTOARDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_detect = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSTOARDetectZeros (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setSTOARDetectZeros") < 0)) __PYX_ERR(16, 1216, __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("setSTOARDetectZeros", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1216, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setSTOARDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_128setSTOARDetectZeros(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_detect); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_128setSTOARDetectZeros(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSTOARDetectZeros", 0); /* "SLEPc/PEP.pyx":1235 * with support for zero detection, e.g. MUMPS. * """ * cdef PetscBool val = detect # <<<<<<<<<<<<<< * CHKERR( PEPSTOARSetDetectZeros(self.pep, val) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_detect)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 1235, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1236 * """ * cdef PetscBool val = detect * CHKERR( PEPSTOARSetDetectZeros(self.pep, val) ) # <<<<<<<<<<<<<< * * def getSTOARDetectZeros(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARSetDetectZeros(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1236, __pyx_L1_error) /* "SLEPc/PEP.pyx":1216 * return tval * * def setSTOARDetectZeros(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.PEP.setSTOARDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1238 * CHKERR( PEPSTOARSetDetectZeros(self.pep, val) ) * * def getSTOARDetectZeros(self): # <<<<<<<<<<<<<< * """ * Gets the flag that enforces zero detection in spectrum slicing. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_131getSTOARDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_130getSTOARDetectZeros[] = "PEP.getSTOARDetectZeros(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_3PEP_131getSTOARDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSTOARDetectZeros (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getSTOARDetectZeros", 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, "getSTOARDetectZeros", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_130getSTOARDetectZeros(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_130getSTOARDetectZeros(struct PySlepcPEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSTOARDetectZeros", 0); /* "SLEPc/PEP.pyx":1247 * The zero detection flag. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( PEPSTOARGetDetectZeros(self.pep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/PEP.pyx":1248 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPSTOARGetDetectZeros(self.pep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARGetDetectZeros(__pyx_v_self->pep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1248, __pyx_L1_error) /* "SLEPc/PEP.pyx":1249 * cdef PetscBool tval = PETSC_FALSE * CHKERR( PEPSTOARGetDetectZeros(self.pep, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setSTOARDimensions(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(16, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1238 * CHKERR( PEPSTOARSetDetectZeros(self.pep, val) ) * * def getSTOARDetectZeros(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.PEP.getSTOARDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1251 * return tval * * def setSTOARDimensions(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_3PEP_133setSTOARDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_132setSTOARDimensions[] = "PEP.setSTOARDimensions(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_3PEP_133setSTOARDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setSTOARDimensions (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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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, "setSTOARDimensions") < 0)) __PYX_ERR(16, 1251, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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("setSTOARDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1251, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setSTOARDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_132setSTOARDimensions(((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_132setSTOARDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSTOARDimensions", 0); /* "SLEPc/PEP.pyx":1266 * 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":1267 * """ * 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":1268 * 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":1269 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 1269, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/PEP.pyx":1270 * 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( PEPSTOARSetDimensions(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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 1270, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/PEP.pyx":1271 * 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( PEPSTOARSetDimensions(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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(16, 1271, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/PEP.pyx":1272 * if ncv is not None: ival2 = asInt(ncv) * if mpd is not None: ival3 = asInt(mpd) * CHKERR( PEPSTOARSetDimensions(self.pep, ival1, ival2, ival3) ) # <<<<<<<<<<<<<< * * def getSTOARDimensions(self): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARSetDimensions(__pyx_v_self->pep, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 1272, __pyx_L1_error) /* "SLEPc/PEP.pyx":1251 * return tval * * def setSTOARDimensions(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.PEP.setSTOARDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1274 * CHKERR( PEPSTOARSetDimensions(self.pep, ival1, ival2, ival3) ) * * def getSTOARDimensions(self): # <<<<<<<<<<<<<< * """ * Gets the dimensions used for each subsolve step in case of doing */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_135getSTOARDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_134getSTOARDimensions[] = "PEP.getSTOARDimensions(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_3PEP_135getSTOARDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getSTOARDimensions (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getSTOARDimensions", 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, "getSTOARDimensions", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_134getSTOARDimensions(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_134getSTOARDimensions(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSTOARDimensions", 0); /* "SLEPc/PEP.pyx":1288 * 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":1289 * """ * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 # <<<<<<<<<<<<<< * cdef PetscInt ival3 = 0 * CHKERR( PEPSTOARGetDimensions(self.pep, &ival1, &ival2, &ival3) ) */ __pyx_v_ival2 = 0; /* "SLEPc/PEP.pyx":1290 * cdef PetscInt ival1 = 0 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 # <<<<<<<<<<<<<< * CHKERR( PEPSTOARGetDimensions(self.pep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) */ __pyx_v_ival3 = 0; /* "SLEPc/PEP.pyx":1291 * cdef PetscInt ival2 = 0 * cdef PetscInt ival3 = 0 * CHKERR( PEPSTOARGetDimensions(self.pep, &ival1, &ival2, &ival3) ) # <<<<<<<<<<<<<< * return (toInt(ival1), toInt(ival2), toInt(ival3)) * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSTOARGetDimensions(__pyx_v_self->pep, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1291, __pyx_L1_error) /* "SLEPc/PEP.pyx":1292 * cdef PetscInt ival3 = 0 * CHKERR( PEPSTOARGetDimensions(self.pep, &ival1, &ival2, &ival3) ) * return (toInt(ival1), toInt(ival2), toInt(ival3)) # <<<<<<<<<<<<<< * * # */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1292, __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, 1292, __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, 1292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 1292, __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":1274 * CHKERR( PEPSTOARSetDimensions(self.pep, ival1, ival2, ival3) ) * * def getSTOARDimensions(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.PEP.getSTOARDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1296 * # * * def setJDRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the Jacobi-Davidson method, in */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_137setJDRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_136setJDRestart[] = "PEP.setJDRestart(self, keep)\n\n Sets the restart parameter for the Jacobi-Davidson 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_3PEP_137setJDRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_keep = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setJDRestart (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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, "setJDRestart") < 0)) __PYX_ERR(16, 1296, __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("setJDRestart", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1296, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setJDRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_136setJDRestart(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_keep); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_136setJDRestart(struct PySlepcPEPObject *__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setJDRestart", 0); /* "SLEPc/PEP.pyx":1311 * Allowed values are in the range [0.1,0.9]. The default is 0.5. * """ * cdef PetscReal val = keep # <<<<<<<<<<<<<< * CHKERR( PEPJDSetRestart(self.pep, val) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_keep); if (unlikely((__pyx_t_1 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(16, 1311, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1312 * """ * cdef PetscReal val = keep * CHKERR( PEPJDSetRestart(self.pep, val) ) # <<<<<<<<<<<<<< * * def getJDRestart(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPJDSetRestart(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1312, __pyx_L1_error) /* "SLEPc/PEP.pyx":1296 * # * * def setJDRestart(self, keep): # <<<<<<<<<<<<<< * """ * Sets the restart parameter for the Jacobi-Davidson method, in */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setJDRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1314 * CHKERR( PEPJDSetRestart(self.pep, val) ) * * def getJDRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the Jacobi-Davidson method. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_139getJDRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_138getJDRestart[] = "PEP.getJDRestart(self)\n\n Gets the restart parameter used in the Jacobi-Davidson 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_3PEP_139getJDRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getJDRestart (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getJDRestart", 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, "getJDRestart", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_138getJDRestart(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_138getJDRestart(struct PySlepcPEPObject *__pyx_v_self) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getJDRestart", 0); /* "SLEPc/PEP.pyx":1323 * The number of vectors to be kept at restart. * """ * cdef PetscReal val = 0 # <<<<<<<<<<<<<< * CHKERR( PEPJDGetRestart(self.pep, &val) ) * return val */ __pyx_v_val = 0.0; /* "SLEPc/PEP.pyx":1324 * """ * cdef PetscReal val = 0 * CHKERR( PEPJDGetRestart(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPJDGetRestart(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1324, __pyx_L1_error) /* "SLEPc/PEP.pyx":1325 * cdef PetscReal val = 0 * CHKERR( PEPJDGetRestart(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * def setJDFix(self, fix): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1314 * CHKERR( PEPJDSetRestart(self.pep, val) ) * * def getJDRestart(self): # <<<<<<<<<<<<<< * """ * Gets the restart parameter used in the Jacobi-Davidson method. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getJDRestart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1327 * return val * * def setJDFix(self, fix): # <<<<<<<<<<<<<< * """ * Sets the threshold for changing the target in the correction */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_141setJDFix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_140setJDFix[] = "PEP.setJDFix(self, fix)\n\n Sets the threshold for changing the target in the correction\n equation.\n\n Parameters\n ----------\n fix: float\n Threshold for changing the target.\n\n Notes\n -----\n The target in the correction equation is fixed at the first iterations.\n When the norm of the residual vector is lower than the fix value,\n the target is set to the corresponding eigenvalue.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_141setJDFix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fix = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setJDFix (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fix,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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fix)) != 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, "setJDFix") < 0)) __PYX_ERR(16, 1327, __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_fix = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setJDFix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 1327, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setJDFix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_140setJDFix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_fix); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_140setJDFix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_fix) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscReal __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setJDFix", 0); /* "SLEPc/PEP.pyx":1343 * the target is set to the corresponding eigenvalue. * """ * cdef PetscReal val = fix # <<<<<<<<<<<<<< * CHKERR( PEPJDSetFix(self.pep, val) ) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_fix); if (unlikely((__pyx_t_1 == ((PetscReal)-1)) && PyErr_Occurred())) __PYX_ERR(16, 1343, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/PEP.pyx":1344 * """ * cdef PetscReal val = fix * CHKERR( PEPJDSetFix(self.pep, val) ) # <<<<<<<<<<<<<< * * def getJDFix(self): */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPJDSetFix(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 1344, __pyx_L1_error) /* "SLEPc/PEP.pyx":1327 * return val * * def setJDFix(self, fix): # <<<<<<<<<<<<<< * """ * Sets the threshold for changing the target in the correction */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setJDFix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/PEP.pyx":1346 * CHKERR( PEPJDSetFix(self.pep, val) ) * * def getJDFix(self): # <<<<<<<<<<<<<< * """ * Gets threshold for changing the target in the correction equation. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_143getJDFix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3PEP_142getJDFix[] = "PEP.getJDFix(self)\n\n Gets threshold for changing the target in the correction equation.\n\n Returns\n -------\n fix: float\n The threshold for changing the target.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_143getJDFix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getJDFix (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getJDFix", 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, "getJDFix", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_142getJDFix(((struct PySlepcPEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_142getJDFix(struct PySlepcPEPObject *__pyx_v_self) { PetscReal __pyx_v_val; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getJDFix", 0); /* "SLEPc/PEP.pyx":1355 * The threshold for changing the target. * """ * cdef PetscReal val = 0 # <<<<<<<<<<<<<< * CHKERR( PEPJDGetFix(self.pep, &val) ) * return val */ __pyx_v_val = 0.0; /* "SLEPc/PEP.pyx":1356 * """ * cdef PetscReal val = 0 * CHKERR( PEPJDGetFix(self.pep, &val) ) # <<<<<<<<<<<<<< * return val * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPJDGetFix(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 1356, __pyx_L1_error) /* "SLEPc/PEP.pyx":1357 * cdef PetscReal val = 0 * CHKERR( PEPJDGetFix(self.pep, &val) ) * return val # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/PEP.pyx":1346 * CHKERR( PEPJDSetFix(self.pep, val) ) * * def getJDFix(self): # <<<<<<<<<<<<<< * """ * Gets threshold for changing the target in the correction equation. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getJDFix", __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 100, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 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(17, 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/NEP.pyx":110 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( NEPView(self.nep, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/NEP.pyx":111 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( NEPView(self.nep, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPView(__pyx_v_self->nep, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 111, __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":113 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/NEP.pyx":117 * 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 == ((int)-1))) __PYX_ERR(17, 117, __pyx_L1_error) /* "SLEPc/NEP.pyx":118 * """ * CHKERR( NEPDestroy(&self.nep) ) * self.nep = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->nep = NULL; /* "SLEPc/NEP.pyx":119 * 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":113 * 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":121 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/NEP.pyx":125 * 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 == ((int)-1))) __PYX_ERR(17, 125, __pyx_L1_error) /* "SLEPc/NEP.pyx":121 * 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":127 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 127, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 127, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/NEP.pyx":137 * 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(17, 137, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/NEP.pyx":138 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPCreate(__pyx_v_ccomm, (&__pyx_v_newnep))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 139, __pyx_L1_error) /* "SLEPc/NEP.pyx":140 * cdef SlepcNEP newnep = NULL * CHKERR( NEPCreate(ccomm, &newnep) ) * SlepcCLEAR(self.obj); self.nep = newnep # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->nep = __pyx_v_newnep; /* "SLEPc/NEP.pyx":141 * 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":127 * 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":143 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 143, __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(17, 143, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_nep_type); /* "SLEPc/NEP.pyx":152 * 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":153 * """ * 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(17, 153, __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":154 * 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 == ((int)-1))) __PYX_ERR(17, 154, __pyx_L1_error) /* "SLEPc/NEP.pyx":143 * 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":156 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/NEP.pyx":165 * 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":166 * """ * 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 == ((int)-1))) __PYX_ERR(17, 166, __pyx_L1_error) /* "SLEPc/NEP.pyx":167 * 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(17, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":156 * 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":169 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/NEP.pyx":179 * 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":180 * """ * 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 == ((int)-1))) __PYX_ERR(17, 180, __pyx_L1_error) /* "SLEPc/NEP.pyx":181 * 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(17, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":169 * 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":183 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 183, __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, 183, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/NEP.pyx":193 * 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":194 * """ * 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(17, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":195 * 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 == ((int)-1))) __PYX_ERR(17, 195, __pyx_L1_error) /* "SLEPc/NEP.pyx":183 * 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":197 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 197, __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, 197, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/NEP.pyx":207 * 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":208 * """ * 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(17, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":209 * 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 == ((int)-1))) __PYX_ERR(17, 209, __pyx_L1_error) /* "SLEPc/NEP.pyx":197 * 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":211 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/NEP.pyx":217 * 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 == ((int)-1))) __PYX_ERR(17, 217, __pyx_L1_error) /* "SLEPc/NEP.pyx":211 * 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":219 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getWhichEigenpairs", 0); /* "SLEPc/NEP.pyx":228 * 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":229 * """ * 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 == ((int)-1))) __PYX_ERR(17, 229, __pyx_L1_error) /* "SLEPc/NEP.pyx":230 * 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(17, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":219 * 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":232 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 232, __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(17, 232, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setWhichEigenpairs", 0); /* "SLEPc/NEP.pyx":241 * 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(17, 241, __pyx_L1_error) __pyx_v_val = __pyx_t_1; /* "SLEPc/NEP.pyx":242 * """ * 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 == ((int)-1))) __PYX_ERR(17, 242, __pyx_L1_error) /* "SLEPc/NEP.pyx":232 * 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":244 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/NEP.pyx":256 * 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":257 * """ * 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":258 * 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 == ((int)-1))) __PYX_ERR(17, 258, __pyx_L1_error) /* "SLEPc/NEP.pyx":259 * 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(17, 259, __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, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 259, __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":244 * 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":261 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 261, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(17, 261, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/NEP.pyx":272 * 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":273 * """ * 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":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) * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(17, 274, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/NEP.pyx":275 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(17, 275, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/NEP.pyx":276 * 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 == ((int)-1))) __PYX_ERR(17, 276, __pyx_L1_error) /* "SLEPc/NEP.pyx":261 * 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":278 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRIILagPreconditioner", 0); /* "SLEPc/NEP.pyx":287 * The lag parameter. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) ) * return ival */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":288 * """ * 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 == ((int)-1))) __PYX_ERR(17, 288, __pyx_L1_error) /* "SLEPc/NEP.pyx":289 * 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(17, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":278 * 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":291 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 291, __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(17, 291, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRIILagPreconditioner", 0); /* "SLEPc/NEP.pyx":303 * 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(17, 303, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/NEP.pyx":304 * """ * 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 == ((int)-1))) __PYX_ERR(17, 304, __pyx_L1_error) /* "SLEPc/NEP.pyx":291 * 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":306 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTrackAll", 0); /* "SLEPc/NEP.pyx":316 * 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":317 * """ * 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 == ((int)-1))) __PYX_ERR(17, 317, __pyx_L1_error) /* "SLEPc/NEP.pyx":318 * 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(17, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":306 * 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":320 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 320, __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(17, 320, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTrackAll", 0); /* "SLEPc/NEP.pyx":330 * 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(17, 330, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/NEP.pyx":331 * """ * 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 == ((int)-1))) __PYX_ERR(17, 331, __pyx_L1_error) /* "SLEPc/NEP.pyx":320 * 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":333 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/NEP.pyx":347 * 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":348 * """ * 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":349 * 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":350 * 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 == ((int)-1))) __PYX_ERR(17, 350, __pyx_L1_error) /* "SLEPc/NEP.pyx":351 * 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(17, 351, __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(17, 351, __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(17, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 351, __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":333 * 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":353 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nev); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ncv); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 353, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(17, 353, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/NEP.pyx":368 * 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":369 * """ * 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":370 * 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":371 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(17, 371, __pyx_L1_error) __pyx_v_ival1 = __pyx_t_3; } /* "SLEPc/NEP.pyx":372 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(17, 372, __pyx_L1_error) __pyx_v_ival2 = __pyx_t_3; } /* "SLEPc/NEP.pyx":373 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(17, 373, __pyx_L1_error) __pyx_v_ival3 = __pyx_t_3; } /* "SLEPc/NEP.pyx":374 * 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 == ((int)-1))) __PYX_ERR(17, 374, __pyx_L1_error) /* "SLEPc/NEP.pyx":353 * 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":376 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/NEP.pyx":385 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":386 * """ * 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 == ((int)-1))) __PYX_ERR(17, 386, __pyx_L1_error) /* "SLEPc/NEP.pyx":387 * cdef BV bv = BV() * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj)); /* "SLEPc/NEP.pyx":388 * CHKERR( NEPGetBV(self.nep, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/NEP.pyx":376 * 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":390 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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, 390, __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, 390, __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(17, 390, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/NEP.pyx":399 * 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 == ((int)-1))) __PYX_ERR(17, 399, __pyx_L1_error) /* "SLEPc/NEP.pyx":390 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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":401 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getRG", 0); /* "SLEPc/NEP.pyx":410 * The region context. * """ * cdef RG rg = RG() # <<<<<<<<<<<<<< * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":411 * """ * 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 == ((int)-1))) __PYX_ERR(17, 411, __pyx_L1_error) /* "SLEPc/NEP.pyx":412 * cdef RG rg = RG() * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) # <<<<<<<<<<<<<< * return rg * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj)); /* "SLEPc/NEP.pyx":413 * CHKERR( NEPGetRG(self.nep, &rg.rg) ) * PetscINCREF(rg.obj) * return rg # <<<<<<<<<<<<<< * * def setRG(self, RG rg): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rg)); __pyx_r = ((PyObject *)__pyx_v_rg); goto __pyx_L0; /* "SLEPc/NEP.pyx":401 * 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":415 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 415, __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(17, 415, __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(17, 415, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setRG", 0); /* "SLEPc/NEP.pyx":424 * 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 == ((int)-1))) __PYX_ERR(17, 424, __pyx_L1_error) /* "SLEPc/NEP.pyx":415 * return rg * * def setRG(self, RG rg): # <<<<<<<<<<<<<< * """ * 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":428 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 428, __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(17, 428, __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; Py_ssize_t __pyx_t_6; Vec __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setInitialSpace", 0); __Pyx_INCREF(__pyx_v_space); /* "SLEPc/NEP.pyx":438 * 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(17, 438, __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":439 * """ * 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":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) * 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 == ((Py_ssize_t)-1))) __PYX_ERR(17, 440, __pyx_L1_error) __pyx_v_ns = __pyx_t_4; /* "SLEPc/NEP.pyx":441 * 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(17, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":442 * 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; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; __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(17, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(17, 442, __pyx_L1_error) __pyx_t_7 = ((struct PyPetscVecObject *)__pyx_t_3)->vec; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_vs[__pyx_v_i]) = __pyx_t_7; } /* "SLEPc/NEP.pyx":443 * 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_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetInitialSpace(__pyx_v_self->nep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 443, __pyx_L1_error) /* "SLEPc/NEP.pyx":428 * # * * 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":447 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/NEP.pyx":451 * 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 == ((int)-1))) __PYX_ERR(17, 451, __pyx_L1_error) /* "SLEPc/NEP.pyx":447 * # * * 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":455 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/NEP.pyx":460 * 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 == ((int)-1))) __PYX_ERR(17, 460, __pyx_L1_error) /* "SLEPc/NEP.pyx":455 * # * * 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":462 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/NEP.pyx":466 * 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 == ((int)-1))) __PYX_ERR(17, 466, __pyx_L1_error) /* "SLEPc/NEP.pyx":462 * 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":468 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/NEP.pyx":479 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetIterationNumber(self.nep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":480 * """ * 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 == ((int)-1))) __PYX_ERR(17, 480, __pyx_L1_error) /* "SLEPc/NEP.pyx":481 * 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(17, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":468 * 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":483 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/NEP.pyx":493 * converged. * """ * cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( NEPGetConvergedReason(self.nep, &val) ) * return val */ __pyx_v_val = NEP_CONVERGED_ITERATING; /* "SLEPc/NEP.pyx":494 * """ * 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 == ((int)-1))) __PYX_ERR(17, 494, __pyx_L1_error) /* "SLEPc/NEP.pyx":495 * 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(17, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":483 * 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":498 * * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConverged", 0); /* "SLEPc/NEP.pyx":507 * Number of converged eigenpairs. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetConverged(self.nep, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/NEP.pyx":508 * """ * 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 == ((int)-1))) __PYX_ERR(17, 508, __pyx_L1_error) /* "SLEPc/NEP.pyx":509 * 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(17, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":498 * * * 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":511 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Vr); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 511, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(17, 511, __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(17, 511, __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(17, 511, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(17, 511, __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 Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getEigenpair", 0); /* "SLEPc/NEP.pyx":531 * The computed eigenvalue. * """ * cdef PetscScalar sval1 = 0 # <<<<<<<<<<<<<< * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL */ __pyx_v_sval1 = 0.0; /* "SLEPc/NEP.pyx":532 * """ * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 # <<<<<<<<<<<<<< * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL */ __pyx_v_sval2 = 0.0; /* "SLEPc/NEP.pyx":533 * cdef PetscScalar sval1 = 0 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL # <<<<<<<<<<<<<< * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vr) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vr->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_vecr = __pyx_t_1; /* "SLEPc/NEP.pyx":534 * cdef PetscScalar sval2 = 0 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) */ __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Vi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/NEP.pyx":535 * cdef PetscVec vecr = Vr.vec if Vr is not None else NULL * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) # <<<<<<<<<<<<<< * return toComplex(sval1, sval2) * */ __pyx_t_3 = __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_3 == ((int)-1))) __PYX_ERR(17, 535, __pyx_L1_error) /* "SLEPc/NEP.pyx":536 * cdef PetscVec veci = Vi.vec if Vi is not None else NULL * CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) ) * return toComplex(sval1, sval2) # <<<<<<<<<<<<<< * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toComplex(__pyx_v_sval1, __pyx_v_sval2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":511 * 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_4); __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":538 * return toComplex(sval1, sval2) * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th left eigenvector as computed by `solve()`. */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getLeftEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_66getLeftEigenvector[] = "NEP.getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None)\n\n Gets the i-th left eigenvector as computed by `solve()`.\n\n Parameters\n ----------\n i: int\n Index of the solution to be obtained.\n Wr: Vec\n Placeholder for the returned eigenvector (real part).\n Wi: 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()`). Eigensolutions are indexed\n according to the ordering criterion established with\n `setWhichEigenpairs()`.\n\n Left eigenvectors are available only if the twosided flag was set\n with `setTwoSided()`.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getLeftEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; struct PyPetscVecObject *__pyx_v_Wr = 0; struct PyPetscVecObject *__pyx_v_Wi = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getLeftEigenvector (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Wr,&__pyx_n_s_Wi,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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Wr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getLeftEigenvector", 0, 2, 3, 1); __PYX_ERR(17, 538, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Wi); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getLeftEigenvector") < 0)) __PYX_ERR(17, 538, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(17, 538, __pyx_L3_error) __pyx_v_Wr = ((struct PyPetscVecObject *)values[1]); __pyx_v_Wi = ((struct PyPetscVecObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getLeftEigenvector", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 538, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getLeftEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Wr), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "Wr", 0))) __PYX_ERR(17, 538, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Wi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Wi", 0))) __PYX_ERR(17, 538, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_66getLeftEigenvector(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Wr, __pyx_v_Wi); /* 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_66getLeftEigenvector(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Wr, struct PyPetscVecObject *__pyx_v_Wi) { Vec __pyx_v_vecr; Vec __pyx_v_veci; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Vec __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getLeftEigenvector", 0); /* "SLEPc/NEP.pyx":561 * with `setTwoSided()`. * """ * cdef PetscVec vecr = Wr.vec # <<<<<<<<<<<<<< * cdef PetscVec veci = Wi.vec if Wi is not None else NULL * CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) */ __pyx_t_1 = __pyx_v_Wr->vec; __pyx_v_vecr = __pyx_t_1; /* "SLEPc/NEP.pyx":562 * """ * cdef PetscVec vecr = Wr.vec * cdef PetscVec veci = Wi.vec if Wi is not None else NULL # <<<<<<<<<<<<<< * CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) * */ __pyx_t_2 = (((PyObject *)__pyx_v_Wi) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_Wi->vec; } else { __pyx_t_1 = ((Vec)NULL); } __pyx_v_veci = __pyx_t_1; /* "SLEPc/NEP.pyx":563 * cdef PetscVec vecr = Wr.vec * cdef PetscVec veci = Wi.vec if Wi is not None else NULL * CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) # <<<<<<<<<<<<<< * * def getErrorEstimate(self, int i): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetLeftEigenvector(__pyx_v_self->nep, __pyx_v_i, __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 563, __pyx_L1_error) /* "SLEPc/NEP.pyx":538 * return toComplex(sval1, sval2) * * def getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None): # <<<<<<<<<<<<<< * """ * Gets the i-th left 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.NEP.getLeftEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":565 * CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) * * def getErrorEstimate(self, int i): # <<<<<<<<<<<<<< * """ * Returns the error estimate associated to the i-th computed */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_69getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_68getErrorEstimate[] = "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_69getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(17, 565, __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(17, 565, __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(17, 565, __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_68getErrorEstimate(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68getErrorEstimate(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getErrorEstimate", 0); /* "SLEPc/NEP.pyx":580 * Error estimate. * """ * cdef PetscReal rval = 0 # <<<<<<<<<<<<<< * CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) ) * return toReal(rval) */ __pyx_v_rval = 0.0; /* "SLEPc/NEP.pyx":581 * """ * 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 == ((int)-1))) __PYX_ERR(17, 581, __pyx_L1_error) /* "SLEPc/NEP.pyx":582 * 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(17, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":565 * CHKERR( NEPGetLeftEigenvector(self.nep, i, vecr, veci) ) * * 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":584 * 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_71computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_70computeError[] = "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_71computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; PyObject *__pyx_v_etype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 584, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; 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(17, 584, __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(17, 584, __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_70computeError(((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_70computeError(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeError", 0); /* "SLEPc/NEP.pyx":603 * ``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":604 * """ * 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":605 * 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(17, 605, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/NEP.pyx":606 * 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 == ((int)-1))) __PYX_ERR(17, 606, __pyx_L1_error) /* "SLEPc/NEP.pyx":607 * 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(17, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":584 * 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":609 * 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_73errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_72errorView[] = "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_73errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etype = 0; struct PyPetscViewerObject *__pyx_v_viewer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_etype); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 609, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(17, 609, __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(17, 609, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_72errorView(((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_72errorView(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; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("errorView", 0); /* "SLEPc/NEP.pyx":630 * * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) */ __pyx_v_et = NEP_ERROR_RELATIVE; /* "SLEPc/NEP.pyx":631 * """ * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * if etype is not None: et = etype # <<<<<<<<<<<<<< * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( NEPErrorView(self.nep, et, 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(17, 631, __pyx_L1_error) __pyx_v_et = __pyx_t_3; } /* "SLEPc/NEP.pyx":632 * cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( NEPErrorView(self.nep, et, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/NEP.pyx":633 * if etype is not None: et = etype * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( NEPErrorView(self.nep, et, vwr) ) # <<<<<<<<<<<<<< * * def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None): */ __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPErrorView(__pyx_v_self->nep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 633, __pyx_L1_error) /* "SLEPc/NEP.pyx":609 * 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":635 * 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_75setFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_74setFunction[] = "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_75setFunction(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_F)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setFunction", 0, 2, 5, 1); __PYX_ERR(17, 635, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_P); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 635, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(17, 635, __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, 0, "F", 0))) __PYX_ERR(17, 635, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_P), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "P", 0))) __PYX_ERR(17, 635, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_74setFunction(((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_74setFunction(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 Mat __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFunction", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/NEP.pyx":649 * preconditioner matrix (usually same as the Function) * """ * cdef PetscMat Fmat = F.mat if F is not None else NULL # <<<<<<<<<<<<<< * cdef PetscMat Pmat = P.mat if P is not None else Fmat * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) */ __pyx_t_2 = (((PyObject *)__pyx_v_F) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_F->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Fmat = __pyx_t_1; /* "SLEPc/NEP.pyx":650 * """ * cdef PetscMat Fmat = F.mat if F is not None else NULL * cdef PetscMat Pmat = P.mat if P is not None else Fmat # <<<<<<<<<<<<<< * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) * if args is None: args = () */ __pyx_t_2 = (((PyObject *)__pyx_v_P) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_P->mat; } else { __pyx_t_1 = __pyx_v_Fmat; } __pyx_v_Pmat = __pyx_t_1; /* "SLEPc/NEP.pyx":651 * cdef PetscMat Fmat = F.mat if F is not None else NULL * cdef PetscMat Pmat = P.mat if P is not None else Fmat * CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) ) # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_3 = __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_3 == ((int)-1))) __PYX_ERR(17, 651, __pyx_L1_error) /* "SLEPc/NEP.pyx":652 * cdef PetscMat Pmat = P.mat if P is not None else Fmat * 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_args == Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple); } /* "SLEPc/NEP.pyx":653 * 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_4 = (__pyx_v_kargs == Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5); __pyx_t_5 = 0; } /* "SLEPc/NEP.pyx":654 * 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(17, 654, __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(17, 654, __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 * 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":656 * 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_77setJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_76setJacobian[] = "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_77setJacobian(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_J)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setJacobian", 0, 2, 4, 1); __PYX_ERR(17, 656, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 656, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(17, 656, __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, 0, "J", 0))) __PYX_ERR(17, 656, __pyx_L1_error) __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_76setJacobian(((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_76setJacobian(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 Mat __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setJacobian", 0); __Pyx_INCREF(__pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); /* "SLEPc/NEP.pyx":668 * Jacobian matrix * """ * cdef PetscMat Jmat = J.mat if J is not None else NULL # <<<<<<<<<<<<<< * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) * if args is None: args = () */ __pyx_t_2 = (((PyObject *)__pyx_v_J) != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_J->mat; } else { __pyx_t_1 = ((Mat)NULL); } __pyx_v_Jmat = __pyx_t_1; /* "SLEPc/NEP.pyx":669 * """ * cdef PetscMat Jmat = J.mat if J is not None else NULL * CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) ) # <<<<<<<<<<<<<< * if args is None: args = () * if kargs is None: kargs = {} */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetJacobian(__pyx_v_self->nep, __pyx_v_Jmat, __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian, NULL)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 669, __pyx_L1_error) /* "SLEPc/NEP.pyx":670 * cdef PetscMat Jmat = J.mat if J is not None else NULL * 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_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple); } /* "SLEPc/NEP.pyx":671 * 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_4 = (__pyx_v_kargs == Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5); __pyx_t_5 = 0; } /* "SLEPc/NEP.pyx":672 * 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(17, 672, __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(17, 672, __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":656 * 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":674 * 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_79setSplitOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_78setSplitOperator[] = "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_79setSplitOperator(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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setSplitOperator", 0, 2, 3, 1); __PYX_ERR(17, 674, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(17, 674, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; 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(17, 674, __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_78setSplitOperator(((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_78setSplitOperator(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; Py_ssize_t __pyx_t_7; Mat __pyx_t_8; FN __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSplitOperator", 0); __Pyx_INCREF(__pyx_v_A); __Pyx_INCREF(__pyx_v_f); /* "SLEPc/NEP.pyx":688 * 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(17, 688, __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":689 * """ * 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(17, 689, __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":690 * 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":691 * 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":692 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(17, 692, __pyx_L1_error) __pyx_v_n = __pyx_t_4; /* "SLEPc/NEP.pyx":693 * 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)((MatStructure)-1L)))) __PYX_ERR(17, 693, __pyx_L1_error) __pyx_v_mstr = __pyx_t_5; /* "SLEPc/NEP.pyx":694 * 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 == ((Py_ssize_t)-1))) __PYX_ERR(17, 694, __pyx_L1_error) if (unlikely(!((__pyx_v_n == __pyx_t_4) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(17, 694, __pyx_L1_error) } } #endif /* "SLEPc/NEP.pyx":695 * 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(17, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":696 * 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(17, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":697 * 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; __pyx_t_6 = __pyx_t_4; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "SLEPc/NEP.pyx":698 * 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(17, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(17, 698, __pyx_L1_error) __pyx_t_8 = ((struct PyPetscMatObject *)__pyx_t_3)->mat; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_As[__pyx_v_i]) = __pyx_t_8; /* "SLEPc/NEP.pyx":699 * 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(17, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8slepc4py_5SLEPc_FN)))) __PYX_ERR(17, 699, __pyx_L1_error) __pyx_t_9 = ((struct PySlepcFNObject *)__pyx_t_3)->fn; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_Fs[__pyx_v_i]) = __pyx_t_9; } /* "SLEPc/NEP.pyx":700 * As[i] = (A[i]).mat * Fs[i] = (f[i]).fn * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) # <<<<<<<<<<<<<< * * def getTwoSided(self): */ __pyx_t_10 = __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_10 == ((int)-1))) __PYX_ERR(17, 700, __pyx_L1_error) /* "SLEPc/NEP.pyx":674 * 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/NEP.pyx":702 * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) * * def getTwoSided(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether a two-sided variant */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_81getTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_80getTwoSided[] = "NEP.getTwoSided(self)\n\n Returns the flag indicating whether a two-sided variant\n of the algorithm is being used or not.\n\n Returns\n -------\n twosided: bool\n Whether the two-sided variant is to be used or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_81getTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getTwoSided (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("getTwoSided", 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, "getTwoSided", 0))) return NULL; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_80getTwoSided(((struct PySlepcNEPObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_80getTwoSided(struct PySlepcNEPObject *__pyx_v_self) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTwoSided", 0); /* "SLEPc/NEP.pyx":712 * Whether the two-sided variant is to be used or not. * """ * cdef PetscBool tval = PETSC_FALSE # <<<<<<<<<<<<<< * CHKERR( NEPGetTwoSided(self.nep, &tval) ) * return tval */ __pyx_v_tval = PETSC_FALSE; /* "SLEPc/NEP.pyx":713 * """ * cdef PetscBool tval = PETSC_FALSE * CHKERR( NEPGetTwoSided(self.nep, &tval) ) # <<<<<<<<<<<<<< * return tval * */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetTwoSided(__pyx_v_self->nep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 713, __pyx_L1_error) /* "SLEPc/NEP.pyx":714 * cdef PetscBool tval = PETSC_FALSE * CHKERR( NEPGetTwoSided(self.nep, &tval) ) * return tval # <<<<<<<<<<<<<< * * def setTwoSided(self, twosided): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/NEP.pyx":702 * CHKERR( NEPSetSplitOperator(self.nep, n, As, Fs, mstr) ) * * def getTwoSided(self): # <<<<<<<<<<<<<< * """ * Returns the flag indicating whether a two-sided variant */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "SLEPc/NEP.pyx":716 * return tval * * def setTwoSided(self, twosided): # <<<<<<<<<<<<<< * """ * Sets the solver to use a two-sided variant so that left */ /* Python wrapper */ static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_83setTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8slepc4py_5SLEPc_3NEP_82setTwoSided[] = "NEP.setTwoSided(self, twosided)\n\n Sets the solver to use a two-sided variant so that left\n eigenvectors are also computed.\n\n Parameters\n ----------\n twosided: bool\n Whether the two-sided variant is to be used or not.\n "; static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_83setTwoSided(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_twosided = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setTwoSided (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_twosided,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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_twosided)) != 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, "setTwoSided") < 0)) __PYX_ERR(17, 716, __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_twosided = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setTwoSided", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 716, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_82setTwoSided(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_twosided); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_82setTwoSided(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_twosided) { PetscBool __pyx_v_tval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PetscBool __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTwoSided", 0); /* "SLEPc/NEP.pyx":726 * Whether the two-sided variant is to be used or not. * """ * cdef PetscBool tval = twosided # <<<<<<<<<<<<<< * CHKERR( NEPSetTwoSided(self.nep, tval) ) * */ __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_twosided)); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 726, __pyx_L1_error) __pyx_v_tval = __pyx_t_1; /* "SLEPc/NEP.pyx":727 * """ * cdef PetscBool tval = twosided * CHKERR( NEPSetTwoSided(self.nep, tval) ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetTwoSided(__pyx_v_self->nep, __pyx_v_tval)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 727, __pyx_L1_error) /* "SLEPc/NEP.pyx":716 * return tval * * def setTwoSided(self, twosided): # <<<<<<<<<<<<<< * """ * Sets the solver to use a two-sided variant so that left */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTwoSided", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(18, 38, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(18, 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(18, 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("view", 0); /* "SLEPc/MFN.pyx":48 * output is used. * """ * cdef PetscViewer vwr = def_Viewer(viewer) # <<<<<<<<<<<<<< * CHKERR( MFNView(self.mfn, vwr) ) * */ __pyx_v_vwr = __pyx_f_8slepc4py_5SLEPc_def_Viewer(__pyx_v_viewer); /* "SLEPc/MFN.pyx":49 * """ * cdef PetscViewer vwr = def_Viewer(viewer) * CHKERR( MFNView(self.mfn, vwr) ) # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNView(__pyx_v_self->mfn, __pyx_v_vwr)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 49, __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":51 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("destroy", 0); /* "SLEPc/MFN.pyx":55 * 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 == ((int)-1))) __PYX_ERR(18, 55, __pyx_L1_error) /* "SLEPc/MFN.pyx":56 * """ * CHKERR( MFNDestroy(&self.mfn) ) * self.mfn = NULL # <<<<<<<<<<<<<< * return self * */ __pyx_v_self->mfn = NULL; /* "SLEPc/MFN.pyx":57 * 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":51 * 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":59 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "SLEPc/MFN.pyx":63 * 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 == ((int)-1))) __PYX_ERR(18, 63, __pyx_L1_error) /* "SLEPc/MFN.pyx":59 * 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":65 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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(18, 65, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(18, 65, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create", 0); /* "SLEPc/MFN.pyx":75 * 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(18, 75, __pyx_L1_error) __pyx_v_ccomm = __pyx_t_1; /* "SLEPc/MFN.pyx":76 * """ * 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":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 * return self */ __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNCreate(__pyx_v_ccomm, (&__pyx_v_newmfn))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 77, __pyx_L1_error) /* "SLEPc/MFN.pyx":78 * cdef SlepcMFN newmfn = NULL * CHKERR( MFNCreate(ccomm, &newmfn) ) * SlepcCLEAR(self.obj); self.mfn = newmfn # <<<<<<<<<<<<<< * return self * */ (void)(__pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj)); __pyx_v_self->mfn = __pyx_v_newmfn; /* "SLEPc/MFN.pyx":79 * 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":65 * 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":81 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 81, __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(18, 81, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setType", 0); __Pyx_INCREF(__pyx_v_mfn_type); /* "SLEPc/MFN.pyx":90 * 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":91 * """ * 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(18, 91, __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":92 * 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 == ((int)-1))) __PYX_ERR(18, 92, __pyx_L1_error) /* "SLEPc/MFN.pyx":81 * 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":94 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getType", 0); /* "SLEPc/MFN.pyx":103 * 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":104 * """ * 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 == ((int)-1))) __PYX_ERR(18, 104, __pyx_L1_error) /* "SLEPc/MFN.pyx":105 * 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(18, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":94 * 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":107 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOptionsPrefix", 0); /* "SLEPc/MFN.pyx":117 * 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":118 * """ * 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 == ((int)-1))) __PYX_ERR(18, 118, __pyx_L1_error) /* "SLEPc/MFN.pyx":119 * 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(18, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":107 * 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":121 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 121, __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(18, 121, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/MFN.pyx":131 * 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":132 * """ * 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(18, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":133 * 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 == ((int)-1))) __PYX_ERR(18, 133, __pyx_L1_error) /* "SLEPc/MFN.pyx":121 * 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":135 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 135, __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(18, 135, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("appendOptionsPrefix", 0); __Pyx_INCREF(__pyx_v_prefix); /* "SLEPc/MFN.pyx":145 * 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":146 * """ * 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(18, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":147 * 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 == ((int)-1))) __PYX_ERR(18, 147, __pyx_L1_error) /* "SLEPc/MFN.pyx":135 * 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":149 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFromOptions", 0); /* "SLEPc/MFN.pyx":155 * 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 == ((int)-1))) __PYX_ERR(18, 155, __pyx_L1_error) /* "SLEPc/MFN.pyx":149 * 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":157 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getTolerances", 0); /* "SLEPc/MFN.pyx":169 * 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":170 * """ * 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":171 * 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 == ((int)-1))) __PYX_ERR(18, 171, __pyx_L1_error) /* "SLEPc/MFN.pyx":172 * 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(18, 172, __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(18, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 172, __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":157 * 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":174 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__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(18, 174, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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(18, 174, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setTolerances", 0); /* "SLEPc/MFN.pyx":186 * 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":187 * """ * 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":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) * 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 == ((PetscReal)-1.0) && PyErr_Occurred())) __PYX_ERR(18, 188, __pyx_L1_error) __pyx_v_rval = __pyx_t_3; } /* "SLEPc/MFN.pyx":189 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(18, 189, __pyx_L1_error) __pyx_v_ival = __pyx_t_4; } /* "SLEPc/MFN.pyx":190 * 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 == ((int)-1))) __PYX_ERR(18, 190, __pyx_L1_error) /* "SLEPc/MFN.pyx":174 * 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":192 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getDimensions", 0); /* "SLEPc/MFN.pyx":201 * 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":202 * """ * 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 == ((int)-1))) __PYX_ERR(18, 202, __pyx_L1_error) /* "SLEPc/MFN.pyx":203 * 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(18, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":192 * 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":205 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 205, __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(18, 205, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setDimensions", 0); /* "SLEPc/MFN.pyx":215 * 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 == ((PetscInt)-1L) && PyErr_Occurred())) __PYX_ERR(18, 215, __pyx_L1_error) __pyx_v_ival = __pyx_t_1; /* "SLEPc/MFN.pyx":216 * """ * 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 == ((int)-1))) __PYX_ERR(18, 216, __pyx_L1_error) /* "SLEPc/MFN.pyx":205 * 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":218 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getFN", 0); /* "SLEPc/MFN.pyx":227 * The math function context. * """ * cdef FN fn = FN() # <<<<<<<<<<<<<< * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fn = ((struct PySlepcFNObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":228 * """ * 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 == ((int)-1))) __PYX_ERR(18, 228, __pyx_L1_error) /* "SLEPc/MFN.pyx":229 * cdef FN fn = FN() * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) # <<<<<<<<<<<<<< * return fn * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_fn->__pyx_base.obj)); /* "SLEPc/MFN.pyx":230 * CHKERR( MFNGetFN(self.mfn, &fn.fn) ) * PetscINCREF(fn.obj) * return fn # <<<<<<<<<<<<<< * * def setFN(self, FN fn): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_fn)); __pyx_r = ((PyObject *)__pyx_v_fn); goto __pyx_L0; /* "SLEPc/MFN.pyx":218 * 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":232 * return fn * * def setFN(self, FN fn): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 232, __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(18, 232, __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(18, 232, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setFN", 0); /* "SLEPc/MFN.pyx":241 * 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 == ((int)-1))) __PYX_ERR(18, 241, __pyx_L1_error) /* "SLEPc/MFN.pyx":232 * return fn * * def setFN(self, FN fn): # <<<<<<<<<<<<<< * """ * 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":243 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getBV", 0); /* "SLEPc/MFN.pyx":252 * The basis vectors context. * """ * cdef BV bv = BV() # <<<<<<<<<<<<<< * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":253 * """ * 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 == ((int)-1))) __PYX_ERR(18, 253, __pyx_L1_error) /* "SLEPc/MFN.pyx":254 * cdef BV bv = BV() * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) # <<<<<<<<<<<<<< * return bv * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj)); /* "SLEPc/MFN.pyx":255 * CHKERR( MFNGetBV(self.mfn, &bv.bv) ) * PetscINCREF(bv.obj) * return bv # <<<<<<<<<<<<<< * * def setBV(self, BV bv): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bv)); __pyx_r = ((PyObject *)__pyx_v_bv); goto __pyx_L0; /* "SLEPc/MFN.pyx":243 * 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":257 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 257, __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(18, 257, __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(18, 257, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setBV", 0); /* "SLEPc/MFN.pyx":266 * 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 == ((int)-1))) __PYX_ERR(18, 266, __pyx_L1_error) /* "SLEPc/MFN.pyx":257 * return bv * * def setBV(self, BV bv): # <<<<<<<<<<<<<< * """ * 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":268 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getOperator", 0); /* "SLEPc/MFN.pyx":277 * 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_CallNoArg(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":278 * """ * 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 == ((int)-1))) __PYX_ERR(18, 278, __pyx_L1_error) /* "SLEPc/MFN.pyx":279 * cdef Mat A = Mat() * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) * PetscINCREF(A.obj) # <<<<<<<<<<<<<< * return A * */ (void)(__pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj)); /* "SLEPc/MFN.pyx":280 * CHKERR( MFNGetOperator(self.mfn, &A.mat) ) * PetscINCREF(A.obj) * return A # <<<<<<<<<<<<<< * * def setOperator(self, Mat A): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_A)); __pyx_r = ((PyObject *)__pyx_v_A); goto __pyx_L0; /* "SLEPc/MFN.pyx":268 * 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":282 * return A * * def setOperator(self, Mat A): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__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(18, 282, __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(18, 282, __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(18, 282, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setOperator", 0); /* "SLEPc/MFN.pyx":291 * 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 == ((int)-1))) __PYX_ERR(18, 291, __pyx_L1_error) /* "SLEPc/MFN.pyx":282 * return A * * def setOperator(self, Mat A): # <<<<<<<<<<<<<< * """ * 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":295 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancelMonitor", 0); /* "SLEPc/MFN.pyx":299 * 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 == ((int)-1))) __PYX_ERR(18, 299, __pyx_L1_error) /* "SLEPc/MFN.pyx":295 * # * * 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":303 * # * * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setUp", 0); /* "SLEPc/MFN.pyx":308 * execution of the eigensolver. * """ * CHKERR( MFNSetUp(self.mfn) ) # <<<<<<<<<<<<<< * * def solve(self, Vec b, Vec x): */ __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetUp(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 308, __pyx_L1_error) /* "SLEPc/MFN.pyx":303 * # * * 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":310 * CHKERR( MFNSetUp(self.mfn) ) * * def solve(self, Vec b, Vec x): # <<<<<<<<<<<<<< * """ * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, 1); __PYX_ERR(18, 310, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solve") < 0)) __PYX_ERR(18, 310, __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(18, 310, __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(18, 310, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(18, 310, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("solve", 0); /* "SLEPc/MFN.pyx":322 * 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 == ((int)-1))) __PYX_ERR(18, 322, __pyx_L1_error) /* "SLEPc/MFN.pyx":310 * CHKERR( MFNSetUp(self.mfn) ) * * def solve(self, Vec b, Vec x): # <<<<<<<<<<<<<< * """ * 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":324 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getIterationNumber", 0); /* "SLEPc/MFN.pyx":335 * Iteration number. * """ * cdef PetscInt ival = 0 # <<<<<<<<<<<<<< * CHKERR( MFNGetIterationNumber(self.mfn, &ival) ) * return toInt(ival) */ __pyx_v_ival = 0; /* "SLEPc/MFN.pyx":336 * """ * 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 == ((int)-1))) __PYX_ERR(18, 336, __pyx_L1_error) /* "SLEPc/MFN.pyx":337 * 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(18, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":324 * 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":339 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getConvergedReason", 0); /* "SLEPc/MFN.pyx":349 * converged. * """ * cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING # <<<<<<<<<<<<<< * CHKERR( MFNGetConvergedReason(self.mfn, &val) ) * return val */ __pyx_v_val = MFN_CONVERGED_ITERATING; /* "SLEPc/MFN.pyx":350 * """ * 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 == ((int)-1))) __PYX_ERR(18, 350, __pyx_L1_error) /* "SLEPc/MFN.pyx":351 * 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(18, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "SLEPc/MFN.pyx":339 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_CallNoArg(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 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 == ((int)-1))) __PYX_ERR(19, 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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(19, 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":180 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("initialize", 0); /* "SLEPc/SLEPc.pyx":181 * * 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":183 * 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 == ((int)-1))) __PYX_ERR(4, 183, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":185 * 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":186 * # 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":185 * 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":188 * 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":180 * 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":206 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("register", 0); /* "SLEPc/SLEPc.pyx":208 * 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 == ((int)-1))) __PYX_ERR(4, 208, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":210 * 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 == ((int)-1))) __PYX_ERR(4, 210, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":211 * # 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 == ((int)-1))) __PYX_ERR(4, 211, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":212 * 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 == ((int)-1))) __PYX_ERR(4, 212, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":213 * 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 == ((int)-1))) __PYX_ERR(4, 213, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":214 * 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 == ((int)-1))) __PYX_ERR(4, 214, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":215 * 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 == ((int)-1))) __PYX_ERR(4, 215, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":216 * 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 == ((int)-1))) __PYX_ERR(4, 216, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":217 * 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 == ((int)-1))) __PYX_ERR(4, 217, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":218 * 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 == ((int)-1))) __PYX_ERR(4, 218, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":219 * 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 == ((int)-1))) __PYX_ERR(4, 219, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":220 * 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":206 * 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":222 * 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":224 * cdef void finalize() nogil: * # finalize SLEPc * cdef int ierr = 0 # <<<<<<<<<<<<<< * ierr = SlepcFinalize() * if ierr != 0: */ __pyx_v_ierr = 0; /* "SLEPc/SLEPc.pyx":225 * # finalize SLEPc * cdef int ierr = 0 * ierr = SlepcFinalize() # <<<<<<<<<<<<<< * if ierr != 0: * fprintf(stderr, "SlepcFinalize() failed " */ __pyx_v_ierr = SlepcFinalize(); /* "SLEPc/SLEPc.pyx":226 * 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":227 * ierr = SlepcFinalize() * if ierr != 0: * fprintf(stderr, "SlepcFinalize() failed " # <<<<<<<<<<<<<< * "[error code: %d]\n", ierr) * # and we are done, see you later !! */ (void)(fprintf(stderr, ((char *)"SlepcFinalize() failed [error code: %d]\n"), __pyx_v_ierr)); /* "SLEPc/SLEPc.pyx":226 * cdef int ierr = 0 * ierr = SlepcFinalize() * if ierr != 0: # <<<<<<<<<<<<<< * fprintf(stderr, "SlepcFinalize() failed " * "[error code: %d]\n", ierr) */ } /* "SLEPc/SLEPc.pyx":222 * return 0 * * cdef void finalize() nogil: # <<<<<<<<<<<<<< * # finalize SLEPc * cdef int ierr = 0 */ /* function exit code */ } /* "SLEPc/SLEPc.pyx":233 * # ----------------------------------------------------------------------------- * * 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)(void*)(PyCFunctionWithKeywords)__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); CYTHON_FALLTHROUGH; 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 = __Pyx_PyDict_GetItemStr(__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, 233, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; 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, 233, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_initialize", 0); /* "SLEPc/SLEPc.pyx":234 * * 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 == ((int)-1))) __PYX_ERR(4, 234, __pyx_L1_error) __pyx_v_ready = __pyx_t_1; /* "SLEPc/SLEPc.pyx":235 * 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 == ((int)-1))) __PYX_ERR(4, 235, __pyx_L1_error) } /* "SLEPc/SLEPc.pyx":233 * # ----------------------------------------------------------------------------- * * 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":237 * 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)(void*)(PyCFunctionWithKeywords)__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":238 * * def _finalize(): * finalize() # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_f_8slepc4py_5SLEPc_finalize(); /* "SLEPc/SLEPc.pyx":237 * 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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_ST(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_12getType}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_14setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_16getOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_18setFromOptions}, {"setShift", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_20setShift}, {"getShift", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_22getShift}, {"setTransform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_24setTransform}, {"getTransform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_26getTransform}, {"setMatMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_28setMatMode}, {"getMatMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_30getMatMode}, {"setMatrices", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_33setMatrices, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_32setMatrices}, {"getMatrices", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_35getMatrices, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_34getMatrices}, {"setMatStructure", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_36setMatStructure}, {"setKSP", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_38setKSP}, {"getKSP", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_40getKSP}, {"setPreconditionerMat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_43setPreconditionerMat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_42setPreconditionerMat}, {"getPreconditionerMat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_45getPreconditionerMat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_44getPreconditionerMat}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_47setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_46setUp}, {"apply", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_49apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_48apply}, {"applyTranspose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_51applyTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_50applyTranspose}, {"setCayleyAntishift", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2ST_53setCayleyAntishift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_52setCayleyAntishift}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_BV(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_4destroy}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_6create}, {"createMat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_9createMat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_8createMat}, {"duplicate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_11duplicate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_10duplicate}, {"copy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_13copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_12copy}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_15setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_14setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_17getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_16getType}, {"setSizes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizes}, {"setSizesFromVec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_21setSizesFromVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_20setSizesFromVec}, {"getSizes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_23getSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_22getSizes}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_25setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_24setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_27getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_26getOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_29setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_28setFromOptions}, {"getOrthogonalization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_31getOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_30getOrthogonalization}, {"setOrthogonalization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_33setOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_32setOrthogonalization}, {"getMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_35getMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_34getMatrix}, {"setMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_37setMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_36setMatrix}, {"applyMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_39applyMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_38applyMatrix}, {"setActiveColumns", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_41setActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_40setActiveColumns}, {"getActiveColumns", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_43getActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_42getActiveColumns}, {"scaleColumn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_45scaleColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_44scaleColumn}, {"scale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_47scale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_46scale}, {"insertVec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVec}, {"insertVecs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_51insertVecs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_50insertVecs}, {"dotVec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_53dotVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_52dotVec}, {"getColumn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_55getColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_54getColumn}, {"restoreColumn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_57restoreColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_56restoreColumn}, {"dot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_59dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_58dot}, {"matProject", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_61matProject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_60matProject}, {"matMult", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_63matMult, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_62matMult}, {"matMultHermitianTranspose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_65matMultHermitianTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_64matMultHermitianTranspose}, {"multVec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_67multVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_66multVec}, {"normColumn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_69normColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_68normColumn}, {"norm", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_71norm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_70norm}, {"resize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_73resize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_72resize}, {"setRandom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_75setRandom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_74setRandom}, {"setRandomNormal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_77setRandomNormal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_76setRandomNormal}, {"orthogonalizeVec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_79orthogonalizeVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_78orthogonalizeVec}, {"orthogonalize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2BV_81orthogonalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_80orthogonalize}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_DS(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_12getType}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_14setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_16getOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_18setFromOptions}, {"allocate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_20allocate}, {"getLeadingDimension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_22getLeadingDimension}, {"setState", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_25setState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_24setState}, {"getState", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_27getState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_26getState}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_28setDimensions}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_30getDimensions}, {"setMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_32setMethod}, {"getMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_34getMethod}, {"setCompact", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_36setCompact}, {"getCompact", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_38getCompact}, {"setExtraRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_40setExtraRow}, {"getExtraRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_42getExtraRow}, {"setRefined", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_44setRefined}, {"getRefined", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_46getRefined}, {"truncate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_48truncate}, {"updateExtraRow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_50updateExtraRow}, {"getMat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2DS_53getMat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_52getMat}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_FN(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_4destroy}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_6create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_8setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_10getType}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_12setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_14getOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_16setFromOptions}, {"evaluateFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_18evaluateFunction}, {"evaluateDerivative", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_20evaluateDerivative}, {"setScale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_22setScale}, {"getScale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_24getScale}, {"setRationalNumerator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_26setRationalNumerator}, {"setRationalDenominator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_28setRationalDenominator}, {"setCombineChildren", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2FN_31setCombineChildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_30setCombineChildren}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_RG(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_4destroy}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_6create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_8setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_10getType}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_12setOptionsPrefix}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_14getOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_16setFromOptions}, {"isTrivial", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_18isTrivial}, {"getComplement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_20getComplement}, {"setComplement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_22setComplement}, {"setEllipseParameters", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_24setEllipseParameters}, {"getEllipseParameters", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_26getEllipseParameters}, {"setIntervalEndpoints", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints}, {"getIntervalEndpoints", (PyCFunction)(void*)(PyCFunctionWithKeywords)__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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_12getType}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_20setFromOptions}, {"getProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_22getProblemType}, {"setProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_24setProblemType}, {"isGeneralized", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_26isGeneralized}, {"isHermitian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_28isHermitian}, {"isPositive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_30isPositive}, {"getBalance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_32getBalance}, {"setBalance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_34setBalance}, {"getExtraction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_36getExtraction}, {"setExtraction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_38setExtraction}, {"getWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs}, {"getTarget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_44getTarget}, {"setTarget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_46setTarget}, {"getInterval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_48getInterval}, {"setInterval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_50setInterval}, {"getTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_52getTolerances}, {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_54setTolerances}, {"getTwoSided", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_57getTwoSided, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_56getTwoSided}, {"setTwoSided", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_59setTwoSided, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_58setTwoSided}, {"getConvergenceTest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_61getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_60getConvergenceTest}, {"setConvergenceTest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_63setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_62setConvergenceTest}, {"getTrueResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrueResidual}, {"setTrueResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrueResidual}, {"getTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_69getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_68getTrackAll}, {"setTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_71setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_70setTrackAll}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_73getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_72getDimensions}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_75setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_74setDimensions}, {"getST", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_77getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_76getST}, {"setST", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_79setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_78setST}, {"getBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_81getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_80getBV}, {"setBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_83setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_82setBV}, {"getDS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_85getDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_84getDS}, {"setDS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_87setDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_86setDS}, {"getRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_89getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_88getRG}, {"setRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_91setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_90setRG}, {"getOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_93getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_92getOperators}, {"setOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_95setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_94setOperators}, {"setDeflationSpace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_97setDeflationSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_96setDeflationSpace}, {"setInitialSpace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_99setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_98setInitialSpace}, {"setStoppingTest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_101setStoppingTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_100setStoppingTest}, {"setMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_103setMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_102setMonitor}, {"getMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_105getMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_104getMonitor}, {"cancelMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_107cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_106cancelMonitor}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_109setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_108setUp}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_111solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_110solve}, {"getIterationNumber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_113getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_112getIterationNumber}, {"getConvergedReason", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_115getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_114getConvergedReason}, {"getConverged", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_117getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_116getConverged}, {"getEigenvalue", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_119getEigenvalue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_118getEigenvalue}, {"getEigenvector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_121getEigenvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_120getEigenvector}, {"getLeftEigenvector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_123getLeftEigenvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_122getLeftEigenvector}, {"getEigenpair", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_125getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_124getEigenpair}, {"getInvariantSubspace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_127getInvariantSubspace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_126getInvariantSubspace}, {"getErrorEstimate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_129getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_128getErrorEstimate}, {"computeError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_131computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_130computeError}, {"errorView", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_133errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_132errorView}, {"setPowerShiftType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_135setPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_134setPowerShiftType}, {"getPowerShiftType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_137getPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_136getPowerShiftType}, {"setArnoldiDelayed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_139setArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_138setArnoldiDelayed}, {"getArnoldiDelayed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_141getArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_140getArnoldiDelayed}, {"setLanczosReorthogType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_143setLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_142setLanczosReorthogType}, {"getLanczosReorthogType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_145getLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_144getLanczosReorthogType}, {"setKrylovSchurRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurRestart}, {"getKrylovSchurRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurRestart}, {"setKrylovSchurLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurLocking}, {"getKrylovSchurLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurLocking}, {"setKrylovSchurPartitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_155setKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_154setKrylovSchurPartitions}, {"getKrylovSchurPartitions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurPartitions}, {"setKrylovSchurDetectZeros", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_159setKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_158setKrylovSchurDetectZeros}, {"getKrylovSchurDetectZeros", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_161getKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_160getKrylovSchurDetectZeros}, {"setKrylovSchurDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurDimensions}, {"getKrylovSchurDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_165getKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_164getKrylovSchurDimensions}, {"getKrylovSchurSubcommInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_167getKrylovSchurSubcommInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_166getKrylovSchurSubcommInfo}, {"getKrylovSchurSubcommPairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_169getKrylovSchurSubcommPairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_168getKrylovSchurSubcommPairs}, {"getKrylovSchurSubcommMats", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_171getKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_170getKrylovSchurSubcommMats}, {"updateKrylovSchurSubcommMats", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_173updateKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_172updateKrylovSchurSubcommMats}, {"setKrylovSchurSubintervals", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_175setKrylovSchurSubintervals, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_174setKrylovSchurSubintervals}, {"setRQCGReset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_177setRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_176setRQCGReset}, {"getRQCGReset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3EPS_179getRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_178getRQCGReset}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_12getType}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_20setFromOptions}, {"getProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_23getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_22getProblemType}, {"setProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_25setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_24setProblemType}, {"isGeneralized", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_27isGeneralized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_26isGeneralized}, {"getImplicitTranspose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_29getImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_28getImplicitTranspose}, {"setImplicitTranspose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_31setImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_30setImplicitTranspose}, {"getWhichSingularTriplets", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_33getWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_32getWhichSingularTriplets}, {"setWhichSingularTriplets", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_35setWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_34setWhichSingularTriplets}, {"getTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_37getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_36getTolerances}, {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_39setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_38setTolerances}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_41getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_40getDimensions}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_43setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_42setDimensions}, {"getBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_45getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_44getBV}, {"setBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_47setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_46setBV}, {"getOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_49getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_48getOperators}, {"setOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_51setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_50setOperators}, {"setInitialSpaces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_53setInitialSpaces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_52setInitialSpaces}, {"cancelMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_55cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_54cancelMonitor}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_57setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_56setUp}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_59solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_58solve}, {"getIterationNumber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_61getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_60getIterationNumber}, {"getConvergedReason", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_63getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_62getConvergedReason}, {"getConverged", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_65getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_64getConverged}, {"getValue", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_67getValue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_66getValue}, {"getVectors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_69getVectors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_68getVectors}, {"getSingularTriplet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_71getSingularTriplet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_70getSingularTriplet}, {"computeError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_73computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_72computeError}, {"errorView", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_75errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_74errorView}, {"setCrossEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_77setCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_76setCrossEPS}, {"getCrossEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_79getCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_78getCrossEPS}, {"setCyclicEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_81setCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_80setCyclicEPS}, {"getCyclicEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_83getCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_82getCyclicEPS}, {"setCyclicExplicitMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_85setCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_84setCyclicExplicitMatrix}, {"getCyclicExplicitMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_87getCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_86getCyclicExplicitMatrix}, {"setLanczosOneSide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_89setLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_88setLanczosOneSide}, {"setTRLanczosOneSide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3SVD_91setTRLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_90setTRLanczosOneSide}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_12getType}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_20setFromOptions}, {"getBasis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_22getBasis}, {"setBasis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_24setBasis}, {"getProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_26getProblemType}, {"setProblemType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_28setProblemType}, {"getWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs}, {"getTarget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTarget}, {"setTarget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTarget}, {"getTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_39getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_38getTolerances}, {"getInterval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_41getInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_40getInterval}, {"setInterval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_43setInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_42setInterval}, {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_45setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_44setTolerances}, {"getConvergenceTest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_47getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_46getConvergenceTest}, {"setConvergenceTest", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_49setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_48setConvergenceTest}, {"getRefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_51getRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_50getRefine}, {"setRefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_53setRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_52setRefine}, {"getTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_55getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_54getTrackAll}, {"setTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_57setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_56setTrackAll}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_59getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_58getDimensions}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_61setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_60setDimensions}, {"getST", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_63getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_62getST}, {"setST", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_65setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_64setST}, {"getScale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_67getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_66getScale}, {"setScale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_69setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_68setScale}, {"getBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_71getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_70getBV}, {"setBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_73setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_72setBV}, {"getRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_75getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_74getRG}, {"setRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_77setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_76setRG}, {"getOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_79getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_78getOperators}, {"setOperators", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_81setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_80setOperators}, {"setInitialSpace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_83setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_82setInitialSpace}, {"cancelMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_85cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_84cancelMonitor}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_87setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_86setUp}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_89solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_88solve}, {"getIterationNumber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_91getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_90getIterationNumber}, {"getConvergedReason", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_93getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_92getConvergedReason}, {"getConverged", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_95getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_94getConverged}, {"getEigenpair", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_97getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_96getEigenpair}, {"getErrorEstimate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_99getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_98getErrorEstimate}, {"computeError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_101computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_100computeError}, {"errorView", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_103errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_102errorView}, {"setLinearEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearEPS}, {"getLinearEPS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearEPS}, {"setLinearLinearization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_109setLinearLinearization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_108setLinearLinearization}, {"getLinearLinearization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_111getLinearLinearization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_110getLinearLinearization}, {"setLinearExplicitMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_113setLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_112setLinearExplicitMatrix}, {"getLinearExplicitMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_115getLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_114getLinearExplicitMatrix}, {"setTOARRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_117setTOARRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_116setTOARRestart}, {"getTOARRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_119getTOARRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_118getTOARRestart}, {"setTOARLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_121setTOARLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_120setTOARLocking}, {"getTOARLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_123getTOARLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_122getTOARLocking}, {"setSTOARLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_125setSTOARLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_124setSTOARLocking}, {"getSTOARLocking", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_127getSTOARLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_126getSTOARLocking}, {"setSTOARDetectZeros", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_129setSTOARDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_128setSTOARDetectZeros}, {"getSTOARDetectZeros", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_131getSTOARDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_130getSTOARDetectZeros}, {"setSTOARDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_133setSTOARDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_132setSTOARDimensions}, {"getSTOARDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_135getSTOARDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_134getSTOARDimensions}, {"setJDRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_137setJDRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_136setJDRestart}, {"getJDRestart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_139getJDRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_138getJDRestart}, {"setJDFix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_141setJDFix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_140setJDFix}, {"getJDFix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3PEP_143getJDFix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_142getJDFix}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_12getType}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_20setFromOptions}, {"getWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs}, {"setWhichEigenpairs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs}, {"getTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_26getTolerances}, {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_28setTolerances}, {"getRIILagPreconditioner", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner}, {"setRIILagPreconditioner", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner}, {"getTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_34getTrackAll}, {"setTrackAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_36setTrackAll}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_38getDimensions}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_40setDimensions}, {"getBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_42getBV}, {"setBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_44setBV}, {"getRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_46getRG}, {"setRG", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_48setRG}, {"setInitialSpace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_50setInitialSpace}, {"cancelMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_52cancelMonitor}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_54setUp}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_56solve}, {"getIterationNumber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_58getIterationNumber}, {"getConvergedReason", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_60getConvergedReason}, {"getConverged", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_62getConverged}, {"getEigenpair", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_64getEigenpair}, {"getLeftEigenvector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_67getLeftEigenvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_66getLeftEigenvector}, {"getErrorEstimate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_69getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_68getErrorEstimate}, {"computeError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_71computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_70computeError}, {"errorView", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_73errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_72errorView}, {"setFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_75setFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_74setFunction}, {"setJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_77setJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_76setJacobian}, {"setSplitOperator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_79setSplitOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_78setSplitOperator}, {"getTwoSided", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_81getTwoSided, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_80getTwoSided}, {"setTwoSided", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3NEP_83setTwoSided, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_82setTwoSided}, {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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_2view}, {"destroy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_4destroy}, {"reset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_6reset}, {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_8create}, {"setType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_10setType}, {"getType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_12getType}, {"getOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix}, {"setOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix}, {"appendOptionsPrefix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix}, {"setFromOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_20setFromOptions}, {"getTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_22getTolerances}, {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_24setTolerances}, {"getDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_26getDimensions}, {"setDimensions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_28setDimensions}, {"getFN", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_30getFN}, {"setFN", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_32setFN}, {"getBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_34getBV}, {"setBV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_36setBV}, {"getOperator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_38getOperator}, {"setOperator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_40setOperator}, {"cancelMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_42cancelMonitor}, {"setUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_44setUp}, {"solve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_46solve}, {"getIterationNumber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_48getIterationNumber}, {"getConvergedReason", (PyCFunction)(void*)(PyCFunctionWithKeywords)__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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_8slepc4py_5SLEPc__p_mem(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); 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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #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 CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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)(void*)(PyCFunctionWithKeywords)__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3Sys_getVersion}, {"getVersionInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__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*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 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 #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_SLEPc(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_SLEPc}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "SLEPc", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ (freefunc)__pyx_module_cleanup /* m_free */ }; #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #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_BV, __pyx_k_BV, sizeof(__pyx_k_BV), 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_MAXIT, __pyx_k_CONVERGED_MAXIT, sizeof(__pyx_k_CONVERGED_MAXIT), 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_DS, __pyx_k_DS, sizeof(__pyx_k_DS), 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_ELEMENTAL, __pyx_k_ELEMENTAL, sizeof(__pyx_k_ELEMENTAL), 0, 0, 1, 1}, {&__pyx_n_s_ELLIPSE, __pyx_k_ELLIPSE, sizeof(__pyx_k_ELLIPSE), 0, 0, 1, 1}, {&__pyx_n_s_ELPA, __pyx_k_ELPA, sizeof(__pyx_k_ELPA), 0, 0, 1, 1}, {&__pyx_n_s_EPS, __pyx_k_EPS, sizeof(__pyx_k_EPS), 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_EVSL, __pyx_k_EVSL, sizeof(__pyx_k_EVSL), 0, 0, 1, 1}, {&__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_FN, __pyx_k_FN, sizeof(__pyx_k_FN), 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_GENERALIZED, __pyx_k_GENERALIZED, sizeof(__pyx_k_GENERALIZED), 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_kp_s_GIT_Date, __pyx_k_GIT_Date, sizeof(__pyx_k_GIT_Date), 0, 0, 1, 0}, {&__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_LYAPII, __pyx_k_LYAPII, sizeof(__pyx_k_LYAPII), 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_MFN, __pyx_k_MFN, sizeof(__pyx_k_MFN), 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_NHEPTS, __pyx_k_NHEPTS, sizeof(__pyx_k_NHEPTS), 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_RANDOMIZED, __pyx_k_RANDOMIZED, sizeof(__pyx_k_RANDOMIZED), 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_RG, __pyx_k_RG, sizeof(__pyx_k_RG), 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_SCALAPACK, __pyx_k_SCALAPACK, sizeof(__pyx_k_SCALAPACK), 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_kp_s_SLEPc_SLEPc_pyx, __pyx_k_SLEPc_SLEPc_pyx, sizeof(__pyx_k_SLEPc_SLEPc_pyx), 0, 0, 1, 0}, {&__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_ST, __pyx_k_ST, sizeof(__pyx_k_ST), 0, 0, 1, 1}, {&__pyx_n_s_STANDARD, __pyx_k_STANDARD, sizeof(__pyx_k_STANDARD), 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_SVDProblemType, __pyx_k_SVDProblemType, sizeof(__pyx_k_SVDProblemType), 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_problem_type_STANDARD_Stand, __pyx_k_SVD_problem_type_STANDARD_Stand, sizeof(__pyx_k_SVD_problem_type_STANDARD_Stand), 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_Sys, __pyx_k_Sys, sizeof(__pyx_k_Sys), 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_Wi, __pyx_k_Wi, sizeof(__pyx_k_Wi), 0, 0, 1, 1}, {&__pyx_n_s_Wr, __pyx_k_Wr, sizeof(__pyx_k_Wr), 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_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 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_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_comb, __pyx_k_comb, sizeof(__pyx_k_comb), 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_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 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_f1, __pyx_k_f1, sizeof(__pyx_k_f1), 0, 0, 1, 1}, {&__pyx_n_s_f2, __pyx_k_f2, sizeof(__pyx_k_f2), 0, 0, 1, 1}, {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1}, {&__pyx_n_s_fix, __pyx_k_fix, sizeof(__pyx_k_fix), 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_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_matname, __pyx_k_matname, sizeof(__pyx_k_matname), 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_monitor, __pyx_k_monitor, sizeof(__pyx_k_monitor), 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_name, __pyx_k_name, sizeof(__pyx_k_name), 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_p_mem, __pyx_k_p_mem, sizeof(__pyx_k_p_mem), 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_setOperator, __pyx_k_setOperator, sizeof(__pyx_k_setOperator), 0, 0, 1, 1}, {&__pyx_n_s_setOperators, __pyx_k_setOperators, sizeof(__pyx_k_setOperators), 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_spaceleft, __pyx_k_spaceleft, sizeof(__pyx_k_spaceleft), 0, 0, 1, 1}, {&__pyx_n_s_spaceright, __pyx_k_spaceright, sizeof(__pyx_k_spaceright), 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_stopping, __pyx_k_stopping, sizeof(__pyx_k_stopping), 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_trim, __pyx_k_trim, sizeof(__pyx_k_trim), 0, 0, 1, 1}, {&__pyx_n_s_trueres, __pyx_k_trueres, sizeof(__pyx_k_trueres), 0, 0, 1, 1}, {&__pyx_n_s_twosided, __pyx_k_twosided, sizeof(__pyx_k_twosided), 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 CYTHON_SMALL_CODE 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, 86, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 86, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(3, 309, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "SLEPc/slepcbv.pxi":90 * 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, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "SLEPc/Sys.pyx":19 * vstr = bytes2str(cversion) * if release != 0: * date = vstr.split(",", 1)[-1].strip() # <<<<<<<<<<<<<< * else: * date = vstr.split("GIT Date:")[-1].strip() */ __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s__2, __pyx_int_1); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "SLEPc/Sys.pyx":31 * @classmethod * def getVersionInfo(cls): * version, dev, date, author = cls.getVersion(True, True, True) # <<<<<<<<<<<<<< * return dict(major = version[0], * minor = version[1], */ __pyx_tuple__5 = PyTuple_Pack(3, Py_True, Py_True, Py_True); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(9, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "SLEPc/ST.pyx":3 * # ----------------------------------------------------------------------------- * * class STType(object): # <<<<<<<<<<<<<< * """ * ST types */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "SLEPc/ST.pyx":19 * PRECOND = S_(STPRECOND) * * class STMatMode(object): # <<<<<<<<<<<<<< * """ * ST matrix mode */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "SLEPc/BV.pyx":3 * # ----------------------------------------------------------------------------- * * class BVType(object): # <<<<<<<<<<<<<< * """ * BV type */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "SLEPc/BV.pyx":12 * CONTIGUOUS = S_(BVCONTIGUOUS) * * class BVOrthogType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization types */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "SLEPc/BV.pyx":22 * MGS = BV_ORTHOG_MGS * * class BVOrthogRefineType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization refinement types */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(10, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "SLEPc/BV.pyx":34 * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * * class BVOrthogBlockType(object): # <<<<<<<<<<<<<< * """ * BV block-orthogonalization types */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(10, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "SLEPc/DS.pyx":3 * # ----------------------------------------------------------------------------- * * class DSType(object): # <<<<<<<<<<<<<< * """ * DS type */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "SLEPc/DS.pyx":17 * NEP = S_(DSNEP) * * class DSStateType(object): # <<<<<<<<<<<<<< * """ * DS state types */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "SLEPc/DS.pyx":31 * TRUNCATED = DS_STATE_TRUNCATED * * class DSMatType(object): # <<<<<<<<<<<<<< * """ * To refer to one of the matrices stored internally in DS */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(11, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "SLEPc/FN.pyx":3 * # ----------------------------------------------------------------------------- * * class FNType(object): # <<<<<<<<<<<<<< * """ * FN type */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "SLEPc/FN.pyx":15 * INVSQRT = S_(FNINVSQRT) * * class FNCombineType(object): # <<<<<<<<<<<<<< * """ * FN type of combination of child functions */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(12, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "SLEPc/RG.pyx":3 * # ----------------------------------------------------------------------------- * * class RGType(object): # <<<<<<<<<<<<<< * """ * RG type */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "SLEPc/EPS.pyx":3 * # ----------------------------------------------------------------------------- * * class EPSType(object): # <<<<<<<<<<<<<< * """ * EPS type */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "SLEPc/EPS.pyx":61 * EVSL = S_(EPSEVSL) * * class EPSProblemType(object): # <<<<<<<<<<<<<< * """ * EPS problem type */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "SLEPc/EPS.pyx":80 * GHIEP = EPS_GHIEP * * class EPSExtraction(object): # <<<<<<<<<<<<<< * """ * EPS extraction technique */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(14, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "SLEPc/EPS.pyx":100 * REFINED_HARMONIC = EPS_REFINED_HARMONIC * * class EPSBalance(object): # <<<<<<<<<<<<<< * """ * EPS type of balancing used for non-Hermitian problems */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(14, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "SLEPc/EPS.pyx":114 * USER = EPS_BALANCE_USER * * class EPSErrorType(object): # <<<<<<<<<<<<<< * """ * EPS error type to assess accuracy of computed solutions */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(14, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "SLEPc/EPS.pyx":126 * BACKWARD = EPS_ERROR_BACKWARD * * class EPSWhich(object): # <<<<<<<<<<<<<< * """ * EPS desired piece of spectrum */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(14, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "SLEPc/EPS.pyx":154 * USER = EPS_WHICH_USER * * class EPSConv(object): # <<<<<<<<<<<<<< * """ * EPS convergence test */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(14, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "SLEPc/EPS.pyx":168 * USER = EPS_CONV_USER * * class EPSConvergedReason(object): # <<<<<<<<<<<<<< * """ * EPS convergence reasons */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(14, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "SLEPc/EPS.pyx":187 * ITERATING = EPS_CONVERGED_ITERATING * * class EPSPowerShiftType(object): # <<<<<<<<<<<<<< * """ * EPS Power shift type. */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(14, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "SLEPc/EPS.pyx":199 * WILKINSON = EPS_POWER_SHIFT_WILKINSON * * class EPSLanczosReorthogType(object): # <<<<<<<<<<<<<< * """ * EPS Lanczos reorthogonalization type */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(14, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "SLEPc/SVD.pyx":3 * # ----------------------------------------------------------------------------- * * class SVDType(object): # <<<<<<<<<<<<<< * """ * SVD types */ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "SLEPc/SVD.pyx":30 * PRIMME = S_(SVDPRIMME) * * class SVDProblemType(object): # <<<<<<<<<<<<<< * """ * SVD problem type */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "SLEPc/SVD.pyx":40 * GENERALIZED = SVD_GENERALIZED * * class SVDErrorType(object): # <<<<<<<<<<<<<< * """ * SVD error type to assess accuracy of computed solutions */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "SLEPc/SVD.pyx":50 * RELATIVE = SVD_ERROR_RELATIVE * * class SVDWhich(object): # <<<<<<<<<<<<<< * """ * SVD desired piece of spectrum */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "SLEPc/SVD.pyx":60 * SMALLEST = SVD_SMALLEST * * class SVDConvergedReason(object): # <<<<<<<<<<<<<< * """ * SVD convergence reasons */ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); /* "SLEPc/PEP.pyx":3 * # ----------------------------------------------------------------------------- * * class PEPType(object): # <<<<<<<<<<<<<< * """ * PEP type */ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "SLEPc/PEP.pyx":21 * JD = S_(PEPJD) * * class PEPProblemType(object): # <<<<<<<<<<<<<< * """ * PEP problem type */ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "SLEPc/PEP.pyx":33 * GYROSCOPIC = PEP_GYROSCOPIC * * class PEPWhich(object): # <<<<<<<<<<<<<< * """ * PEP desired part of spectrum */ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "SLEPc/PEP.pyx":61 * USER = PEP_WHICH_USER * * class PEPBasis(object): # <<<<<<<<<<<<<< * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 */ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(16, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); /* "SLEPc/PEP.pyx":69 * HERMITE = PEP_BASIS_HERMITE * * class PEPScale(object): # <<<<<<<<<<<<<< * """ * PEP scaling strategy */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "SLEPc/PEP.pyx":83 * BOTH = PEP_SCALE_BOTH * * class PEPRefine(object): # <<<<<<<<<<<<<< * """ * PEP refinement strategy */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "SLEPc/PEP.pyx":95 * MULTIPLE = PEP_REFINE_MULTIPLE * * class PEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(16, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "SLEPc/PEP.pyx":107 * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * * class PEPExtract(object): # <<<<<<<<<<<<<< * """ * Extraction strategy used to obtain eigenvectors of the PEP from the */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(16, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "SLEPc/PEP.pyx":122 * STRUCTURED = PEP_EXTRACT_STRUCTURED * * class PEPErrorType(object): # <<<<<<<<<<<<<< * """ * PEP error type to assess accuracy of computed solutions */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(16, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "SLEPc/PEP.pyx":134 * BACKWARD = PEP_ERROR_BACKWARD * * class PEPConv(object): # <<<<<<<<<<<<<< * """ * PEP convergence test */ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(16, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "SLEPc/PEP.pyx":148 * USER = PEP_CONV_USER * * class PEPConvergedReason(object): # <<<<<<<<<<<<<< * """ * PEP convergence reasons */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(16, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "SLEPc/NEP.pyx":3 * # ----------------------------------------------------------------------------- * * class NEPType(object): # <<<<<<<<<<<<<< * """ * NEP type */ __pyx_tuple__44 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "SLEPc/NEP.pyx":23 * NLEIGS = S_(NEPNLEIGS) * * class NEPErrorType(object): # <<<<<<<<<<<<<< * """ * NEP error type to assess accuracy of computed solutions */ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(17, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "SLEPc/NEP.pyx":35 * BACKWARD = NEP_ERROR_BACKWARD * * class NEPWhich(object): # <<<<<<<<<<<<<< * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE */ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(17, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "SLEPc/NEP.pyx":48 * USER = NEP_WHICH_USER * * class NEPConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(17, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "SLEPc/NEP.pyx":57 * ITERATING = NEP_CONVERGED_ITERATING * * class NEPRefine(object): # <<<<<<<<<<<<<< * """ * NEP refinement strategy */ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "SLEPc/NEP.pyx":69 * MULTIPLE = NEP_REFINE_MULTIPLE * * class NEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(17, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); /* "SLEPc/MFN.pyx":3 * # ----------------------------------------------------------------------------- * * class MFNType(object): # <<<<<<<<<<<<<< * """ * MFN type */ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); /* "SLEPc/MFN.pyx":15 * EXPOKIT = S_(MFNEXPOKIT) * * class MFNConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "SLEPc/SLEPc.pyx":233 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_ready); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(4, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SLEPc_SLEPc_pyx, __pyx_n_s_initialize, 233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(4, 233, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":237 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SLEPc_SLEPc_pyx, __pyx_n_s_finalize, 237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(4, 237, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(20, 1, __pyx_L1_error); __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(20, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __pyx_v_8slepc4py_5SLEPc_PetscError = Py_None; Py_INCREF(Py_None); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ if (__Pyx_ExportFunction("PySlepcST_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_New, "PyObject *(ST)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcST_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_Get, "ST (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcBV_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New, "PyObject *(BV)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcBV_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get, "BV (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcDS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New, "PyObject *(DS)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcDS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get, "DS (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New, "PyObject *(FN)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get, "FN (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcRG_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New, "PyObject *(RG)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcRG_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get, "RG (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcEPS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New, "PyObject *(EPS)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcEPS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get, "EPS (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcSVD_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New, "PyObject *(SVD)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcSVD_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get, "SVD (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcPEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New, "PyObject *(PEP)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcPEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get, "PEP (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcNEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New, "PyObject *(NEP)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcNEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get, "NEP (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcMFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New, "PyObject *(MFN)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PySlepcMFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get, "MFN (PyObject *)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_t_1 = PyImport_ImportModule("petsc4py.PETSc"); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_8petsc4py_5PETSc_Object = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Object", sizeof(struct PyPetscObjectObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Object) __PYX_ERR(20, 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(20, 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) #if PY_VERSION_HEX < 0x030800B1 PySlepcST_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcST_Type.tp_dictoffset && PySlepcST_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcST_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcST_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_ST) < 0) __PYX_ERR(0, 34, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_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(10, 46, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcBV_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcBV_Type.tp_dictoffset && PySlepcBV_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcBV_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcBV_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_BV) < 0) __PYX_ERR(10, 46, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BV, (PyObject *)&PySlepcBV_Type) < 0) __PYX_ERR(10, 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(11, 63, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcDS_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcDS_Type.tp_dictoffset && PySlepcDS_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcDS_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcDS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_DS) < 0) __PYX_ERR(11, 63, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DS, (PyObject *)&PySlepcDS_Type) < 0) __PYX_ERR(11, 63, __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(12, 31, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcFN_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcFN_Type.tp_dictoffset && PySlepcFN_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcFN_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_FN) < 0) __PYX_ERR(12, 31, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FN, (PyObject *)&PySlepcFN_Type) < 0) __PYX_ERR(12, 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(13, 14, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcRG_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcRG_Type.tp_dictoffset && PySlepcRG_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcRG_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcRG_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_RG) < 0) __PYX_ERR(13, 14, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RG, (PyObject *)&PySlepcRG_Type) < 0) __PYX_ERR(13, 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(14, 219, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcEPS_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcEPS_Type.tp_dictoffset && PySlepcEPS_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcEPS_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcEPS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_EPS) < 0) __PYX_ERR(14, 219, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EPS, (PyObject *)&PySlepcEPS_Type) < 0) __PYX_ERR(14, 219, __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(15, 80, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcSVD_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcSVD_Type.tp_dictoffset && PySlepcSVD_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcSVD_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcSVD_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_SVD) < 0) __PYX_ERR(15, 80, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVD, (PyObject *)&PySlepcSVD_Type) < 0) __PYX_ERR(15, 80, __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(16, 169, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcPEP_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcPEP_Type.tp_dictoffset && PySlepcPEP_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcPEP_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcPEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_PEP) < 0) __PYX_ERR(16, 169, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PEP, (PyObject *)&PySlepcPEP_Type) < 0) __PYX_ERR(16, 169, __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(17, 83, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcNEP_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcNEP_Type.tp_dictoffset && PySlepcNEP_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcNEP_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcNEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_NEP) < 0) __PYX_ERR(17, 83, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NEP, (PyObject *)&PySlepcNEP_Type) < 0) __PYX_ERR(17, 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(18, 25, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PySlepcMFN_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PySlepcMFN_Type.tp_dictoffset && PySlepcMFN_Type.tp_getattro == PyObject_GenericGetAttr)) { PySlepcMFN_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(PySlepcMFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_MFN) < 0) __PYX_ERR(18, 25, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MFN, (PyObject *)&PySlepcMFN_Type) < 0) __PYX_ERR(18, 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) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_8slepc4py_5SLEPc__p_mem.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8slepc4py_5SLEPc__p_mem.tp_dictoffset && __pyx_type_8slepc4py_5SLEPc__p_mem.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_8slepc4py_5SLEPc__p_mem.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_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) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_8slepc4py_5SLEPc_Sys.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8slepc4py_5SLEPc_Sys.tp_dictoffset && __pyx_type_8slepc4py_5SLEPc_Sys.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_8slepc4py_5SLEPc_Sys.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_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; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule("petsc4py.PETSc"); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_8petsc4py_5PETSc_Comm = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Comm", sizeof(struct PyPetscCommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Comm) __PYX_ERR(21, 91, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Viewer = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Viewer", sizeof(struct PyPetscViewerObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Viewer) __PYX_ERR(21, 111, __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(21, 111, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Random = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Random", sizeof(struct PyPetscRandomObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Random) __PYX_ERR(21, 117, __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(21, 117, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_IS = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "IS", sizeof(struct PyPetscISObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_IS) __PYX_ERR(21, 123, __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(21, 123, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_LGMap = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "LGMap", sizeof(struct PyPetscLGMapObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_LGMap) __PYX_ERR(21, 129, __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(21, 129, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_SF = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "SF", sizeof(struct PyPetscSFObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_SF) __PYX_ERR(21, 135, __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(21, 135, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Vec = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Vec", sizeof(struct PyPetscVecObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Vec) __PYX_ERR(21, 141, __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(21, 141, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_FE = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "FE", sizeof(struct PyPetscFEObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_FE) __PYX_ERR(21, 147, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_FE = (struct __pyx_vtabstruct_8petsc4py_5PETSc_FE*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_FE->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_FE)) __PYX_ERR(21, 147, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Quad = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Quad", sizeof(struct PyPetscQuadObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Quad) __PYX_ERR(21, 153, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_Quad = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Quad*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Quad->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Quad)) __PYX_ERR(21, 153, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Scatter = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Scatter", sizeof(struct PyPetscScatterObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Scatter) __PYX_ERR(21, 159, __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(21, 159, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Section = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Section", sizeof(struct PyPetscSectionObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Section) __PYX_ERR(21, 165, __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(21, 165, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Mat = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Mat", sizeof(struct PyPetscMatObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Mat) __PYX_ERR(21, 171, __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(21, 171, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_NullSpace = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "NullSpace", sizeof(struct PyPetscNullSpaceObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_NullSpace) __PYX_ERR(21, 177, __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(21, 177, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_PC = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "PC", sizeof(struct PyPetscPCObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_PC) __PYX_ERR(21, 183, __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(21, 183, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_KSP = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "KSP", sizeof(struct PyPetscKSPObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_KSP) __PYX_ERR(21, 189, __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(21, 189, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_SNES = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "SNES", sizeof(struct PyPetscSNESObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_SNES) __PYX_ERR(21, 195, __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(21, 195, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_TS = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "TS", sizeof(struct PyPetscTSObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_TS) __PYX_ERR(21, 201, __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(21, 201, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_TAO = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "TAO", sizeof(struct PyPetscTAOObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_TAO) __PYX_ERR(21, 207, __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(21, 207, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_AO = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "AO", sizeof(struct PyPetscAOObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_AO) __PYX_ERR(21, 213, __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(21, 213, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_DM = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "DM", sizeof(struct PyPetscDMObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_DM) __PYX_ERR(21, 219, __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(21, 219, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_DS = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "DS", sizeof(struct PyPetscDSObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_DS) __PYX_ERR(21, 225, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_DS = (struct __pyx_vtabstruct_8petsc4py_5PETSc_DS*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_DS->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_DS)) __PYX_ERR(21, 225, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_Partitioner = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "Partitioner", sizeof(struct PyPetscPartitionerObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_Partitioner) __PYX_ERR(21, 231, __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(21, 231, __pyx_L1_error) __pyx_ptype_8petsc4py_5PETSc_DMLabel = __Pyx_ImportType(__pyx_t_1, "petsc4py.PETSc", "DMLabel", sizeof(struct PyPetscDMLabelObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_8petsc4py_5PETSc_DMLabel) __PYX_ERR(21, 237, __pyx_L1_error) __pyx_vtabptr_8petsc4py_5PETSc_DMLabel = (struct __pyx_vtabstruct_8petsc4py_5PETSc_DMLabel*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_DMLabel->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_DMLabel)) __PYX_ERR(21, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __pyx_t_1 = PyImport_ImportModule("petsc4py.PETSc"); if (!__pyx_t_1) __PYX_ERR(20, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_ImportFunction(__pyx_t_1, "GetComm", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetComm, "MPI_Comm (PyObject *, MPI_Comm)") < 0) __PYX_ERR(20, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "GetCommDefault", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetCommDefault, "MPI_Comm (void)") < 0) __PYX_ERR(20, 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(20, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initSLEPc(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initSLEPc(void) #else __Pyx_PyMODINIT_FUNC PyInit_SLEPc(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_SLEPc(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_SLEPc(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'SLEPc' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #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("__Pyx_PyMODINIT_FUNC PyInit_SLEPc(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(20, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(20, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(20, 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 CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #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(20, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(20, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(20, 1, __pyx_L1_error) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(20, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(20, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(20, 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(20, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_slepc4py__SLEPc) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(20, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(20, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "slepc4py.SLEPc")) { if (unlikely(PyDict_SetItemString(modules, "slepc4py.SLEPc", __pyx_m) < 0)) __PYX_ERR(20, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(20, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(20, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(20, 1, __pyx_L1_error) if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(20, 1, __pyx_L1_error) if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(20, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(20, 1, __pyx_L1_error) /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(20, 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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_COMM_NULL); __Pyx_GIVEREF(__pyx_n_s_COMM_NULL); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_COMM_NULL); __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_COMM_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_NULL, __pyx_t_1) < 0) __PYX_ERR(4, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_COMM_SELF); __Pyx_GIVEREF(__pyx_n_s_COMM_SELF); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_COMM_SELF); __pyx_t_1 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_SELF, __pyx_t_2) < 0) __PYX_ERR(4, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_COMM_WORLD); __Pyx_GIVEREF(__pyx_n_s_COMM_WORLD); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_COMM_WORLD); __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_COMM_WORLD); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_WORLD, __pyx_t_1) < 0) __PYX_ERR(4, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "SLEPc/SLEPc.pyx":62 * void *PyExc_RuntimeError * * cdef object PetscError = PyExc_RuntimeError # <<<<<<<<<<<<<< * from petsc4py.PETSc import Error as PetscError * */ __pyx_t_2 = ((PyObject *)PyExc_RuntimeError); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError); __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Error); __Pyx_GIVEREF(__pyx_n_s_Error); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Error); __pyx_t_1 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError); __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SLEPc.pyx":145 * * __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, 144, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":149 * """ * * DECIDE = PETSC_DECIDE # <<<<<<<<<<<<<< * DEFAULT = PETSC_DEFAULT * DETERMINE = PETSC_DETERMINE */ __pyx_t_1 = __Pyx_PyInt_From_int(PETSC_DECIDE); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DECIDE, __pyx_t_1) < 0) __PYX_ERR(4, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SLEPc.pyx":150 * * DECIDE = PETSC_DECIDE * DEFAULT = PETSC_DEFAULT # <<<<<<<<<<<<<< * DETERMINE = PETSC_DETERMINE * */ __pyx_t_1 = __Pyx_PyInt_From_int(PETSC_DEFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT, __pyx_t_1) < 0) __PYX_ERR(4, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SLEPc.pyx":151 * DECIDE = PETSC_DECIDE * DEFAULT = PETSC_DEFAULT * DETERMINE = PETSC_DETERMINE # <<<<<<<<<<<<<< * * include "Sys.pyx" */ __pyx_t_1 = __Pyx_PyInt_From_int(PETSC_DETERMINE); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DETERMINE, __pyx_t_1) < 0) __PYX_ERR(4, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/Sys.pyx":6 * * @classmethod * def getVersion(cls, devel=False, date=False, author=False): # <<<<<<<<<<<<<< * cdef char cversion[256] * cdef PetscInt major=0, minor=0, micro=0, release=0 */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "SLEPc/Sys.pyx":5 * cdef class Sys: * * @classmethod # <<<<<<<<<<<<<< * def getVersion(cls, devel=False, date=False, author=False): * cdef char cversion[256] */ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersion, __pyx_t_2) < 0) __PYX_ERR(9, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys); /* "SLEPc/Sys.pyx":30 * * @classmethod * def getVersionInfo(cls): # <<<<<<<<<<<<<< * version, dev, date, author = cls.getVersion(True, True, True) * return dict(major = version[0], */ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersionInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/Sys.pyx":29 * return tuple(out) * * @classmethod # <<<<<<<<<<<<<< * def getVersionInfo(cls): * version, dev, date, author = cls.getVersion(True, True, True) */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersionInfo, __pyx_t_1) < 0) __PYX_ERR(9, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys); /* "SLEPc/ST.pyx":3 * # ----------------------------------------------------------------------------- * * class STType(object): # <<<<<<<<<<<<<< * """ * ST types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__6, __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_2)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/ST.pyx":13 * - `PRECOND`: Preconditioner. * """ * SHELL = S_(STSHELL) # <<<<<<<<<<<<<< * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(STSHELL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SHELL, __pyx_t_3) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":14 * """ * SHELL = S_(STSHELL) * SHIFT = S_(STSHIFT) # <<<<<<<<<<<<<< * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(STSHIFT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SHIFT, __pyx_t_3) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":15 * SHELL = S_(STSHELL) * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) # <<<<<<<<<<<<<< * CAYLEY = S_(STCAYLEY) * PRECOND = S_(STPRECOND) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(STSINVERT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SINVERT, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":16 * SHIFT = S_(STSHIFT) * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) # <<<<<<<<<<<<<< * PRECOND = S_(STPRECOND) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(STCAYLEY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CAYLEY, __pyx_t_3) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":17 * SINVERT = S_(STSINVERT) * CAYLEY = S_(STCAYLEY) * PRECOND = S_(STPRECOND) # <<<<<<<<<<<<<< * * class STMatMode(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(STPRECOND); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PRECOND, __pyx_t_3) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":3 * # ----------------------------------------------------------------------------- * * class STType(object): # <<<<<<<<<<<<<< * """ * ST types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_STType, __pyx_tuple__6, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_STType, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":19 * PRECOND = S_(STPRECOND) * * class STMatMode(object): # <<<<<<<<<<<<<< * """ * ST matrix mode */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__7, __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_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/ST.pyx":28 * implicit matrix. * """ * COPY = ST_MATMODE_COPY # <<<<<<<<<<<<<< * INPLACE = ST_MATMODE_INPLACE * SHELL = ST_MATMODE_SHELL */ __pyx_t_3 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_COPY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_COPY, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":29 * """ * COPY = ST_MATMODE_COPY * INPLACE = ST_MATMODE_INPLACE # <<<<<<<<<<<<<< * SHELL = ST_MATMODE_SHELL * */ __pyx_t_3 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_INPLACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_INPLACE, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":30 * COPY = ST_MATMODE_COPY * INPLACE = ST_MATMODE_INPLACE * SHELL = ST_MATMODE_SHELL # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_SHELL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SHELL, __pyx_t_3) < 0) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/ST.pyx":19 * PRECOND = S_(STPRECOND) * * class STMatMode(object): # <<<<<<<<<<<<<< * """ * ST matrix mode */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_STMatMode, __pyx_tuple__7, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_STMatMode, __pyx_t_3) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/ST.pyx":40 * """ * * Type = STType # <<<<<<<<<<<<<< * MatMode = STMatMode * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_STType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST); /* "SLEPc/ST.pyx":41 * * Type = STType * MatMode = STMatMode # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_STMatMode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_MatMode, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST); /* "SLEPc/ST.pyx":494 * # ----------------------------------------------------------------------------- * * del STType # <<<<<<<<<<<<<< * del STMatMode * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STType) < 0) __PYX_ERR(0, 494, __pyx_L1_error) /* "SLEPc/ST.pyx":495 * * del STType * del STMatMode # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STMatMode) < 0) __PYX_ERR(0, 495, __pyx_L1_error) /* "SLEPc/BV.pyx":3 * # ----------------------------------------------------------------------------- * * class BVType(object): # <<<<<<<<<<<<<< * """ * BV type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__8, __pyx_n_s_BVType, __pyx_n_s_BVType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/BV.pyx":7 * BV type * """ * MAT = S_(BVMAT) # <<<<<<<<<<<<<< * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(BVMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MAT, __pyx_t_3) < 0) __PYX_ERR(10, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":8 * """ * MAT = S_(BVMAT) * SVEC = S_(BVSVEC) # <<<<<<<<<<<<<< * VECS = S_(BVVECS) * CONTIGUOUS = S_(BVCONTIGUOUS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(BVSVEC); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SVEC, __pyx_t_3) < 0) __PYX_ERR(10, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":9 * MAT = S_(BVMAT) * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) # <<<<<<<<<<<<<< * CONTIGUOUS = S_(BVCONTIGUOUS) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(BVVECS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_VECS, __pyx_t_3) < 0) __PYX_ERR(10, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":10 * SVEC = S_(BVSVEC) * VECS = S_(BVVECS) * CONTIGUOUS = S_(BVCONTIGUOUS) # <<<<<<<<<<<<<< * * class BVOrthogType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(BVCONTIGUOUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONTIGUOUS, __pyx_t_3) < 0) __PYX_ERR(10, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":3 * # ----------------------------------------------------------------------------- * * class BVType(object): # <<<<<<<<<<<<<< * """ * BV type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BVType, __pyx_tuple__8, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVType, __pyx_t_3) < 0) __PYX_ERR(10, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":12 * CONTIGUOUS = S_(BVCONTIGUOUS) * * class BVOrthogType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__9, __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_2)) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/BV.pyx":19 * - `MGS`: Modified Gram-Schmidt. * """ * CGS = BV_ORTHOG_CGS # <<<<<<<<<<<<<< * MGS = BV_ORTHOG_MGS * */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_CGS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CGS, __pyx_t_3) < 0) __PYX_ERR(10, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":20 * """ * CGS = BV_ORTHOG_CGS * MGS = BV_ORTHOG_MGS # <<<<<<<<<<<<<< * * class BVOrthogRefineType(object): */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_MGS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MGS, __pyx_t_3) < 0) __PYX_ERR(10, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":12 * CONTIGUOUS = S_(BVCONTIGUOUS) * * class BVOrthogType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BVOrthogType, __pyx_tuple__9, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogType, __pyx_t_3) < 0) __PYX_ERR(10, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":22 * MGS = BV_ORTHOG_MGS * * class BVOrthogRefineType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization refinement types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__10, __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_2)) __PYX_ERR(10, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/BV.pyx":30 * - `ALWAYS`: Always reorthogonalize. * """ * IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED # <<<<<<<<<<<<<< * NEVER = BV_ORTHOG_REFINE_NEVER * ALWAYS = BV_ORTHOG_REFINE_ALWAYS */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_IFNEEDED); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_IFNEEDED, __pyx_t_3) < 0) __PYX_ERR(10, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":31 * """ * IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED * NEVER = BV_ORTHOG_REFINE_NEVER # <<<<<<<<<<<<<< * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_NEVER); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NEVER, __pyx_t_3) < 0) __PYX_ERR(10, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_ALWAYS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ALWAYS, __pyx_t_3) < 0) __PYX_ERR(10, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":22 * MGS = BV_ORTHOG_MGS * * class BVOrthogRefineType(object): # <<<<<<<<<<<<<< * """ * BV orthogonalization refinement types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BVOrthogRefineType, __pyx_tuple__10, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogRefineType, __pyx_t_3) < 0) __PYX_ERR(10, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":34 * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * * class BVOrthogBlockType(object): # <<<<<<<<<<<<<< * """ * BV block-orthogonalization types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__11); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__11, __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_2)) __PYX_ERR(10, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/BV.pyx":41 * - `CHOL`: Cholesky. * """ * GS = BV_ORTHOG_BLOCK_GS # <<<<<<<<<<<<<< * CHOL = BV_ORTHOG_BLOCK_CHOL * */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_GS); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GS, __pyx_t_3) < 0) __PYX_ERR(10, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":42 * """ * GS = BV_ORTHOG_BLOCK_GS * CHOL = BV_ORTHOG_BLOCK_CHOL # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_CHOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CHOL, __pyx_t_3) < 0) __PYX_ERR(10, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/BV.pyx":34 * ALWAYS = BV_ORTHOG_REFINE_ALWAYS * * class BVOrthogBlockType(object): # <<<<<<<<<<<<<< * """ * BV block-orthogonalization types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BVOrthogBlockType, __pyx_tuple__11, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogBlockType, __pyx_t_3) < 0) __PYX_ERR(10, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/BV.pyx":52 * """ * * Type = BVType # <<<<<<<<<<<<<< * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(10, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":53 * * Type = BVType * OrthogType = BVOrthogType # <<<<<<<<<<<<<< * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVOrthogType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogType, __pyx_t_1) < 0) __PYX_ERR(10, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":54 * Type = BVType * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType # <<<<<<<<<<<<<< * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogRefineType, __pyx_t_1) < 0) __PYX_ERR(10, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":55 * OrthogType = BVOrthogType * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType # <<<<<<<<<<<<<< * OrthogBlockType = BVOrthogBlockType * BlockType = BVOrthogBlockType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_RefineType, __pyx_t_1) < 0) __PYX_ERR(10, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":56 * OrthogRefineType = BVOrthogRefineType * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType # <<<<<<<<<<<<<< * BlockType = BVOrthogBlockType * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogBlockType, __pyx_t_1) < 0) __PYX_ERR(10, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":57 * RefineType = BVOrthogRefineType * OrthogBlockType = BVOrthogBlockType * BlockType = BVOrthogBlockType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_BlockType, __pyx_t_1) < 0) __PYX_ERR(10, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV); /* "SLEPc/BV.pyx":885 * # ----------------------------------------------------------------------------- * * del BVType # <<<<<<<<<<<<<< * del BVOrthogType * del BVOrthogRefineType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVType) < 0) __PYX_ERR(10, 885, __pyx_L1_error) /* "SLEPc/BV.pyx":886 * * del BVType * del BVOrthogType # <<<<<<<<<<<<<< * del BVOrthogRefineType * del BVOrthogBlockType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogType) < 0) __PYX_ERR(10, 886, __pyx_L1_error) /* "SLEPc/BV.pyx":887 * del BVType * del BVOrthogType * del BVOrthogRefineType # <<<<<<<<<<<<<< * del BVOrthogBlockType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogRefineType) < 0) __PYX_ERR(10, 887, __pyx_L1_error) /* "SLEPc/BV.pyx":888 * del BVOrthogType * del BVOrthogRefineType * del BVOrthogBlockType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogBlockType) < 0) __PYX_ERR(10, 888, __pyx_L1_error) /* "SLEPc/DS.pyx":3 * # ----------------------------------------------------------------------------- * * class DSType(object): # <<<<<<<<<<<<<< * """ * DS type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__12); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__12, __pyx_n_s_DSType, __pyx_n_s_DSType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_DS_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/DS.pyx":7 * DS type * """ * HEP = S_(DSHEP) # <<<<<<<<<<<<<< * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HEP, __pyx_t_3) < 0) __PYX_ERR(11, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":8 * """ * HEP = S_(DSHEP) * NHEP = S_(DSNHEP) # <<<<<<<<<<<<<< * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSNHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NHEP, __pyx_t_3) < 0) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":9 * HEP = S_(DSHEP) * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) # <<<<<<<<<<<<<< * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GHEP, __pyx_t_3) < 0) __PYX_ERR(11, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":10 * NHEP = S_(DSNHEP) * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) # <<<<<<<<<<<<<< * GNHEP = S_(DSGNHEP) * NHEPTS = S_(DSNHEPTS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHIEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GHIEP, __pyx_t_3) < 0) __PYX_ERR(11, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":11 * GHEP = S_(DSGHEP) * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) # <<<<<<<<<<<<<< * NHEPTS = S_(DSNHEPTS) * SVD = S_(DSSVD) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSGNHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GNHEP, __pyx_t_3) < 0) __PYX_ERR(11, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":12 * GHIEP = S_(DSGHIEP) * GNHEP = S_(DSGNHEP) * NHEPTS = S_(DSNHEPTS) # <<<<<<<<<<<<<< * SVD = S_(DSSVD) * PEP = S_(DSPEP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSNHEPTS); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NHEPTS, __pyx_t_3) < 0) __PYX_ERR(11, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":13 * GNHEP = S_(DSGNHEP) * NHEPTS = S_(DSNHEPTS) * SVD = S_(DSSVD) # <<<<<<<<<<<<<< * PEP = S_(DSPEP) * NEP = S_(DSNEP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSSVD); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SVD, __pyx_t_3) < 0) __PYX_ERR(11, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":14 * NHEPTS = S_(DSNHEPTS) * SVD = S_(DSSVD) * PEP = S_(DSPEP) # <<<<<<<<<<<<<< * NEP = S_(DSNEP) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSPEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PEP, __pyx_t_3) < 0) __PYX_ERR(11, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":15 * SVD = S_(DSSVD) * PEP = S_(DSPEP) * NEP = S_(DSNEP) # <<<<<<<<<<<<<< * * class DSStateType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(DSNEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NEP, __pyx_t_3) < 0) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":3 * # ----------------------------------------------------------------------------- * * class DSType(object): # <<<<<<<<<<<<<< * """ * DS type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DSType, __pyx_tuple__12, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSType, __pyx_t_3) < 0) __PYX_ERR(11, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/DS.pyx":17 * NEP = S_(DSNEP) * * class DSStateType(object): # <<<<<<<<<<<<<< * """ * DS state types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__13); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__13, __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_2)) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/DS.pyx":26 * - `TRUNCATED`: Condensed form truncated to a smaller size. * """ * RAW = DS_STATE_RAW # <<<<<<<<<<<<<< * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED */ __pyx_t_3 = __Pyx_PyInt_From_DSStateType(DS_STATE_RAW); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RAW, __pyx_t_3) < 0) __PYX_ERR(11, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":27 * """ * RAW = DS_STATE_RAW * INTERMEDIATE = DS_STATE_INTERMEDIATE # <<<<<<<<<<<<<< * CONDENSED = DS_STATE_CONDENSED * TRUNCATED = DS_STATE_TRUNCATED */ __pyx_t_3 = __Pyx_PyInt_From_DSStateType(DS_STATE_INTERMEDIATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_INTERMEDIATE, __pyx_t_3) < 0) __PYX_ERR(11, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":28 * RAW = DS_STATE_RAW * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED # <<<<<<<<<<<<<< * TRUNCATED = DS_STATE_TRUNCATED * */ __pyx_t_3 = __Pyx_PyInt_From_DSStateType(DS_STATE_CONDENSED); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONDENSED, __pyx_t_3) < 0) __PYX_ERR(11, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":29 * INTERMEDIATE = DS_STATE_INTERMEDIATE * CONDENSED = DS_STATE_CONDENSED * TRUNCATED = DS_STATE_TRUNCATED # <<<<<<<<<<<<<< * * class DSMatType(object): */ __pyx_t_3 = __Pyx_PyInt_From_DSStateType(DS_STATE_TRUNCATED); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TRUNCATED, __pyx_t_3) < 0) __PYX_ERR(11, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":17 * NEP = S_(DSNEP) * * class DSStateType(object): # <<<<<<<<<<<<<< * """ * DS state types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DSStateType, __pyx_tuple__13, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSStateType, __pyx_t_3) < 0) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/DS.pyx":31 * TRUNCATED = DS_STATE_TRUNCATED * * class DSMatType(object): # <<<<<<<<<<<<<< * """ * To refer to one of the matrices stored internally in DS */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__14); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__14, __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_2)) __PYX_ERR(11, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/DS.pyx":48 * - `W`: workspace matrix. * """ * A = DS_MAT_A # <<<<<<<<<<<<<< * B = DS_MAT_B * C = DS_MAT_C */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_A); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_A, __pyx_t_3) < 0) __PYX_ERR(11, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":49 * """ * A = DS_MAT_A * B = DS_MAT_B # <<<<<<<<<<<<<< * C = DS_MAT_C * T = DS_MAT_T */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_B); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_B, __pyx_t_3) < 0) __PYX_ERR(11, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":50 * A = DS_MAT_A * B = DS_MAT_B * C = DS_MAT_C # <<<<<<<<<<<<<< * T = DS_MAT_T * D = DS_MAT_D */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_C, __pyx_t_3) < 0) __PYX_ERR(11, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":51 * B = DS_MAT_B * C = DS_MAT_C * T = DS_MAT_T # <<<<<<<<<<<<<< * D = DS_MAT_D * Q = DS_MAT_Q */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_T); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_T, __pyx_t_3) < 0) __PYX_ERR(11, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":52 * C = DS_MAT_C * T = DS_MAT_T * D = DS_MAT_D # <<<<<<<<<<<<<< * Q = DS_MAT_Q * Z = DS_MAT_Z */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_D, __pyx_t_3) < 0) __PYX_ERR(11, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":53 * T = DS_MAT_T * D = DS_MAT_D * Q = DS_MAT_Q # <<<<<<<<<<<<<< * Z = DS_MAT_Z * X = DS_MAT_X */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_Q); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Q, __pyx_t_3) < 0) __PYX_ERR(11, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":54 * D = DS_MAT_D * Q = DS_MAT_Q * Z = DS_MAT_Z # <<<<<<<<<<<<<< * X = DS_MAT_X * Y = DS_MAT_Y */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_Z); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Z, __pyx_t_3) < 0) __PYX_ERR(11, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":55 * Q = DS_MAT_Q * Z = DS_MAT_Z * X = DS_MAT_X # <<<<<<<<<<<<<< * Y = DS_MAT_Y * U = DS_MAT_U */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_X); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_X, __pyx_t_3) < 0) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":56 * Z = DS_MAT_Z * X = DS_MAT_X * Y = DS_MAT_Y # <<<<<<<<<<<<<< * U = DS_MAT_U * VT = DS_MAT_VT */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_Y); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Y, __pyx_t_3) < 0) __PYX_ERR(11, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":57 * X = DS_MAT_X * Y = DS_MAT_Y * U = DS_MAT_U # <<<<<<<<<<<<<< * VT = DS_MAT_VT * W = DS_MAT_W */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_U); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_U, __pyx_t_3) < 0) __PYX_ERR(11, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":58 * Y = DS_MAT_Y * U = DS_MAT_U * VT = DS_MAT_VT # <<<<<<<<<<<<<< * W = DS_MAT_W * */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_VT); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_VT, __pyx_t_3) < 0) __PYX_ERR(11, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":59 * U = DS_MAT_U * VT = DS_MAT_VT * W = DS_MAT_W # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_DSMatType(DS_MAT_W); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_W, __pyx_t_3) < 0) __PYX_ERR(11, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/DS.pyx":31 * TRUNCATED = DS_STATE_TRUNCATED * * class DSMatType(object): # <<<<<<<<<<<<<< * """ * To refer to one of the matrices stored internally in DS */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DSMatType, __pyx_tuple__14, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSMatType, __pyx_t_3) < 0) __PYX_ERR(11, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/DS.pyx":69 * """ * * Type = DSType # <<<<<<<<<<<<<< * StateType = DSStateType * MatType = DSMatType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DSType); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(11, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":70 * * Type = DSType * StateType = DSStateType # <<<<<<<<<<<<<< * MatType = DSMatType * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DSStateType); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_StateType, __pyx_t_1) < 0) __PYX_ERR(11, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":71 * Type = DSType * StateType = DSStateType * MatType = DSMatType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DSMatType); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_MatType, __pyx_t_1) < 0) __PYX_ERR(11, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS); /* "SLEPc/DS.pyx":482 * # ----------------------------------------------------------------------------- * * del DSType # <<<<<<<<<<<<<< * del DSStateType * del DSMatType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSType) < 0) __PYX_ERR(11, 482, __pyx_L1_error) /* "SLEPc/DS.pyx":483 * * del DSType * del DSStateType # <<<<<<<<<<<<<< * del DSMatType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSStateType) < 0) __PYX_ERR(11, 483, __pyx_L1_error) /* "SLEPc/DS.pyx":484 * del DSType * del DSStateType * del DSMatType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSMatType) < 0) __PYX_ERR(11, 484, __pyx_L1_error) /* "SLEPc/FN.pyx":3 * # ----------------------------------------------------------------------------- * * class FNType(object): # <<<<<<<<<<<<<< * """ * FN type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__15, __pyx_n_s_FNType, __pyx_n_s_FNType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_FN_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/FN.pyx":7 * FN type * """ * COMBINE = S_(FNCOMBINE) # <<<<<<<<<<<<<< * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNCOMBINE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_COMBINE, __pyx_t_3) < 0) __PYX_ERR(12, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":8 * """ * COMBINE = S_(FNCOMBINE) * RATIONAL = S_(FNRATIONAL) # <<<<<<<<<<<<<< * EXP = S_(FNEXP) * LOG = S_(FNLOG) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNRATIONAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RATIONAL, __pyx_t_3) < 0) __PYX_ERR(12, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":9 * COMBINE = S_(FNCOMBINE) * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) # <<<<<<<<<<<<<< * LOG = S_(FNLOG) * PHI = S_(FNPHI) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNEXP); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_EXP, __pyx_t_3) < 0) __PYX_ERR(12, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":10 * RATIONAL = S_(FNRATIONAL) * EXP = S_(FNEXP) * LOG = S_(FNLOG) # <<<<<<<<<<<<<< * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNLOG); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LOG, __pyx_t_3) < 0) __PYX_ERR(12, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":11 * EXP = S_(FNEXP) * LOG = S_(FNLOG) * PHI = S_(FNPHI) # <<<<<<<<<<<<<< * SQRT = S_(FNSQRT) * INVSQRT = S_(FNINVSQRT) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNPHI); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PHI, __pyx_t_3) < 0) __PYX_ERR(12, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":12 * LOG = S_(FNLOG) * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) # <<<<<<<<<<<<<< * INVSQRT = S_(FNINVSQRT) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNSQRT); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SQRT, __pyx_t_3) < 0) __PYX_ERR(12, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":13 * PHI = S_(FNPHI) * SQRT = S_(FNSQRT) * INVSQRT = S_(FNINVSQRT) # <<<<<<<<<<<<<< * * class FNCombineType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(FNINVSQRT); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_INVSQRT, __pyx_t_3) < 0) __PYX_ERR(12, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":3 * # ----------------------------------------------------------------------------- * * class FNType(object): # <<<<<<<<<<<<<< * """ * FN type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FNType, __pyx_tuple__15, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNType, __pyx_t_3) < 0) __PYX_ERR(12, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/FN.pyx":15 * INVSQRT = S_(FNINVSQRT) * * class FNCombineType(object): # <<<<<<<<<<<<<< * """ * FN type of combination of child functions */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__16); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__16, __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_2)) __PYX_ERR(12, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "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_3 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_ADD); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ADD, __pyx_t_3) < 0) __PYX_ERR(12, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":25 * """ * ADD = FN_COMBINE_ADD * MULTIPLY = FN_COMBINE_MULTIPLY # <<<<<<<<<<<<<< * DIVIDE = FN_COMBINE_DIVIDE * COMPOSE = FN_COMBINE_COMPOSE */ __pyx_t_3 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_MULTIPLY); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MULTIPLY, __pyx_t_3) < 0) __PYX_ERR(12, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":26 * ADD = FN_COMBINE_ADD * MULTIPLY = FN_COMBINE_MULTIPLY * DIVIDE = FN_COMBINE_DIVIDE # <<<<<<<<<<<<<< * COMPOSE = FN_COMBINE_COMPOSE * */ __pyx_t_3 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_DIVIDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVIDE, __pyx_t_3) < 0) __PYX_ERR(12, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":27 * MULTIPLY = FN_COMBINE_MULTIPLY * DIVIDE = FN_COMBINE_DIVIDE * COMPOSE = FN_COMBINE_COMPOSE # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_COMPOSE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_COMPOSE, __pyx_t_3) < 0) __PYX_ERR(12, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/FN.pyx":15 * INVSQRT = S_(FNINVSQRT) * * class FNCombineType(object): # <<<<<<<<<<<<<< * """ * FN type of combination of child functions */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FNCombineType, __pyx_tuple__16, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNCombineType, __pyx_t_3) < 0) __PYX_ERR(12, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/FN.pyx":37 * """ * * Type = FNType # <<<<<<<<<<<<<< * CombineType = FNCombineType * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FNType); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(12, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN); /* "SLEPc/FN.pyx":38 * * Type = FNType * CombineType = FNCombineType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FNCombineType); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_CombineType, __pyx_t_1) < 0) __PYX_ERR(12, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN); /* "SLEPc/FN.pyx":272 * # ----------------------------------------------------------------------------- * * del FNType # <<<<<<<<<<<<<< * del FNCombineType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNType) < 0) __PYX_ERR(12, 272, __pyx_L1_error) /* "SLEPc/FN.pyx":273 * * del FNType * del FNCombineType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNCombineType) < 0) __PYX_ERR(12, 273, __pyx_L1_error) /* "SLEPc/RG.pyx":3 * # ----------------------------------------------------------------------------- * * class RGType(object): # <<<<<<<<<<<<<< * """ * RG type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__17); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__17, __pyx_n_s_RGType, __pyx_n_s_RGType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_RG_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/RG.pyx":7 * RG type * """ * INTERVAL = S_(RGINTERVAL) # <<<<<<<<<<<<<< * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(RGINTERVAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_INTERVAL, __pyx_t_3) < 0) __PYX_ERR(13, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/RG.pyx":8 * """ * INTERVAL = S_(RGINTERVAL) * POLYGON = S_(RGPOLYGON) # <<<<<<<<<<<<<< * ELLIPSE = S_(RGELLIPSE) * RING = S_(RGRING) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(RGPOLYGON); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_POLYGON, __pyx_t_3) < 0) __PYX_ERR(13, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/RG.pyx":9 * INTERVAL = S_(RGINTERVAL) * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) # <<<<<<<<<<<<<< * RING = S_(RGRING) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(RGELLIPSE); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ELLIPSE, __pyx_t_3) < 0) __PYX_ERR(13, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/RG.pyx":10 * POLYGON = S_(RGPOLYGON) * ELLIPSE = S_(RGELLIPSE) * RING = S_(RGRING) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(RGRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RING, __pyx_t_3) < 0) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/RG.pyx":3 * # ----------------------------------------------------------------------------- * * class RGType(object): # <<<<<<<<<<<<<< * """ * RG type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RGType, __pyx_tuple__17, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_RGType, __pyx_t_3) < 0) __PYX_ERR(13, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/RG.pyx":20 * """ * * Type = RGType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RGType); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(13, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_RG); /* "SLEPc/RG.pyx":262 * # ----------------------------------------------------------------------------- * * del RGType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_RGType) < 0) __PYX_ERR(13, 262, __pyx_L1_error) /* "SLEPc/EPS.pyx":3 * # ----------------------------------------------------------------------------- * * class EPSType(object): # <<<<<<<<<<<<<< * """ * EPS type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__18); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__18, __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_2)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":37 * """ * # provided implementations * POWER = S_(EPSPOWER) # <<<<<<<<<<<<<< * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPOWER); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_POWER, __pyx_t_3) < 0) __PYX_ERR(14, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":38 * # provided implementations * POWER = S_(EPSPOWER) * SUBSPACE = S_(EPSSUBSPACE) # <<<<<<<<<<<<<< * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSSUBSPACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SUBSPACE, __pyx_t_3) < 0) __PYX_ERR(14, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":39 * POWER = S_(EPSPOWER) * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) # <<<<<<<<<<<<<< * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARNOLDI); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ARNOLDI, __pyx_t_3) < 0) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":40 * SUBSPACE = S_(EPSSUBSPACE) * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) # <<<<<<<<<<<<<< * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLANCZOS); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LANCZOS, __pyx_t_3) < 0) __PYX_ERR(14, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":41 * ARNOLDI = S_(EPSARNOLDI) * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) # <<<<<<<<<<<<<< * GD = S_(EPSGD) * JD = S_(EPSJD) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSKRYLOVSCHUR); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_KRYLOVSCHUR, __pyx_t_3) < 0) __PYX_ERR(14, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":42 * LANCZOS = S_(EPSLANCZOS) * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) # <<<<<<<<<<<<<< * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSGD); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GD, __pyx_t_3) < 0) __PYX_ERR(14, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":43 * KRYLOVSCHUR = S_(EPSKRYLOVSCHUR) * GD = S_(EPSGD) * JD = S_(EPSJD) # <<<<<<<<<<<<<< * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSJD); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_JD, __pyx_t_3) < 0) __PYX_ERR(14, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":44 * GD = S_(EPSGD) * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) # <<<<<<<<<<<<<< * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSRQCG); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RQCG, __pyx_t_3) < 0) __PYX_ERR(14, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":45 * JD = S_(EPSJD) * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) # <<<<<<<<<<<<<< * CISS = S_(EPSCISS) * LYAPII = S_(EPSLYAPII) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLOBPCG); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LOBPCG, __pyx_t_3) < 0) __PYX_ERR(14, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":46 * RQCG = S_(EPSRQCG) * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) # <<<<<<<<<<<<<< * LYAPII = S_(EPSLYAPII) * LAPACK = S_(EPSLAPACK) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSCISS); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CISS, __pyx_t_3) < 0) __PYX_ERR(14, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":47 * LOBPCG = S_(EPSLOBPCG) * CISS = S_(EPSCISS) * LYAPII = S_(EPSLYAPII) # <<<<<<<<<<<<<< * LAPACK = S_(EPSLAPACK) * # with external libraries */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLYAPII); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LYAPII, __pyx_t_3) < 0) __PYX_ERR(14, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":48 * CISS = S_(EPSCISS) * LYAPII = S_(EPSLYAPII) * LAPACK = S_(EPSLAPACK) # <<<<<<<<<<<<<< * # with external libraries * ARPACK = S_(EPSARPACK) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLAPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LAPACK, __pyx_t_3) < 0) __PYX_ERR(14, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":50 * LAPACK = S_(EPSLAPACK) * # with external libraries * ARPACK = S_(EPSARPACK) # <<<<<<<<<<<<<< * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ARPACK, __pyx_t_3) < 0) __PYX_ERR(14, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":51 * # with external libraries * ARPACK = S_(EPSARPACK) * BLZPACK = S_(EPSBLZPACK) # <<<<<<<<<<<<<< * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLZPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BLZPACK, __pyx_t_3) < 0) __PYX_ERR(14, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":52 * ARPACK = S_(EPSARPACK) * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) # <<<<<<<<<<<<<< * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSTRLAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TRLAN, __pyx_t_3) < 0) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":53 * BLZPACK = S_(EPSBLZPACK) * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) # <<<<<<<<<<<<<< * PRIMME = S_(EPSPRIMME) * FEAST = S_(EPSFEAST) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLOPEX); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BLOPEX, __pyx_t_3) < 0) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":54 * TRLAN = S_(EPSTRLAN) * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) # <<<<<<<<<<<<<< * FEAST = S_(EPSFEAST) * SCALAPACK = S_(EPSSCALAPACK) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPRIMME); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PRIMME, __pyx_t_3) < 0) __PYX_ERR(14, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":55 * BLOPEX = S_(EPSBLOPEX) * PRIMME = S_(EPSPRIMME) * FEAST = S_(EPSFEAST) # <<<<<<<<<<<<<< * SCALAPACK = S_(EPSSCALAPACK) * ELPA = S_(EPSELPA) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSFEAST); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_FEAST, __pyx_t_3) < 0) __PYX_ERR(14, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":56 * PRIMME = S_(EPSPRIMME) * FEAST = S_(EPSFEAST) * SCALAPACK = S_(EPSSCALAPACK) # <<<<<<<<<<<<<< * ELPA = S_(EPSELPA) * ELEMENTAL = S_(EPSELEMENTAL) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSSCALAPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SCALAPACK, __pyx_t_3) < 0) __PYX_ERR(14, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":57 * FEAST = S_(EPSFEAST) * SCALAPACK = S_(EPSSCALAPACK) * ELPA = S_(EPSELPA) # <<<<<<<<<<<<<< * ELEMENTAL = S_(EPSELEMENTAL) * EVSL = S_(EPSEVSL) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSELPA); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ELPA, __pyx_t_3) < 0) __PYX_ERR(14, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":58 * SCALAPACK = S_(EPSSCALAPACK) * ELPA = S_(EPSELPA) * ELEMENTAL = S_(EPSELEMENTAL) # <<<<<<<<<<<<<< * EVSL = S_(EPSEVSL) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSELEMENTAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ELEMENTAL, __pyx_t_3) < 0) __PYX_ERR(14, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":59 * ELPA = S_(EPSELPA) * ELEMENTAL = S_(EPSELEMENTAL) * EVSL = S_(EPSEVSL) # <<<<<<<<<<<<<< * * class EPSProblemType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(EPSEVSL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_EVSL, __pyx_t_3) < 0) __PYX_ERR(14, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":3 * # ----------------------------------------------------------------------------- * * class EPSType(object): # <<<<<<<<<<<<<< * """ * EPS type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSType, __pyx_tuple__18, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSType, __pyx_t_3) < 0) __PYX_ERR(14, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":61 * EVSL = S_(EPSEVSL) * * class EPSProblemType(object): # <<<<<<<<<<<<<< * """ * EPS problem type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__19); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__19, __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_2)) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":73 * - `GHIEP`: Generalized Hermitian-indefinite eigenproblem. * """ * HEP = EPS_HEP # <<<<<<<<<<<<<< * NHEP = EPS_NHEP * GHEP = EPS_GHEP */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_HEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HEP, __pyx_t_3) < 0) __PYX_ERR(14, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":74 * """ * HEP = EPS_HEP * NHEP = EPS_NHEP # <<<<<<<<<<<<<< * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_NHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NHEP, __pyx_t_3) < 0) __PYX_ERR(14, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":75 * HEP = EPS_HEP * NHEP = EPS_NHEP * GHEP = EPS_GHEP # <<<<<<<<<<<<<< * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_GHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GHEP, __pyx_t_3) < 0) __PYX_ERR(14, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":76 * NHEP = EPS_NHEP * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP # <<<<<<<<<<<<<< * PGNHEP = EPS_PGNHEP * GHIEP = EPS_GHIEP */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_GNHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GNHEP, __pyx_t_3) < 0) __PYX_ERR(14, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":77 * GHEP = EPS_GHEP * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP # <<<<<<<<<<<<<< * GHIEP = EPS_GHIEP * */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_PGNHEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PGNHEP, __pyx_t_3) < 0) __PYX_ERR(14, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":78 * GNHEP = EPS_GNHEP * PGNHEP = EPS_PGNHEP * GHIEP = EPS_GHIEP # <<<<<<<<<<<<<< * * class EPSExtraction(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSProblemType(EPS_GHIEP); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GHIEP, __pyx_t_3) < 0) __PYX_ERR(14, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":61 * EVSL = S_(EPSEVSL) * * class EPSProblemType(object): # <<<<<<<<<<<<<< * """ * EPS problem type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSProblemType, __pyx_tuple__19, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSProblemType, __pyx_t_3) < 0) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":80 * GHIEP = EPS_GHIEP * * class EPSExtraction(object): # <<<<<<<<<<<<<< * """ * EPS extraction technique */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__20); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__20, __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_2)) __PYX_ERR(14, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":92 * - `REFINED_HARMONIC`: Refined harmonic extraction. * """ * RITZ = EPS_RITZ # <<<<<<<<<<<<<< * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_RITZ); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RITZ, __pyx_t_3) < 0) __PYX_ERR(14, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":93 * """ * RITZ = EPS_RITZ * HARMONIC = EPS_HARMONIC # <<<<<<<<<<<<<< * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HARMONIC, __pyx_t_3) < 0) __PYX_ERR(14, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":94 * RITZ = EPS_RITZ * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE # <<<<<<<<<<<<<< * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RELATIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HARMONIC_RELATIVE, __pyx_t_3) < 0) __PYX_ERR(14, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":95 * HARMONIC = EPS_HARMONIC * HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT # <<<<<<<<<<<<<< * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RIGHT); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HARMONIC_RIGHT, __pyx_t_3) < 0) __PYX_ERR(14, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":96 * 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_3 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_LARGEST); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HARMONIC_LARGEST, __pyx_t_3) < 0) __PYX_ERR(14, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":97 * HARMONIC_RIGHT = EPS_HARMONIC_RIGHT * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED # <<<<<<<<<<<<<< * REFINED_HARMONIC = EPS_REFINED_HARMONIC * */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_REFINED, __pyx_t_3) < 0) __PYX_ERR(14, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":98 * HARMONIC_LARGEST = EPS_HARMONIC_LARGEST * REFINED = EPS_REFINED * REFINED_HARMONIC = EPS_REFINED_HARMONIC # <<<<<<<<<<<<<< * * class EPSBalance(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED_HARMONIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_REFINED_HARMONIC, __pyx_t_3) < 0) __PYX_ERR(14, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":80 * GHIEP = EPS_GHIEP * * class EPSExtraction(object): # <<<<<<<<<<<<<< * """ * EPS extraction technique */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSExtraction, __pyx_tuple__20, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSExtraction, __pyx_t_3) < 0) __PYX_ERR(14, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":100 * REFINED_HARMONIC = EPS_REFINED_HARMONIC * * class EPSBalance(object): # <<<<<<<<<<<<<< * """ * EPS type of balancing used for non-Hermitian problems */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__21); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__21, __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_2)) __PYX_ERR(14, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":109 * - `USER`: User-defined. * """ * NONE = EPS_BALANCE_NONE # <<<<<<<<<<<<<< * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE */ __pyx_t_3 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(14, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":110 * """ * NONE = EPS_BALANCE_NONE * ONESIDE = EPS_BALANCE_ONESIDE # <<<<<<<<<<<<<< * TWOSIDE = EPS_BALANCE_TWOSIDE * USER = EPS_BALANCE_USER */ __pyx_t_3 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_ONESIDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ONESIDE, __pyx_t_3) < 0) __PYX_ERR(14, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":111 * NONE = EPS_BALANCE_NONE * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE # <<<<<<<<<<<<<< * USER = EPS_BALANCE_USER * */ __pyx_t_3 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_TWOSIDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TWOSIDE, __pyx_t_3) < 0) __PYX_ERR(14, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":112 * ONESIDE = EPS_BALANCE_ONESIDE * TWOSIDE = EPS_BALANCE_TWOSIDE * USER = EPS_BALANCE_USER # <<<<<<<<<<<<<< * * class EPSErrorType(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(14, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":100 * REFINED_HARMONIC = EPS_REFINED_HARMONIC * * class EPSBalance(object): # <<<<<<<<<<<<<< * """ * EPS type of balancing used for non-Hermitian problems */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSBalance, __pyx_tuple__21, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSBalance, __pyx_t_3) < 0) __PYX_ERR(14, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":114 * USER = EPS_BALANCE_USER * * class EPSErrorType(object): # <<<<<<<<<<<<<< * """ * EPS error type to assess accuracy of computed solutions */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__22); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__22, __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_2)) __PYX_ERR(14, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":122 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = EPS_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = EPS_ERROR_RELATIVE * BACKWARD = EPS_ERROR_BACKWARD */ __pyx_t_3 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABSOLUTE, __pyx_t_3) < 0) __PYX_ERR(14, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":123 * """ * ABSOLUTE = EPS_ERROR_ABSOLUTE * RELATIVE = EPS_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = EPS_ERROR_BACKWARD * */ __pyx_t_3 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_RELATIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RELATIVE, __pyx_t_3) < 0) __PYX_ERR(14, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":124 * ABSOLUTE = EPS_ERROR_ABSOLUTE * RELATIVE = EPS_ERROR_RELATIVE * BACKWARD = EPS_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class EPSWhich(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_BACKWARD); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BACKWARD, __pyx_t_3) < 0) __PYX_ERR(14, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":114 * USER = EPS_BALANCE_USER * * class EPSErrorType(object): # <<<<<<<<<<<<<< * """ * EPS error type to assess accuracy of computed solutions */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSErrorType, __pyx_tuple__22, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSErrorType, __pyx_t_3) < 0) __PYX_ERR(14, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":126 * BACKWARD = EPS_ERROR_BACKWARD * * class EPSWhich(object): # <<<<<<<<<<<<<< * """ * EPS desired piece of spectrum */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__23); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__23, __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_2)) __PYX_ERR(14, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":142 * - `USER`: User defined ordering. * """ * LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * LARGEST_REAL = EPS_LARGEST_REAL * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY */ __pyx_t_3 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(14, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":143 * """ * LARGEST_MAGNITUDE = EPS_LARGEST_MAGNITUDE * LARGEST_REAL = EPS_LARGEST_REAL # <<<<<<<<<<<<<< * LARGEST_IMAGINARY = EPS_LARGEST_IMAGINARY * SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE */ __pyx_t_3 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_REAL, __pyx_t_3) < 0) __PYX_ERR(14, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":144 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(14, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":145 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(14, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":146 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_REAL, __pyx_t_3) < 0) __PYX_ERR(14, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":147 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(14, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":148 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(14, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":149 * 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_3 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_REAL, __pyx_t_3) < 0) __PYX_ERR(14, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":150 * TARGET_MAGNITUDE = EPS_TARGET_MAGNITUDE * TARGET_REAL = EPS_TARGET_REAL * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY # <<<<<<<<<<<<<< * ALL = EPS_ALL * USER = EPS_WHICH_USER */ __pyx_t_3 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(14, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":151 * TARGET_REAL = EPS_TARGET_REAL * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY * ALL = EPS_ALL # <<<<<<<<<<<<<< * USER = EPS_WHICH_USER * */ __pyx_t_3 = __Pyx_PyInt_From_EPSWhich(EPS_ALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ALL, __pyx_t_3) < 0) __PYX_ERR(14, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":152 * TARGET_IMAGINARY = EPS_TARGET_IMAGINARY * ALL = EPS_ALL * USER = EPS_WHICH_USER # <<<<<<<<<<<<<< * * class EPSConv(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSWhich(EPS_WHICH_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(14, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":126 * BACKWARD = EPS_ERROR_BACKWARD * * class EPSWhich(object): # <<<<<<<<<<<<<< * """ * EPS desired piece of spectrum */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSWhich, __pyx_tuple__23, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSWhich, __pyx_t_3) < 0) __PYX_ERR(14, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":154 * USER = EPS_WHICH_USER * * class EPSConv(object): # <<<<<<<<<<<<<< * """ * EPS convergence test */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__24); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__24, __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_2)) __PYX_ERR(14, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":163 * - `USER`: * """ * ABS = EPS_CONV_ABS # <<<<<<<<<<<<<< * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM */ __pyx_t_3 = __Pyx_PyInt_From_EPSConv(EPS_CONV_ABS); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABS, __pyx_t_3) < 0) __PYX_ERR(14, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":164 * """ * ABS = EPS_CONV_ABS * REL = EPS_CONV_REL # <<<<<<<<<<<<<< * NORM = EPS_CONV_NORM * USER = EPS_CONV_USER */ __pyx_t_3 = __Pyx_PyInt_From_EPSConv(EPS_CONV_REL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_REL, __pyx_t_3) < 0) __PYX_ERR(14, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":165 * ABS = EPS_CONV_ABS * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM # <<<<<<<<<<<<<< * USER = EPS_CONV_USER * */ __pyx_t_3 = __Pyx_PyInt_From_EPSConv(EPS_CONV_NORM); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NORM, __pyx_t_3) < 0) __PYX_ERR(14, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":166 * REL = EPS_CONV_REL * NORM = EPS_CONV_NORM * USER = EPS_CONV_USER # <<<<<<<<<<<<<< * * class EPSConvergedReason(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSConv(EPS_CONV_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(14, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":154 * USER = EPS_WHICH_USER * * class EPSConv(object): # <<<<<<<<<<<<<< * """ * EPS convergence test */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSConv, __pyx_tuple__24, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConv, __pyx_t_3) < 0) __PYX_ERR(14, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":168 * USER = EPS_CONV_USER * * class EPSConvergedReason(object): # <<<<<<<<<<<<<< * """ * EPS convergence reasons */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__25); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__25, __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_2)) __PYX_ERR(14, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":179 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = EPS_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = EPS_CONVERGED_USER * DIVERGED_ITS = EPS_DIVERGED_ITS */ __pyx_t_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_TOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_TOL, __pyx_t_3) < 0) __PYX_ERR(14, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":180 * """ * CONVERGED_TOL = EPS_CONVERGED_TOL * CONVERGED_USER = EPS_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = EPS_DIVERGED_ITS * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN */ __pyx_t_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_USER, __pyx_t_3) < 0) __PYX_ERR(14, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":181 * 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_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(14, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":182 * 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_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_3) < 0) __PYX_ERR(14, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":183 * 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_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_3) < 0) __PYX_ERR(14, 183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":184 * DIVERGED_BREAKDOWN = EPS_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = EPS_CONVERGED_ITERATING * */ __pyx_t_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_3) < 0) __PYX_ERR(14, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":185 * DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = EPS_CONVERGED_ITERATING * ITERATING = EPS_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * class EPSPowerShiftType(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ITERATING, __pyx_t_3) < 0) __PYX_ERR(14, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":168 * USER = EPS_CONV_USER * * class EPSConvergedReason(object): # <<<<<<<<<<<<<< * """ * EPS convergence reasons */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSConvergedReason, __pyx_tuple__25, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConvergedReason, __pyx_t_3) < 0) __PYX_ERR(14, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":187 * ITERATING = EPS_CONVERGED_ITERATING * * class EPSPowerShiftType(object): # <<<<<<<<<<<<<< * """ * EPS Power shift type. */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__26); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__26, __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_2)) __PYX_ERR(14, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":195 * - `WILKINSON`: * """ * CONSTANT = EPS_POWER_SHIFT_CONSTANT # <<<<<<<<<<<<<< * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH * WILKINSON = EPS_POWER_SHIFT_WILKINSON */ __pyx_t_3 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_CONSTANT); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONSTANT, __pyx_t_3) < 0) __PYX_ERR(14, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":196 * """ * CONSTANT = EPS_POWER_SHIFT_CONSTANT * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH # <<<<<<<<<<<<<< * WILKINSON = EPS_POWER_SHIFT_WILKINSON * */ __pyx_t_3 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_RAYLEIGH); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RAYLEIGH, __pyx_t_3) < 0) __PYX_ERR(14, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":197 * CONSTANT = EPS_POWER_SHIFT_CONSTANT * RAYLEIGH = EPS_POWER_SHIFT_RAYLEIGH * WILKINSON = EPS_POWER_SHIFT_WILKINSON # <<<<<<<<<<<<<< * * class EPSLanczosReorthogType(object): */ __pyx_t_3 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_WILKINSON); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_WILKINSON, __pyx_t_3) < 0) __PYX_ERR(14, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":187 * ITERATING = EPS_CONVERGED_ITERATING * * class EPSPowerShiftType(object): # <<<<<<<<<<<<<< * """ * EPS Power shift type. */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSPowerShiftType, __pyx_tuple__26, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSPowerShiftType, __pyx_t_3) < 0) __PYX_ERR(14, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":199 * WILKINSON = EPS_POWER_SHIFT_WILKINSON * * class EPSLanczosReorthogType(object): # <<<<<<<<<<<<<< * """ * EPS Lanczos reorthogonalization type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__27, __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_2)) __PYX_ERR(14, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/EPS.pyx":210 * - `DELAYED`: * """ * LOCAL = EPS_LANCZOS_REORTHOG_LOCAL # <<<<<<<<<<<<<< * FULL = EPS_LANCZOS_REORTHOG_FULL * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE */ __pyx_t_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_LOCAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LOCAL, __pyx_t_3) < 0) __PYX_ERR(14, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":211 * """ * LOCAL = EPS_LANCZOS_REORTHOG_LOCAL * FULL = EPS_LANCZOS_REORTHOG_FULL # <<<<<<<<<<<<<< * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC */ __pyx_t_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_FULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_FULL, __pyx_t_3) < 0) __PYX_ERR(14, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":212 * 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_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_SELECTIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SELECTIVE, __pyx_t_3) < 0) __PYX_ERR(14, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":213 * 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_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PERIODIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PERIODIC, __pyx_t_3) < 0) __PYX_ERR(14, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":214 * SELECTIVE = EPS_LANCZOS_REORTHOG_SELECTIVE * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL # <<<<<<<<<<<<<< * DELAYED = EPS_LANCZOS_REORTHOG_DELAYED * */ __pyx_t_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PARTIAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PARTIAL, __pyx_t_3) < 0) __PYX_ERR(14, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":215 * PERIODIC = EPS_LANCZOS_REORTHOG_PERIODIC * PARTIAL = EPS_LANCZOS_REORTHOG_PARTIAL * DELAYED = EPS_LANCZOS_REORTHOG_DELAYED # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_DELAYED); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DELAYED, __pyx_t_3) < 0) __PYX_ERR(14, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/EPS.pyx":199 * WILKINSON = EPS_POWER_SHIFT_WILKINSON * * class EPSLanczosReorthogType(object): # <<<<<<<<<<<<<< * """ * EPS Lanczos reorthogonalization type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EPSLanczosReorthogType, __pyx_tuple__27, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSLanczosReorthogType, __pyx_t_3) < 0) __PYX_ERR(14, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/EPS.pyx":225 * """ * * Type = EPSType # <<<<<<<<<<<<<< * ProblemType = EPSProblemType * Extraction = EPSExtraction */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSType); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(14, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":226 * * Type = EPSType * ProblemType = EPSProblemType # <<<<<<<<<<<<<< * Extraction = EPSExtraction * Balance = EPSBalance */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSProblemType); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ProblemType, __pyx_t_1) < 0) __PYX_ERR(14, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":227 * Type = EPSType * ProblemType = EPSProblemType * Extraction = EPSExtraction # <<<<<<<<<<<<<< * Balance = EPSBalance * ErrorType = EPSErrorType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSExtraction); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Extraction, __pyx_t_1) < 0) __PYX_ERR(14, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":228 * ProblemType = EPSProblemType * Extraction = EPSExtraction * Balance = EPSBalance # <<<<<<<<<<<<<< * ErrorType = EPSErrorType * Which = EPSWhich */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSBalance); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Balance, __pyx_t_1) < 0) __PYX_ERR(14, 228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":229 * Extraction = EPSExtraction * Balance = EPSBalance * ErrorType = EPSErrorType # <<<<<<<<<<<<<< * Which = EPSWhich * Conv = EPSConv */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSErrorType); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ErrorType, __pyx_t_1) < 0) __PYX_ERR(14, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":230 * Balance = EPSBalance * ErrorType = EPSErrorType * Which = EPSWhich # <<<<<<<<<<<<<< * Conv = EPSConv * ConvergedReason = EPSConvergedReason */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSWhich); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Which, __pyx_t_1) < 0) __PYX_ERR(14, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":231 * ErrorType = EPSErrorType * Which = EPSWhich * Conv = EPSConv # <<<<<<<<<<<<<< * ConvergedReason = EPSConvergedReason * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSConv); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Conv, __pyx_t_1) < 0) __PYX_ERR(14, 231, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":232 * Which = EPSWhich * Conv = EPSConv * ConvergedReason = EPSConvergedReason # <<<<<<<<<<<<<< * * PowerShiftType = EPSPowerShiftType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSConvergedReason); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_1) < 0) __PYX_ERR(14, 232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":234 * ConvergedReason = EPSConvergedReason * * PowerShiftType = EPSPowerShiftType # <<<<<<<<<<<<<< * LanczosReorthogType = EPSLanczosReorthogType * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSPowerShiftType); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_PowerShiftType, __pyx_t_1) < 0) __PYX_ERR(14, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":235 * * PowerShiftType = EPSPowerShiftType * LanczosReorthogType = EPSLanczosReorthogType # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EPSLanczosReorthogType); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_LanczosReorthogType, __pyx_t_1) < 0) __PYX_ERR(14, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS); /* "SLEPc/EPS.pyx":1954 * # ----------------------------------------------------------------------------- * * del EPSType # <<<<<<<<<<<<<< * del EPSProblemType * del EPSExtraction */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSType) < 0) __PYX_ERR(14, 1954, __pyx_L1_error) /* "SLEPc/EPS.pyx":1955 * * del EPSType * del EPSProblemType # <<<<<<<<<<<<<< * del EPSExtraction * del EPSBalance */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSProblemType) < 0) __PYX_ERR(14, 1955, __pyx_L1_error) /* "SLEPc/EPS.pyx":1956 * del EPSType * del EPSProblemType * del EPSExtraction # <<<<<<<<<<<<<< * del EPSBalance * del EPSErrorType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSExtraction) < 0) __PYX_ERR(14, 1956, __pyx_L1_error) /* "SLEPc/EPS.pyx":1957 * del EPSProblemType * del EPSExtraction * del EPSBalance # <<<<<<<<<<<<<< * del EPSErrorType * del EPSWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSBalance) < 0) __PYX_ERR(14, 1957, __pyx_L1_error) /* "SLEPc/EPS.pyx":1958 * del EPSExtraction * del EPSBalance * del EPSErrorType # <<<<<<<<<<<<<< * del EPSWhich * del EPSConv */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSErrorType) < 0) __PYX_ERR(14, 1958, __pyx_L1_error) /* "SLEPc/EPS.pyx":1959 * del EPSBalance * del EPSErrorType * del EPSWhich # <<<<<<<<<<<<<< * del EPSConv * del EPSConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSWhich) < 0) __PYX_ERR(14, 1959, __pyx_L1_error) /* "SLEPc/EPS.pyx":1960 * del EPSErrorType * del EPSWhich * del EPSConv # <<<<<<<<<<<<<< * del EPSConvergedReason * del EPSPowerShiftType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConv) < 0) __PYX_ERR(14, 1960, __pyx_L1_error) /* "SLEPc/EPS.pyx":1961 * del EPSWhich * del EPSConv * del EPSConvergedReason # <<<<<<<<<<<<<< * del EPSPowerShiftType * del EPSLanczosReorthogType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConvergedReason) < 0) __PYX_ERR(14, 1961, __pyx_L1_error) /* "SLEPc/EPS.pyx":1962 * del EPSConv * del EPSConvergedReason * del EPSPowerShiftType # <<<<<<<<<<<<<< * del EPSLanczosReorthogType * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSPowerShiftType) < 0) __PYX_ERR(14, 1962, __pyx_L1_error) /* "SLEPc/EPS.pyx":1963 * del EPSConvergedReason * del EPSPowerShiftType * del EPSLanczosReorthogType # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSLanczosReorthogType) < 0) __PYX_ERR(14, 1963, __pyx_L1_error) /* "SLEPc/SVD.pyx":3 * # ----------------------------------------------------------------------------- * * class SVDType(object): # <<<<<<<<<<<<<< * """ * SVD types */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__28); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__28, __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_2)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/SVD.pyx":20 * - `PRIMME`: * """ * CROSS = S_(SVDCROSS) # <<<<<<<<<<<<<< * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCROSS); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CROSS, __pyx_t_3) < 0) __PYX_ERR(15, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":21 * """ * CROSS = S_(SVDCROSS) * CYCLIC = S_(SVDCYCLIC) # <<<<<<<<<<<<<< * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCYCLIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CYCLIC, __pyx_t_3) < 0) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":22 * CROSS = S_(SVDCROSS) * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) # <<<<<<<<<<<<<< * LANCZOS = S_(SVDLANCZOS) * TRLANCZOS = S_(SVDTRLANCZOS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLAPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LAPACK, __pyx_t_3) < 0) __PYX_ERR(15, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":23 * CYCLIC = S_(SVDCYCLIC) * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) # <<<<<<<<<<<<<< * TRLANCZOS = S_(SVDTRLANCZOS) * RANDOMIZED = S_(SVDRANDOMIZED) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLANCZOS); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LANCZOS, __pyx_t_3) < 0) __PYX_ERR(15, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":24 * LAPACK = S_(SVDLAPACK) * LANCZOS = S_(SVDLANCZOS) * TRLANCZOS = S_(SVDTRLANCZOS) # <<<<<<<<<<<<<< * RANDOMIZED = S_(SVDRANDOMIZED) * SCALAPACK = S_(SVDSCALAPACK) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDTRLANCZOS); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TRLANCZOS, __pyx_t_3) < 0) __PYX_ERR(15, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":25 * LANCZOS = S_(SVDLANCZOS) * TRLANCZOS = S_(SVDTRLANCZOS) * RANDOMIZED = S_(SVDRANDOMIZED) # <<<<<<<<<<<<<< * SCALAPACK = S_(SVDSCALAPACK) * ELEMENTAL = S_(SVDELEMENTAL) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDRANDOMIZED); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RANDOMIZED, __pyx_t_3) < 0) __PYX_ERR(15, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":26 * TRLANCZOS = S_(SVDTRLANCZOS) * RANDOMIZED = S_(SVDRANDOMIZED) * SCALAPACK = S_(SVDSCALAPACK) # <<<<<<<<<<<<<< * ELEMENTAL = S_(SVDELEMENTAL) * PRIMME = S_(SVDPRIMME) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDSCALAPACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SCALAPACK, __pyx_t_3) < 0) __PYX_ERR(15, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":27 * RANDOMIZED = S_(SVDRANDOMIZED) * SCALAPACK = S_(SVDSCALAPACK) * ELEMENTAL = S_(SVDELEMENTAL) # <<<<<<<<<<<<<< * PRIMME = S_(SVDPRIMME) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDELEMENTAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ELEMENTAL, __pyx_t_3) < 0) __PYX_ERR(15, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":28 * SCALAPACK = S_(SVDSCALAPACK) * ELEMENTAL = S_(SVDELEMENTAL) * PRIMME = S_(SVDPRIMME) # <<<<<<<<<<<<<< * * class SVDProblemType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(SVDPRIMME); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_PRIMME, __pyx_t_3) < 0) __PYX_ERR(15, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":3 * # ----------------------------------------------------------------------------- * * class SVDType(object): # <<<<<<<<<<<<<< * """ * SVD types */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVDType, __pyx_tuple__28, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDType, __pyx_t_3) < 0) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":30 * PRIMME = S_(SVDPRIMME) * * class SVDProblemType(object): # <<<<<<<<<<<<<< * """ * SVD problem type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__29); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__29, __pyx_n_s_SVDProblemType, __pyx_n_s_SVDProblemType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_problem_type_STANDARD_Stand); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/SVD.pyx":37 * - `GENERALIZED`: Generalized singular value decomposition (GSVD). * """ * STANDARD = SVD_STANDARD # <<<<<<<<<<<<<< * GENERALIZED = SVD_GENERALIZED * */ __pyx_t_3 = __Pyx_PyInt_From_SVDProblemType(SVD_STANDARD); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_STANDARD, __pyx_t_3) < 0) __PYX_ERR(15, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":38 * """ * STANDARD = SVD_STANDARD * GENERALIZED = SVD_GENERALIZED # <<<<<<<<<<<<<< * * class SVDErrorType(object): */ __pyx_t_3 = __Pyx_PyInt_From_SVDProblemType(SVD_GENERALIZED); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GENERALIZED, __pyx_t_3) < 0) __PYX_ERR(15, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":30 * PRIMME = S_(SVDPRIMME) * * class SVDProblemType(object): # <<<<<<<<<<<<<< * """ * SVD problem type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVDProblemType, __pyx_tuple__29, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDProblemType, __pyx_t_3) < 0) __PYX_ERR(15, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":40 * GENERALIZED = SVD_GENERALIZED * * class SVDErrorType(object): # <<<<<<<<<<<<<< * """ * SVD error type to assess accuracy of computed solutions */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__30); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__30, __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_2)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/SVD.pyx":47 * - `RELATIVE`: Relative error. * """ * ABSOLUTE = SVD_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = SVD_ERROR_RELATIVE * */ __pyx_t_3 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABSOLUTE, __pyx_t_3) < 0) __PYX_ERR(15, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":48 * """ * ABSOLUTE = SVD_ERROR_ABSOLUTE * RELATIVE = SVD_ERROR_RELATIVE # <<<<<<<<<<<<<< * * class SVDWhich(object): */ __pyx_t_3 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_RELATIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RELATIVE, __pyx_t_3) < 0) __PYX_ERR(15, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":40 * GENERALIZED = SVD_GENERALIZED * * class SVDErrorType(object): # <<<<<<<<<<<<<< * """ * SVD error type to assess accuracy of computed solutions */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVDErrorType, __pyx_tuple__30, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDErrorType, __pyx_t_3) < 0) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":50 * RELATIVE = SVD_ERROR_RELATIVE * * class SVDWhich(object): # <<<<<<<<<<<<<< * """ * SVD desired piece of spectrum */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__31); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__31, __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_2)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/SVD.pyx":57 * - `SMALLEST`: smallest singular values. * """ * LARGEST = SVD_LARGEST # <<<<<<<<<<<<<< * SMALLEST = SVD_SMALLEST * */ __pyx_t_3 = __Pyx_PyInt_From_SVDWhich(SVD_LARGEST); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST, __pyx_t_3) < 0) __PYX_ERR(15, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":58 * """ * LARGEST = SVD_LARGEST * SMALLEST = SVD_SMALLEST # <<<<<<<<<<<<<< * * class SVDConvergedReason(object): */ __pyx_t_3 = __Pyx_PyInt_From_SVDWhich(SVD_SMALLEST); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST, __pyx_t_3) < 0) __PYX_ERR(15, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":50 * RELATIVE = SVD_ERROR_RELATIVE * * class SVDWhich(object): # <<<<<<<<<<<<<< * """ * SVD desired piece of spectrum */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVDWhich, __pyx_tuple__31, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDWhich, __pyx_t_3) < 0) __PYX_ERR(15, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":60 * SMALLEST = SVD_SMALLEST * * class SVDConvergedReason(object): # <<<<<<<<<<<<<< * """ * SVD convergence reasons */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__32); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__32, __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_2)) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/SVD.pyx":70 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = SVD_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = SVD_CONVERGED_USER * CONVERGED_MAXIT = SVD_CONVERGED_MAXIT */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_TOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_TOL, __pyx_t_3) < 0) __PYX_ERR(15, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":71 * """ * CONVERGED_TOL = SVD_CONVERGED_TOL * CONVERGED_USER = SVD_CONVERGED_USER # <<<<<<<<<<<<<< * CONVERGED_MAXIT = SVD_CONVERGED_MAXIT * DIVERGED_ITS = SVD_DIVERGED_ITS */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_USER, __pyx_t_3) < 0) __PYX_ERR(15, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":72 * CONVERGED_TOL = SVD_CONVERGED_TOL * CONVERGED_USER = SVD_CONVERGED_USER * CONVERGED_MAXIT = SVD_CONVERGED_MAXIT # <<<<<<<<<<<<<< * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_MAXIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_MAXIT, __pyx_t_3) < 0) __PYX_ERR(15, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":73 * CONVERGED_USER = SVD_CONVERGED_USER * CONVERGED_MAXIT = SVD_CONVERGED_MAXIT * DIVERGED_ITS = SVD_DIVERGED_ITS # <<<<<<<<<<<<<< * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(15, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":74 * CONVERGED_MAXIT = SVD_CONVERGED_MAXIT * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN # <<<<<<<<<<<<<< * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING * ITERATING = SVD_CONVERGED_ITERATING */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_3) < 0) __PYX_ERR(15, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":75 * DIVERGED_ITS = SVD_DIVERGED_ITS * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = SVD_CONVERGED_ITERATING * */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_3) < 0) __PYX_ERR(15, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":76 * DIVERGED_BREAKDOWN = SVD_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = SVD_CONVERGED_ITERATING * ITERATING = SVD_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ITERATING, __pyx_t_3) < 0) __PYX_ERR(15, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/SVD.pyx":60 * SMALLEST = SVD_SMALLEST * * class SVDConvergedReason(object): # <<<<<<<<<<<<<< * """ * SVD convergence reasons */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVDConvergedReason, __pyx_tuple__32, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDConvergedReason, __pyx_t_3) < 0) __PYX_ERR(15, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SVD.pyx":86 * """ * * Type = SVDType # <<<<<<<<<<<<<< * ProblemType = SVDProblemType * ErrorType = SVDErrorType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVDType); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(15, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":87 * * Type = SVDType * ProblemType = SVDProblemType # <<<<<<<<<<<<<< * ErrorType = SVDErrorType * Which = SVDWhich */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVDProblemType); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ProblemType, __pyx_t_1) < 0) __PYX_ERR(15, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":88 * Type = SVDType * ProblemType = SVDProblemType * ErrorType = SVDErrorType # <<<<<<<<<<<<<< * Which = SVDWhich * ConvergedReason = SVDConvergedReason */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVDErrorType); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ErrorType, __pyx_t_1) < 0) __PYX_ERR(15, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":89 * ProblemType = SVDProblemType * ErrorType = SVDErrorType * Which = SVDWhich # <<<<<<<<<<<<<< * ConvergedReason = SVDConvergedReason * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVDWhich); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Which, __pyx_t_1) < 0) __PYX_ERR(15, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":90 * ErrorType = SVDErrorType * Which = SVDWhich * ConvergedReason = SVDConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVDConvergedReason); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_1) < 0) __PYX_ERR(15, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":884 * CHKERR( SVDLanczosSetOneSide(self.svd, tval) ) * * setOperator = setOperators # backward compatibility # <<<<<<<<<<<<<< * * # */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD, __pyx_n_s_setOperators); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_setOperator, __pyx_t_1) < 0) __PYX_ERR(15, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD); /* "SLEPc/SVD.pyx":920 * # ----------------------------------------------------------------------------- * * del SVDType # <<<<<<<<<<<<<< * del SVDProblemType * del SVDErrorType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDType) < 0) __PYX_ERR(15, 920, __pyx_L1_error) /* "SLEPc/SVD.pyx":921 * * del SVDType * del SVDProblemType # <<<<<<<<<<<<<< * del SVDErrorType * del SVDWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDProblemType) < 0) __PYX_ERR(15, 921, __pyx_L1_error) /* "SLEPc/SVD.pyx":922 * del SVDType * del SVDProblemType * del SVDErrorType # <<<<<<<<<<<<<< * del SVDWhich * del SVDConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDErrorType) < 0) __PYX_ERR(15, 922, __pyx_L1_error) /* "SLEPc/SVD.pyx":923 * del SVDProblemType * del SVDErrorType * del SVDWhich # <<<<<<<<<<<<<< * del SVDConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDWhich) < 0) __PYX_ERR(15, 923, __pyx_L1_error) /* "SLEPc/SVD.pyx":924 * del SVDErrorType * del SVDWhich * del SVDConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDConvergedReason) < 0) __PYX_ERR(15, 924, __pyx_L1_error) /* "SLEPc/PEP.pyx":3 * # ----------------------------------------------------------------------------- * * class PEPType(object): # <<<<<<<<<<<<<< * """ * PEP type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__33); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__33, __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_2)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":15 * - `JD`: Polynomial Jacobi-Davidson. * """ * LINEAR = S_(PEPLINEAR) # <<<<<<<<<<<<<< * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(PEPLINEAR); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LINEAR, __pyx_t_3) < 0) __PYX_ERR(16, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":16 * """ * LINEAR = S_(PEPLINEAR) * QARNOLDI = S_(PEPQARNOLDI) # <<<<<<<<<<<<<< * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(PEPQARNOLDI); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_QARNOLDI, __pyx_t_3) < 0) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":17 * LINEAR = S_(PEPLINEAR) * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) # <<<<<<<<<<<<<< * STOAR = S_(PEPSTOAR) * JD = S_(PEPJD) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(PEPTOAR); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TOAR, __pyx_t_3) < 0) __PYX_ERR(16, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":18 * QARNOLDI = S_(PEPQARNOLDI) * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) # <<<<<<<<<<<<<< * JD = S_(PEPJD) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(PEPSTOAR); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_STOAR, __pyx_t_3) < 0) __PYX_ERR(16, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":19 * TOAR = S_(PEPTOAR) * STOAR = S_(PEPSTOAR) * JD = S_(PEPJD) # <<<<<<<<<<<<<< * * class PEPProblemType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(PEPJD); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_JD, __pyx_t_3) < 0) __PYX_ERR(16, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":3 * # ----------------------------------------------------------------------------- * * class PEPType(object): # <<<<<<<<<<<<<< * """ * PEP type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPType, __pyx_tuple__33, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPType, __pyx_t_3) < 0) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":21 * JD = S_(PEPJD) * * class PEPProblemType(object): # <<<<<<<<<<<<<< * """ * PEP problem type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__34); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__34, __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_2)) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":29 * - `GYROSCOPIC`: Hamiltonian structure. * """ * GENERAL = PEP_GENERAL # <<<<<<<<<<<<<< * HERMITIAN = PEP_HERMITIAN * GYROSCOPIC = PEP_GYROSCOPIC */ __pyx_t_3 = __Pyx_PyInt_From_PEPProblemType(PEP_GENERAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GENERAL, __pyx_t_3) < 0) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":30 * """ * GENERAL = PEP_GENERAL * HERMITIAN = PEP_HERMITIAN # <<<<<<<<<<<<<< * GYROSCOPIC = PEP_GYROSCOPIC * */ __pyx_t_3 = __Pyx_PyInt_From_PEPProblemType(PEP_HERMITIAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HERMITIAN, __pyx_t_3) < 0) __PYX_ERR(16, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":31 * GENERAL = PEP_GENERAL * HERMITIAN = PEP_HERMITIAN * GYROSCOPIC = PEP_GYROSCOPIC # <<<<<<<<<<<<<< * * class PEPWhich(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPProblemType(PEP_GYROSCOPIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_GYROSCOPIC, __pyx_t_3) < 0) __PYX_ERR(16, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":21 * JD = S_(PEPJD) * * class PEPProblemType(object): # <<<<<<<<<<<<<< * """ * PEP problem type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPProblemType, __pyx_tuple__34, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPProblemType, __pyx_t_3) < 0) __PYX_ERR(16, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":33 * GYROSCOPIC = PEP_GYROSCOPIC * * class PEPWhich(object): # <<<<<<<<<<<<<< * """ * PEP desired part of spectrum */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__35); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__35, __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_2)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":49 * - `USER`: User-defined criterion. * """ * LARGEST_MAGNITUDE = PEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE * LARGEST_REAL = PEP_LARGEST_REAL */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(16, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(16, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":51 * 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_3 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_REAL, __pyx_t_3) < 0) __PYX_ERR(16, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":52 * 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_3 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_REAL, __pyx_t_3) < 0) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":53 * 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_3 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(16, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":54 * 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_3 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(16, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":55 * 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_3 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(16, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":56 * SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE * TARGET_REAL = PEP_TARGET_REAL # <<<<<<<<<<<<<< * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY * ALL = PEP_ALL */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_REAL, __pyx_t_3) < 0) __PYX_ERR(16, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":57 * TARGET_MAGNITUDE = PEP_TARGET_MAGNITUDE * TARGET_REAL = PEP_TARGET_REAL * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY # <<<<<<<<<<<<<< * ALL = PEP_ALL * USER = PEP_WHICH_USER */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":58 * TARGET_REAL = PEP_TARGET_REAL * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY * ALL = PEP_ALL # <<<<<<<<<<<<<< * USER = PEP_WHICH_USER * */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_ALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ALL, __pyx_t_3) < 0) __PYX_ERR(16, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":59 * TARGET_IMAGINARY = PEP_TARGET_IMAGINARY * ALL = PEP_ALL * USER = PEP_WHICH_USER # <<<<<<<<<<<<<< * * class PEPBasis(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPWhich(PEP_WHICH_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(16, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":33 * GYROSCOPIC = PEP_GYROSCOPIC * * class PEPWhich(object): # <<<<<<<<<<<<<< * """ * PEP desired part of spectrum */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPWhich, __pyx_tuple__35, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPWhich, __pyx_t_3) < 0) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":61 * USER = PEP_WHICH_USER * * class PEPBasis(object): # <<<<<<<<<<<<<< * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__36); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__36, __pyx_n_s_PEPBasis, __pyx_n_s_PEPBasis, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":62 * * class PEPBasis(object): * MONOMIAL = PEP_BASIS_MONOMIAL # <<<<<<<<<<<<<< * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_MONOMIAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MONOMIAL, __pyx_t_3) < 0) __PYX_ERR(16, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":63 * class PEPBasis(object): * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 # <<<<<<<<<<<<<< * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CHEBYSHEV1, __pyx_t_3) < 0) __PYX_ERR(16, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":64 * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 # <<<<<<<<<<<<<< * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CHEBYSHEV2, __pyx_t_3) < 0) __PYX_ERR(16, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":65 * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE # <<<<<<<<<<<<<< * LAGUERRE = PEP_BASIS_LAGUERRE * HERMITE = PEP_BASIS_HERMITE */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LEGENDRE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LEGENDRE, __pyx_t_3) < 0) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":66 * CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2 * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE # <<<<<<<<<<<<<< * HERMITE = PEP_BASIS_HERMITE * */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LAGUERRE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LAGUERRE, __pyx_t_3) < 0) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":67 * LEGENDRE = PEP_BASIS_LEGENDRE * LAGUERRE = PEP_BASIS_LAGUERRE * HERMITE = PEP_BASIS_HERMITE # <<<<<<<<<<<<<< * * class PEPScale(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_HERMITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_HERMITE, __pyx_t_3) < 0) __PYX_ERR(16, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":61 * USER = PEP_WHICH_USER * * class PEPBasis(object): # <<<<<<<<<<<<<< * MONOMIAL = PEP_BASIS_MONOMIAL * CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1 */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPBasis, __pyx_tuple__36, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPBasis, __pyx_t_3) < 0) __PYX_ERR(16, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":69 * HERMITE = PEP_BASIS_HERMITE * * class PEPScale(object): # <<<<<<<<<<<<<< * """ * PEP scaling strategy */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__37); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__37, __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_2)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":78 * - `BOTH`: Both parameter and diagonal scaling. * """ * NONE = PEP_SCALE_NONE # <<<<<<<<<<<<<< * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL */ __pyx_t_3 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(16, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":79 * """ * NONE = PEP_SCALE_NONE * SCALAR = PEP_SCALE_SCALAR # <<<<<<<<<<<<<< * DIAGONAL = PEP_SCALE_DIAGONAL * BOTH = PEP_SCALE_BOTH */ __pyx_t_3 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_SCALAR); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SCALAR, __pyx_t_3) < 0) __PYX_ERR(16, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":80 * NONE = PEP_SCALE_NONE * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL # <<<<<<<<<<<<<< * BOTH = PEP_SCALE_BOTH * */ __pyx_t_3 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_DIAGONAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIAGONAL, __pyx_t_3) < 0) __PYX_ERR(16, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":81 * SCALAR = PEP_SCALE_SCALAR * DIAGONAL = PEP_SCALE_DIAGONAL * BOTH = PEP_SCALE_BOTH # <<<<<<<<<<<<<< * * class PEPRefine(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_BOTH); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BOTH, __pyx_t_3) < 0) __PYX_ERR(16, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":69 * HERMITE = PEP_BASIS_HERMITE * * class PEPScale(object): # <<<<<<<<<<<<<< * """ * PEP scaling strategy */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPScale, __pyx_tuple__37, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPScale, __pyx_t_3) < 0) __PYX_ERR(16, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":83 * BOTH = PEP_SCALE_BOTH * * class PEPRefine(object): # <<<<<<<<<<<<<< * """ * PEP refinement strategy */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__38); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__38, __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_2)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":91 * - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair). * """ * NONE = PEP_REFINE_NONE # <<<<<<<<<<<<<< * SIMPLE = PEP_REFINE_SIMPLE * MULTIPLE = PEP_REFINE_MULTIPLE */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(16, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":92 * """ * NONE = PEP_REFINE_NONE * SIMPLE = PEP_REFINE_SIMPLE # <<<<<<<<<<<<<< * MULTIPLE = PEP_REFINE_MULTIPLE * */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SIMPLE, __pyx_t_3) < 0) __PYX_ERR(16, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":93 * NONE = PEP_REFINE_NONE * SIMPLE = PEP_REFINE_SIMPLE * MULTIPLE = PEP_REFINE_MULTIPLE # <<<<<<<<<<<<<< * * class PEPRefineScheme(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MULTIPLE, __pyx_t_3) < 0) __PYX_ERR(16, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":83 * BOTH = PEP_SCALE_BOTH * * class PEPRefine(object): # <<<<<<<<<<<<<< * """ * PEP refinement strategy */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPRefine, __pyx_tuple__38, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefine, __pyx_t_3) < 0) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":95 * MULTIPLE = PEP_REFINE_MULTIPLE * * class PEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__39); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__39, __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_2)) __PYX_ERR(16, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":103 * - `EXPLICIT`: Build the explicit matrix. * """ * SCHUR = PEP_REFINE_SCHEME_SCHUR # <<<<<<<<<<<<<< * MBE = PEP_REFINE_SCHEME_MBE * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SCHUR, __pyx_t_3) < 0) __PYX_ERR(16, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":104 * """ * SCHUR = PEP_REFINE_SCHEME_SCHUR * MBE = PEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MBE, __pyx_t_3) < 0) __PYX_ERR(16, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":105 * SCHUR = PEP_REFINE_SCHEME_SCHUR * MBE = PEP_REFINE_SCHEME_MBE * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT # <<<<<<<<<<<<<< * * class PEPExtract(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_EXPLICIT, __pyx_t_3) < 0) __PYX_ERR(16, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":95 * MULTIPLE = PEP_REFINE_MULTIPLE * * class PEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPRefineScheme, __pyx_tuple__39, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefineScheme, __pyx_t_3) < 0) __PYX_ERR(16, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":107 * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * * class PEPExtract(object): # <<<<<<<<<<<<<< * """ * Extraction strategy used to obtain eigenvectors of the PEP from the */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__40); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__40, __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_2)) __PYX_ERR(16, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":117 * - `STRUCTURED`: Combine all blocks in a certain way. * """ * NONE = PEP_EXTRACT_NONE # <<<<<<<<<<<<<< * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL */ __pyx_t_3 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(16, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":118 * """ * NONE = PEP_EXTRACT_NONE * NORM = PEP_EXTRACT_NORM # <<<<<<<<<<<<<< * RESIDUAL = PEP_EXTRACT_RESIDUAL * STRUCTURED = PEP_EXTRACT_STRUCTURED */ __pyx_t_3 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NORM); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NORM, __pyx_t_3) < 0) __PYX_ERR(16, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":119 * NONE = PEP_EXTRACT_NONE * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL # <<<<<<<<<<<<<< * STRUCTURED = PEP_EXTRACT_STRUCTURED * */ __pyx_t_3 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_RESIDUAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RESIDUAL, __pyx_t_3) < 0) __PYX_ERR(16, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":120 * NORM = PEP_EXTRACT_NORM * RESIDUAL = PEP_EXTRACT_RESIDUAL * STRUCTURED = PEP_EXTRACT_STRUCTURED # <<<<<<<<<<<<<< * * class PEPErrorType(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_STRUCTURED); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_STRUCTURED, __pyx_t_3) < 0) __PYX_ERR(16, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":107 * EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT * * class PEPExtract(object): # <<<<<<<<<<<<<< * """ * Extraction strategy used to obtain eigenvectors of the PEP from the */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPExtract, __pyx_tuple__40, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPExtract, __pyx_t_3) < 0) __PYX_ERR(16, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":122 * STRUCTURED = PEP_EXTRACT_STRUCTURED * * class PEPErrorType(object): # <<<<<<<<<<<<<< * """ * PEP error type to assess accuracy of computed solutions */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__41); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__41, __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_2)) __PYX_ERR(16, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":130 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = PEP_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = PEP_ERROR_RELATIVE * BACKWARD = PEP_ERROR_BACKWARD */ __pyx_t_3 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABSOLUTE, __pyx_t_3) < 0) __PYX_ERR(16, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":131 * """ * ABSOLUTE = PEP_ERROR_ABSOLUTE * RELATIVE = PEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = PEP_ERROR_BACKWARD * */ __pyx_t_3 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RELATIVE, __pyx_t_3) < 0) __PYX_ERR(16, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":132 * ABSOLUTE = PEP_ERROR_ABSOLUTE * RELATIVE = PEP_ERROR_RELATIVE * BACKWARD = PEP_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class PEPConv(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BACKWARD, __pyx_t_3) < 0) __PYX_ERR(16, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":122 * STRUCTURED = PEP_EXTRACT_STRUCTURED * * class PEPErrorType(object): # <<<<<<<<<<<<<< * """ * PEP error type to assess accuracy of computed solutions */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPErrorType, __pyx_tuple__41, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPErrorType, __pyx_t_3) < 0) __PYX_ERR(16, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":134 * BACKWARD = PEP_ERROR_BACKWARD * * class PEPConv(object): # <<<<<<<<<<<<<< * """ * PEP convergence test */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__42); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__42, __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_2)) __PYX_ERR(16, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":143 * - `USER`: * """ * ABS = PEP_CONV_ABS # <<<<<<<<<<<<<< * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM */ __pyx_t_3 = __Pyx_PyInt_From_PEPConv(PEP_CONV_ABS); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABS, __pyx_t_3) < 0) __PYX_ERR(16, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":144 * """ * ABS = PEP_CONV_ABS * REL = PEP_CONV_REL # <<<<<<<<<<<<<< * NORM = PEP_CONV_NORM * USER = PEP_CONV_USER */ __pyx_t_3 = __Pyx_PyInt_From_PEPConv(PEP_CONV_REL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_REL, __pyx_t_3) < 0) __PYX_ERR(16, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":145 * ABS = PEP_CONV_ABS * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM # <<<<<<<<<<<<<< * USER = PEP_CONV_USER * */ __pyx_t_3 = __Pyx_PyInt_From_PEPConv(PEP_CONV_NORM); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NORM, __pyx_t_3) < 0) __PYX_ERR(16, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":146 * REL = PEP_CONV_REL * NORM = PEP_CONV_NORM * USER = PEP_CONV_USER # <<<<<<<<<<<<<< * * class PEPConvergedReason(object): */ __pyx_t_3 = __Pyx_PyInt_From_PEPConv(PEP_CONV_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(16, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":134 * BACKWARD = PEP_ERROR_BACKWARD * * class PEPConv(object): # <<<<<<<<<<<<<< * """ * PEP convergence test */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPConv, __pyx_tuple__42, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConv, __pyx_t_3) < 0) __PYX_ERR(16, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":148 * USER = PEP_CONV_USER * * class PEPConvergedReason(object): # <<<<<<<<<<<<<< * """ * PEP convergence reasons */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__43); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__43, __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_2)) __PYX_ERR(16, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/PEP.pyx":159 * - `CONVERGED_ITERATING`: * """ * CONVERGED_TOL = PEP_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = PEP_CONVERGED_USER * DIVERGED_ITS = PEP_DIVERGED_ITS */ __pyx_t_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_TOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_TOL, __pyx_t_3) < 0) __PYX_ERR(16, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":160 * """ * CONVERGED_TOL = PEP_CONVERGED_TOL * CONVERGED_USER = PEP_CONVERGED_USER # <<<<<<<<<<<<<< * DIVERGED_ITS = PEP_DIVERGED_ITS * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN */ __pyx_t_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_USER, __pyx_t_3) < 0) __PYX_ERR(16, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":161 * 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_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(16, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":162 * 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_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_3) < 0) __PYX_ERR(16, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":163 * 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_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_3) < 0) __PYX_ERR(16, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":164 * DIVERGED_BREAKDOWN = PEP_DIVERGED_BREAKDOWN * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * ITERATING = PEP_CONVERGED_ITERATING * */ __pyx_t_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_3) < 0) __PYX_ERR(16, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":165 * DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST * CONVERGED_ITERATING = PEP_CONVERGED_ITERATING * ITERATING = PEP_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ITERATING, __pyx_t_3) < 0) __PYX_ERR(16, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/PEP.pyx":148 * USER = PEP_CONV_USER * * class PEPConvergedReason(object): # <<<<<<<<<<<<<< * """ * PEP convergence reasons */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PEPConvergedReason, __pyx_tuple__43, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConvergedReason, __pyx_t_3) < 0) __PYX_ERR(16, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/PEP.pyx":175 * """ * * Type = PEPType # <<<<<<<<<<<<<< * ProblemType = PEPProblemType * Which = PEPWhich */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPType); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(16, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":176 * * Type = PEPType * ProblemType = PEPProblemType # <<<<<<<<<<<<<< * Which = PEPWhich * Basis = PEPBasis */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPProblemType); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ProblemType, __pyx_t_1) < 0) __PYX_ERR(16, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":177 * Type = PEPType * ProblemType = PEPProblemType * Which = PEPWhich # <<<<<<<<<<<<<< * Basis = PEPBasis * Scale = PEPScale */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPWhich); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Which, __pyx_t_1) < 0) __PYX_ERR(16, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":178 * ProblemType = PEPProblemType * Which = PEPWhich * Basis = PEPBasis # <<<<<<<<<<<<<< * Scale = PEPScale * Refine = PEPRefine */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPBasis); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Basis, __pyx_t_1) < 0) __PYX_ERR(16, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":179 * Which = PEPWhich * Basis = PEPBasis * Scale = PEPScale # <<<<<<<<<<<<<< * Refine = PEPRefine * RefineScheme = PEPRefineScheme */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPScale); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Scale, __pyx_t_1) < 0) __PYX_ERR(16, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":180 * Basis = PEPBasis * Scale = PEPScale * Refine = PEPRefine # <<<<<<<<<<<<<< * RefineScheme = PEPRefineScheme * Extract = PEPExtract */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPRefine); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Refine, __pyx_t_1) < 0) __PYX_ERR(16, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":181 * Scale = PEPScale * Refine = PEPRefine * RefineScheme = PEPRefineScheme # <<<<<<<<<<<<<< * Extract = PEPExtract * ErrorType = PEPErrorType */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPRefineScheme); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_1) < 0) __PYX_ERR(16, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":182 * Refine = PEPRefine * RefineScheme = PEPRefineScheme * Extract = PEPExtract # <<<<<<<<<<<<<< * ErrorType = PEPErrorType * Conv = PEPConv */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPExtract); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Extract, __pyx_t_1) < 0) __PYX_ERR(16, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":183 * RefineScheme = PEPRefineScheme * Extract = PEPExtract * ErrorType = PEPErrorType # <<<<<<<<<<<<<< * Conv = PEPConv * ConvergedReason = PEPConvergedReason */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPErrorType); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_1) < 0) __PYX_ERR(16, 183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":184 * Extract = PEPExtract * ErrorType = PEPErrorType * Conv = PEPConv # <<<<<<<<<<<<<< * ConvergedReason = PEPConvergedReason * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPConv); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Conv, __pyx_t_1) < 0) __PYX_ERR(16, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":185 * ErrorType = PEPErrorType * Conv = PEPConv * ConvergedReason = PEPConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PEPConvergedReason); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_1) < 0) __PYX_ERR(16, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP); /* "SLEPc/PEP.pyx":1361 * # ----------------------------------------------------------------------------- * * del PEPType # <<<<<<<<<<<<<< * del PEPProblemType * del PEPWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPType) < 0) __PYX_ERR(16, 1361, __pyx_L1_error) /* "SLEPc/PEP.pyx":1362 * * del PEPType * del PEPProblemType # <<<<<<<<<<<<<< * del PEPWhich * del PEPBasis */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPProblemType) < 0) __PYX_ERR(16, 1362, __pyx_L1_error) /* "SLEPc/PEP.pyx":1363 * del PEPType * del PEPProblemType * del PEPWhich # <<<<<<<<<<<<<< * del PEPBasis * del PEPScale */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPWhich) < 0) __PYX_ERR(16, 1363, __pyx_L1_error) /* "SLEPc/PEP.pyx":1364 * del PEPProblemType * del PEPWhich * del PEPBasis # <<<<<<<<<<<<<< * del PEPScale * del PEPRefine */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPBasis) < 0) __PYX_ERR(16, 1364, __pyx_L1_error) /* "SLEPc/PEP.pyx":1365 * del PEPWhich * del PEPBasis * del PEPScale # <<<<<<<<<<<<<< * del PEPRefine * del PEPRefineScheme */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPScale) < 0) __PYX_ERR(16, 1365, __pyx_L1_error) /* "SLEPc/PEP.pyx":1366 * del PEPBasis * del PEPScale * del PEPRefine # <<<<<<<<<<<<<< * del PEPRefineScheme * del PEPExtract */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefine) < 0) __PYX_ERR(16, 1366, __pyx_L1_error) /* "SLEPc/PEP.pyx":1367 * del PEPScale * del PEPRefine * del PEPRefineScheme # <<<<<<<<<<<<<< * del PEPExtract * del PEPErrorType */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefineScheme) < 0) __PYX_ERR(16, 1367, __pyx_L1_error) /* "SLEPc/PEP.pyx":1368 * del PEPRefine * del PEPRefineScheme * del PEPExtract # <<<<<<<<<<<<<< * del PEPErrorType * del PEPConv */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPExtract) < 0) __PYX_ERR(16, 1368, __pyx_L1_error) /* "SLEPc/PEP.pyx":1369 * del PEPRefineScheme * del PEPExtract * del PEPErrorType # <<<<<<<<<<<<<< * del PEPConv * del PEPConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPErrorType) < 0) __PYX_ERR(16, 1369, __pyx_L1_error) /* "SLEPc/PEP.pyx":1370 * del PEPExtract * del PEPErrorType * del PEPConv # <<<<<<<<<<<<<< * del PEPConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConv) < 0) __PYX_ERR(16, 1370, __pyx_L1_error) /* "SLEPc/PEP.pyx":1371 * del PEPErrorType * del PEPConv * del PEPConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConvergedReason) < 0) __PYX_ERR(16, 1371, __pyx_L1_error) /* "SLEPc/NEP.pyx":3 * # ----------------------------------------------------------------------------- * * class NEPType(object): # <<<<<<<<<<<<<< * """ * NEP type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__44); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__44, __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_2)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/NEP.pyx":16 * - `NLEIGS`: Fully rational Krylov method for nonlinear eigenproblems. * """ * RII = S_(NEPRII) # <<<<<<<<<<<<<< * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPRII); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RII, __pyx_t_3) < 0) __PYX_ERR(17, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":17 * """ * RII = S_(NEPRII) * SLP = S_(NEPSLP) # <<<<<<<<<<<<<< * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPSLP); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SLP, __pyx_t_3) < 0) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":18 * RII = S_(NEPRII) * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) # <<<<<<<<<<<<<< * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNARNOLDI); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NARNOLDI, __pyx_t_3) < 0) __PYX_ERR(17, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":19 * SLP = S_(NEPSLP) * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) # <<<<<<<<<<<<<< * INTERPOL = S_(NEPINTERPOL) * NLEIGS = S_(NEPNLEIGS) */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPCISS); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CISS, __pyx_t_3) < 0) __PYX_ERR(17, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":20 * NARNOLDI = S_(NEPNARNOLDI) * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) # <<<<<<<<<<<<<< * NLEIGS = S_(NEPNLEIGS) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPINTERPOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_INTERPOL, __pyx_t_3) < 0) __PYX_ERR(17, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":21 * CISS = S_(NEPCISS) * INTERPOL = S_(NEPINTERPOL) * NLEIGS = S_(NEPNLEIGS) # <<<<<<<<<<<<<< * * class NEPErrorType(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNLEIGS); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NLEIGS, __pyx_t_3) < 0) __PYX_ERR(17, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":3 * # ----------------------------------------------------------------------------- * * class NEPType(object): # <<<<<<<<<<<<<< * """ * NEP type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPType, __pyx_tuple__44, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPType, __pyx_t_3) < 0) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":23 * NLEIGS = S_(NEPNLEIGS) * * class NEPErrorType(object): # <<<<<<<<<<<<<< * """ * NEP error type to assess accuracy of computed solutions */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__45); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__45, __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_2)) __PYX_ERR(17, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/NEP.pyx":31 * - `BACKWARD`: Backward error. * """ * ABSOLUTE = NEP_ERROR_ABSOLUTE # <<<<<<<<<<<<<< * RELATIVE = NEP_ERROR_RELATIVE * BACKWARD = NEP_ERROR_BACKWARD */ __pyx_t_3 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ABSOLUTE, __pyx_t_3) < 0) __PYX_ERR(17, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":32 * """ * ABSOLUTE = NEP_ERROR_ABSOLUTE * RELATIVE = NEP_ERROR_RELATIVE # <<<<<<<<<<<<<< * BACKWARD = NEP_ERROR_BACKWARD * */ __pyx_t_3 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_RELATIVE, __pyx_t_3) < 0) __PYX_ERR(17, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":33 * ABSOLUTE = NEP_ERROR_ABSOLUTE * RELATIVE = NEP_ERROR_RELATIVE * BACKWARD = NEP_ERROR_BACKWARD # <<<<<<<<<<<<<< * * class NEPWhich(object): */ __pyx_t_3 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_BACKWARD, __pyx_t_3) < 0) __PYX_ERR(17, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":23 * NLEIGS = S_(NEPNLEIGS) * * class NEPErrorType(object): # <<<<<<<<<<<<<< * """ * NEP error type to assess accuracy of computed solutions */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPErrorType, __pyx_tuple__45, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPErrorType, __pyx_t_3) < 0) __PYX_ERR(17, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":35 * BACKWARD = NEP_ERROR_BACKWARD * * class NEPWhich(object): # <<<<<<<<<<<<<< * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__46); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__46, __pyx_n_s_NEPWhich, __pyx_n_s_NEPWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/NEP.pyx":36 * * class NEPWhich(object): * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE # <<<<<<<<<<<<<< * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE * LARGEST_REAL = NEP_LARGEST_REAL */ __pyx_t_3 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(17, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(17, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_REAL, __pyx_t_3) < 0) __PYX_ERR(17, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_REAL, __pyx_t_3) < 0) __PYX_ERR(17, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(17, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(17, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_3) < 0) __PYX_ERR(17, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_REAL, __pyx_t_3) < 0) __PYX_ERR(17, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_3) < 0) __PYX_ERR(17, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":45 * TARGET_REAL = NEP_TARGET_REAL * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY * ALL = NEP_ALL # <<<<<<<<<<<<<< * USER = NEP_WHICH_USER * */ __pyx_t_3 = __Pyx_PyInt_From_NEPWhich(NEP_ALL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ALL, __pyx_t_3) < 0) __PYX_ERR(17, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":46 * TARGET_IMAGINARY = NEP_TARGET_IMAGINARY * ALL = NEP_ALL * USER = NEP_WHICH_USER # <<<<<<<<<<<<<< * * class NEPConvergedReason(object): */ __pyx_t_3 = __Pyx_PyInt_From_NEPWhich(NEP_WHICH_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_USER, __pyx_t_3) < 0) __PYX_ERR(17, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":35 * BACKWARD = NEP_ERROR_BACKWARD * * class NEPWhich(object): # <<<<<<<<<<<<<< * LARGEST_MAGNITUDE = NEP_LARGEST_MAGNITUDE * SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPWhich, __pyx_tuple__46, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPWhich, __pyx_t_3) < 0) __PYX_ERR(17, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":48 * USER = NEP_WHICH_USER * * class NEPConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__47); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__47, __pyx_n_s_NEPConvergedReason, __pyx_n_s_NEPConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/NEP.pyx":49 * * class NEPConvergedReason(object): * CONVERGED_TOL = NEP_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_USER = NEP_CONVERGED_USER * DIVERGED_ITS = NEP_DIVERGED_ITS */ __pyx_t_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_TOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_TOL, __pyx_t_3) < 0) __PYX_ERR(17, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_USER, __pyx_t_3) < 0) __PYX_ERR(17, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(17, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_3) < 0) __PYX_ERR(17, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_LINEAR_SOLVE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_LINEAR_SOLVE, __pyx_t_3) < 0) __PYX_ERR(17, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_3) < 0) __PYX_ERR(17, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ITERATING, __pyx_t_3) < 0) __PYX_ERR(17, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":48 * USER = NEP_WHICH_USER * * class NEPConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = NEP_CONVERGED_TOL * CONVERGED_USER = NEP_CONVERGED_USER */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPConvergedReason, __pyx_tuple__47, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPConvergedReason, __pyx_t_3) < 0) __PYX_ERR(17, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":57 * ITERATING = NEP_CONVERGED_ITERATING * * class NEPRefine(object): # <<<<<<<<<<<<<< * """ * NEP refinement strategy */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__48); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__48, __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_2)) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "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_3 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(17, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":66 * """ * NONE = NEP_REFINE_NONE * SIMPLE = NEP_REFINE_SIMPLE # <<<<<<<<<<<<<< * MULTIPLE = NEP_REFINE_MULTIPLE * */ __pyx_t_3 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SIMPLE, __pyx_t_3) < 0) __PYX_ERR(17, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":67 * NONE = NEP_REFINE_NONE * SIMPLE = NEP_REFINE_SIMPLE * MULTIPLE = NEP_REFINE_MULTIPLE # <<<<<<<<<<<<<< * * class NEPRefineScheme(object): */ __pyx_t_3 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MULTIPLE, __pyx_t_3) < 0) __PYX_ERR(17, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":57 * ITERATING = NEP_CONVERGED_ITERATING * * class NEPRefine(object): # <<<<<<<<<<<<<< * """ * NEP refinement strategy */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPRefine, __pyx_tuple__48, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefine, __pyx_t_3) < 0) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":69 * MULTIPLE = NEP_REFINE_MULTIPLE * * class NEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__49); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__49, __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_2)) __PYX_ERR(17, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "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_3 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_SCHUR, __pyx_t_3) < 0) __PYX_ERR(17, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":78 * """ * SCHUR = NEP_REFINE_SCHEME_SCHUR * MBE = NEP_REFINE_SCHEME_MBE # <<<<<<<<<<<<<< * EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT * */ __pyx_t_3 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_MBE, __pyx_t_3) < 0) __PYX_ERR(17, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":79 * SCHUR = NEP_REFINE_SCHEME_SCHUR * MBE = NEP_REFINE_SCHEME_MBE * EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_EXPLICIT, __pyx_t_3) < 0) __PYX_ERR(17, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/NEP.pyx":69 * MULTIPLE = NEP_REFINE_MULTIPLE * * class NEPRefineScheme(object): # <<<<<<<<<<<<<< * """ * Scheme for solving linear systems during iterative refinement */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NEPRefineScheme, __pyx_tuple__49, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefineScheme, __pyx_t_3) < 0) __PYX_ERR(17, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/NEP.pyx":89 * """ * * Type = NEPType # <<<<<<<<<<<<<< * ErrorType = NEPErrorType * Which = NEPWhich */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPType); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(17, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":90 * * Type = NEPType * ErrorType = NEPErrorType # <<<<<<<<<<<<<< * Which = NEPWhich * ConvergedReason = NEPConvergedReason */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPErrorType); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_1) < 0) __PYX_ERR(17, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":91 * Type = NEPType * ErrorType = NEPErrorType * Which = NEPWhich # <<<<<<<<<<<<<< * ConvergedReason = NEPConvergedReason * Refine = NEPRefine */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPWhich); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Which, __pyx_t_1) < 0) __PYX_ERR(17, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":92 * ErrorType = NEPErrorType * Which = NEPWhich * ConvergedReason = NEPConvergedReason # <<<<<<<<<<<<<< * Refine = NEPRefine * RefineScheme = NEPRefineScheme */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPConvergedReason); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_1) < 0) __PYX_ERR(17, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":93 * Which = NEPWhich * ConvergedReason = NEPConvergedReason * Refine = NEPRefine # <<<<<<<<<<<<<< * RefineScheme = NEPRefineScheme * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPRefine); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Refine, __pyx_t_1) < 0) __PYX_ERR(17, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":94 * ConvergedReason = NEPConvergedReason * Refine = NEPRefine * RefineScheme = NEPRefineScheme # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NEPRefineScheme); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_1) < 0) __PYX_ERR(17, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP); /* "SLEPc/NEP.pyx":731 * # ----------------------------------------------------------------------------- * * del NEPType # <<<<<<<<<<<<<< * del NEPErrorType * del NEPWhich */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPType) < 0) __PYX_ERR(17, 731, __pyx_L1_error) /* "SLEPc/NEP.pyx":732 * * del NEPType * del NEPErrorType # <<<<<<<<<<<<<< * del NEPWhich * del NEPConvergedReason */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPErrorType) < 0) __PYX_ERR(17, 732, __pyx_L1_error) /* "SLEPc/NEP.pyx":733 * del NEPType * del NEPErrorType * del NEPWhich # <<<<<<<<<<<<<< * del NEPConvergedReason * del NEPRefine */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPWhich) < 0) __PYX_ERR(17, 733, __pyx_L1_error) /* "SLEPc/NEP.pyx":734 * del NEPErrorType * del NEPWhich * del NEPConvergedReason # <<<<<<<<<<<<<< * del NEPRefine * del NEPRefineScheme */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPConvergedReason) < 0) __PYX_ERR(17, 734, __pyx_L1_error) /* "SLEPc/NEP.pyx":735 * del NEPWhich * del NEPConvergedReason * del NEPRefine # <<<<<<<<<<<<<< * del NEPRefineScheme * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefine) < 0) __PYX_ERR(17, 735, __pyx_L1_error) /* "SLEPc/NEP.pyx":736 * del NEPConvergedReason * del NEPRefine * del NEPRefineScheme # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefineScheme) < 0) __PYX_ERR(17, 736, __pyx_L1_error) /* "SLEPc/MFN.pyx":3 * # ----------------------------------------------------------------------------- * * class MFNType(object): # <<<<<<<<<<<<<< * """ * MFN type */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__50); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__50, __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_2)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/MFN.pyx":12 * - `EXPOKIT`: Implementation of the method in Expokit. * """ * KRYLOV = S_(MFNKRYLOV) # <<<<<<<<<<<<<< * EXPOKIT = S_(MFNEXPOKIT) * */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(MFNKRYLOV); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_KRYLOV, __pyx_t_3) < 0) __PYX_ERR(18, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/MFN.pyx":13 * """ * KRYLOV = S_(MFNKRYLOV) * EXPOKIT = S_(MFNEXPOKIT) # <<<<<<<<<<<<<< * * class MFNConvergedReason(object): */ __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_S_(MFNEXPOKIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_EXPOKIT, __pyx_t_3) < 0) __PYX_ERR(18, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/MFN.pyx":3 * # ----------------------------------------------------------------------------- * * class MFNType(object): # <<<<<<<<<<<<<< * """ * MFN type */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MFNType, __pyx_tuple__50, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNType, __pyx_t_3) < 0) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":15 * EXPOKIT = S_(MFNEXPOKIT) * * class MFNConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__51); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__51, __pyx_n_s_MFNConvergedReason, __pyx_n_s_MFNConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "SLEPc/MFN.pyx":16 * * class MFNConvergedReason(object): * CONVERGED_TOL = MFN_CONVERGED_TOL # <<<<<<<<<<<<<< * CONVERGED_ITS = MFN_CONVERGED_ITS * DIVERGED_ITS = MFN_DIVERGED_ITS */ __pyx_t_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_TOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_TOL, __pyx_t_3) < 0) __PYX_ERR(18, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(18, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_ITS); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_ITS, __pyx_t_3) < 0) __PYX_ERR(18, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_3) < 0) __PYX_ERR(18, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_3) < 0) __PYX_ERR(18, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/MFN.pyx":21 * DIVERGED_BREAKDOWN = MFN_DIVERGED_BREAKDOWN * CONVERGED_ITERATING = MFN_CONVERGED_ITERATING * ITERATING = MFN_CONVERGED_ITERATING # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ITERATING, __pyx_t_3) < 0) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "SLEPc/MFN.pyx":15 * EXPOKIT = S_(MFNEXPOKIT) * * class MFNConvergedReason(object): # <<<<<<<<<<<<<< * CONVERGED_TOL = MFN_CONVERGED_TOL * CONVERGED_ITS = MFN_CONVERGED_ITS */ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MFNConvergedReason, __pyx_tuple__51, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNConvergedReason, __pyx_t_3) < 0) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/MFN.pyx":31 * """ * * Type = MFNType # <<<<<<<<<<<<<< * ConvergedReason = MFNConvergedReason * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MFNType); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(18, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN); /* "SLEPc/MFN.pyx":32 * * Type = MFNType * ConvergedReason = MFNConvergedReason # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MFNConvergedReason); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_1) < 0) __PYX_ERR(18, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN); /* "SLEPc/MFN.pyx":356 * # ----------------------------------------------------------------------------- * * del MFNType # <<<<<<<<<<<<<< * del MFNConvergedReason * */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNType) < 0) __PYX_ERR(18, 356, __pyx_L1_error) /* "SLEPc/MFN.pyx":357 * * del MFNType * del MFNConvergedReason # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNConvergedReason) < 0) __PYX_ERR(18, 357, __pyx_L1_error) /* "SLEPc/SLEPc.pyx":233 * # ----------------------------------------------------------------------------- * * def _initialize(args=None): # <<<<<<<<<<<<<< * cdef int ready = initialize(args) * if ready: register(NULL) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_1_initialize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize, __pyx_t_1) < 0) __PYX_ERR(4, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "SLEPc/SLEPc.pyx":237 * if ready: register(NULL) * * def _finalize(): # <<<<<<<<<<<<<< * finalize() * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_3_finalize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_finalize, __pyx_t_1) < 0) __PYX_ERR(4, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ if (__Pyx_RegisterCleanup()) __PYX_ERR(20, 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); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init slepc4py.SLEPc", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init slepc4py.SLEPc"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) { Py_CLEAR(__pyx_tuple_); Py_CLEAR(__pyx_tuple__3); Py_CLEAR(__pyx_tuple__5); Py_CLEAR(__pyx_tuple__6); Py_CLEAR(__pyx_tuple__7); Py_CLEAR(__pyx_tuple__8); Py_CLEAR(__pyx_tuple__9); Py_CLEAR(__pyx_tuple__10); Py_CLEAR(__pyx_tuple__11); Py_CLEAR(__pyx_tuple__12); Py_CLEAR(__pyx_tuple__13); Py_CLEAR(__pyx_tuple__14); Py_CLEAR(__pyx_tuple__15); Py_CLEAR(__pyx_tuple__16); Py_CLEAR(__pyx_tuple__17); Py_CLEAR(__pyx_tuple__18); Py_CLEAR(__pyx_tuple__19); Py_CLEAR(__pyx_tuple__20); Py_CLEAR(__pyx_tuple__21); Py_CLEAR(__pyx_tuple__22); Py_CLEAR(__pyx_tuple__23); Py_CLEAR(__pyx_tuple__24); Py_CLEAR(__pyx_tuple__25); Py_CLEAR(__pyx_tuple__26); Py_CLEAR(__pyx_tuple__27); Py_CLEAR(__pyx_tuple__28); Py_CLEAR(__pyx_tuple__29); Py_CLEAR(__pyx_tuple__30); Py_CLEAR(__pyx_tuple__31); Py_CLEAR(__pyx_tuple__32); Py_CLEAR(__pyx_tuple__33); Py_CLEAR(__pyx_tuple__34); Py_CLEAR(__pyx_tuple__35); Py_CLEAR(__pyx_tuple__36); Py_CLEAR(__pyx_tuple__37); Py_CLEAR(__pyx_tuple__38); Py_CLEAR(__pyx_tuple__39); Py_CLEAR(__pyx_tuple__40); Py_CLEAR(__pyx_tuple__41); Py_CLEAR(__pyx_tuple__42); Py_CLEAR(__pyx_tuple__43); Py_CLEAR(__pyx_tuple__44); Py_CLEAR(__pyx_tuple__45); Py_CLEAR(__pyx_tuple__46); Py_CLEAR(__pyx_tuple__47); Py_CLEAR(__pyx_tuple__48); Py_CLEAR(__pyx_tuple__49); Py_CLEAR(__pyx_tuple__50); Py_CLEAR(__pyx_tuple__51); Py_CLEAR(__pyx_tuple__52); Py_CLEAR(__pyx_codeobj__53); Py_CLEAR(__pyx_codeobj__54); /* 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; itp_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); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 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; if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* 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 /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #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 /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #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) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (__Pyx_PyFastCFunction_Check(func)) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } 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 /* 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 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_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_FAST_THREAD_STATE 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_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(__Pyx_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; } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif 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; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else 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; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; icurexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE 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_FAST_THREAD_STATE 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_FAST_THREAD_STATE 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_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; } #else 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; #endif 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 (cause) { 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 = __Pyx_PyThreadState_Current; 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 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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(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(__Pyx_is_valid_index(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_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 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(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; } /* PyObjectCall2Args */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args, *result = NULL; #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyFunction_FastCall(function, args, 2); } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyCFunction_FastCall(function, args, 2); } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); Py_INCREF(function); result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); done: return result; } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (descr != NULL) { *method = descr; return 0; } PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(name)); #endif return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); } /* 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 int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); 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(__Pyx_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* 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); } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif result = PyObject_GetAttrString(module, class_name); 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 ((size_t)basicsize < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* 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; } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* 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_MAJOR_VERSION < 3 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 ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 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; } /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else #if PY_MAJOR_VERSION == 2 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); } #else PyTypeObject *methoddescr_type = &PyMethodDescr_Type; #endif if (__Pyx_TypeCheck(method, methoddescr_type)) #endif { 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 { return PyClassMethod_New(method); } } /* GetNameInClass */ static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { PyObject *result; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) { result = __Pyx_GetGlobalNameAfterAttributeLookup(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; } /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS 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); } #endif /* RegisterModuleCleanup */ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY 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 = PyImport_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; } #endif /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #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; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } 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( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* 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_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(STMatMode) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(BVOrthogType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(BVOrthogRefineType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(BVOrthogBlockType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(BVOrthogBlockType), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSStateType(DSStateType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(DSStateType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const DSMatType neg_one = (DSMatType) -1, const_zero = (DSMatType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(DSMatType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(DSMatType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(DSMatType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const FNCombineType neg_one = (FNCombineType) -1, const_zero = (FNCombineType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(FNCombineType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(FNCombineType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(FNCombineType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSProblemType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSExtraction) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSBalance) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSConv) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSConvergedReason neg_one = (EPSConvergedReason) -1, const_zero = (EPSConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSPowerShiftType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(EPSLanczosReorthogType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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_SVDProblemType(SVDProblemType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDProblemType neg_one = (SVDProblemType) -1, const_zero = (SVDProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(SVDProblemType) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(SVDProblemType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDProblemType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SVDProblemType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDProblemType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(SVDProblemType), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDErrorType(SVDErrorType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SVDErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SVDWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDConvergedReason neg_one = (SVDConvergedReason) -1, const_zero = (SVDConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(SVDConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(SVDConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPProblemType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPBasis) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPScale) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPRefine) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPRefineScheme) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPExtract neg_one = (PEPExtract) -1, const_zero = (PEPExtract) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPExtract) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPExtract) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPExtract) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPConv) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPConvergedReason neg_one = (PEPConvergedReason) -1, const_zero = (PEPConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PEPConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(NEPErrorType) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(NEPWhich) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPConvergedReason neg_one = (NEPConvergedReason) -1, const_zero = (NEPConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(NEPConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPRefine neg_one = (NEPRefine) -1, const_zero = (NEPRefine) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(NEPRefine) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPRefine) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPRefineScheme neg_one = (NEPRefineScheme) -1, const_zero = (NEPRefineScheme) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(NEPRefineScheme) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(NEPRefineScheme) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const MFNConvergedReason neg_one = (MFNConvergedReason) -1, const_zero = (MFNConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(MFNConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(MFNConvergedReason) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MFNConvergedReason) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { 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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PetscInt) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PetscInt), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE PetscInt __Pyx_PyInt_As_PetscInt(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscInt, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const MatStructure neg_one = (MatStructure) -1, const_zero = (MatStructure) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(MatStructure) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(MatStructure) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MatStructure, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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 EPSConvergedReason __Pyx_PyInt_As_EPSConvergedReason(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSConvergedReason neg_one = (EPSConvergedReason) -1, const_zero = (EPSConvergedReason) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(EPSConvergedReason) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (EPSConvergedReason) 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 (EPSConvergedReason) 0; case 1: __PYX_VERIFY_RETURN_INT(EPSConvergedReason, digit, digits[0]) case 2: if (8 * sizeof(EPSConvergedReason) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) >= 2 * PyLong_SHIFT) { return (EPSConvergedReason) (((((EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0])); } } break; case 3: if (8 * sizeof(EPSConvergedReason) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) >= 3 * PyLong_SHIFT) { return (EPSConvergedReason) (((((((EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0])); } } break; case 4: if (8 * sizeof(EPSConvergedReason) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, 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(EPSConvergedReason) >= 4 * PyLong_SHIFT) { return (EPSConvergedReason) (((((((((EPSConvergedReason)digits[3]) << PyLong_SHIFT) | (EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)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 (EPSConvergedReason) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(EPSConvergedReason) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConvergedReason, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConvergedReason, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (EPSConvergedReason) 0; case -1: __PYX_VERIFY_RETURN_INT(EPSConvergedReason, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(EPSConvergedReason, digit, +digits[0]) case -2: if (8 * sizeof(EPSConvergedReason) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) - 1 > 2 * PyLong_SHIFT) { return (EPSConvergedReason) (((EPSConvergedReason)-1)*(((((EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; case 2: if (8 * sizeof(EPSConvergedReason) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) - 1 > 2 * PyLong_SHIFT) { return (EPSConvergedReason) ((((((EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; case -3: if (8 * sizeof(EPSConvergedReason) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) - 1 > 3 * PyLong_SHIFT) { return (EPSConvergedReason) (((EPSConvergedReason)-1)*(((((((EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; case 3: if (8 * sizeof(EPSConvergedReason) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(EPSConvergedReason) - 1 > 3 * PyLong_SHIFT) { return (EPSConvergedReason) ((((((((EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; case -4: if (8 * sizeof(EPSConvergedReason) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, 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(EPSConvergedReason) - 1 > 4 * PyLong_SHIFT) { return (EPSConvergedReason) (((EPSConvergedReason)-1)*(((((((((EPSConvergedReason)digits[3]) << PyLong_SHIFT) | (EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; case 4: if (8 * sizeof(EPSConvergedReason) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(EPSConvergedReason, 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(EPSConvergedReason) - 1 > 4 * PyLong_SHIFT) { return (EPSConvergedReason) ((((((((((EPSConvergedReason)digits[3]) << PyLong_SHIFT) | (EPSConvergedReason)digits[2]) << PyLong_SHIFT) | (EPSConvergedReason)digits[1]) << PyLong_SHIFT) | (EPSConvergedReason)digits[0]))); } } break; } #endif if (sizeof(EPSConvergedReason) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConvergedReason, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConvergedReason) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConvergedReason, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else EPSConvergedReason 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 (EPSConvergedReason) -1; } } else { EPSConvergedReason val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (EPSConvergedReason) -1; val = __Pyx_PyInt_As_EPSConvergedReason(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to EPSConvergedReason"); return (EPSConvergedReason) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to EPSConvergedReason"); return (EPSConvergedReason) -1; } /* CIntFromPy */ static CYTHON_INLINE STMatMode __Pyx_PyInt_As_STMatMode(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(STMatMode, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); #ifdef HAVE_LONG_LONG } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PetscBool) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(PetscBool), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NormType neg_one = (NormType) -1, const_zero = (NormType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NormType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NormType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NormType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSStateType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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 DSMatType __Pyx_PyInt_As_DSMatType(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const DSMatType neg_one = (DSMatType) -1, const_zero = (DSMatType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(DSMatType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(DSMatType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (DSMatType) 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 (DSMatType) 0; case 1: __PYX_VERIFY_RETURN_INT(DSMatType, digit, digits[0]) case 2: if (8 * sizeof(DSMatType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) >= 2 * PyLong_SHIFT) { return (DSMatType) (((((DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0])); } } break; case 3: if (8 * sizeof(DSMatType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) >= 3 * PyLong_SHIFT) { return (DSMatType) (((((((DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0])); } } break; case 4: if (8 * sizeof(DSMatType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, 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(DSMatType) >= 4 * PyLong_SHIFT) { return (DSMatType) (((((((((DSMatType)digits[3]) << PyLong_SHIFT) | (DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)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 (DSMatType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(DSMatType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(DSMatType, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(DSMatType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSMatType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (DSMatType) 0; case -1: __PYX_VERIFY_RETURN_INT(DSMatType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(DSMatType, digit, +digits[0]) case -2: if (8 * sizeof(DSMatType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) - 1 > 2 * PyLong_SHIFT) { return (DSMatType) (((DSMatType)-1)*(((((DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; case 2: if (8 * sizeof(DSMatType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) - 1 > 2 * PyLong_SHIFT) { return (DSMatType) ((((((DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; case -3: if (8 * sizeof(DSMatType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) - 1 > 3 * PyLong_SHIFT) { return (DSMatType) (((DSMatType)-1)*(((((((DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; case 3: if (8 * sizeof(DSMatType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(DSMatType) - 1 > 3 * PyLong_SHIFT) { return (DSMatType) ((((((((DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; case -4: if (8 * sizeof(DSMatType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, 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(DSMatType) - 1 > 4 * PyLong_SHIFT) { return (DSMatType) (((DSMatType)-1)*(((((((((DSMatType)digits[3]) << PyLong_SHIFT) | (DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; case 4: if (8 * sizeof(DSMatType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(DSMatType, 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(DSMatType) - 1 > 4 * PyLong_SHIFT) { return (DSMatType) ((((((((((DSMatType)digits[3]) << PyLong_SHIFT) | (DSMatType)digits[2]) << PyLong_SHIFT) | (DSMatType)digits[1]) << PyLong_SHIFT) | (DSMatType)digits[0]))); } } break; } #endif if (sizeof(DSMatType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(DSMatType, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(DSMatType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(DSMatType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else DSMatType 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 (DSMatType) -1; } } else { DSMatType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (DSMatType) -1; val = __Pyx_PyInt_As_DSMatType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to DSMatType"); return (DSMatType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to DSMatType"); return (DSMatType) -1; } /* CIntFromPy */ static CYTHON_INLINE FNCombineType __Pyx_PyInt_As_FNCombineType(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const FNCombineType neg_one = (FNCombineType) -1, const_zero = (FNCombineType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(FNCombineType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(FNCombineType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (FNCombineType) 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 (FNCombineType) 0; case 1: __PYX_VERIFY_RETURN_INT(FNCombineType, digit, digits[0]) case 2: if (8 * sizeof(FNCombineType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) >= 2 * PyLong_SHIFT) { return (FNCombineType) (((((FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0])); } } break; case 3: if (8 * sizeof(FNCombineType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) >= 3 * PyLong_SHIFT) { return (FNCombineType) (((((((FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0])); } } break; case 4: if (8 * sizeof(FNCombineType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, 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(FNCombineType) >= 4 * PyLong_SHIFT) { return (FNCombineType) (((((((((FNCombineType)digits[3]) << PyLong_SHIFT) | (FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)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 (FNCombineType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(FNCombineType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(FNCombineType, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(FNCombineType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(FNCombineType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (FNCombineType) 0; case -1: __PYX_VERIFY_RETURN_INT(FNCombineType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(FNCombineType, digit, +digits[0]) case -2: if (8 * sizeof(FNCombineType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) - 1 > 2 * PyLong_SHIFT) { return (FNCombineType) (((FNCombineType)-1)*(((((FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; case 2: if (8 * sizeof(FNCombineType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) - 1 > 2 * PyLong_SHIFT) { return (FNCombineType) ((((((FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; case -3: if (8 * sizeof(FNCombineType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) - 1 > 3 * PyLong_SHIFT) { return (FNCombineType) (((FNCombineType)-1)*(((((((FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; case 3: if (8 * sizeof(FNCombineType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(FNCombineType) - 1 > 3 * PyLong_SHIFT) { return (FNCombineType) ((((((((FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; case -4: if (8 * sizeof(FNCombineType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, 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(FNCombineType) - 1 > 4 * PyLong_SHIFT) { return (FNCombineType) (((FNCombineType)-1)*(((((((((FNCombineType)digits[3]) << PyLong_SHIFT) | (FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; case 4: if (8 * sizeof(FNCombineType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(FNCombineType, 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(FNCombineType) - 1 > 4 * PyLong_SHIFT) { return (FNCombineType) ((((((((((FNCombineType)digits[3]) << PyLong_SHIFT) | (FNCombineType)digits[2]) << PyLong_SHIFT) | (FNCombineType)digits[1]) << PyLong_SHIFT) | (FNCombineType)digits[0]))); } } break; } #endif if (sizeof(FNCombineType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(FNCombineType, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(FNCombineType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(FNCombineType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else FNCombineType 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 (FNCombineType) -1; } } else { FNCombineType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (FNCombineType) -1; val = __Pyx_PyInt_As_FNCombineType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to FNCombineType"); return (FNCombineType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to FNCombineType"); return (FNCombineType) -1; } /* CIntFromPy */ static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PetscBool, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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 EPSProblemType __Pyx_PyInt_As_EPSProblemType(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSConv, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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 SVDProblemType __Pyx_PyInt_As_SVDProblemType(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDProblemType neg_one = (SVDProblemType) -1, const_zero = (SVDProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(SVDProblemType) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(SVDProblemType, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (SVDProblemType) 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 (SVDProblemType) 0; case 1: __PYX_VERIFY_RETURN_INT(SVDProblemType, digit, digits[0]) case 2: if (8 * sizeof(SVDProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) >= 2 * PyLong_SHIFT) { return (SVDProblemType) (((((SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0])); } } break; case 3: if (8 * sizeof(SVDProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) >= 3 * PyLong_SHIFT) { return (SVDProblemType) (((((((SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0])); } } break; case 4: if (8 * sizeof(SVDProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, 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(SVDProblemType) >= 4 * PyLong_SHIFT) { return (SVDProblemType) (((((((((SVDProblemType)digits[3]) << PyLong_SHIFT) | (SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)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 (SVDProblemType) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(SVDProblemType) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDProblemType, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDProblemType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (SVDProblemType) 0; case -1: __PYX_VERIFY_RETURN_INT(SVDProblemType, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(SVDProblemType, digit, +digits[0]) case -2: if (8 * sizeof(SVDProblemType) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) - 1 > 2 * PyLong_SHIFT) { return (SVDProblemType) (((SVDProblemType)-1)*(((((SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; case 2: if (8 * sizeof(SVDProblemType) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) - 1 > 2 * PyLong_SHIFT) { return (SVDProblemType) ((((((SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; case -3: if (8 * sizeof(SVDProblemType) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) - 1 > 3 * PyLong_SHIFT) { return (SVDProblemType) (((SVDProblemType)-1)*(((((((SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; case 3: if (8 * sizeof(SVDProblemType) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(SVDProblemType) - 1 > 3 * PyLong_SHIFT) { return (SVDProblemType) ((((((((SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; case -4: if (8 * sizeof(SVDProblemType) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, 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(SVDProblemType) - 1 > 4 * PyLong_SHIFT) { return (SVDProblemType) (((SVDProblemType)-1)*(((((((((SVDProblemType)digits[3]) << PyLong_SHIFT) | (SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; case 4: if (8 * sizeof(SVDProblemType) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(SVDProblemType, 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(SVDProblemType) - 1 > 4 * PyLong_SHIFT) { return (SVDProblemType) ((((((((((SVDProblemType)digits[3]) << PyLong_SHIFT) | (SVDProblemType)digits[2]) << PyLong_SHIFT) | (SVDProblemType)digits[1]) << PyLong_SHIFT) | (SVDProblemType)digits[0]))); } } break; } #endif if (sizeof(SVDProblemType) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(SVDProblemType, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDProblemType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDProblemType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else SVDProblemType 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 (SVDProblemType) -1; } } else { SVDProblemType val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (SVDProblemType) -1; val = __Pyx_PyInt_As_SVDProblemType(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to SVDProblemType"); return (SVDProblemType) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to SVDProblemType"); return (SVDProblemType) -1; } /* CIntFromPy */ static CYTHON_INLINE SVDWhich __Pyx_PyInt_As_SVDWhich(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPConv, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPScale, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } 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)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #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; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 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; } /* 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; if (PyObject_Hash(*t->p) == -1) 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 const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { 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 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(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 #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __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)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } 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 int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } 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(b); } #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_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ slepc4py-3.15.1/LICENSE.rst0000644000175100017510000000263114054125637015771 0ustar jromanjroman00000000000000========================= LICENSE: SLEPc for Python ========================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Copyright (c) 2021, 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.15.1/setup.py0000755000175100017510000002225314054125637015674 0ustar jromanjroman00000000000000#!/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") if pyver == (2, 6) or pyver == (3, 2): sys.stderr.write( "WARNING: Python %d.%d is not supported.\n" % pyver) # -------------------------------------------------------------------- # Metadata # -------------------------------------------------------------------- topdir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, topdir) 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://gitlab.com/slepc/slepc' pypiroot = 'https://pypi.io/packages/source/%s/%s/' % (name[0], name) download = pypiroot + '%(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 from glob import glob from os.path import join glob_join = lambda *args: glob(join(*args)) depends = [] for pth, dirs, files in walk('src'): depends += glob_join(pth, '*.h') depends += glob_join(pth, '*.c') if 'SLEPC_DIR' in os.environ: pd = os.environ['SLEPC_DIR'] pa = os.environ.get('PETSC_ARCH', '') depends += glob_join(pd, 'include', '*.h') depends += glob_join(pd, 'include', 'slepc', 'private', '*.h') depends += glob_join(pd, pa, 'include', 'slepcconf.h') if 'PETSC_DIR' in os.environ: pd = os.environ['PETSC_DIR'] pa = os.environ.get('PETSC_ARCH', '') depends += glob_join(pd, 'include', '*.h') depends += glob_join(pd, 'include', 'petsc', 'private', '*.h') depends += glob_join(pd, pa, 'include', 'petscconf.h') 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.24' 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')) suffix = os.path.join('src', 'binding', 'slepc4py') in_slepc = topdir.endswith(os.path.sep + suffix) if not has_src or has_git or has_hg or in_slepc: 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, target=None, 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 if target is None: 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, target, 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 # slepc4py.SLEPc source = 'slepc4py.SLEPc.pyx' target = 'slepc4py.SLEPc.c' depends = ["include/*/*.pxd", "SLEPc/*.pyx", "SLEPc/*.pxi",] import petsc4py includes = ['include', petsc4py.get_include()] destdir_h = os.path.join('include', 'slepc4py') run_cython(source, target, depends=depends, includes=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.15.1/DESCRIPTION.rst0000644000175100017510000000171714054125637016476 0ustar jromanjroman00000000000000SLEPc 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 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. https://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. https://doi.org/10.1145/1089014.1089019 slepc4py-3.15.1/CHANGES.rst0000644000175100017510000000341214054125637015755 0ustar jromanjroman00000000000000========================= CHANGES: SLEPc for Python ========================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Release 3.15.1 ============== - Updates in installation scripts. Release 3.15.0 ============== - Update to SLEPc 3.15 release. Release 3.14.0 ============== - Update to SLEPc 3.14 release. Release 3.13.0 ============== - Update to SLEPc 3.13 release. Release 3.12.0 ============== - Update to SLEPc 3.12 release. Release 3.11.0 ============== - Update to SLEPc 3.11 release. Release 3.10.0 ============== - Update to SLEPc 3.10 release. Release 3.9.0 ============= - Update to SLEPc 3.9 release. Release 3.8.0 ============= - Update to SLEPc 3.8 release. 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.15.1/slepc4py.egg-info/0000755000175100017510000000000014054125756017412 5ustar jromanjroman00000000000000slepc4py-3.15.1/slepc4py.egg-info/SOURCES.txt0000644000175100017510000002172214054125756021302 0ustar jromanjroman00000000000000CHANGES.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_problemtyp_3.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.ProblemType-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/contents.rst 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/toctree.txt docs/source/tutorial.rst docs/usrman/citing.html docs/usrman/contents.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.rst.txt docs/usrman/_sources/contents.rst.txt docs/usrman/_sources/index.rst.txt docs/usrman/_sources/install.rst.txt docs/usrman/_sources/manual.rst.txt docs/usrman/_sources/overview.rst.txt docs/usrman/_sources/tutorial.rst.txt docs/usrman/_static/ajax-loader.gif docs/usrman/_static/basic.css docs/usrman/_static/classic.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/compat.h 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.15.1/slepc4py.egg-info/PKG-INFO0000644000175100017510000000451314054125756020512 0ustar jromanjroman00000000000000Metadata-Version: 1.2 Name: slepc4py Version: 3.15.1 Summary: SLEPc for Python Home-page: https://gitlab.com/slepc/slepc Author: Lisandro Dalcin Author-email: dalcinl@gmail.com Maintainer: Lisandro Dalcin Maintainer-email: dalcinl@gmail.com License: BSD Download-URL: https://pypi.io/packages/source/s/slepc4py/slepc4py-3.15.1.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 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. https://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. https://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.15.1/slepc4py.egg-info/top_level.txt0000644000175100017510000000001114054125756022134 0ustar jromanjroman00000000000000slepc4py slepc4py-3.15.1/slepc4py.egg-info/not-zip-safe0000644000175100017510000000000114054125725021634 0ustar jromanjroman00000000000000 slepc4py-3.15.1/slepc4py.egg-info/requires.txt0000644000175100017510000000002514054125756022007 0ustar jromanjroman00000000000000petsc4py<3.16,>=3.15 slepc4py-3.15.1/slepc4py.egg-info/dependency_links.txt0000644000175100017510000000000114054125756023460 0ustar jromanjroman00000000000000 slepc4py-3.15.1/demo/0000755000175100017510000000000014054125756015101 5ustar jromanjroman00000000000000slepc4py-3.15.1/demo/ex6.py0000644000175100017510000000425714054125637016163 0ustar jromanjroman00000000000000import 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.createVecs() 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.15.1/demo/ex7.py0000644000175100017510000001033014054125637016151 0ustar jromanjroman00000000000000# ------------------------------------------------------------------------ # 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 = F.createVecs('right') 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.15.1/demo/makefile0000644000175100017510000000145114054125637016600 0ustar jromanjroman00000000000000PYTHON=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.15.1/demo/ex1.py0000644000175100017510000000331714054125637016152 0ustar jromanjroman00000000000000import 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) history = [] def monitor(eps, its, nconv, eig, err): history.append(err[nconv]) #print(its, rnorm) E.setMonitor(monitor) 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, vi = A.createVecs() # 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.15.1/demo/ex10.py0000644000175100017510000002124014054125637016225 0ustar jromanjroman00000000000000""" 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 """ try: range = xrange except: pass 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 range(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 range(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.createVecs() for j in range(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 = A.createVecs('right') 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 range(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() tmpvec2 = S.createVecs('left') 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 = Ared.createVecs('right') 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).real) print('The L2-norm of the error is: '+str(errorL2)) print("NORMAL END") if __name__ == '__main__': main() slepc4py-3.15.1/demo/ex5.py0000644000175100017510000000512014054125637016150 0ustar jromanjroman00000000000000 import 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.15.1/demo/ex4.py0000644000175100017510000000277714054125637016166 0ustar jromanjroman00000000000000try: range = xrange except: pass import 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 range(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.createVecs() 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.15.1/demo/ex11.py0000644000175100017510000000336314054125637016234 0ustar jromanjroman00000000000000try: range = xrange except: pass import 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 range(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.setProblemType(SLEPc.EPS.ProblemType.HEP) 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.15.1/demo/ex9.py0000644000175100017510000000643414054125637016165 0ustar jromanjroman00000000000000try: range = xrange except: pass import 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 range(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 range(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, xi = A.createVecs() 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.15.1/demo/ex2.py0000644000175100017510000000500514054125637016147 0ustar jromanjroman00000000000000try: range = xrange except: pass import 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 range(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 result vectors xr, xi = A.createVecs() # 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.15.1/demo/ex8.py0000644000175100017510000000604614054125637016163 0ustar jromanjroman00000000000000# ------------------------------------------------------------------------ # 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 = Id.createVecs('right') 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.15.1/demo/ex3.py0000644000175100017510000000544114054125637016154 0ustar jromanjroman00000000000000import 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 result vectors xr, xi = A.createVecs() # 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.15.1/setup.cfg0000644000175100017510000000050414054125756015775 0ustar jromanjroman00000000000000[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 slepc4py-3.15.1/MANIFEST.in0000644000175100017510000000065414054125637015716 0ustar jromanjroman00000000000000include 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 * slepc4py-3.15.1/test/0000755000175100017510000000000014054125756015134 5ustar jromanjroman00000000000000slepc4py-3.15.1/test/test_object.py0000644000175100017510000001344514054125637020020 0ustar jromanjroman00000000000000from 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): myobj = type(self.obj)().create() self.assertEqual(myobj.getRefCount(), 1) self.obj.compose('myobj', myobj) self.assertTrue(type(self.obj.query('myobj')) is self.CLASS) self.assertEqual(self.obj.query('myobj'), myobj) self.assertEqual(myobj.getRefCount(), 2) self.obj.compose('myobj', None) self.assertEqual(myobj.getRefCount(), 1) self.assertEqual(self.obj.query('myobj'), None) myobj.destroy() 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.15.1/test/runtests.py0000644000175100017510000001664514054125637017407 0ustar jromanjroman00000000000000import 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() try: name = os.uname()[1] except: import platform name = platform.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())