1*768de9afSRichard Tran Mills #include <petsc/private/fortranimpl.h> 2*768de9afSRichard Tran Mills #include <petscksp.h> 3*768de9afSRichard Tran Mills 4*768de9afSRichard Tran Mills #if defined(PETSC_HAVE_FORTRAN_CAPS) 5*768de9afSRichard Tran Mills #define pcgasmgetsubksp_ PCGASMGETSUBKSP 6*768de9afSRichard Tran Mills #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 7*768de9afSRichard Tran Mills #define pcgasmgetsubksp_ pcgasmgetsubksp 8*768de9afSRichard Tran Mills #endif 9*768de9afSRichard Tran Mills 10*768de9afSRichard Tran Mills PETSC_EXTERN void PETSC_STDCALL pcgasmgetsubksp_(PC *pc,PetscInt *n_local,PetscInt *first_local,KSP *ksp,PetscErrorCode *ierr) 11*768de9afSRichard Tran Mills { 12*768de9afSRichard Tran Mills KSP *tksp; 13*768de9afSRichard Tran Mills PetscInt i,nloc; 14*768de9afSRichard Tran Mills CHKFORTRANNULLINTEGER(n_local); 15*768de9afSRichard Tran Mills CHKFORTRANNULLINTEGER(first_local); 16*768de9afSRichard Tran Mills CHKFORTRANNULLOBJECT(ksp); 17*768de9afSRichard Tran Mills *ierr = PCGASMGetSubKSP(*pc,&nloc,first_local,&tksp); 18*768de9afSRichard Tran Mills if (n_local) *n_local = nloc; 19*768de9afSRichard Tran Mills if (ksp) { 20*768de9afSRichard Tran Mills for (i=0; i<nloc; i++) ksp[i] = tksp[i]; 21*768de9afSRichard Tran Mills } 22*768de9afSRichard Tran Mills } 23*768de9afSRichard Tran Mills 24*768de9afSRichard Tran Mills 25