PetscSFCreateStridedSF#
Create an PetscSF to communicate interleaved blocks of data
Synopsis#
#include "petscsf.h"   
PetscErrorCode PetscSFCreateStridedSF(PetscSF sf, PetscInt bs, PetscInt ldr, PetscInt ldl, PetscSF *vsf)
Collective
Input Parameters#
- sf - star forest 
- bs - stride 
- ldr - leading dimension of root space 
- ldl - leading dimension of leaf space 
Output Parameter#
- vsf - the new - PetscSF
Notes#
This can be useful to perform communications on blocks of right-hand sides. For example, the calling sequence
  c_datatype *roots, *leaves;
  for i in [0,bs) do
    PetscSFBcastBegin(sf, mpi_datatype, roots + i*ldr, leaves + i*ldl, op)
    PetscSFBcastEnd(sf, mpi_datatype, roots + i*ldr, leaves + i*ldl, op)
is equivalent to
  c_datatype *roots, *leaves;
  PetscSFCreateStridedSF(sf, bs, ldr, ldl, &vsf)
  PetscSFBcastBegin(vsf, mpi_datatype, roots, leaves, op)
  PetscSFBcastEnd(vsf, mpi_datatype, roots, leaves, op)
Developer Notes#
Should this functionality be handled with a new API instead of creating a new object?
See Also#
Level#
intermediate
Location#
Examples#
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages