1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscHeaderCreate</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="PetscHeaderCreate"><H1>PetscHeaderCreate</H1></A>
Creates a PETSc object
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#define PetscHeaderCreate(h,tp,pops,cook,t,class_name,com,des,vie) \
(PetscNew(struct tp,&(h)) || \
PetscNew(PetscOps,&((h)->bops)) || \
PetscNew(pops,&((h)->ops)) || \
PetscHeaderCreate_Private((PetscObject)h,cook,t,class_name,com,(PetscObjectFunction)des,(PetscObjectViewerFunction)vie) || \
PetscLogObjectCreate(h))
/*@C
PetscHeaderDestroy - Final step in destroying a PetscObject
Input Parameters:
. h - the header created with PetscHeaderCreate()
.seealso: PetscHeaderCreate()
@*/
#define PetscHeaderDestroy(h) \
(PetscLogObjectDestroy((PetscObject)(h)) || \
PetscHeaderDestroy_Private((PetscObject)(h)) || \
PetscFree(h))
/* ---------------------------------------------------------------------------------------*/
#if !defined(PETSC_USE_DEBUG)
#define PetscValidHeaderSpecific(h,ck,arg)
#define PetscValidHeader(h,arg)
#define PetscValidPointer(h,arg)
#define PetscValidCharPointer(h,arg)
#define PetscValidIntPointer(h,arg)
#define PetscValidScalarPointer(h,arg)
#elif !defined(PETSC_HAVE_CRAY90_POINTER)
/*
Macros to test if a PETSc object is valid and if pointers are
valid
*/
#define PetscValidHeaderSpecific(h,ck,arg) \
</PRE>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>tp </B></TD><TD>- the data structure type of the object
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>pops </B></TD><TD>- the data structure type of the objects operations (for example VecOps)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cook </B></TD><TD>- the cookie associated with this object
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t </B></TD><TD>- type (no longer should be used)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>class_name </B></TD><TD>- string name of class; should be static
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>com </B></TD><TD>- the MPI Communicator
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>des </B></TD><TD>- the destroy routine for this object
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vie </B></TD><TD>- the view routine for this object
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>h </B> -the newly created object
<br>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Sys/PetscHeaderDestroy.html#PetscHeaderDestroy">PetscHeaderDestroy</A>(), <A HREF="../Profiling/PetscLogClassRegister.html#PetscLogClassRegister">PetscLogClassRegister</A>()
<BR>
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>developer
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../include/private/petscimpl.h.html#PetscHeaderCreate">include/private/petscimpl.h</A>
<BR><A HREF="./index.html">Index of all Sys routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|