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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMNetworkGetComponentTypeOffset.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMNetworkGetComponentTypeOffset</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/DM/DMNetworkGetComponentTypeOffset.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMNetworkGetComponentTypeOffset"><H1>DMNetworkGetComponentTypeOffset</H1></A>
Gets the type along with the offset for indexing the component value from the component data array
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdmnetwork.h"
PetscErrorCode DMNetworkGetComponentTypeOffset(DM dm,PetscInt p, PetscInt compnum, PetscInt *compkey, PetscInt *offset)
</PRE>
Not Collective
<P>
<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>dm </B></TD><TD>- The DMNetwork object
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>p </B></TD><TD>- vertex/edge point
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>compnum </B></TD><TD>- component number
</TD></TR></TABLE>
<H3><FONT COLOR="#CC3333">Output Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>compkey </B></TD><TD>- the key obtained when registering the component
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>offset </B></TD><TD>- offset into the component data array associated with the vertex/edge point
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<H3><FONT COLOR="#CC3333">Typical usage</FONT></H3>
<P>
<A HREF="../DM/DMNetworkGetComponentDataArray.html#DMNetworkGetComponentDataArray">DMNetworkGetComponentDataArray</A>(dm, &arr);
DMNetworkGetVertex/EdgeRange(dm,&Start,&End);
Loop over vertices or edges
<A HREF="../DM/DMNetworkGetNumComponents.html#DMNetworkGetNumComponents">DMNetworkGetNumComponents</A>(dm,v,&numcomps);
Loop over numcomps
<A HREF="../DM/DMNetworkGetComponentTypeOffset.html#DMNetworkGetComponentTypeOffset">DMNetworkGetComponentTypeOffset</A>(dm,v,compnum,&key,&offset);
compdata = (UserCompDataType)(arr+offset);
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DM/DMNetworkGetNumComponents.html#DMNetworkGetNumComponents">DMNetworkGetNumComponents</A>, <A HREF="../DM/DMNetworkGetComponentDataArray.html#DMNetworkGetComponentDataArray">DMNetworkGetComponentDataArray</A>,
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/dm/impls/network/network.c.html#DMNetworkGetComponentTypeOffset">src/dm/impls/network/network.c</A>
<BR><A HREF="./index.html">Index of all DM 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>
|