petsc-3.9.4 2018-09-11
Report Typos and Errors

PetscCopyMode

Determines how an array passed to certain functions is copied or retained

Synopsis

typedef enum { PETSC_COPY_VALUES, PETSC_OWN_POINTER, PETSC_USE_POINTER} PetscCopyMode;

  PETSC_COPY_VALUES - the array values are copied into new space, the user is free to reuse or delete the passed in array
  PETSC_OWN_POINTER - the array values are NOT copied, the object takes ownership of the array and will free it later, the user cannot change or
                      delete the array. The array MUST have been obtained with PetscMalloc(). Hence this mode cannot be used in Fortran.
  PETSC_USE_POINTER - the array values are NOT copied, the object uses the array but does NOT take ownership of the array. The user cannot use
the array but the user must delete the array after the object is destroyed.

Level

beginner

Location

include/petscsys.h

Examples

src/vec/vec/utils/tagger/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex8.c.html
src/vec/is/is/examples/tutorials/ex1.c.html
src/vec/is/is/examples/tutorials/ex3.c.html
src/vec/is/is/examples/tutorials/ex4.c.html
src/vec/is/is/examples/tutorials/ex5.c.html
src/vec/is/is/examples/tutorials/ex1f.F.html
src/vec/is/is/examples/tutorials/ex1f90.F90.html
src/vec/is/is/examples/tutorials/ex3f90.F90.html
src/vec/is/sf/examples/tutorials/ex1.c.html
src/vec/is/sf/examples/tutorials/ex2.c.html

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