GCC Code Coverage Report


Directory: ./
File: include/slepc/private/slepccontour.h
Date: 2026-10-22 02:08:06
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 1 1 100.0%
Branches: 15 24 62.5%

Line Branch Exec Source
1 /*
2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 SLEPc - Scalable Library for Eigenvalue Problem Computations
4 Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
5
6 This file is part of SLEPc.
7 SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9 */
10
11 #pragma once
12
13 #include <slepc/private/slepcimpl.h>
14 #include <petscksp.h>
15
16 /*
17 CISS_BlockHankel - Builds a block Hankel matrix from the contents of Mu.
18 */
19 450 static inline PetscErrorCode CISS_BlockHankel(PetscScalar *Mu,PetscInt s,PetscInt L,PetscInt M,PetscScalar *H)
20 {
21 450 PetscInt i,j,k;
22
23
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
450 PetscFunctionBegin;
24
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 20 times.
22258 for (k=0;k<L*M;k++)
25
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 20 times.
173232 for (j=0;j<M;j++)
26
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 20 times.
2070176 for (i=0;i<L;i++)
27 1918752 H[j*L+i+k*L*M] = Mu[i+k*L+(j+s)*L*L];
28
7/14
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 4 times.
450 PetscFunctionReturn(PETSC_SUCCESS);
29 }
30
31 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcCISS_isGhost(Mat,PetscInt,PetscReal*,PetscReal,PetscBool*);
32 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcCISS_BH_SVD(PetscScalar*,PetscInt,PetscReal,PetscReal*,PetscInt*);
33
34 /* Data structures and functions for contour integral methods (used in several classes) */
35 struct _n_SlepcContourData {
36 PetscObject parent; /* parent object */
37 PetscSubcomm subcomm; /* subcommunicator for top level parallelization */
38 PetscInt npoints; /* number of integration points assigned to the local subcomm */
39 KSP *ksp; /* ksp array for storing factorizations at integration points */
40 PetscInt nksp; /* number of ksp objects in array */
41 Mat *pA; /* redundant copies of the matrices in the local subcomm */
42 Mat *pP; /* redundant copies of the matrices (preconditioner) */
43 PetscInt nmat; /* number of matrices in pA */
44 Vec xsub; /* aux vector with parallel layout as redundant Mat */
45 Vec xdup; /* aux vector with parallel layout as original Mat (with contiguous order) */
46 VecScatter scatterin; /* to scatter from regular vector to xdup */
47 };
48 typedef struct _n_SlepcContourData* SlepcContourData;
49
50 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcContourDataCreate(PetscInt,PetscInt,PetscObject,SlepcContourData*);
51 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcContourDataReset(SlepcContourData);
52 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcContourDataDestroy(SlepcContourData*);
53
54 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcContourRedundantMat(SlepcContourData,PetscInt,Mat*,Mat*);
55 SLEPC_SINGLE_LIBRARY_INTERN PetscErrorCode SlepcContourScatterCreate(SlepcContourData,Vec);
56