petsc-3.7.1 2016-05-15
Report Typos and Errors

# DMPlexPointLocalRef

return read/write access to a point in local array

### Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexPointLocalRef(DM dm,PetscInt point,PetscScalar *array,void *ptr)

Not Collective Many br

### Input Arguments

| dm | - DM defining topological space Many br
| point | - topological point Many br
| array | - array to index into Many br

### Output Arguments

ptr -address of reference to point data, type generic so user can place in structure Many br

Many br

### Note

### A common usage when data sizes are known statically

     struct { PetscScalar foo,bar,baz; } *ptr;

     DMPlexPointLocalRef(dm,point,array,&ptr);

     ptr->foo = 2; ptr->bar = 3; ptr->baz = 5;

### See Also

DMGetDefaultSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

Level:intermediate
Location:src/dm/impls/plex/plexpoint.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ts/examples/tutorials/ex11.c.html