#include "petscdmnetwork.h" PetscErrorCode DMNetworkGetGlobalVecOffset(DM dm,PetscInt p,PetscInt compnum,PetscInt *offsetg)Not Collective
dm | - the DMNetwork object | |
p | - the edge or vertex point | |
compnum | - component number; use ALL_COMPONENTS if no specific component is requested |
offsetg | - the global offset |
For vectors obtained with DMCreateGlobalVector() the offsets can be used with VecSetValues().
For vectors obtained with DMCreateGlobalVector() and the array obtained with VecGetArray(vec,&array) you can access or set the vector values with array[offset - rstart] where restart is obtained with VecGetOwnershipRange(v,&rstart,NULL);