petsc-3.7.1 2016-05-15
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 Many br

### Input Parameters

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

### Output Parameters

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

### Notes

### Typical usage

DMNetworkGetComponentDataArray(dm, &arr); Many brDMNetworkGetVertex/EdgeRange(dm,&Start,&End); Many brLoop over vertices or edges Many brDMNetworkGetNumComponents(dm,v,&numcomps); Many brLoop over numcomps Many brDMNetworkGetComponentTypeOffset(dm,v,compnum,&key,&offset); Many brcompdata = (UserCompDataType)(arr+offset); Many br

Many br

### 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