xref: /petsc/src/ksp/pc/impls/fieldsplit/ftn-custom/zfieldsplitf.c (revision 8cc058d9cd56c1ccb3be12a47760ddfc446aaffc)
11193e19dSBarry Smith #include <petsc-private/fortranimpl.h>
21193e19dSBarry Smith #include <petscksp.h>
31193e19dSBarry Smith 
41193e19dSBarry Smith #if defined(PETSC_HAVE_FORTRAN_CAPS)
51193e19dSBarry Smith #define pcfieldsplitgetsubksp_        PCFIELDSPLITGETSUBKSP
61193e19dSBarry Smith #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
71193e19dSBarry Smith #define pcfieldsplitgetsubksp_        pcfieldsplitgetsubksp
81193e19dSBarry Smith #endif
91193e19dSBarry Smith 
10*8cc058d9SJed Brown PETSC_EXTERN void PETSC_STDCALL pcfieldsplitgetsubksp_(PC *pc,PetscInt *n_local,KSP *ksp,PetscErrorCode *ierr)
111193e19dSBarry Smith {
121193e19dSBarry Smith   KSP      *tksp;
131193e19dSBarry Smith   PetscInt i,nloc;
141193e19dSBarry Smith   CHKFORTRANNULLINTEGER(n_local);
151193e19dSBarry Smith   *ierr = PCFieldSplitGetSubKSP(*pc,&nloc,&tksp); if (*ierr) return;
161193e19dSBarry Smith   if (n_local) *n_local = nloc;
171193e19dSBarry Smith   CHKFORTRANNULLOBJECT(ksp);
181193e19dSBarry Smith   if (ksp) {
192fa5cd67SKarl Rupp     for (i=0; i<nloc; i++) ksp[i] = tksp[i];
201193e19dSBarry Smith   }
211193e19dSBarry Smith }
221193e19dSBarry Smith 
23