PetscNew

Allocates memory of a particular type

Input Parameter

type -structure name of space to be allocated. Memory of size sizeof(type) is allocated

Output Parameter

result -memory allocated

Synopsis

int PetscNew(struct type,((type *))result)

See Also

PetscFree(), PetscMalloc()

Level:beginner
Location:
include/petsc.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/sles/examples/tutorials/ex15.c.html
src/snes/examples/tutorials/ex24.c.html