petsc-3.7.3 2016-07-24
Report Typos and Errors

# DMNetworkGetComponentTypeOffset

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

### Synopsis

    #include "petscdmnetwork.h"
    PetscErrorCode DMNetworkGetComponentTypeOffset(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 DMNetworkGetComponentTypeOffset(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 DM routines
Table of Contents for all manual pages
Index of all manual pages