PetscObjectContainerCompose#
Creates a PetscContainer
, provides all of its values and composes it with a PetscObject
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscObjectContainerCompose(PetscObject obj, const char *name, void *pointer, PetscErrorCode (*destroy)(void *))
Collective
Input Parameters#
obj - the
PetscObject
name - the name for the composed container
pointer - the pointer to the data
destroy - the routine to destroy the container’s data; use
PetscContainerUserDestroyDefault()
if aPetscFree()
frees the data
Notes#
This allows one to attach any type of data (accessible through a pointer) with the
PetscObjectCompose()
function to a PetscObject
. The data item itself is attached by a
call to PetscContainerSetPointer()
.
See Also#
PetscContainerCreate()
, PetscContainerDestroy()
, PetscContainerSetPointer()
, PetscContainerGetPointer()
, PetscObjectCompose()
, PetscObjectQuery()
,
PetscContainerSetUserDestroy()
, PetscObject
, PetscObjectContainerQuery()
Level#
advanced
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages