1: #include <petsc/private/fortranimpl.h> 2: #include <petscmat.h> 3: #include <petscviewer.h> 5: #if defined(PETSC_HAVE_FORTRAN_CAPS) 6: #define matnullspacegetvecs_ MATNULLSPACEGETVECS 7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 8: #define matnullspacegetvecs_ matnullspacegetvecs 9: #endif 11: PETSC_EXTERN void matnullspacegetvecs_(MatNullSpace *sp, PetscBool *HAS_CNST, PetscInt *N, Vec *VECS, PetscErrorCode *ierr) 12: { 13: PetscBool has_cnst; 14: PetscInt i, n; 15: const Vec *vecs; 17: CHKFORTRANNULLBOOL(HAS_CNST); 18: CHKFORTRANNULLINTEGER(N); 19: CHKFORTRANNULLOBJECT(VECS); 21: *ierr = MatNullSpaceGetVecs(*sp, &has_cnst, &n, &vecs); 23: if (HAS_CNST) { *HAS_CNST = has_cnst; } 24: if (N) { *N = n; } 25: if (VECS) { 26: for (i = 0; i < n; i++) { VECS[i] = vecs[i]; } 27: } 28: }