petsc-3.14.6 2021-03-30
Report Typos and Errors

DMPlexPointGlobalRead

return read access to a point in global array

Synopsis

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

Input Arguments

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

Output Arguments

ptr - address of read 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

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

See Also

DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRead(), DMPlexPointGlobalRef()

Level

intermediate

Location

src/dm/impls/plex/plexpoint.c

Examples

src/ts/tutorials/ex11.c.html

Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages