Actual source code: dense.h
petsc-3.12.5 2020-03-29
4: #include <petsc/private/matimpl.h>
5: #include <../src/mat/impls/aij/seq/aij.h> /* Mat_MatTransMatMult is defined here */
7: /*
8: MATSEQDENSE format - conventional dense Fortran storage (by columns)
9: */
11: typedef struct {
12: PetscScalar *v; /* matrix elements */
13: PetscScalar *unplacedarray; /* if one called MatDensePlaceArray(), this is where it stashed the original */
14: PetscBool roworiented; /* if true, row oriented input (default) */
15: PetscInt pad; /* padding */
16: PetscBLASInt *pivots; /* pivots in LU factorization */
17: PetscBLASInt lfwork; /* length of work array in factorization */
18: PetscScalar *fwork; /* work array in factorization */
19: PetscBLASInt lda; /* Lapack leading dimension of data */
20: PetscBool changelda; /* change lda on resize? Default unless user set lda */
21: PetscBLASInt Mmax,Nmax; /* indicates the largest dimensions of data possible */
22: PetscBool user_alloc; /* true if the user provided the dense data */
23: PetscBool unplaced_user_alloc;
24: Mat ptapwork; /* workspace (SeqDense matrix) for PtAP */
26: Mat_MatTransMatMult *atb; /* used by MatTransposeMatMult_SeqAIJ_SeqDense */
27: } Mat_SeqDense;
29: PETSC_INTERN PetscErrorCode MatMatMultSymbolic_SeqDense_SeqDense(Mat,Mat,PetscReal,Mat*);
30: PETSC_INTERN PetscErrorCode MatMatMultNumeric_SeqDense_SeqDense(Mat,Mat,Mat);
31: PETSC_INTERN PetscErrorCode MatTransposeMatMult_SeqDense_SeqDense(Mat,Mat,MatReuse,PetscReal,Mat*);
32: PETSC_INTERN PetscErrorCode MatTransposeMatMultSymbolic_SeqDense_SeqDense(Mat,Mat,PetscReal,Mat*);
33: PETSC_INTERN PetscErrorCode MatTransposeMatMultNumeric_SeqDense_SeqDense(Mat,Mat,Mat);
34: PETSC_INTERN PetscErrorCode MatMatTransposeMult_SeqDense_SeqDense(Mat,Mat,MatReuse,PetscReal,Mat*);
35: PETSC_INTERN PetscErrorCode MatMatTransposeMultSymbolic_SeqDense_SeqDense(Mat,Mat,PetscReal,Mat*);
36: PETSC_INTERN PetscErrorCode MatMatTransposeMultNumeric_SeqDense_SeqDense(Mat,Mat,Mat);
37: PETSC_INTERN PetscErrorCode MatMatMultSymbolic_SeqAIJ_SeqDense(Mat,Mat,PetscReal,Mat*);
38: PETSC_INTERN PetscErrorCode MatMatMultNumeric_SeqAIJ_SeqDense(Mat,Mat,Mat);
39: PETSC_INTERN PetscErrorCode MatMatMultSymbolic_SeqBAIJ_SeqDense(Mat,Mat,PetscReal,Mat*);
40: PETSC_INTERN PetscErrorCode MatMatMultNumeric_SeqBAIJ_SeqDense(Mat,Mat,Mat);
42: PETSC_EXTERN PetscErrorCode MatCreate_SeqDense(Mat);
44: /* Used by SeqDenseCUDA */
45: PETSC_INTERN PetscErrorCode MatDuplicateNoCreate_SeqDense(Mat,Mat,MatDuplicateOption);
46: PETSC_INTERN PetscErrorCode MatNorm_SeqDense(Mat,NormType,PetscReal*);
47: PETSC_INTERN PetscErrorCode MatView_SeqDense(Mat,PetscViewer);
48: PETSC_INTERN PetscErrorCode MatDestroy_SeqDense(Mat);
49: PETSC_INTERN PetscErrorCode MatDenseGetArray_SeqDense(Mat,PetscScalar*[]);
50: PETSC_INTERN PetscErrorCode MatDenseRestoreArray_SeqDense(Mat,PetscScalar*[]);
51: PETSC_INTERN PetscErrorCode MatAXPY_SeqDense(Mat,PetscScalar,Mat,MatStructure);
52: PETSC_INTERN PetscErrorCode MatMultTransposeAdd_SeqDense(Mat,Vec,Vec,Vec);
53: PETSC_INTERN PetscErrorCode MatMultTranspose_SeqDense(Mat,Vec,Vec);
54: PETSC_INTERN PetscErrorCode MatMultAdd_SeqDense(Mat,Vec,Vec,Vec);
55: PETSC_INTERN PetscErrorCode MatMult_SeqDense(Mat,Vec,Vec);
56: PETSC_INTERN PetscErrorCode MatDuplicate_SeqDense(Mat,MatDuplicateOption,Mat*);
57: PETSC_INTERN PetscErrorCode MatSeqDenseSetPreallocation_SeqDense(Mat,PetscScalar*);
58: PETSC_INTERN PetscErrorCode MatCholeskyFactor_SeqDense(Mat,IS,const MatFactorInfo*);
59: PETSC_INTERN PetscErrorCode MatLUFactor_SeqDense(Mat,IS,IS,const MatFactorInfo*);
60: PETSC_INTERN PetscErrorCode MatCholeskyFactorSymbolic_SeqDense(Mat,Mat,IS,const MatFactorInfo*);
61: PETSC_INTERN PetscErrorCode MatLUFactorSymbolic_SeqDense(Mat,Mat,IS,IS,const MatFactorInfo*);
62: PETSC_INTERN PetscErrorCode MatSeqDenseSymmetrize_Private(Mat,PetscBool);
64: #if defined(PETSC_HAVE_CUDA)
65: PETSC_EXTERN PetscErrorCode MatSeqDenseCUDAInvertFactors_Private(Mat);
66: PETSC_INTERN PetscErrorCode MatConvert_SeqDenseCUDA_SeqDense(Mat,MatType,MatReuse,Mat*);
67: PETSC_INTERN PetscErrorCode MatConvert_SeqDense_SeqDenseCUDA(Mat,MatType,MatReuse,Mat*);
68: #endif
70: PETSC_INTERN PetscErrorCode MatDestroy_SeqDense_MatTransMatMult(Mat);
72: PETSC_INTERN PetscErrorCode MatMatMult_SeqAIJ_SeqDense(Mat,Mat,MatReuse,PetscReal,Mat*);
73: PETSC_INTERN PetscErrorCode MatMatMult_SeqBAIJ_SeqDense(Mat,Mat,MatReuse,PetscReal,Mat*);
74: PETSC_INTERN PetscErrorCode MatMatMult_SeqDense_SeqDense(Mat,Mat,MatReuse,PetscReal,Mat*);
75: PETSC_EXTERN PetscErrorCode MatSeqDenseInvertFactors_Private(Mat);
77: PETSC_INTERN PetscErrorCode MatCreateMPIMatConcatenateSeqMat_SeqDense(MPI_Comm,Mat,PetscInt,MatReuse,Mat*);
78: PETSC_INTERN PetscErrorCode MatCreateMPIMatConcatenateSeqMat_MPIDense(MPI_Comm,Mat,PetscInt,MatReuse,Mat*);
80: PETSC_INTERN PetscErrorCode MatLoad_Dense_HDF5(Mat,PetscViewer);
81: #endif