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