petsc-3.11.4 2019-09-28
Report Typos and Errors

DMPlexPointGlobalRef

return read/write access to a point in global array

Synopsis

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

Input Arguments

dm - DM defining topological space
point - topological point
array - array to index into

Output Arguments

ptr -address of reference to point data, type generic so user can place in structure; returns NULL if global point is not owned

Note

A common usage when data sizes are known statically

 struct { PetscScalar foo,bar,baz; } *ptr;
 DMPlexPointGlobalRef(dm,point,array,&ptr);
 ptr->foo = 2; ptr->bar = 3; ptr->baz = 5;

See Also

DMGetSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRef(), DMPlexPointGlobalRead()

Level

intermediate

Location

src/dm/impls/plex/plexpoint.c
Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages