From ec50d69056458acf807c10b5bee5c3fcf8792ad3 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Thu, 1 Oct 2026 16:38:36 +0100 Subject: [PATCH] Add more bindings --- petsctools/cpetsc.pxd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/petsctools/cpetsc.pxd b/petsctools/cpetsc.pxd index c1fc2c6..7c787fc 100644 --- a/petsctools/cpetsc.pxd +++ b/petsctools/cpetsc.pxd @@ -2,6 +2,7 @@ # IMPORTANT: This file cannot be accessed if petsctools is installed in editable mode. +from mpi4py cimport libmpi as cmpi from petsc4py cimport PETSc as _PETSc # clearer aliases from petsc4py, so the names here match the C API @@ -53,6 +54,10 @@ cdef extern from "petscsf.h": PetscInt rank PetscInt index + PetscErrorCode PetscSFCreateSectionSF(PetscSF, PetscSection, PetscInt[], PetscSection, PetscSF*) + PetscErrorCode PetscSFBcastBegin(PetscSF,cmpi.MPI_Datatype,const void*, void*, cmpi.MPI_Op) + PetscErrorCode PetscSFBcastEnd(PetscSF,cmpi.MPI_Datatype,const void*, void*, cmpi.MPI_Op) + PetscErrorCode PetscSFDistributeSection(PetscSF,PetscSection,PetscInt*[],PetscSection) PetscErrorCode PetscSFGetGraph(PetscSF,PetscInt*,PetscInt*,const PetscInt**,const PetscSFNode**) PetscErrorCode PetscSFSetGraph(PetscSF,PetscInt,PetscInt,PetscInt*,PetscCopyMode,PetscSFNode*,PetscCopyMode)