Date: 2025-03-28T21:10:55+00:00

Actual source code: zbjacobif.c

      1: #include <petsc/private/fortranimpl.h>
      2: #include <petscksp.h>

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define pcbjacobigetsubksp1_ PCBJACOBIGETSUBKSP1
      6:   #define pcbjacobigetsubksp2_ PCBJACOBIGETSUBKSP2
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define pcbjacobigetsubksp1_ pcbjacobigetsubksp1
      9:   #define pcbjacobigetsubksp2_ pcbjacobigetsubksp2
     10: #endif

     12: PETSC_EXTERN void pcbjacobigetsubksp1_(PC *pc, PetscInt *n_local, PetscInt *first_local, KSP *ksp, PetscErrorCode *ierr)
     13: {
     14:   KSP     *tksp;
     15:   PetscInt i, nloc;
     16:   CHKFORTRANNULLINTEGER(n_local);
     17:   CHKFORTRANNULLINTEGER(first_local);
     18:   *ierr = PCBJacobiGetSubKSP(*pc, &nloc, first_local, &tksp);
     19:   if (*ierr) return;
     20:   if (n_local) *n_local = nloc;
     21:   CHKFORTRANNULLOBJECT(ksp);
     22:   if (ksp) {
     23:     for (i = 0; i < nloc; i++) { ksp[i] = tksp[i]; }
     24:   }
     25: }
     26: PETSC_EXTERN void pcbjacobigetsubksp2_(PC *pc, PetscInt *n_local, PetscInt *first_local, KSP *ksp, PetscErrorCode *ierr)
     27: {
     28:   pcbjacobigetsubksp1_(pc, n_local, first_local, ksp, ierr);
     29: }