| bandwidth.c (c13ced23ecfee519e7f32cc04f5bdfe3fc432057) | bandwidth.c (ddc19b50a14f8f503cc416d4fb735ba65e2e35bb) |
|---|---|
| 1#include <petsc-private/matimpl.h> /*I "petscmat.h" I*/ 2 3#undef __FUNCT__ | 1#include <petsc-private/matimpl.h> /*I "petscmat.h" I*/ 2 3#undef __FUNCT__ |
| 4#define __FUNCT__ "MatCalcBandwidth" 5/*@C 6 MatCalcBandwidth - Calculate the full bandwidth of the matrix, meaning the width 2k+1 where k diagonals on either side are sufficient to contain all the matrix nonzeros. | 4#define __FUNCT__ "MatComputeBandwidth" 5/*@ 6 MatComputeBandwidth - Calculate the full bandwidth of the matrix, meaning the width 2k+1 where k diagonals on either side are sufficient to contain all the matrix nonzeros. |
| 7 8 Collective on Mat 9 10 Input Parameters: 11+ A - The Mat 12- fraction - An optional percentage of the Frobenius norm of the matrix that the bandwidth should enclose 13 14 Output Parameter: 15. bw - The matrix bandwidth 16 17 Level: beginner 18 19.seealso: DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart() 20@*/ | 7 8 Collective on Mat 9 10 Input Parameters: 11+ A - The Mat 12- fraction - An optional percentage of the Frobenius norm of the matrix that the bandwidth should enclose 13 14 Output Parameter: 15. bw - The matrix bandwidth 16 17 Level: beginner 18 19.seealso: DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart() 20@*/ |
| 21PetscErrorCode MatCalcBandwidth(Mat A, PetscReal fraction, PetscInt *bw) | 21PetscErrorCode MatComputeBandwidth(Mat A, PetscReal fraction, PetscInt *bw) |
| 22{ 23 PetscMPIInt lbw[2] = {0, 0}, gbw[2]; 24 PetscInt rStart, rEnd, r; 25 PetscErrorCode ierr; 26 27 PetscFunctionBegin; 28 PetscValidHeaderSpecific(A, MAT_CLASSID, 1); 29 PetscValidLogicalCollectiveReal(A,fraction,2); --- 18 unchanged lines hidden --- | 22{ 23 PetscMPIInt lbw[2] = {0, 0}, gbw[2]; 24 PetscInt rStart, rEnd, r; 25 PetscErrorCode ierr; 26 27 PetscFunctionBegin; 28 PetscValidHeaderSpecific(A, MAT_CLASSID, 1); 29 PetscValidLogicalCollectiveReal(A,fraction,2); --- 18 unchanged lines hidden --- |