Actual source code: vpbjacobi.h

  1: #pragma once

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

  5: /*
  6:    Private context (data structure) for the VPBJacobi preconditioner.
  7: */
  8: typedef struct {
  9:   PetscInt   nblocks, min_bs, max_bs; // Stats recorded during setup for viewing
 10:   MatScalar *diag;                    /* on host */
 11:   Mat        diagVPB;                 /* the matrix made of the diagonal blocks if some shell matrix provided it; otherwise, NULL. Need to destroy it after use */
 12:   void      *spptr;                   /* offload to devices */
 13: } PC_VPBJacobi;

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

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

 23: PETSC_INTERN PetscErrorCode PCSetUp_VPBJacobi_Host(PC, Mat);
 24: PETSC_INTERN PetscErrorCode PCDestroy_VPBJacobi(PC);