Actual source code: pbjacobi.h

  1: #pragma once

  3: #include <petsc/private/pcimpl.h>

  5: /*
  6:    Private context (data structure) for the PBJacobi preconditioner.
  7: */
  8: typedef struct {
  9:   const MatScalar *diag;
 10:   PetscInt         bs, mbs; /* block size (bs), and number of blocks (mbs) */
 11:   Mat              diagPB;  /* the matrix made of the diagonal blocks if some shell smatrix provided it; otherwise, NULL. Need to destroy it after use */
 12:   void            *spptr;   /* opaque pointer to a device data structure */
 13: } PC_PBJacobi;

 15: #if defined(PETSC_HAVE_CUDA)
 16: PETSC_INTERN PetscErrorCode PCSetUp_PBJacobi_CUDA(PC, Mat);
 17: #endif

 19: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
 20: PETSC_INTERN PetscErrorCode PCSetUp_PBJacobi_Kokkos(PC, Mat);
 21: #endif

 23: PETSC_INTERN PetscErrorCode PCSetUp_PBJacobi_Host(PC, Mat);
 24: PETSC_INTERN PetscErrorCode PCDestroy_PBJacobi(PC);