File: slepcmat.h

package info (click to toggle)
slepc 3.22.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 49,376 kB
  • sloc: ansic: 118,012; python: 4,887; f90: 3,620; cpp: 1,526; makefile: 811; sh: 311
file content (38 lines) | stat: -rw-r--r-- 1,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   SLEPc - Scalable Library for Eigenvalue Problem Computations
   Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

   This file is part of SLEPc.
   SLEPc is distributed under a 2-clause BSD license (see LICENSE).
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
/*
   User interface for various matrix operations added in SLEPc
*/

#pragma once

#include <petscmat.h>

/* SUBMANSEC = sys */

SLEPC_EXTERN PetscErrorCode MatCreateTile(PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,PetscScalar,Mat,Mat*);
SLEPC_EXTERN PetscErrorCode MatCreateVecsEmpty(Mat,Vec*,Vec*);
SLEPC_EXTERN PetscErrorCode MatNormEstimate(Mat,Vec,Vec,PetscReal*);

/* Matrices for structured eigenproblems */
SLEPC_EXTERN PetscErrorCode MatCreateBSE(Mat,Mat,Mat*);

/* Deprecated functions */
PETSC_DEPRECATED_FUNCTION(3, 6, 0, "MatCreateRedundantMatrix() followed by MatConvert()", ) static inline PetscErrorCode SlepcMatConvertSeqDense(Mat mat,Mat *newmat)
{
  Mat Ar;

  PetscFunctionBegin;
  PetscCall(MatCreateRedundantMatrix(mat,0,PETSC_COMM_SELF,MAT_INITIAL_MATRIX,&Ar));
  PetscCall(MatConvert(Ar,MATSEQDENSE,MAT_INITIAL_MATRIX,newmat));
  PetscCall(MatDestroy(&Ar));
  PetscFunctionReturn(PETSC_SUCCESS);
}
PETSC_DEPRECATED_FUNCTION(3, 8, 0, "MatCreateTile()", ) static inline PetscErrorCode SlepcMatTile(PetscScalar a,Mat A,PetscScalar b,Mat B,PetscScalar c,Mat C,PetscScalar d,Mat D,Mat *G) {return MatCreateTile(a,A,b,B,c,C,d,D,G);}