petsc-3.8.4 2018-03-24
Report Typos and Errors

DMNetworkGetComponentKeyOffset

Gets the type along with the offset for indexing the component value from the component data array

Synopsis

#include "petscdmnetwork.h"  
PetscErrorCode DMNetworkGetComponentKeyOffset(DM dm,PetscInt p, PetscInt compnum, PetscInt *compkey, PetscInt *offset)
Not Collective

Input Parameters

dm - The DMNetwork object
p - vertex/edge point
compnum - component number

Output Parameters

compkey - the key obtained when registering the component
offset - offset into the component data array associated with the vertex/edge point

Notes

Typical usage

DMNetworkGetComponentDataArray(dm, &arr); DMNetworkGetVertex/EdgeRange(dm,&Start,&End); Loop over vertices or edges DMNetworkGetNumComponents(dm,v,&numcomps); Loop over numcomps DMNetworkGetComponentKeyOffset(dm,v,compnum,&key,&offset); compdata = (UserCompDataType)(arr+offset);

See Also

DMNetworkGetNumComponents, DMNetworkGetComponentDataArray,

Level:intermediate
Location:
src/dm/impls/network/network.c
Index of all DMNetwork routines
Table of Contents for all manual pages
Index of all manual pages