| /* |
| slepcimpl.h contains definitions common to all SLEPc objects |
| */ |
| #include "private/slepcimpl.h" |
| #include "slepc-private/slepcimpl.h" |
| /* |
| Default tolerance for the different solvers, depending on the precision |
| OBJSC = |
| OBJSF = |
| LIBBASE = libslepc |
| DIRS = finclude private |
| DIRS = finclude slepc-private |
| LOCDIR = include/ |
| MANSEC = |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _EPSIMPL |
| #define _EPSIMPL |
| #include <slepceps.h> |
| extern PetscFList EPSList; |
| extern PetscLogEvent EPS_SetUp, EPS_Solve, EPS_Dense; |
| typedef struct _EPSOps *EPSOps; |
| struct _EPSOps { |
| PetscErrorCode (*solve)(EPS); |
| PetscErrorCode (*setup)(EPS); |
| PetscErrorCode (*setfromoptions)(EPS); |
| PetscErrorCode (*publishoptions)(EPS); |
| PetscErrorCode (*destroy)(EPS); |
| PetscErrorCode (*reset)(EPS); |
| PetscErrorCode (*view)(EPS,PetscViewer); |
| PetscErrorCode (*backtransform)(EPS); |
| PetscErrorCode (*computevectors)(EPS); |
| }; |
| /* |
| Maximum number of monitors you can run with a single EPS |
| */ |
| #define MAXEPSMONITORS 5 |
| /* |
| Defines the EPS data structure. |
| */ |
| struct _p_EPS { |
| PETSCHEADER(struct _EPSOps); |
| /*------------------------- User parameters --------------------------*/ |
| PetscInt max_it, /* maximum number of iterations */ |
| nev, /* number of eigenvalues to compute */ |
| ncv, /* number of basis vectors */ |
| mpd, /* maximum dimension of projected problem */ |
| nini, ninil, /* number of initial vectors (negative means not copied yet) */ |
| nds; /* number of basis vectors of deflation space */ |
| PetscScalar target; /* target value */ |
| PetscReal tol; /* tolerance */ |
| EPSConv conv; /* convergence test */ |
| PetscErrorCode (*conv_func)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*); |
| void *conv_ctx; |
| EPSWhich which; /* which part of the spectrum to be sought */ |
| PetscBool leftvecs; /* if left eigenvectors are requested */ |
| PetscErrorCode (*which_func)(EPS,PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*); |
| void *which_ctx; |
| PetscReal inta, intb; /* interval [a,b] for spectrum slicing */ |
| EPSProblemType problem_type; /* which kind of problem to be solved */ |
| EPSExtraction extraction; /* which kind of extraction to be applied */ |
| EPSBalance balance; /* the balancing method */ |
| PetscInt balance_its; /* number of iterations of the balancing method */ |
| PetscReal balance_cutoff; /* cutoff value for balancing */ |
| PetscReal nrma, nrmb; /* matrix norms */ |
| PetscBool adaptive; /* whether matrix norms are adaptively improved */ |
| PetscBool trueres; /* whether the true residual norm must be computed */ |
| PetscBool trackall; /* whether all the residuals must be computed */ |
| /*------------------------- Working data --------------------------*/ |
| Vec D, /* diagonal matrix for balancing */ |
| *V, /* set of basis vectors and computed eigenvectors */ |
| *W, /* set of left basis vectors and computed left eigenvectors */ |
| *IS, *ISL, /* placeholder for references to user-provided initial space */ |
| *DS; /* deflation space */ |
| PetscScalar *eigr, *eigi, /* real and imaginary parts of eigenvalues */ |
| *T, *Tl; /* projected matrices */ |
| PetscReal *errest, /* error estimates */ |
| *errest_left; /* left error estimates */ |
| ST OP; /* spectral transformation object */ |
| IP ip; /* innerproduct object */ |
| void *data; /* placeholder for misc stuff associated |
| with a particular solver */ |
| PetscInt nconv, /* number of converged eigenvalues */ |
| its, /* number of iterations so far computed */ |
| *perm, /* permutation for eigenvalue ordering */ |
| nv, /* size of current Schur decomposition */ |
| n, nloc, /* problem dimensions (global, local) */ |
| allocated_ncv; /* number of basis vectors allocated */ |
| PetscBool evecsavailable; /* computed eigenvectors */ |
| PetscRandom rand; /* random number generator */ |
| Vec t; /* template vector */ |
| /* ---------------- Default work-area and status vars -------------------- */ |
| PetscInt nwork; |
| Vec *work; |
| PetscBool ds_ortho; /* if DS vectors have been stored and orthonormalized */ |
| PetscInt setupcalled; |
| PetscBool isgeneralized, |
| ispositive, |
| ishermitian; |
| EPSConvergedReason reason; |
| PetscErrorCode (*monitor[MAXEPSMONITORS])(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*); |
| PetscErrorCode (*monitordestroy[MAXEPSMONITORS])(void**); |
| void *monitorcontext[MAXEPSMONITORS]; |
| PetscInt numbermonitors; |
| }; |
| extern PetscErrorCode EPSMonitor(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt); |
| extern PetscErrorCode EPSReset_Default(EPS); |
| extern PetscErrorCode EPSDefaultGetWork(EPS,PetscInt); |
| extern PetscErrorCode EPSDefaultFreeWork(EPS); |
| extern PetscErrorCode EPSDefaultSetWhich(EPS); |
| extern PetscErrorCode EPSAllocateSolution(EPS); |
| extern PetscErrorCode EPSFreeSolution(EPS); |
| extern PetscErrorCode EPSBackTransform_Default(EPS); |
| extern PetscErrorCode EPSComputeVectors_Default(EPS); |
| extern PetscErrorCode EPSComputeVectors_Hermitian(EPS); |
| extern PetscErrorCode EPSComputeVectors_Schur(EPS); |
| extern PetscErrorCode EPSComputeResidualNorm_Private(EPS,PetscScalar,PetscScalar,Vec,Vec,PetscReal*); |
| extern PetscErrorCode EPSComputeRelativeError_Private(EPS,PetscScalar,PetscScalar,Vec,Vec,PetscReal*); |
| extern PetscErrorCode EPSComputeTrueResidual(EPS,PetscScalar,PetscScalar,PetscScalar*,Vec*,PetscInt,PetscReal*); |
| /* Private functions of the solver implementations */ |
| extern PetscErrorCode EPSBasicArnoldi(EPS,PetscBool,PetscScalar*,PetscInt,Vec*,PetscInt,PetscInt*,Vec,PetscReal*,PetscBool*); |
| extern PetscErrorCode EPSDelayedArnoldi(EPS,PetscScalar*,PetscInt,Vec*,PetscInt,PetscInt*,Vec,PetscReal*,PetscBool*); |
| extern PetscErrorCode EPSDelayedArnoldi1(EPS,PetscScalar*,PetscInt,Vec*,PetscInt,PetscInt*,Vec,PetscReal*,PetscBool*); |
| extern PetscErrorCode EPSKrylovConvergence(EPS,PetscBool,PetscBool,PetscInt,PetscInt,PetscScalar*,PetscInt,PetscScalar*,Vec*,PetscInt,PetscReal,PetscReal,PetscInt*,PetscScalar*); |
| extern PetscErrorCode EPSFullLanczos(EPS,PetscReal*,PetscReal*,Vec*,PetscInt,PetscInt*,Vec,PetscBool*); |
| extern PetscErrorCode EPSTranslateHarmonic(PetscInt,PetscScalar*,PetscInt,PetscScalar,PetscScalar,PetscScalar*,PetscScalar*); |
| extern PetscErrorCode EPSBuildBalance_Krylov(EPS); |
| extern PetscErrorCode EPSProjectedKSNonsym(EPS,PetscInt,PetscScalar*,PetscInt,PetscScalar*,PetscInt); |
| #endif |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _IPIMPL |
| #define _IPIMPL |
| #include <slepcip.h> |
| extern PetscLogEvent IP_InnerProduct,IP_Orthogonalize,IP_ApplyMatrix; |
| typedef struct _IPOps *IPOps; |
| struct _IPOps { |
| PetscErrorCode (*normbegin)(IP,Vec,PetscReal*); |
| PetscErrorCode (*normend)(IP,Vec,PetscReal*); |
| PetscErrorCode (*innerproductbegin)(IP,Vec,Vec,PetscScalar*); |
| PetscErrorCode (*innerproductend)(IP,Vec,Vec,PetscScalar*); |
| PetscErrorCode (*minnerproductbegin)(IP,Vec,PetscInt,const Vec[],PetscScalar*); |
| PetscErrorCode (*minnerproductend)(IP,Vec,PetscInt,const Vec[],PetscScalar*); |
| }; |
| struct _p_IP { |
| PETSCHEADER(struct _IPOps); |
| IPOrthogType orthog_type; /* which orthogonalization to use */ |
| IPOrthogRefineType orthog_ref; /* refinement method */ |
| PetscReal orthog_eta; /* refinement threshold */ |
| Mat matrix; |
| PetscInt innerproducts; |
| /*------------------------- Cache Bx product -------------------*/ |
| PetscInt xid; |
| PetscInt xstate; |
| Vec Bx; |
| }; |
| extern PetscErrorCode IPSetDefaultType_Private(IP); |
| extern PetscErrorCode IPApplyMatrix_Private(IP,Vec); |
| extern PetscErrorCode IPOrthogonalizeCGS1(IP,PetscInt,Vec*,PetscInt,PetscBool*,Vec*,Vec,PetscScalar*,PetscReal*,PetscReal*); |
| #endif |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _SVDIMPL |
| #define _SVDIMPL |
| #include <slepcsvd.h> |
| #include <slepcip.h> |
| extern PetscFList SVDList; |
| extern PetscLogEvent SVD_SetUp, SVD_Solve, SVD_Dense; |
| typedef struct _SVDOps *SVDOps; |
| struct _SVDOps { |
| PetscErrorCode (*solve)(SVD); |
| PetscErrorCode (*setup)(SVD); |
| PetscErrorCode (*setfromoptions)(SVD); |
| PetscErrorCode (*publishoptions)(SVD); |
| PetscErrorCode (*destroy)(SVD); |
| PetscErrorCode (*reset)(SVD); |
| PetscErrorCode (*view)(SVD,PetscViewer); |
| }; |
| /* |
| Maximum number of monitors you can run with a single SVD |
| */ |
| #define MAXSVDMONITORS 5 |
| /* |
| Defines the SVD data structure. |
| */ |
| struct _p_SVD { |
| PETSCHEADER(struct _SVDOps); |
| Mat OP; /* problem matrix */ |
| Mat A; /* problem matrix (m>n) */ |
| Mat AT; /* transposed matrix */ |
| SVDTransposeMode transmode; /* transpose mode */ |
| PetscReal *sigma; /* singular values */ |
| PetscInt *perm; /* permutation for singular value ordering */ |
| Vec *U,*V; /* left and right singular vectors */ |
| Vec *IS; /* placeholder for references to user-provided initial space */ |
| PetscInt n; /* maximun size of descomposition */ |
| SVDWhich which; /* which singular values are computed */ |
| PetscInt nconv; /* number of converged values */ |
| PetscInt nsv; /* number of requested values */ |
| PetscInt ncv; /* basis size */ |
| PetscInt mpd; /* maximum dimension of projected problem */ |
| PetscInt nini; /* number of initial vectors (negative means not copied yet) */ |
| PetscInt its; /* iteration counter */ |
| PetscInt max_it; /* max iterations */ |
| PetscReal tol; /* tolerance */ |
| PetscReal *errest; /* error estimates */ |
| PetscRandom rand; /* random number generator */ |
| Vec tl,tr; /* template vectors */ |
| void *data; /* placeholder for misc stuff associated |
| with a particular solver */ |
| PetscInt setupcalled; |
| SVDConvergedReason reason; |
| IP ip; |
| PetscBool trackall; |
| PetscErrorCode (*monitor[MAXSVDMONITORS])(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt,void*); |
| PetscErrorCode (*monitordestroy[MAXSVDMONITORS])(void**); |
| void *monitorcontext[MAXSVDMONITORS]; |
| PetscInt numbermonitors; |
| PetscInt matvecs; |
| }; |
| extern PetscErrorCode SVDMonitor(SVD,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscInt); |
| extern PetscErrorCode SVDMatMult(SVD,PetscBool,Vec,Vec); |
| extern PetscErrorCode SVDMatGetVecs(SVD,Vec*,Vec*); |
| extern PetscErrorCode SVDMatGetSize(SVD,PetscInt*,PetscInt*); |
| extern PetscErrorCode SVDMatGetLocalSize(SVD,PetscInt*,PetscInt*); |
| extern PetscErrorCode SVDTwoSideLanczos(SVD,PetscReal*,PetscReal*,Vec*,Vec,Vec*,PetscInt,PetscInt,PetscScalar*); |
| #endif |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _VECIMPLSLEPC |
| #define _VECIMPLSLEPC |
| #include <slepcvec.h> |
| extern PetscLogEvent SLEPC_UpdateVectors, SLEPC_VecMAXPBY; |
| /* context for the storage of contiguous Vecs */ |
| typedef struct { |
| PetscScalar *array; /* pointer to common storage */ |
| PetscInt nvecs; /* number of vectors that share this array */ |
| } Vecs_Contiguous; |
| #if !defined(PETSC_USE_DEBUG) |
| #define SlepcValidVecsContiguous(V,m,arg) do {} while (0) |
| #define PetscValidVecComp(y) do {} while (0) |
| #else |
| #define SlepcValidVecsContiguous(V,m,arg) \ |
| do { \ |
| PetscErrorCode __ierr; \ |
| PetscInt __i; \ |
| PetscContainer __container; \ |
| for (__i=0;__i<(m);__i++) { \ |
| PetscValidHeaderSpecific((V)[__i],VEC_CLASSID,(arg)); \ |
| __ierr = PetscObjectQuery((PetscObject)((V)[__i]),"contiguous",(PetscObject*)&__container);CHKERRQ(__ierr); \ |
| if (!__container && (m)>1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Contiguous check failed in argument # %d",(arg)); \ |
| } \ |
| } while (0) |
| #define PetscValidVecComp(y) \ |
| do { \ |
| if (((Vec_Comp*)(y)->data)->nx < ((Vec_Comp*)(y)->data)->n->n) \ |
| SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Invalid number of subvectors required!"); \ |
| } while (0) |
| #endif |
| /* Contexts for VecComp */ |
| typedef struct { |
| PetscInt n, /* number of active subvectors */ |
| N, /* virtual global size */ |
| lN, /* virtual local size */ |
| friends; /* number of vectors sharing this structure */ |
| } Vec_Comp_N; |
| typedef struct { |
| Vec *x; /* the vectors */ |
| PetscInt nx; /* number of available subvectors */ |
| Vec_Comp_N *n; /* structure shared by friend vectors */ |
| } Vec_Comp; |
| /* Operations implemented in VecComp */ |
| PetscErrorCode VecDuplicate_Comp(Vec win,Vec *V); |
| PetscErrorCode VecDestroy_Comp(Vec v); |
| PetscErrorCode VecSet_Comp(Vec v,PetscScalar alpha); |
| PetscErrorCode VecView_Comp(Vec v,PetscViewer viewer); |
| PetscErrorCode VecScale_Comp(Vec v,PetscScalar alpha); |
| PetscErrorCode VecCopy_Comp(Vec v,Vec w); |
| PetscErrorCode VecSwap_Comp(Vec v,Vec w); |
| PetscErrorCode VecAXPY_Comp(Vec v,PetscScalar alpha,Vec w); |
| PetscErrorCode VecAYPX_Comp(Vec v,PetscScalar alpha,Vec w); |
| PetscErrorCode VecAXPBY_Comp(Vec v,PetscScalar alpha,PetscScalar beta,Vec w); |
| PetscErrorCode VecMAXPY_Comp(Vec v,PetscInt n,const PetscScalar *alpha,Vec *w); |
| PetscErrorCode VecWAXPY_Comp(Vec v,PetscScalar alpha,Vec w,Vec z); |
| PetscErrorCode VecAXPBYPCZ_Comp(Vec v,PetscScalar alpha,PetscScalar beta,PetscScalar gamma,Vec w,Vec z); |
| PetscErrorCode VecPointwiseMult_Comp(Vec v,Vec w,Vec z); |
| PetscErrorCode VecPointwiseDivide_Comp(Vec v,Vec w,Vec z); |
| PetscErrorCode VecGetSize_Comp(Vec v,PetscInt *size); |
| PetscErrorCode VecGetLocalSize_Comp(Vec v,PetscInt *size); |
| PetscErrorCode VecMax_Comp(Vec v,PetscInt *idx,PetscReal *z); |
| PetscErrorCode VecMin_Comp(Vec v,PetscInt *idx,PetscReal *z); |
| PetscErrorCode VecSetRandom_Comp(Vec v,PetscRandom r); |
| PetscErrorCode VecConjugate_Comp(Vec v); |
| PetscErrorCode VecReciprocal_Comp(Vec v); |
| PetscErrorCode VecMaxPointwiseDivide_Comp(Vec v,Vec w,PetscReal *m); |
| PetscErrorCode VecPointwiseMax_Comp(Vec v,Vec w,Vec z); |
| PetscErrorCode VecPointwiseMaxAbs_Comp(Vec v,Vec w,Vec z); |
| PetscErrorCode VecPointwiseMin_Comp(Vec v,Vec w,Vec z); |
| PetscErrorCode VecDotNorm2_Comp_Seq(Vec v,Vec w,PetscScalar *dp,PetscScalar *nm); |
| PetscErrorCode VecDotNorm2_Comp_MPI(Vec v,Vec w,PetscScalar *dp,PetscScalar *nm); |
| PetscErrorCode VecSqrtAbs_Comp(Vec v); |
| PetscErrorCode VecAbs_Comp(Vec v); |
| PetscErrorCode VecExp_Comp(Vec v); |
| PetscErrorCode VecLog_Comp(Vec v); |
| PetscErrorCode VecShift_Comp(Vec v,PetscScalar alpha); |
| #endif |
| # |
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| # SLEPc - Scalable Library for Eigenvalue Problem Computations |
| # Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| # |
| # This file is part of SLEPc. |
| # |
| # SLEPc is free software: you can redistribute it and/or modify it under the |
| # terms of version 3 of the GNU Lesser General Public License as published by |
| # the Free Software Foundation. |
| # |
| # SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| # more details. |
| # |
| # You should have received a copy of the GNU Lesser General Public License |
| # along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| # |
| CFLAGS = |
| FFLAGS = |
| SOURCEC = |
| SOURCEF = |
| SOURCEH = epsimpl.h stimpl.h svdimpl.h ipimpl.h qepimpl.h slepcimpl.h |
| OBJSC = |
| OBJSF = |
| LIBBASE = libslepc |
| DIRS = |
| LOCDIR = include/ |
| MANSEC = |
| include ${SLEPC_DIR}/conf/slepc_common |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _QEPIMPL |
| #define _QEPIMPL |
| #include <slepcqep.h> |
| extern PetscFList QEPList; |
| extern PetscLogEvent QEP_SetUp, QEP_Solve, QEP_Dense; |
| typedef struct _QEPOps *QEPOps; |
| struct _QEPOps { |
| PetscErrorCode (*solve)(QEP); |
| PetscErrorCode (*setup)(QEP); |
| PetscErrorCode (*setfromoptions)(QEP); |
| PetscErrorCode (*publishoptions)(QEP); |
| PetscErrorCode (*destroy)(QEP); |
| PetscErrorCode (*reset)(QEP); |
| PetscErrorCode (*view)(QEP,PetscViewer); |
| }; |
| /* |
| Maximum number of monitors you can run with a single QEP |
| */ |
| #define MAXQEPMONITORS 5 |
| /* |
| Defines the QEP data structure. |
| */ |
| struct _p_QEP { |
| PETSCHEADER(struct _QEPOps); |
| /*------------------------- User parameters --------------------------*/ |
| PetscInt max_it, /* maximum number of iterations */ |
| nev, /* number of eigenvalues to compute */ |
| ncv, /* number of basis vectors */ |
| mpd, /* maximum dimension of projected problem */ |
| nini, ninil, /* number of initial vectors (negative means not copied yet) */ |
| allocated_ncv; /* number of basis vectors allocated */ |
| PetscReal tol; /* tolerance */ |
| PetscReal sfactor; /* scaling factor of the quadratic problem */ |
| PetscErrorCode (*conv_func)(QEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*); |
| void *conv_ctx; |
| QEPWhich which; /* which part of the spectrum to be sought */ |
| PetscBool leftvecs; /* if left eigenvectors are requested */ |
| PetscErrorCode (*which_func)(QEP,PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*); |
| void *which_ctx; |
| QEPProblemType problem_type; /* which kind of problem to be solved */ |
| PetscBool trackall; /* whether all the residuals must be computed */ |
| /*------------------------- Working data --------------------------*/ |
| Mat M,C,K; /* problem matrices */ |
| Vec *V, /* set of basis vectors and computed eigenvectors */ |
| *W, /* set of left basis vectors and computed left eigenvectors */ |
| *IS, *ISL; /* placeholder for references to user-provided initial space */ |
| PetscScalar *eigr, *eigi, /* real and imaginary parts of eigenvalues */ |
| *T; /* matrix for projected eigenproblem */ |
| PetscReal *errest; /* error estimates */ |
| IP ip; /* innerproduct object */ |
| void *data; /* placeholder for misc stuff associated |
| with a particular solver */ |
| PetscInt nconv, /* number of converged eigenvalues */ |
| its, /* number of iterations so far computed */ |
| *perm, /* permutation for eigenvalue ordering */ |
| matvecs, linits, /* operation counters */ |
| n, nloc; /* problem dimensions (global, local) */ |
| PetscRandom rand; /* random number generator */ |
| Vec t; /* template vector */ |
| /* ---------------- Default work-area and status vars -------------------- */ |
| PetscInt nwork; |
| Vec *work; |
| PetscInt setupcalled; |
| QEPConvergedReason reason; |
| PetscErrorCode (*monitor[MAXQEPMONITORS])(QEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*); |
| PetscErrorCode (*monitordestroy[MAXQEPMONITORS])(void**); |
| void *monitorcontext[MAXQEPMONITORS]; |
| PetscInt numbermonitors; |
| }; |
| extern PetscErrorCode QEPMonitor(QEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt); |
| extern PetscErrorCode QEPDefaultGetWork(QEP,PetscInt); |
| extern PetscErrorCode QEPDefaultFreeWork(QEP); |
| extern PetscErrorCode QEPAllocateSolution(QEP); |
| extern PetscErrorCode QEPFreeSolution(QEP); |
| extern PetscErrorCode QEPComputeVectors_Schur(QEP); |
| extern PetscErrorCode QEPComputeResidualNorm_Private(QEP,PetscScalar,PetscScalar,Vec,Vec,PetscReal*); |
| extern PetscErrorCode QEPComputeRelativeError_Private(QEP,PetscScalar,PetscScalar,Vec,Vec,PetscReal*); |
| extern PetscErrorCode QEPKrylovConvergence(QEP,PetscInt,PetscInt,PetscScalar*,PetscInt,PetscScalar*,PetscInt,PetscReal,PetscInt*,PetscScalar*); |
| #endif |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _SLEPCIMPL |
| #define _SLEPCIMPL |
| #include <slepcsys.h> |
| /* context for monitors of type XXXMonitorConverged */ |
| struct _n_SlepcConvMonitor { |
| PetscViewer viewer; |
| PetscInt oldnconv; |
| }; |
| typedef struct _n_SlepcConvMonitor* SlepcConvMonitor; |
| /* Private functions that are shared by several classes */ |
| extern PetscErrorCode DenseSelectedEvec(PetscScalar*,PetscInt,PetscScalar*,PetscScalar*,PetscInt,PetscBool,PetscInt,PetscScalar*); |
| extern PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor *ctx); |
| #endif |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| SLEPc - Scalable Library for Eigenvalue Problem Computations |
| Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
| This file is part of SLEPc. |
| SLEPc is free software: you can redistribute it and/or modify it under the |
| terms of version 3 of the GNU Lesser General Public License as published by |
| the Free Software Foundation. |
| SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| more details. |
| You should have received a copy of the GNU Lesser General Public License |
| along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #ifndef _STIMPL |
| #define _STIMPL |
| #include <slepcst.h> |
| extern PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyB,ST_ApplyTranspose; |
| extern PetscFList STList; |
| typedef struct _STOps *STOps; |
| struct _STOps { |
| PetscErrorCode (*setup)(ST); |
| PetscErrorCode (*apply)(ST,Vec,Vec); |
| PetscErrorCode (*getbilinearform)(ST,Mat*); |
| PetscErrorCode (*applytrans)(ST,Vec,Vec); |
| PetscErrorCode (*setshift)(ST,PetscScalar); |
| PetscErrorCode (*setfromoptions)(ST); |
| PetscErrorCode (*postsolve)(ST); |
| PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*); |
| PetscErrorCode (*destroy)(ST); |
| PetscErrorCode (*reset)(ST); |
| PetscErrorCode (*view)(ST,PetscViewer); |
| PetscErrorCode (*checknullspace)(ST,PetscInt,const Vec[]); |
| }; |
| struct _p_ST { |
| PETSCHEADER(struct _STOps); |
| /*------------------------- User parameters --------------------------*/ |
| Mat A,B; /* Matrices which define the eigensystem */ |
| PetscScalar sigma; /* Value of the shift */ |
| PetscBool sigma_set; /* whether the user provided the shift or not */ |
| PetscScalar defsigma; /* Default value of the shift */ |
| STMatMode shift_matrix; |
| MatStructure str; /* whether matrices have the same pattern or not */ |
| Mat mat; |
| /*------------------------- Misc data --------------------------*/ |
| KSP ksp; |
| Vec w; |
| Vec D; /* diagonal matrix for balancing */ |
| Vec wb; /* balancing requires an extra work vector */ |
| void *data; |
| PetscInt setupcalled; |
| PetscInt lineariterations; |
| PetscInt applys; |
| }; |
| extern PetscErrorCode STGetBilinearForm_Default(ST,Mat*); |
| extern PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec); |
| extern PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec); |
| extern PetscErrorCode STCheckNullSpace_Default(ST,PetscInt,const Vec[]); |
| extern PetscErrorCode STMatShellCreate(ST st,Mat *mat); |
| #endif |
| data = match.sub(r'',data) |
| ff = open(filename, 'w') |
| ff.write('#include "petscsys.h"\n#include "petscfix.h"\n#include "private/fortranimpl.h"\n'+data) |
| ff.write('#include "petscsys.h"\n#include "petscfix.h"\n#include "petsc-private/fortranimpl.h"\n'+data) |
| ff.close() |
| return |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <private/qepimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepc-private/qepimpl.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| #define qepdestroy_ QEPDESTROY |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "QEPSolve" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "QEPMonitor" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| EXTERN_C_BEGIN |
| extern PetscErrorCode QEPCreate_Linear(QEP); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <private/ipimpl.h> |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/ipimpl.h> |
| #undef __FUNCT__ |
| #define __FUNCT__ "QEPSetUp" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| PetscFList QEPList = 0; |
| PetscBool QEPRegisterAllCalled = PETSC_FALSE; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "QEPSetFromOptions" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <petscblaslapack.h> |
| typedef struct { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include "linearp.h" |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include <slepc-private/qepimpl.h> /*I "slepcqep.h" I*/ |
| #include "linearp.h" |
| /* |
| ALL: lib |
| SOURCEH = ../../include/private/qepimpl.h ../../include/slepcqep.h |
| SOURCEH = ../../include/slepc-private/qepimpl.h ../../include/slepcqep.h |
| DIRS = interface impls examples |
| LOCDIR = src/qep/ |
| MANSEC = QEP |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepcst.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "STApply" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| EXTERN_C_BEGIN |
| extern PetscErrorCode STCreate_Shell(ST); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| PetscClassId ST_CLASSID = 0; |
| PetscLogEvent ST_SetUp = 0,ST_Apply = 0,ST_ApplyTranspose = 0; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| PetscBool STRegisterAllCalled = PETSC_FALSE; |
| PetscFList STList = 0; |
| */ |
| #include <private/stimpl.h> |
| #include <slepc-private/stimpl.h> |
| #undef __FUNCT__ |
| #define __FUNCT__ "STMatShellMult" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepcsys.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| typedef struct { |
| Vec w2; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| typedef struct { |
| PetscScalar nu; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepcst.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include "private/stimpl.h" /*I "slepcst.h" I*/ |
| #include "slepc-private/stimpl.h" /*I "slepcst.h" I*/ |
| EXTERN_C_BEGIN |
| typedef struct { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| typedef struct { |
| PetscBool setmat; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "STApply_Sinvert" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "STApply_Shift" |
| ALL: lib |
| SOURCEH = ../../include/private/stimpl.h ../../include/slepcst.h |
| SOURCEH = ../../include/slepc-private/stimpl.h ../../include/slepcst.h |
| DIRS = interface impls examples |
| LOCDIR = src/st/ |
| MANSEC = ST |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <private/epsimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepc-private/epsimpl.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| #define epsdestroy_ EPSDESTROY |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "EPSAllocateSolution" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <private/ipimpl.h> |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/ipimpl.h> |
| #undef __FUNCT__ |
| #define __FUNCT__ "EPSSetUp" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| PetscFList EPSList = 0; |
| PetscBool EPSRegisterAllCalled = PETSC_FALSE; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "EPSSetFromOptions" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| EXTERN_C_BEGIN |
| extern PetscErrorCode EPSCreate_Power(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "EPSMonitor" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| typedef struct { |
| /* old values of eps */ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <../src/eps/impls/external/trlan/trlanp.h> |
| PetscErrorCode EPSSolve_TRLAN(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <../src/eps/impls/external/arpack/arpackp.h> |
| PetscErrorCode EPSSolve_ARPACK(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <../src/eps/impls/external/blzpack/blzpackp.h> |
| PetscErrorCode EPSSolve_BLZPACK(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include "slepc-interface.h" |
| #include <blopex_lobpcg.h> |
| #include <blopex_interpreter.h> |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepceps.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| */ |
| #include <petscsys.h> |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <private/stimpl.h> |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/stimpl.h> |
| PetscErrorCode EPSSolve_PRIMME(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| PetscErrorCode EPSSolve_Subspace(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> |
| #include <private/slepcimpl.h> |
| #include <slepc-private/epsimpl.h> |
| #include <slepc-private/slepcimpl.h> |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| PetscErrorCode EPSSolve_Arnoldi(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| PetscErrorCode EPSSolve_Lanczos(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| extern PetscErrorCode EPSProjectedKSSym(EPS,PetscInt,PetscInt,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscReal*,PetscInt*); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| PetscErrorCode EPSSolve_KrylovSchur_Default(EPS); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/vecimplslepc.h> |
| #include <slepc-private/vecimplslepc.h> |
| #include "davidson.h" |
| PetscLogEvent SLEPC_SlepcDenseMatProd = 0; |
| options. |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/stimpl.h> /*I "slepcst.h" I*/ |
| #include <slepcblaslapack.h> |
| typedef struct _dvdFunctionList { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include "private/epsimpl.h" /*I "slepceps.h" I*/ |
| #include "slepc-private/epsimpl.h" /*I "slepceps.h" I*/ |
| #include <../src/eps/impls/davidson/common/davidson.h> |
| PetscErrorCode EPSSetUp_GD(EPS eps); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <../src/eps/impls/davidson/common/davidson.h> |
| PetscErrorCode EPSSetUp_JD(EPS eps); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| typedef struct { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepcblaslapack.h> |
| PetscErrorCode EPSSolve_Power(EPS); |
| ALL: lib |
| SOURCEH = ../../include/private/epsimpl.h ../../include/slepceps.h |
| SOURCEH = ../../include/slepc-private/epsimpl.h ../../include/slepceps.h |
| DIRS = interface impls examples |
| LOCDIR = src/eps/ |
| MANSEC = EPS |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepcip.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/ipimpl.h> /*I "slepcip.h" I*/ |
| #include <slepc-private/ipimpl.h> /*I "slepcip.h" I*/ |
| /* The following definitions are intended to avoid using the "T" versions |
| of dot products in the case of real scalars */ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/ipimpl.h> /*I "slepcip.h" I*/ |
| #include <slepc-private/ipimpl.h> /*I "slepcip.h" I*/ |
| PetscFList IPList = 0; |
| PetscBool IPRegisterAllCalled = PETSC_FALSE; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/ipimpl.h> /*I "slepcip.h" I*/ |
| #include <slepc-private/ipimpl.h> /*I "slepcip.h" I*/ |
| #include <slepcblaslapack.h> |
| /* |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/ipimpl.h> /*I "slepcip.h" I*/ |
| #include <slepc-private/ipimpl.h> /*I "slepcip.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "IPSetMatrix" |
| FFLAGS = |
| SOURCEC = ipbasic.c ipdot.c iporthog.c ipborthog.c ipform.c |
| SOURCEF = |
| SOURCEH = ../../include/private/ipimpl.h ../../include/slepcip.h ../eps/impls/davidson/common/davidson.h |
| SOURCEH = ../../include/slepc-private/ipimpl.h ../../include/slepcip.h ../eps/impls/davidson/common/davidson.h |
| OBJSC = ipbasic.o ipdot.o iporthog.o ipborthog.o ipform.o |
| LIBBASE = libslepc |
| DIRS = |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include "private/ipimpl.h" /*I "slepcip.h" I*/ |
| #include "slepc-private/ipimpl.h" /*I "slepcip.h" I*/ |
| #include "slepcblaslapack.h" |
| #include "../src/eps/impls/davidson/common/davidson.h" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #include <slepcsvd.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| PetscFList SVDList = 0; |
| PetscBool SVDRegisterAllCalled = PETSC_FALSE; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "SVDMatMult" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "SVDSetTransposeMode" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "SVDSolve" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "SVDMonitor" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| EXTERN_C_BEGIN |
| extern PetscErrorCode SVDCreate_Cross(SVD); |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <private/ipimpl.h> |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/ipimpl.h> |
| #undef __FUNCT__ |
| #define __FUNCT__ "SVDSetOperator" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <private/ipimpl.h> |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/ipimpl.h> |
| #include <slepcblaslapack.h> |
| typedef struct { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| typedef struct { |
| PetscBool explicitmatrix; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <private/epsimpl.h> /*I "slepceps.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/epsimpl.h> /*I "slepceps.h" I*/ |
| typedef struct { |
| EPS eps; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <private/ipimpl.h> |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/ipimpl.h> |
| #include <slepcblaslapack.h> |
| typedef struct { |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepc-private/svdimpl.h> /*I "slepcsvd.h" I*/ |
| #include <slepcblaslapack.h> |
| #undef __FUNCT__ |
| ALL: lib |
| SOURCEH = ../../include/private/svdimpl.h ../../include/slepcsvd.h |
| SOURCEH = ../../include/slepc-private/svdimpl.h ../../include/slepcsvd.h |
| DIRS = interface impls examples |
| LOCDIR = src/svd/ |
| MANSEC = SVD |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include <slepc-private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include <petscblaslapack.h> |
| PetscLogEvent SLEPC_UpdateVectors = 0,SLEPC_VecMAXPBY = 0; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/vecimpl.h> /*I "petsvec.h" I*/ |
| #include <petsc-private/vecimpl.h> /*I "petsvec.h" I*/ |
| #ifdef __WITH_MPI__ |
| #define __SUF__(A) A##_MPI |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include <slepc-private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include <slepcsys.h> |
| #undef __FUNCT__ |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include <slepc-private/vecimplslepc.h> /*I "slepcvec.h" I*/ |
| #include "veccomp0.h" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/fortranimpl.h> |
| #include <petsc-private/fortranimpl.h> |
| #if defined(PETSC_HAVE_FORTRAN_CAPS) |
| #define slepcinitializefortran_ SLEPCINITIALIZEFORTRAN |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include "private/fortranimpl.h" |
| #include "petsc-private/fortranimpl.h" |
| extern PetscBool SlepcBeganPetsc; |
| extern PetscBool SlepcInitializeCalled; |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/slepcimpl.h> /*I "slepcsys.h" I*/ |
| #include <slepc-private/slepcimpl.h> /*I "slepcsys.h" I*/ |
| #undef __FUNCT__ |
| #define __FUNCT__ "SlepcMatConvertSeqDense" |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| #include <private/slepcimpl.h> /*I "slepcsys.h" I*/ |
| #include <private/epsimpl.h> |
| #include <private/stimpl.h> |
| #include <private/svdimpl.h> |
| #include <private/qepimpl.h> |
| #include <private/ipimpl.h> |
| #include <private/vecimplslepc.h> |
| #include <slepc-private/slepcimpl.h> /*I "slepcsys.h" I*/ |
| #include <slepc-private/epsimpl.h> |
| #include <slepc-private/stimpl.h> |
| #include <slepc-private/svdimpl.h> |
| #include <slepc-private/qepimpl.h> |
| #include <slepc-private/ipimpl.h> |
| #include <slepc-private/vecimplslepc.h> |
| #include <stdlib.h> |
| #undef __FUNCT__ |