xref: /petsc/src/mat/graphops/partition/ftn-custom/zpartitionf.c (revision b0dcfd164860a975c76f90dabf1036901aab1c4e)
18be712e4SBarry Smith #include <../src/mat/impls/adj/mpi/mpiadj.h>
2*6dd63270SBarry Smith #include <petsc/private/ftnimpl.h>
38be712e4SBarry Smith #include <petscmat.h>
48be712e4SBarry Smith 
58be712e4SBarry Smith #if defined(PETSC_HAVE_FORTRAN_CAPS)
68be712e4SBarry Smith   #define matpartitioningsetvertexweights_ MATPARTITIONINGSETVERTEXWEIGHTS
78be712e4SBarry Smith #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
88be712e4SBarry Smith   #define matpartitioningsetvertexweights_ matpartitioningsetvertexweights
98be712e4SBarry Smith #endif
108be712e4SBarry Smith 
matpartitioningsetvertexweights_NOTODAY(MatPartitioning * part,const PetscInt weights[],PetscErrorCode * ierr)11ce78bad3SBarry Smith PETSC_EXTERN void matpartitioningsetvertexweights_NOTODAY(MatPartitioning *part, const PetscInt weights[], PetscErrorCode *ierr)
128be712e4SBarry Smith {
138be712e4SBarry Smith   PetscInt  len;
148be712e4SBarry Smith   PetscInt *array;
15fb3cba25SSatish Balay   *ierr = MatGetLocalSize((*part)->adj, &len, NULL);
168be712e4SBarry Smith   if (*ierr) return;
178be712e4SBarry Smith   *ierr = PetscMalloc1(len, &array);
188be712e4SBarry Smith   if (*ierr) return;
198be712e4SBarry Smith   *ierr = PetscArraycpy(array, weights, len);
208be712e4SBarry Smith   if (*ierr) return;
218be712e4SBarry Smith   *ierr = MatPartitioningSetVertexWeights(*part, array);
228be712e4SBarry Smith }
23